Examples of InputDialog


Examples of org.eclipse.jface.dialogs.InputDialog

                                    String[] mapsetpathAndMapname = JGrassCatalogUtilities
                                            .getMapsetpathAndMapnameFromJGrassMapGeoResource(mr);
                                    String oldMapName = mapsetpathAndMapname[1];
                                    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.");
                                            msgBox.open();
View Full Code Here

Examples of org.eclipse.jface.dialogs.InputDialog

                Object firstElement = selection.getFirstElement();
                if (firstElement instanceof JGrassService) {
                    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();
                        mapsetName = null;
View Full Code Here

Examples of org.eclipse.jface.dialogs.InputDialog

     */
    protected String getNewInputObject() {
        if( prompt == null ){
            prompt = "Please enter:";
        }
        InputDialog dialog = new InputDialog( getShell(), "New "+getLabelText(), prompt, "", new IInputValidator(){
            public String isValid( String newText ) {
                if( newText == null || newText.length() == 0 ){
                    return "Action is required";
                }
                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

Examples of org.eclipse.jface.dialogs.InputDialog

    btnAdd.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
    btnAdd.setText(Messages.UniqueValuesDialog_AddButton);
    btnAdd.addSelectionListener(new SelectionAdapter(){
      @Override
      public void widgetSelected(SelectionEvent e) {
        InputDialog id = new InputDialog(getParentShell(), Messages.UniqueValuesDialog_AddValueDialogTitle, Messages.UniqueValuesDialog_AddValueDialogMessage, "0", new IInputValidator() { //$NON-NLS-1$
          @Override
          public String isValid(String newText) {
            try{
              Double.parseDouble(newText);
              return null;
            }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

Examples of org.metaworks.InputDialog

            }
          };
                 
          eventHandlerInputForm.setInstance(eventHandlerInstance);
       
          JDialog dialog=new InputDialog(eventHandlerInputForm, ProcessDesigner.getInstance()){
            //do not clear the form
            public void onSaveOK(Instance rec){
              getInputForm().onSaveOK(rec, this);
            }
          };
View Full Code Here

Examples of palmed.ui.InputDialog

            public void cancel()
            {
                display_.setCurrent( next );
            }
        };
        display_.setCurrent( new InputDialog( "Save in a new file", "Enter file name", listener ) );
    }
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.