當前位置: 首頁>>代碼示例>>Java>>正文


Java ProgressBar.setLayoutData方法代碼示例

本文整理匯總了Java中org.eclipse.swt.widgets.ProgressBar.setLayoutData方法的典型用法代碼示例。如果您正苦於以下問題:Java ProgressBar.setLayoutData方法的具體用法?Java ProgressBar.setLayoutData怎麽用?Java ProgressBar.setLayoutData使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.eclipse.swt.widgets.ProgressBar的用法示例。


在下文中一共展示了ProgressBar.setLayoutData方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createBarComp

import org.eclipse.swt.widgets.ProgressBar; //導入方法依賴的package包/類
private void createBarComp(Composite parent) {
	Composite barComp = new Composite(parent, SWT.NONE);
	GridLayout barLayout = new GridLayout();
	barLayout.marginTop = 10;
	barComp.setLayout(barLayout);
	barComp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
	
	label4 = new Label(barComp, SWT.NONE);
	label4.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
	
	bar = new ProgressBar(barComp, SWT.NONE);
	bar.setMaximum(10);
	bar.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
	
	setVisible(false);
}
 
開發者ID:heartsome,項目名稱:translationstudio8,代碼行數:17,代碼來源:LicenseManageDialog.java

示例2: StageProgressBar

import org.eclipse.swt.widgets.ProgressBar; //導入方法依賴的package包/類
public StageProgressBar( final Composite parent, int style, GridData gridData ) {
    serverPush = new ServerPushSession();

    Composite mainComposite = new Composite(parent, SWT.NONE);
    mainComposite.setLayoutData(gridData);
    mainComposite.setLayout(new GridLayout(2, false));
    this.mainComposite = mainComposite;
    progressLabel = new Label(mainComposite, SWT.NONE);
    progressLabel.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
    progressLabel.setText("");

    progressBar = new ProgressBar(mainComposite, style);
    pBarGridData = new GridData(SWT.FILL, SWT.FILL, true, false);
    progressBar.setLayoutData(pBarGridData);

    mainComposite.setVisible(false);
}
 
開發者ID:moovida,項目名稱:STAGE,代碼行數:18,代碼來源:StageProgressBar.java

示例3: fill

import org.eclipse.swt.widgets.ProgressBar; //導入方法依賴的package包/類
public void fill(Composite parent) {
	super.fill(parent);
	Composite container = new Composite(parent, SWT.NONE);
	GridLayout gl = new GridLayout(2, false);
	gl.marginWidth = 5;
	gl.marginHeight = 3;
	container.setLayout(gl);

	progressBar = new ProgressBar(container, SWT.SMOOTH);
	GridData gdPprogressBar = new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1);
	gdPprogressBar.heightHint = 16;
	gdPprogressBar.widthHint = 130;
	progressBar.setLayoutData(gdPprogressBar);
	progressBar.setMinimum(0); // 最小值
	progressBar.setMaximum(100);// 最大值
	progressBar.setSelection(progressValue);
	progressBar.setToolTipText(defaultMessage);

	label = new Label(container, SWT.None);
	label.setText(progressValue + "%");

	StatusLineLayoutData data = new StatusLineLayoutData();
	container.setLayoutData(data);
}
 
開發者ID:heartsome,項目名稱:tmxeditor8,代碼行數:25,代碼來源:XLIFFEditorStatusLineItemWithProgressBar.java

示例4: createBarComp

import org.eclipse.swt.widgets.ProgressBar; //導入方法依賴的package包/類
private void createBarComp(Composite parent) {
	Composite barComp = new Composite(parent, SWT.NONE);
	GridLayout barLayout = new GridLayout();
	barLayout.marginTop = 10;
	barComp.setLayout(barLayout);
	barComp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

	label4 = new Label(barComp, SWT.NONE);
	label4.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

	bar = new ProgressBar(barComp, SWT.NONE);
	bar.setMaximum(10);
	bar.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

	setVisible(false);
}
 
開發者ID:heartsome,項目名稱:tmxeditor8,代碼行數:17,代碼來源:LicenseManageDialog.java

示例5: createControl

import org.eclipse.swt.widgets.ProgressBar; //導入方法依賴的package包/類
@Override
public void createControl(Composite parent) {
	Composite container = GUIHelper.createComposite(parent, 1);
	setControl(container);

	txtLogConsole = GUIHelper.createText(container, new GridData(GridData.FILL_BOTH),
			SWT.MULTI | SWT.BORDER | SWT.WRAP | SWT.V_SCROLL);

	progressBar = new ProgressBar(container, SWT.SMOOTH | SWT.HORIZONTAL);
	progressBar.setSelection(0);
	progressBar.setMaximum(100);

	GridData progressGd = new GridData(GridData.FILL_HORIZONTAL);
	progressGd.heightHint = 40;
	progressBar.setLayoutData(progressGd);
}
 
開發者ID:Pardus-LiderAhenk,項目名稱:lider-ahenk-installer,代碼行數:17,代碼來源:XmppInstallationStatus.java

示例6: createControl

import org.eclipse.swt.widgets.ProgressBar; //導入方法依賴的package包/類
@Override
public void createControl(Composite parent) {
	Composite container = GUIHelper.createComposite(parent, 1);
	setControl(container);

	txtLogConsole = GUIHelper.createText(container, new GridData(GridData.FILL_BOTH),
			SWT.MULTI | SWT.BORDER | SWT.WRAP | SWT.V_SCROLL);
	txtLogConsole.setTopIndex(txtLogConsole.getLineCount() - 1);

	progressBar = new ProgressBar(container, SWT.SMOOTH | SWT.INDETERMINATE);
	progressBar.setSelection(0);
	progressBar.setMaximum(100);
	GridData progressGd = new GridData(GridData.FILL_HORIZONTAL);
	progressGd.heightHint = 40;
	// progressGd.widthHint = 780;
	progressBar.setLayoutData(progressGd);
}
 
開發者ID:Pardus-LiderAhenk,項目名稱:lider-ahenk-installer,代碼行數:18,代碼來源:DatabaseClusterInstallationStatus.java

示例7: createControl

import org.eclipse.swt.widgets.ProgressBar; //導入方法依賴的package包/類
@Override
public void createControl(Composite parent) {
	Composite container = GUIHelper.createComposite(parent, 1);
	setControl(container);

	txtLogConsole = GUIHelper.createText(container, new GridData(GridData.FILL_BOTH),
			SWT.MULTI | SWT.BORDER | SWT.WRAP | SWT.V_SCROLL);
	txtLogConsole.setTopIndex(txtLogConsole.getLineCount() - 1);

	progressBar = new ProgressBar(container, SWT.SMOOTH | SWT.INDETERMINATE);
	progressBar.setSelection(0);
	progressBar.setMaximum(100);
	GridData progressGd = new GridData(GridData.FILL_HORIZONTAL);
	progressGd.heightHint = 40;
	// progressGd.widthHint = 780;
	progressBar.setLayoutData(progressGd);

}
 
開發者ID:Pardus-LiderAhenk,項目名稱:lider-ahenk-installer,代碼行數:19,代碼來源:XmppClusterInstallationStatus.java

示例8: createControl

import org.eclipse.swt.widgets.ProgressBar; //導入方法依賴的package包/類
@Override
public void createControl(Composite parent) {
	Composite container = GUIHelper.createComposite(parent, 1);
	setControl(container);

	txtLogConsole = GUIHelper.createText(container, new GridData(GridData.FILL_BOTH),
			SWT.MULTI | SWT.BORDER | SWT.WRAP | SWT.V_SCROLL);

	progressBar = new ProgressBar(container, SWT.SMOOTH | SWT.HORIZONTAL);
	progressBar.setSelection(0);
	progressBar.setMaximum(100);
	GridData progressGd = new GridData(GridData.FILL_HORIZONTAL);
	progressGd.heightHint = 40;
	// progressGd.widthHint = 780;
	progressBar.setLayoutData(progressGd);
}
 
開發者ID:Pardus-LiderAhenk,項目名稱:lider-ahenk-installer,代碼行數:17,代碼來源:LiderInstallationStatus.java

示例9: createControl

import org.eclipse.swt.widgets.ProgressBar; //導入方法依賴的package包/類
@Override
public void createControl(Composite parent) {
	mainContainer = GUIHelper.createComposite(parent, 1);
	setControl(mainContainer);

	txtLogConsole = GUIHelper.createText(mainContainer, new GridData(GridData.FILL_BOTH),
			SWT.MULTI | SWT.BORDER | SWT.WRAP | SWT.V_SCROLL);

	progressBar = new ProgressBar(mainContainer, SWT.SMOOTH | SWT.HORIZONTAL);
	progressBar.setSelection(0);
	progressBar.setMaximum(100);

	GridData progressGd = new GridData(GridData.FILL_HORIZONTAL);
	progressGd.heightHint = 40;
	progressBar.setLayoutData(progressGd);
}
 
開發者ID:Pardus-LiderAhenk,項目名稱:lider-ahenk-installer,代碼行數:17,代碼來源:MigrationStatusPage.java

示例10: createContents

import org.eclipse.swt.widgets.ProgressBar; //導入方法依賴的package包/類
/**
 * Create contents of the dialog.
 */
private void createContents() {
    shlLoading = new Shell(getParent(), getStyle());
    shlLoading.setSize(274, 157);
    shlLoading.setText("Loading");
    GridLayout gl_shlLoading = new GridLayout(1, false);
    gl_shlLoading.marginWidth = 20;
    gl_shlLoading.marginHeight = 20;
    shlLoading.setLayout(gl_shlLoading);
    
    ProgressBar progressBar = new ProgressBar(shlLoading, SWT.BORDER | SWT.SMOOTH | SWT.INDETERMINATE);
    GridData gd_progressBar = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);
    gd_progressBar.heightHint = 39;
    progressBar.setLayoutData(gd_progressBar);
    
    Label lblLoading = new Label(shlLoading, SWT.NONE);
    GridData gd_lblLoading = new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1);
    gd_lblLoading.verticalIndent = 10;
    lblLoading.setLayoutData(gd_lblLoading);
    lblLoading.setText("Connecting andorid device...");

    shlLoading.pack();
    SwtUtils.center(shlLoading, 10);
}
 
開發者ID:lrscp,項目名稱:ControlAndroidDeviceFromPC,代碼行數:27,代碼來源:WelcomDialog.java

示例11: initialize

import org.eclipse.swt.widgets.ProgressBar; //導入方法依賴的package包/類
protected void initialize() {
	Label label0 = new Label (this, SWT.NONE);
	label0.setText ("Please choose an element to import into a sequence's step:");
	
	GridData data = new GridData ();
	data.horizontalAlignment = GridData.FILL;
	data.verticalAlignment = GridData.FILL;
	data.grabExcessHorizontalSpace = true;
	data.grabExcessVerticalSpace = true;
	data.heightHint = 200;
	list = new List(this, SWT.BORDER | SWT.V_SCROLL);
	list.setLayoutData (data);

       GridData gridData2 = new GridData();
	gridData2.horizontalSpan = 2;
	gridData2.verticalAlignment = GridData.CENTER;
	gridData2.horizontalAlignment = GridData.FILL;
	labelProgression = new Label(this, SWT.NONE);
	labelProgression.setText("Progression");
	labelProgression.setLayoutData(gridData2);
	
       GridData gridData4 = new GridData();
	gridData4.horizontalSpan = 2;
	gridData4.verticalAlignment = GridData.CENTER;
	gridData4.horizontalAlignment = GridData.FILL;
       progressBar = new ProgressBar(this, SWT.NONE);
       //progressBar.setBounds(new Rectangle(16, 349, 571, 17));
       progressBar.setLayoutData(gridData4);
       
	GridLayout gridLayout = new GridLayout();
	setLayout(gridLayout);
	setSize(new Point(408, 251));
}
 
開發者ID:convertigo,項目名稱:convertigo-eclipse,代碼行數:34,代碼來源:SchemaObjectsDialogComposite.java

示例12: initialize

import org.eclipse.swt.widgets.ProgressBar; //導入方法依賴的package包/類
protected void initialize() {
	Label label0 = new Label (this, SWT.NONE);
	label0.setText ("Please enter the XML structure to import into a sequence's step:");
	
	GridData data = new GridData ();
	data.horizontalAlignment = GridData.FILL;
	data.verticalAlignment = GridData.FILL;
	data.grabExcessHorizontalSpace = true;
	data.grabExcessVerticalSpace = true;
	data.heightHint = 200;
	xml = new Text(this, SWT.BORDER | SWT.V_SCROLL);
	xml.setLayoutData (data);

       GridData gridData2 = new GridData();
	gridData2.horizontalSpan = 2;
	gridData2.verticalAlignment = GridData.CENTER;
	gridData2.horizontalAlignment = GridData.FILL;
	labelProgression = new Label(this, SWT.NONE);
	labelProgression.setText("Progression");
	labelProgression.setLayoutData(gridData2);
	
       GridData gridData4 = new GridData();
	gridData4.horizontalSpan = 2;
	gridData4.verticalAlignment = GridData.CENTER;
	gridData4.horizontalAlignment = GridData.FILL;
       progressBar = new ProgressBar(this, SWT.NONE);
       //progressBar.setBounds(new Rectangle(16, 349, 571, 17));
       progressBar.setLayoutData(gridData4);
       
	GridLayout gridLayout = new GridLayout();
	setLayout(gridLayout);
	setSize(new Point(408, 251));
}
 
開發者ID:convertigo,項目名稱:convertigo-eclipse,代碼行數:34,代碼來源:XmlStructureDialogComposite.java

示例13: createDialogArea

import org.eclipse.swt.widgets.ProgressBar; //導入方法依賴的package包/類
private Control createDialogArea(Composite shell) {
       GridLayout layout = new GridLayout();
	layout.numColumns = 1;
	shell.setLayout(layout);

	lblStep = new Label(shell, SWT.NONE);
	lblStep.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
	lblStep.setText("Step 1 / 999");

	lblMessage = new Label(shell, SWT.NONE);
	lblMessage.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
	lblMessage.setText("Idle");

	pbProg = new ProgressBar(shell, SWT.SMOOTH | SWT.INDETERMINATE);
	pbProg.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
	pbProg.setMaximum(1000);
	pbProg.setSelection(0);
	pbProg.setSelection(256);

	final Label lblSeparator = new Label(shell, SWT.SEPARATOR | SWT.HORIZONTAL);
	lblSeparator.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));

	txtLog = new Text(shell, SWT.MULTI
	          | SWT.BORDER
	          | SWT.H_SCROLL
	          | SWT.V_SCROLL);
	txtLog.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
	txtLog.setEditable(false);
	txtLog.setBackground(new Color(shell.getDisplay(), 10,10,10));
	txtLog.setForeground(new Color(shell.getDisplay(), 200,200,200));

	shell.layout();

	return shell;
}
 
開發者ID:aserg-ufmg,項目名稱:RefDiff,代碼行數:36,代碼來源:ProgressBarDialog.java

示例14: createProgressBar

import org.eclipse.swt.widgets.ProgressBar; //導入方法依賴的package包/類
/**
 * Create the progress bar and apply any style bits from style.
 *
 * @param style
 */
void createProgressBar(int style) {

	FormData buttonData = new FormData();
	buttonData.top = new FormAttachment(progressLabel, 0);
	buttonData.right = new FormAttachment(100,
			IDialogConstants.HORIZONTAL_SPACING * -1);

	actionBar.setLayoutData(buttonData);

	progressBar = new ProgressBar(this, SWT.HORIZONTAL | style);
	FormData barData = new FormData();
	barData.top = new FormAttachment(actionBar,
			IDialogConstants.VERTICAL_SPACING, SWT.TOP);
	barData.left = new FormAttachment(progressLabel, 0, SWT.LEFT);
	barData.right = new FormAttachment(actionBar,
			IDialogConstants.HORIZONTAL_SPACING * -1);
	barData.height = MAX_PROGRESS_HEIGHT;
	barData.width = 0;// default is too large
	progressBar.setLayoutData(barData);

	if (taskEntries.size() > 0) {
		// Reattach the link label if there is one
		FormData linkData = new FormData();
		linkData.top = new FormAttachment(progressBar,
				IDialogConstants.VERTICAL_SPACING);
		linkData.left = new FormAttachment(progressBar, 0, SWT.LEFT);
		linkData.right = new FormAttachment(progressBar, 0, SWT.RIGHT);
		// Give an initial value so as to constrain the link shortening
		linkData.width = 20;

		taskEntries.get(0).setLayoutData(linkData);
	}
}
 
開發者ID:termsuite,項目名稱:termsuite-ui,代碼行數:39,代碼來源:ProgressInfoItem.java

示例15: 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


注:本文中的org.eclipse.swt.widgets.ProgressBar.setLayoutData方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。