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


Java ProgressBar.setMaximum方法代码示例

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


在下文中一共展示了ProgressBar.setMaximum方法的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: 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

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

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

示例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);
	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

示例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,代码行数:19,代码来源:XmppClusterInstallationStatus.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);

	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

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

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

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

示例11: createContents

import org.eclipse.swt.widgets.ProgressBar; //导入方法依赖的package包/类
protected void createContents() {
	this.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
	this.setLayout(new GridLayout());		
	Composite composite = this;

	taskNameLabel = new CLabel(composite, SWT.NONE);
	taskNameLabel.setImage(processImage);
	taskNameLabel.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
	taskNameLabel.setText(taskName);

	subTaskLabel = new CLabel(composite, SWT.NONE);
	subTaskLabel.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
	subTaskLabel.setText("");

	progressBarComposite = new Composite(this, SWT.NONE);
	progressBarComposite.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false));
	progressBarComposite.setLayout(new FillLayout());

	progressBar = new ProgressBar(progressBarComposite, progressBarStyle);
	progressBar.setMaximum(0);
	
	detailLabel = new CLabel(this, SWT.NONE);
	detailLabel.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false));

	cancelComposite = new Composite(this, SWT.NONE);
	cancelComposite.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
	final GridLayout gridLayout_1 = new GridLayout();
	gridLayout_1.numColumns = 2;
	cancelComposite.setLayout(gridLayout_1);

	cancelButton = new Button(cancelComposite, SWT.NONE);

	cancelButton.setLayoutData(new GridData(78, SWT.DEFAULT));
	cancelButton.setText("Cancel");
}
 
开发者ID:Transkribus,项目名称:TranskribusSwtGui,代码行数:36,代码来源:ProgressBarComposite.java

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

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

示例14: addProgressBar

import org.eclipse.swt.widgets.ProgressBar; //导入方法依赖的package包/类
private static void addProgressBar(int index, String key, int count) {
    Table table = tableViewerCase.getTable();
    TableItem ti = table.getItem(index);
    ProgressBar bar = new ProgressBar(table, SWT.HORIZONTAL | SWT.SMOOTH);
    bar.setSelection(0);
    bar.setMinimum(0);
    bar.setMaximum(count);
    TableEditor tabEditor = new TableEditor(table);
    tabEditor.grabHorizontal = editor.grabVertical = true;
    tabEditor.setEditor(bar, ti, 3);

    htProgress.put(key, bar);
}
 
开发者ID:hoozheng,项目名称:AndroidRobot,代码行数:14,代码来源:AndroidRobot.java

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


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