Java Code Examples for org.eclipse.swt.widgets.ProgressBar#setMaximum()
The following examples show how to use
org.eclipse.swt.widgets.ProgressBar#setMaximum() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LicenseManageDialog.java From translationstudio8 with GNU General Public License v2.0 | 6 votes |
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); }
Example 2
Source File: XLIFFEditorStatusLineItemWithProgressBar.java From tmxeditor8 with GNU General Public License v2.0 | 6 votes |
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); }
Example 3
Source File: LicenseManageDialog.java From tmxeditor8 with GNU General Public License v2.0 | 6 votes |
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); }
Example 4
Source File: MessageArea.java From nebula with Eclipse Public License 2.0 | 5 votes |
/** * Create a progress bar */ private void createProgressBar() { progressBar = new ProgressBar(composite, SWT.SMOOTH | SWT.HORIZONTAL); progressBar.setMinimum(progressBarMinimumValue); progressBar.setMaximum(progressBarMaximumValue); progressBar.setSelection(progressBarValue); final GridData gd = new GridData(GridData.FILL, GridData.FILL, true, false, 1, 1); progressBar.setLayoutData(gd); }
Example 5
Source File: ExcelExportProgessBar.java From translationstudio8 with GNU General Public License v2.0 | 5 votes |
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(); }
Example 6
Source File: ExcelExportProgessBar.java From tmxeditor8 with GNU General Public License v2.0 | 5 votes |
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(); }
Example 7
Source File: SimulationPage.java From olca-app with Mozilla Public License 2.0 | 5 votes |
private void createProgressSection(FormToolkit toolkit, Composite body) { progressSection = UI.section(body, toolkit, M.Progress); Composite composite = UI.sectionClient(progressSection, toolkit); progressBar = new ProgressBar(composite, SWT.SMOOTH); progressBar.setMaximum(editor.setup.numberOfRuns); UI.gridData(progressBar, false, false).widthHint = 470; Button progressButton = toolkit.createButton(composite, M.Start, SWT.NONE); UI.gridData(progressButton, false, false).widthHint = 70; new SimulationControl(progressButton, editor, this); }
Example 8
Source File: SplashScreen.java From ldparteditor with MIT License | 4 votes |
@Override protected Control createContents(final Composite parent) { final Color bgColor = SWTResourceManager.getColor(SWT.COLOR_WHITE); final Composite frame = new Composite(parent, SWT.NONE); final FormData titleData = new FormData(); final FormData statusData = new FormData(); final FormLayout layout = new FormLayout(); final Label titleLabel = new Label(frame, SWT.NONE); final Label statusLabel = new Label(frame, SWT.NONE); final ProgressBar bar = new ProgressBar(frame, SWT.NONE); final FormData barData = new FormData(); bar.setMaximum(100); titleLabel.setText(Version.getApplicationName() + " " + Version.getVersion() + "\n" + Version.getStage() + "\n(C) " + Version.getDevelopmentLead()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ titleLabel.setBackground(bgColor); bar.setBackground(bgColor); statusLabel.setBackground(bgColor); frame.setLayout(layout); frame.setBackgroundImage(ResourceManager.getImage("imgSplash.png")); //$NON-NLS-1$ barData.left = new FormAttachment(15, 5); barData.right = new FormAttachment(100, -5); barData.bottom = new FormAttachment(100, -5); bar.setLayoutData(barData); titleData.left = new FormAttachment(45, 5); titleData.right = new FormAttachment(100, 0); titleData.top = new FormAttachment(50, 0); titleLabel.setLayoutData(titleData); statusData.left = new FormAttachment(15, 5); statusData.right = new FormAttachment(100, 0); statusData.top = new FormAttachment(80, 0); statusLabel.setLayoutData(statusData); this.bar = bar; this.label = statusLabel; return frame; }