Package org.eclipse.jface.dialogs

Examples of org.eclipse.jface.dialogs.InputDialog.open()


                                    String mapsetName = mapsetpathAndMapname[0];
                                    try {
                                        InputDialog iDialog = new InputDialog(Display.getDefault().getActiveShell(),
                                                "New map name", "Please enter the new name for the map: " + oldMapName, "new_"
                                                        + oldMapName, null);
                                        iDialog.open();
                                        String newMapName = iDialog.getValue();
                                        if (newMapName.indexOf(' ') != -1) {
                                            MessageBox msgBox = new MessageBox(Display.getDefault().getActiveShell(),
                                                    SWT.ICON_ERROR);
                                            msgBox.setMessage("Map names can't contain spaces. Please choose a name without spaces.");
View Full Code Here


                    final JGrassService jgrassService = (JGrassService) firstElement;
                    URL identifier = jgrassService.getIdentifier();
                    String locationPath = URLUtils.urlToFile(identifier).getAbsolutePath();
                    InputDialog iDialog = new InputDialog(Display.getDefault().getActiveShell(), "New mapset name",
                            "Please enter the name for the new mapset to create.", "newmapset", null);
                    iDialog.open();
                    String mapsetName = iDialog.getValue();
                    if (mapsetName.indexOf(' ') != -1) {
                        MessageBox msgBox = new MessageBox(Display.getDefault().getActiveShell(), SWT.ICON_ERROR);
                        msgBox.setMessage("Mapset names can't contain spaces. Please choose a name without spaces.");
                        msgBox.open();
View Full Code Here

                }
                return null;
            }
        });
       
        int sucess = dialog.open();
        if( sucess == InputDialog.CANCEL ){
            return null; // we may have to produce a default value here
        }
        return dialog.getValue();
    }
View Full Code Here

            }catch(Exception ex){
              return Messages.UniqueValuesDialog_InvalidNumberText;
            }
          }
        });
        if (id.open() == InputDialog.OK){
          Double d = Double.valueOf(id.getValue());
          uniqueValues.add(d);
          lstViewer.refresh();
        }
      }
View Full Code Here

      }
    };
    InputDialog dialog= new InputDialog(fTextEditor.getSite().getShell(), title, message, proposal, inputValidator);

    String label= null;
    if (dialog.open() != Window.CANCEL)
      label= dialog.getValue();

    if (label == null)
      return false;
View Full Code Here

        initialValue= encodingSupport.getDefaultEncoding();
      if (initialValue == null)
        initialValue= ""; //$NON-NLS-1$

      InputDialog d= new InputDialog(editor.getSite().getShell(), title, message, initialValue, inputValidator);
      if (d.open() == Window.OK)
        encodingSupport.setEncoding(d.getValue());
    }
  }

View Full Code Here

      }
    };
    InputDialog dialog= new InputDialog(getTextEditor().getSite().getShell(), title, message, proposal, inputValidator);

    String label= null;
    if (dialog.open() != Window.CANCEL)
      label= dialog.getValue();

    if (label == null)
      return false;
View Full Code Here

                InputDialog dialog = new InputDialog(getShell(),
                        RENAME_DEVICE_TITLE, RENAME_DEVICE_MESSAGE,
                        oldName, validator);
                dialog.setBlockOnOpen(true);
                int result = dialog.open();

                // Return the entered name if the dialog was completed
                // successfully.
                String newName = null;
                if (result == Dialog.OK) {
View Full Code Here

                        new DeviceHierarchyLabelProvider());

                // set the title for the dialog
                dialog.setTitle(SELECT_DEVICE_TITLE);
                // display the dialog
                dialog.open();
                // retrieve the selected device
                Object[] result = dialog.getResult();
                // if the result is null then the user pressed the cancel
                // button. However, if it is non null then a selection will
                // have been made and the result array should contain 1
View Full Code Here

    shell.setText("Change value of feature");
    Type range = featTreeNode.getFeature().getRange();
    IInputValidator validator = new ChangeFeatureValidator(range);
    InputDialog dialog = new InputDialog(getShell(), "Define new feature value",
            "New feature value:", "", validator);
    if (dialog.open() == Window.OK) {
      featTreeNode.setValue(dialog.getValue());
      treeView.refresh();
      return;
    }
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.