當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。