当前位置: 首页>>代码示例>>Java>>正文


Java ProgressBar.setBounds方法代码示例

本文整理汇总了Java中org.eclipse.swt.widgets.ProgressBar.setBounds方法的典型用法代码示例。如果您正苦于以下问题:Java ProgressBar.setBounds方法的具体用法?Java ProgressBar.setBounds怎么用?Java ProgressBar.setBounds使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.swt.widgets.ProgressBar的用法示例。


在下文中一共展示了ProgressBar.setBounds方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createContents

import org.eclipse.swt.widgets.ProgressBar; //导入方法依赖的package包/类
/**
 * Create contents of the dialog.
 */
private void createContents() {
	shell.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
	shell.setSize(450, 146);
	windowLocation.dialogLocation(getParent(), shell);
	progressBar = new ProgressBar(shell, SWT.NONE);
	progressBar.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
	progressBar.setBounds(10, 10, 424, 17);
	progressBar.setMaximum(100);
	
	label = new Label(shell, SWT.NONE);
	label.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
	label.setAlignment(SWT.CENTER);
	label.setBounds(10, 33, 424, 43);
	
	Button btnNewButton = new Button(shell, SWT.NONE);
	btnNewButton.addSelectionListener(new SelectionAdapter() {
		@Override
		public void widgetSelected(SelectionEvent e) {
			
			actionWhenOKButtonSelected();
			b.ba.progressMessage = "";
			b.ba.progressValue = 0;
			if(b.ba.progressBugStop){
				b.ba.progressBugStop = false;
			}
			doing.stop();
			dispose();
		}
	});
	btnNewButton.setBounds(359, 82, 75, 25);
	btnNewButton.setText("\u786E\u5B9A");

}
 
开发者ID:piiiiq,项目名称:Black,代码行数:37,代码来源:showProgress.java

示例2: Splash

import org.eclipse.swt.widgets.ProgressBar; //导入方法依赖的package包/类
public Splash(Display display, Rectangle displayRect, boolean showProgress)  {
	image = new Image(display, getClass().getResourceAsStream("/splash.png"));
	shell = new Shell(SWT.ON_TOP);
	progressUI    = new ProgressBar(shell, SWT.NONE);
	progressUI.setMaximum(100);
	
	Label label = new Label(shell, SWT.NONE);
	label.setImage(image);

	FormLayout layout = new FormLayout();
	shell.setLayout(layout);

	FormData labelData = new FormData();
	labelData.right = new FormAttachment(100, 0);
	labelData.bottom = new FormAttachment(100, 0);
	label.setLayoutData(labelData);

	FormData progressData = new FormData();
	progressData.left = new FormAttachment(0, -5);
	progressData.right = new FormAttachment(100, 0);
	progressData.bottom = new FormAttachment(100, 0);
	progressUI.setLayoutData(progressData);
	progressUI.setVisible(showProgress);
	shell.pack();

	Rectangle splashRect = shell.getBounds();

	progressUI.setBounds(2, splashRect.height-14, splashRect.width-6, 10);

	int x = displayRect.x + (displayRect.width - splashRect.width) / 2;
	int y = displayRect.y + (displayRect.height - splashRect.height) / 2;
	shell.setLocation(x, y);
	
	shell.open();		
	setProgress(0);
}
 
开发者ID:arisona,项目名称:ether,代码行数:37,代码来源:Splash.java

示例3: createContents

import org.eclipse.swt.widgets.ProgressBar; //导入方法依赖的package包/类
/**
 * Create contents of the dialog.
 */
private void createContents() {
	shell = new Shell(getParent(), getStyle());
	shell.setSize(445, 135);
	shell.setText("\u8BF7\u7B49\u5F85");
	
	progressBar = new ProgressBar(shell, SWT.HORIZONTAL|SWT.SMOOTH|SWT.INDETERMINATE);
	progressBar.setBounds(40, 29, 364, 32);

}
 
开发者ID:hu9029,项目名称:org.code.quickGeneratingForSSM,代码行数:13,代码来源:PbDialog.java

示例4: ProgressBarWindow

import org.eclipse.swt.widgets.ProgressBar; //导入方法依赖的package包/类
public ProgressBarWindow(Shell shell, String title){
       m_shell = new Shell(shell, SWT.TITLE);
       m_shell.setText(title);
       m_shell.setLayout(new FillLayout());
       int [] pos = UIUtil.getScreenSize();
       m_shell.setBounds((pos[0]/2)-75, (pos[1]/2)-15, 150, 40);
       
       m_progressBar = new ProgressBar(m_shell, SWT.HORIZONTAL);
	m_progressBar.setMinimum(0);
	m_progressBar.setMaximum(100);
	m_progressBar.setBounds(0, 0, 140, 20);

	m_progressBar.setState(SWT.ERROR);
       m_shell.open();
}
 
开发者ID:scouter-project,项目名称:scouter,代码行数:16,代码来源:ProgressBarWindow.java

示例5: open

import org.eclipse.swt.widgets.ProgressBar; //导入方法依赖的package包/类
public void open(int minValue, int maxValue) {
	childShell = new Shell(shell.getDisplay(), SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
	childShell.setText("Exporting to Excel.. please wait");

	progressBar = new ProgressBar(childShell, SWT.SMOOTH);
	progressBar.setMinimum(minValue);
	progressBar.setMaximum(maxValue);
	progressBar.setBounds(0, 0, 400, 25);
	progressBar.setFocus();

	childShell.pack();
	childShell.open();
}
 
开发者ID:heartsome,项目名称:translationstudio8,代码行数:14,代码来源:ExcelExportProgessBar.java

示例6: buildAndDisplay

import org.eclipse.swt.widgets.ProgressBar; //导入方法依赖的package包/类
/**
 * Build and display the progress bar
 */
public void buildAndDisplay()
{
    addAboveBar();

    bar = new ProgressBar(shell, barStyle);
    bar.setBounds(20, 10, MULTIPLIER, 15);

    addBelowBar();

    shell.open();

    bar.setMaximum(MULTIPLIER);
}
 
开发者ID:cogtool,项目名称:cogtool,代码行数:17,代码来源:SimpleProgressBar.java

示例7: createControls

import org.eclipse.swt.widgets.ProgressBar; //导入方法依赖的package包/类
@PostConstruct
public void createControls(Composite parent) {
  progressBar = new ProgressBar(parent, SWT.SMOOTH);
  progressBar.setBounds(100, 10, 200, 20);
}
 
开发者ID:cplutte,项目名称:bts,代码行数:6,代码来源:StatusBarToolControl.java


注:本文中的org.eclipse.swt.widgets.ProgressBar.setBounds方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。