Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.ProgressBar


        // if a SummaryRowLayer is in the layer stack, we need to ensure that
        // the values are calculated
        layer.doCommand(new CalculateSummaryRowValuesCommand());

        ProgressBar progressBar = null;

        if (shell != null) {
            Shell childShell = new Shell(shell.getDisplay(), SWT.DIALOG_TRIM
                    | SWT.APPLICATION_MODAL);
            childShell.setText(Messages.getString("NatExporter.exporting")); //$NON-NLS-1$

            int startRow = 0;
            int endRow = layer.getRowCount() - 1;

            progressBar = new ProgressBar(childShell, SWT.SMOOTH);
            progressBar.setMinimum(startRow);
            progressBar.setMaximum(endRow);
            progressBar.setBounds(0, 0, 400, 25);
            progressBar.setFocus();

            childShell.pack();
            childShell.open();
        }

        try {
            exporter.exportLayerBegin(outputStream, layerName);

            for (int rowPosition = 0; rowPosition < layer.getRowCount(); rowPosition++) {
                exporter.exportRowBegin(outputStream, rowPosition);
                if (progressBar != null) {
                    progressBar.setSelection(rowPosition);
                }

                for (int columnPosition = 0; columnPosition < layer
                        .getColumnCount(); columnPosition++) {
                    ILayerCell cell = layer.getCellByPosition(columnPosition,
                            rowPosition);

                    IExportFormatter exportFormatter = configRegistry
                            .getConfigAttribute(
                                    ExportConfigAttributes.EXPORT_FORMATTER,
                                    cell.getDisplayMode(), cell
                                            .getConfigLabels().getLabels());
                    Object exportDisplayValue = exportFormatter
                            .formatForExport(cell, configRegistry);

                    exporter.exportCell(outputStream, exportDisplayValue, cell,
                            configRegistry);
                }

                exporter.exportRowEnd(outputStream, rowPosition);
            }

            exporter.exportLayerEnd(outputStream, layerName);
        } catch (Exception e) {
            e.printStackTrace(System.err);
        }

        // These must be fired at the end of the thread execution
        layer.setClientAreaProvider(originalClientAreaProvider);
        layer.doCommand(new TurnViewportOnCommand());

        if (progressBar != null) {
            Shell childShell = progressBar.getShell();
            progressBar.dispose();
            childShell.dispose();
        }
    }
View Full Code Here


    //townDistanceRemaining = Map.distanceToTown();
    lblDistanceRemaining = new Label(this, SWT.NONE);
    lblDistanceRemaining.setBounds(121, 266, 108, 15);
    lblDistanceRemaining.setText("Distance Remaining:");
   
    townProgressBar = new ProgressBar(this, SWT.NONE);
    townProgressBar.setMaximum(World.getMap().totalDistanceToTown());
    townProgressBar.setBounds(10, 189, 430, 18);
   
    gameDistanceRemaining = totalGameDistance - World.getWagon().getDistance();
    lblGameDistanceRemaining = new Label(this, SWT.NONE);
    lblGameDistanceRemaining.setBounds(235, 266, 49, 13);
    lblGameDistanceRemaining.setText(Integer.toString(gameDistanceRemaining));
   
    gameProgressBar = new ProgressBar(this, SWT.NONE);
    gameProgressBar.setBounds(10, 242, 430, 18);
    gameProgressBar.setMaximum(totalGameDistance);

   
    canvas = new Canvas(this, SWT.NONE);
View Full Code Here

   
    Label lblUploading = new Label(composite, SWT.NONE);
    lblUploading.setFont(SWTResourceManager.getFont("Lucida Grande", 10, SWT.NORMAL));
    lblUploading.setText("Uploading:");
   
    ProgressBar progressBar = new ProgressBar(composite, SWT.NONE);
    progressBar.setSelection(50);
    GridData gd_progressBar = new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1);
    gd_progressBar.heightHint = 20;
    progressBar.setLayoutData(gd_progressBar);
    progressBar.setBounds(0, 0, 140, 14);
    for (DropTargetAdapter adapter : dropTargetAdapters)
    {
      dropTarget.addDropListener(adapter);
    }
   
View Full Code Here

      }
    });
      this.imageViewer.setContentProvider(imageContentProvider);
      this.imageViewer.setLabelProvider(imageContentProvider);
           
      this.progressBar = new ProgressBar(container, SWT.BORDER | SWT.SMOOTH | SWT.HORIZONTAL | SWT.INDETERMINATE);
      this.progressBar.setLayoutData(new GridData(SWT.FILL, SWT.BOTTOM, true, true, 3, 1));
     
      container.pack();
     
      this.progressBar.setVisible(false);
View Full Code Here

      } else if (control.equals("List")) {
        List list = new List(layoutComposite, SWT.BORDER);
        list.setItems(itemValues);
        children[i] = list;
      } else if (control.equals("ProgressBar")) {
        ProgressBar progress = new ProgressBar(layoutComposite, SWT.NONE);
        progress.setSelection(50);
        children[i] = progress;
      } else if (control.equals("Scale")) {
        Scale scale = new Scale(layoutComposite, SWT.NONE);
        children[i] = scale;
      } else if (control.equals("Slider")) {
View Full Code Here

        }
      });
    }
    if (statusBar) {
      status = new Label(parent, SWT.NONE);
      progressBar = new ProgressBar(parent, SWT.NONE);

      data = new FormData();
      data.left = new FormAttachment(0, 5);
      data.right = new FormAttachment(progressBar, 0, SWT.DEFAULT);
      data.bottom = new FormAttachment(100, -5);
View Full Code Here

      style |= SWT.BORDER;
    if (indeterminateButton.getSelection())
      style |= SWT.INDETERMINATE;

    /* Create the example widgets */
    progressBar1 = new ProgressBar(progressBarGroup, style);
  }
View Full Code Here

      messageLabel = new Label(shell, SWT.HORIZONTAL);
      messageLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL));
      messageLabel.setText(FileViewer.getResourceString("progressDialog." + operationKeyName[style]
          + ".description"));

      progressBar = new ProgressBar(shell, SWT.HORIZONTAL | SWT.WRAP);
      progressBar.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL));
      progressBar.setMinimum(0);
      progressBar.setMaximum(0);

      detailLabel = new Label(shell, SWT.HORIZONTAL);
View Full Code Here

    shell.setLayout(gridLayout);
   
    button = new Button(shell, SWT.BORDER);
    button.setText("Start to count");   
   
    progressBar = new ProgressBar(shell, SWT.SMOOTH);
    progressBar.setMinimum(0);
    progressBar.setMaximum(10);
   
   
    final Thread countThread = new Thread(){
View Full Code Here

               
            }
        });

//      Progress Bar for Tab5
      progressBar2 = new ProgressBar(composite_dl_pb,SWT.BORDER);
      progressBar2.setMaximum(100);
      progressBar2.setMinimum(0);
      progressBar2.setSelection(0);
      progressBar2.setVisible(false);
       
View Full Code Here

TOP

Related Classes of org.eclipse.swt.widgets.ProgressBar

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.