Package org.eclipse.jface.dialogs

Examples of org.eclipse.jface.dialogs.Dialog


  }

  public void run(IAction action) {
    if (fEditor instanceof ITextEditor) {
      final ITextEditor editor = (ITextEditor) fEditor;
      Dialog cleanupDialog = new CleanupDialogXML(editor.getSite().getShell());
      if (cleanupDialog.open() == Window.OK) {
        // setup runnable
        Runnable runnable = new Runnable() {
          public void run() {
            IStructuredCleanupProcessor cleanupProcessor = getCleanupProcessor();
            if (cleanupProcessor != null) {
View Full Code Here


            transfer(dest, JDBC_FILE_NAME, dialog);
            transfer(dest, CONFIG_FILE_NAME, dialog);

            if(needUserCopy) {
              while(!requiredPluginDir.exists()) {
                Dialog dialog2 = new Dialog(shell) {
                  protected Control createDialogArea(Composite parent) {
                    Control comp;
                      try {
                      Browser browser = new Browser(parent, SWT.NONE);

                        String mainMessage = String.format(Messages.GetHTMLCopyPluginMsg,finalNewPlugin.getParentFile().getAbsolutePath(), finalNewPlugin.getAbsolutePath(), pluginsDir.getAbsolutePath());
                    browser.setText(mainMessage);
                    browser.addLocationListener(new LocationListener() {
                     
                      @Override
                      public void changing(LocationEvent event) {
                        event.doit = false;
                        org.eclipse.swt.program.Program.launch(event.location);                       
                      }
                     
                      @Override
                      public void changed(LocationEvent event) {
                      }
                    });
                    comp = browser;
                      } catch (SWTError e) {
                      Text text = new Text(parent, SWT.MULTI
                          | SWT.READ_ONLY | SWT.WRAP | SWT.BORDER
                          | SWT.SHADOW_IN);

                      String mainMessage = String.format(Messages.GetDriverMsg,finalNewPlugin.getAbsolutePath(), pluginsDir.getAbsolutePath());
                      text.setText(mainMessage);
                      comp = text;
                      }
                      GridDataFactory.fillDefaults().hint(500, 200).applyTo(comp);

                      return comp;
                  };
                  @Override
                  protected Button createButton(Composite parent,
                      int id, String label, boolean defaultButton) {
                    Button button = super.createButton(parent, id,label, defaultButton);
                    if (id == Window.OK) button.setText("Restart");
 
                    return button;
                  }
                };
               
                if(dialog2.open() == Window.CANCEL) return;
              }
            }
           
            String cmd = buildCommandLine(shell);
            if (cmd != null) {
View Full Code Here

    private IResourcesSelector active;
    private List<DataStore> selectedLayers;

    public void open( Shell parentShell, final int selectionType ) {

        Dialog dialog = new Dialog(parentShell){

            @Override
            protected void configureShell( Shell shell ) {
                super.configureShell(shell);
                shell.setText("Select vector map"); //$NON-NLS-1$
            }

            @Override
            protected Point getInitialSize() {
                return new Point(280, 380);
            }

            @Override
            protected Control createDialogArea( Composite parent ) {

                parentPanel = (Composite) super.createDialogArea(parent);
                GridLayout gLayout = (GridLayout) parentPanel.getLayout();

                gLayout.numColumns = 1;

                active = new FeatureLayerTreeViewer(parentPanel, SWT.BORDER, selectionType);

                makeCheckPanel();

                return parentPanel;
            }

            @Override
            protected void buttonPressed( int buttonId ) {
                if (buttonId == OK) {
                    Object tmp = null;
                    try {
                        tmp = ((List) active.getSelectedLayers()).get(0);
                    } catch (Exception e) {
                        e.printStackTrace();
                        selectedLayers = null;
                    }
                    if (tmp instanceof DataStore) {
                        selectedLayers = (List<DataStore>) active.getSelectedLayers();
                    } else if (tmp instanceof UDIGSimpleFeatureStore) {
                        List l = (List) active.getSelectedLayers();
                        List<DataStore> ll = new ArrayList<DataStore>();
                        for( Object object : l ) {
                            UDIGSimpleFeatureStore internal = (UDIGSimpleFeatureStore) object;
                            ll.add(internal.getDataStore());
                        }
                        selectedLayers = ll;
                    }
                } else {
                    selectedLayers = null;
                }
                super.buttonPressed(buttonId);
            }

        };
        dialog.setBlockOnOpen(true);
        dialog.open();
    }
View Full Code Here

    public void open( Shell parentShell ) {
        try {
            setRequireContinue(false);

            Dialog dialog = new Dialog(parentShell){

                @Override
                protected void configureShell( Shell shell ) {
                    super.configureShell(shell);
                    shell.setText("Select mapset"); //$NON-NLS-1$
                }

                @Override
                protected Point getInitialSize() {
                    return new Point(250, 250);
                }

                @Override
                protected Control createDialogArea( Composite parent ) {
                    Composite parentPanel = (Composite) super.createDialogArea(parent);
                    GridLayout gLayout = (GridLayout) parentPanel.getLayout();

                    gLayout.numColumns = 1;

                    active = new CatalogJGrassMapsetsTreeViewer(parentPanel, SWT.BORDER, SWT.SINGLE);

                    return parentPanel;
                }

                @Override
                protected void buttonPressed( int buttonId ) {
                    super.buttonPressed(buttonId);
                    if (buttonId == OK) {
                        newLayers = active.getSelectedLayers();
                    } else {
                        newLayers = null;
                    }
                    setRequireContinue(true);
                }

            };

            dialog.setBlockOnOpen(true);
            dialog.open();
           
            while( !isContinueRequired() ) {
                if (dialog.getShell().isDisposed()) {
                    break;
                }

                if (Display.getCurrent().readAndDispatch()) {
                    continue;
View Full Code Here

        this.mapsetPath = mapsetPath;
    }

    public void open( Shell parentShell, final int selectionType ) {

        dialog = new Dialog(parentShell){

            @Override
            protected void configureShell( Shell shell ) {
                super.configureShell(shell);
                shell.setText(Messages.getString("JGRasterChooserDialog.chooseraster")); //$NON-NLS-1$
View Full Code Here

                try {
                    blackboardLock.lock();
                    if (dirtyAreas.get(layer) == null)
                        return;

                    dialog = new Dialog(Display.getCurrent().getActiveShell()){
                        private final int UPDATE = 1;
                        private final int CLEAR = 2;
                        private final int IGNORE = 3;

                        public Control createDialogArea( Composite parent ) {
View Full Code Here

            ProjectUIPlugin.log(null, e);

        }
        display.asyncExec(new Runnable(){
            public void run() {
                Dialog d=new SummaryDialog(display.getActiveShell(), Messages.MultiTargetOp_resource_summary,
                        data);
                d.setBlockOnOpen(true);
                d.open();
            }
        });
    }
View Full Code Here

            ProjectUIPlugin.log(null, e);

        }
        display.asyncExec(new Runnable(){
            public void run() {
                Dialog d=new SummaryDialog(display.getActiveShell(), Messages.MultiTargetOp_resource_summary,
                        data);
                d.setBlockOnOpen(true);
                d.open();
            }
        });
    }
View Full Code Here

    viewer.setInput(descriptorList.toArray());
    viewer.addDoubleClickListener(new IDoubleClickListener() {
      public void doubleClick(DoubleClickEvent event) {
        IWizardContainer container = getContainer();
        if (container instanceof Dialog) {
          Dialog d = (Dialog) container;
          Button button = findButton(d.buttonBar,
              IDialogConstants.NEXT_ID);
          if (button != null)
            button.notifyListeners(SWT.Selection, new Event());
        }
View Full Code Here

            multi.add(status);
        }

        PlatformGIS.syncInDisplayThread(new Runnable(){
            public void run() {
                Dialog dialog = new ErrorDialog(Display.getDefault().getActiveShell(), Messages.ErrorManager_very_informative_error,
                        m, multi, IStatus.ERROR);
                dialog.open();
            }
        });
    }
View Full Code Here

TOP

Related Classes of org.eclipse.jface.dialogs.Dialog

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.