本文整理匯總了Java中org.eclipse.swt.widgets.ProgressBar類的典型用法代碼示例。如果您正苦於以下問題:Java ProgressBar類的具體用法?Java ProgressBar怎麽用?Java ProgressBar使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
ProgressBar類屬於org.eclipse.swt.widgets包,在下文中一共展示了ProgressBar類的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);
}
示例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);
}
示例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);
}
示例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);
}
示例5: ProgressUpdater
import org.eclipse.swt.widgets.ProgressBar; //導入依賴的package包/類
/*******************************************************
* Creates a {@link ProgressUpdater} to encapsulate the updating of
* graph view progress bar and progress label, doing this operation on the
* UI thread.
*
* @param progBar
* The graph view's progress bar
* @param label
* The graph view's progress label
*******************************************************/
public ProgressUpdater(final ProgressBar progBar, final Label label)
{
if (progBar == null || label == null)
{
throw new IllegalArgumentException();
}
mProgressBar = progBar;
mProgressLabel = label;
mDisplay = mProgressBar.getDisplay();
mVisible = false;
mProgressValue = 0;
mProgressText = "";
}
示例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);
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);
}
示例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,代碼行數:18,代碼來源:DatabaseClusterInstallationStatus.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);
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);
}
示例9: 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);
}
示例10: 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);
}
示例11: removeOldTestcase
import org.eclipse.swt.widgets.ProgressBar; //導入依賴的package包/類
public static void removeOldTestcase() {
Table table = tableViewerCase.getTable();
TableItem[] tableItems = table.getItems();
for (int i = 0; i < tableItems.length; i++) {
String sn = tableItems[i].getText(0);
String handset = tableItems[i].getText(1);
String scripts = tableItems[i].getText(2);
RowItem rowItem = htRowItem.get(sn + "." + handset + "." + scripts);
if (rowItem != null) {
htRowItem.remove(sn + "." + handset + "." + scripts);
listCase.remove(rowItem);
ProgressBar bar = htProgress.get(sn + "." + handset + "." + scripts);
bar.dispose();
htProgress.remove(sn + "." + handset + "." + scripts);
}
}
tableViewerCase.refresh(false);
}
示例12: 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);
}
示例13: 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));
}
示例14: 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));
}
示例15: LongRunningOperation
import org.eclipse.swt.widgets.ProgressBar; //導入依賴的package包/類
public LongRunningOperation(Display display, ProgressBar progressBar,
Button button) {
this.display = display;
this.progressBar = progressBar;
this.parentShell = progressBar.getShell();
this.button = button;
}