List of usage examples for org.eclipse.jface.dialogs ProgressIndicator ProgressIndicator
public ProgressIndicator(Composite parent, int style)
From source file:com.bdaum.zoom.report.internal.wizards.ReportComponent.java
License:Open Source License
public ReportComponent(Composite parent, int style, int preview) { super(parent, style); this.preview = preview; setLayout(new FillLayout()); stack = new Composite(this, SWT.NONE); stackLayout = new StackLayout(); stack.setLayout(stackLayout);/* ww w . j ava 2s . co m*/ chartComposite = new ChartComposite(stack, SWT.NONE, null, preview == Integer.MAX_VALUE, preview == Integer.MAX_VALUE, preview == Integer.MAX_VALUE, preview == Integer.MAX_VALUE, preview == Integer.MAX_VALUE); chartComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); pendingComp = new Composite(stack, SWT.NONE); pendingComp.setLayout(new GridLayout(1, false)); Label label = new Label(pendingComp, SWT.NONE); label.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, true)); label.setText(Messages.ReportPage_pending); if (preview == Integer.MAX_VALUE) { progressBar = new ProgressIndicator(pendingComp, SWT.BORDER); GridData data = new GridData(SWT.FILL, SWT.BEGINNING, true, false); data.heightHint = PROGRESS_THICKNESS; progressBar.setLayoutData(data); } stackLayout.topControl = pendingComp; }
From source file:com.bdaum.zoom.ui.internal.views.AbstractPresentationView.java
License:Open Source License
@Override public void createPartControl(Composite parent) { Composite composite = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.verticalSpacing = 0;/*ww w . j a va 2 s .co m*/ layout.marginHeight = 0; layout.marginLeft = 0; composite.setLayout(layout); canvas = new ZPSWTCanvas(composite, SWT.NONE); canvas.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); canvas.setInteractingRenderQuality(PPaintContext.HIGH_QUALITY_RENDERING); setCanvasCursor(null, SWT.CURSOR_APPSTARTING); surfaceBounds = computeSurfaceSize(canvas.getDisplay().getPrimaryMonitor().getBounds()); surface = PSWTPath.createRectangle(surfaceBounds.x, surfaceBounds.y, surfaceBounds.width, surfaceBounds.height); canvas.getLayer().addChild(surface); canvas.addMouseListener(new MouseAdapter() { @Override public void mouseDown(MouseEvent e) { mouseDown = true; mouseButton = e.button; mouseX = lastMouseX = e.x; mouseY = e.y; setCursorForObject(e, CURSOR_GRABBING, CURSOR_MPLUS, CURSOR_MPLUS); } @Override public void mouseUp(MouseEvent e) { mouseX = e.x; mouseY = e.y; mouseDown = false; setCursorForObject(e, CURSOR_OPEN_HAND, CURSOR_OPEN_HAND, CURSOR_OPEN_HAND); } }); canvas.addMouseMoveListener(new MouseMoveListener() { public void mouseMove(MouseEvent e) { mouseX = e.x; mouseY = e.y; if (mouseDown) { e.button = mouseButton; setCursorForObject(e, mouseButton > 1 ? CURSOR_OPEN_HAND : CURSOR_GRABBING, CURSOR_MPLUS, CURSOR_MMINUS); } else setCursorForObject(e, CURSOR_OPEN_HAND, CURSOR_OPEN_HAND, CURSOR_OPEN_HAND); } }); progressBar = new ProgressIndicator(composite, SWT.BORDER); GridData data = new GridData(SWT.FILL, SWT.BEGINNING, true, false); data.heightHint = PROGRESS_THICKNESS; progressBar.setLayoutData(data); addKeyListener(); getSite().getWorkbenchWindow().getWorkbench().getOperationSupport().getOperationHistory() .addOperationHistoryListener(new IOperationHistoryListener() { public void historyNotification(OperationHistoryEvent event) { refresh(); } }); }
From source file:com.maccasoft.composer.Main.java
License:Open Source License
void createStatusBar(Composite parent) { Composite container = new Composite(parent, SWT.NONE); GridData layoutData = new GridData(SWT.FILL, SWT.CENTER, true, false); layoutData.heightHint = 27;/*from w w w. j a v a 2 s . co m*/ container.setLayoutData(layoutData); Label messageLabel = new Label(container, SWT.NONE); layoutData = new GridData(SWT.FILL, SWT.CENTER, true, true); messageLabel.setLayoutData(layoutData); Label label = new Label(container, SWT.SEPARATOR); layoutData = new GridData(SWT.FILL, SWT.CENTER, false, true); label.setLayoutData(layoutData); portLabel = new Label(container, SWT.NONE); layoutData = new GridData(SWT.FILL, SWT.CENTER, false, true); layoutData.widthHint = 128; portLabel.setLayoutData(layoutData); label = new Label(container, SWT.SEPARATOR); layoutData = new GridData(SWT.FILL, SWT.CENTER, false, true); label.setLayoutData(layoutData); progressBar = new ProgressIndicator(container, SWT.HORIZONTAL); layoutData = new GridData(SWT.FILL, SWT.CENTER, false, true); layoutData.widthHint = 128; progressBar.setLayoutData(layoutData); container.setLayout(new GridLayout(container.getChildren().length, false)); }
From source file:net.bhl.cdt.paxelerate.util.toOpenCDT.ProgressHandler.java
License:Open Source License
/** * Instantiates a new progress handler.//from ww w . ja v a 2 s .co m * * @param max * the max */ public ProgressHandler(int max) { current = 0; display = new Display(); shell = new Shell(display); shell.setLayout(new GridLayout()); shell.setSize(500, 100); shell.setText("Boarding Simulation - Preparations in Progress."); indicator = new ProgressIndicator(shell, SWT.HORIZONTAL); indicator.setLayoutData(new GridData(SWT.FILL, SWT.NONE, true, false)); indicator.setBackground(shell.getDisplay().getSystemColor(SWT.COLOR_CYAN)); label = new Label(shell, SWT.NONE); label.setText("The boarding paths for the passengers are being calculated ..."); shell.open(); Dimension dimension = Toolkit.getDefaultToolkit().getScreenSize(); int x = (int) ((dimension.getWidth() - shell.getSize().x) / 2); int y = (int) ((dimension.getHeight() - shell.getSize().y) / 2); shell.setLocation(x, y); indicator.beginTask(max); indicator.showNormal(); }
From source file:net.tourbook.export.gpx.DialogExportTour.java
License:Open Source License
private void createUI30Progress(final Composite parent) { final int selectedTours = _tourDataList.size(); // hide progress bar when only one tour is exported if (selectedTours < 2) { return;/*from w ww .j av a 2 s. c o m*/ } // container final Composite container = new Composite(parent, SWT.NONE); GridDataFactory.fillDefaults().grab(true, false).indent(0, VERTICAL_SECTION_MARGIN).applyTo(container); GridLayoutFactory.swtDefaults().margins(10, 5).numColumns(1).applyTo(container); { /* * progress indicator */ _progressIndicator = new ProgressIndicator(container, SWT.NONE); GridDataFactory.fillDefaults().grab(true, false).applyTo(_progressIndicator); /* * label: exported filename */ _lblExportedFilePath = new ImageComboLabel(container, SWT.NONE); GridDataFactory.fillDefaults().grab(true, false).applyTo(_lblExportedFilePath); } }
From source file:net.tourbook.printing.DialogPrintTour.java
License:Open Source License
private void createUIProgress(final Composite parent) { final int selectedTours = _tourDataList.size(); // hide progress bar when only one tour is printed if (selectedTours < 2) { return;/*from www . ja va2 s.com*/ } // container final Composite container = new Composite(parent, SWT.NONE); GridDataFactory.fillDefaults().grab(true, false).indent(0, VERTICAL_SECTION_MARGIN).applyTo(container); GridLayoutFactory.swtDefaults().margins(10, 5).numColumns(1).applyTo(container); { /* * progress indicator */ _progressIndicator = new ProgressIndicator(container, SWT.NONE); GridDataFactory.fillDefaults().grab(true, false).applyTo(_progressIndicator); /* * label: printed filename */ _lblPrintFilePath = new ImageComboLabel(container, SWT.NONE); GridDataFactory.fillDefaults().grab(true, false).applyTo(_lblPrintFilePath); } }
From source file:org.eclipse.jface.snippets.dialogs.Snippet059VistaProgressIndicator.java
License:Open Source License
public static void main(String[] args) { Display display = new Display(); Shell shell = new Shell(display); shell.setLayout(new GridLayout()); shell.setSize(300, 100);//from w w w .ja v a 2 s . c o m new Label(shell, SWT.CENTER).setText("Snippet059VistaProgressIndicator"); ProgressIndicator indicator = new ProgressIndicator(shell, SWT.HORIZONTAL); Color backgroundColor = shell.getDisplay().getSystemColor(SWT.COLOR_CYAN); indicator.setLayoutData(new GridData(SWT.FILL, SWT.NONE, true, false)); indicator.setBackground(backgroundColor); shell.open(); performProgressOn(display, indicator); indicator.done(); display.dispose(); }
From source file:org.zend.core.notifications.internal.ui.progress.ProgressNotification.java
License:Open Source License
@Override protected void createBody(Composite container) { Composite composite = new Composite(container, SWT.NONE); composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 3, 1)); GridLayout layout = new GridLayout(1, true); layout.horizontalSpacing = layout.verticalSpacing = 2; composite.setLayout(layout);/*from ww w . java 2 s .com*/ message = new Label(composite, SWT.WRAP); message.setFont(Fonts.DEFAULT.getFont()); message.setLayoutData(new GridData(GridData.FILL_BOTH)); message.setForeground(Display.getDefault().getSystemColor(SWT.COLOR_BLACK)); if (settings.getMessage() != null) { message.setText(settings.getMessage()); message.setVisible(false); } indicator = new ProgressIndicator(composite, SWT.NONE); indicator.setLayoutData(new GridData(SWT.FILL, SWT.BOTTOM, true, false)); }