Package org.eclipse.jface.dialogs

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


                        "New Image Type",
                        "Enter the image type",
                        str,
                        null
         );
         int result = dialog.open();        
         if(result == Window.OK){
            str = dialog.getValue();
         }
         if( "image/".equals( str )){
             return null; // nothing to add
View Full Code Here


            public void widgetSelected( SelectionEvent e ) {
                String newStyleName = Messages.PolygonPropertiesEditor_18;
                InputDialog iDialog = new InputDialog(saveAllButton.getShell(), Messages.PolygonPropertiesEditor_19,
                        Messages.PolygonPropertiesEditor_20, newStyleName, null);
                iDialog.setBlockOnOpen(true);
                int open = iDialog.open();
                if (open == SWT.CANCEL) {
                    return;
                }
                String name = iDialog.getValue();
                if (name == null || name.length() == 0) {
View Full Code Here

            public void widgetSelected( SelectionEvent e ) {
                String newStyleName = Messages.PointPropertiesEditor_18;
                InputDialog iDialog = new InputDialog(saveAllButton.getShell(), Messages.PointPropertiesEditor_19,
                        Messages.PointPropertiesEditor_20, newStyleName, null);
                iDialog.setBlockOnOpen(true);
                int open = iDialog.open();
                if (open == SWT.CANCEL) {
                    return;
                }
                String name = iDialog.getValue();
                if (name == null || name.length() == 0) {
View Full Code Here

            public void widgetSelected( SelectionEvent e ) {
                String newStyleName = Messages.LinePropertiesEditor_18;
                InputDialog iDialog = new InputDialog(saveAllButton.getShell(), Messages.LinePropertiesEditor_19,
                        Messages.LinePropertiesEditor_20, newStyleName, null);
                iDialog.setBlockOnOpen(true);
                int open = iDialog.open();
                if (open == SWT.CANCEL) {
                    return;
                }
                String name = iDialog.getValue();
                if (name == null || name.length() == 0) {
View Full Code Here

      new IInputValidator(){
        public String isValid(String name) {
          return name.length() > 2 ? name : null;
        }     
    });   
    if( prompt.open() == Window.OK ){
      return prompt.getValue();
    }
    return null; // user pressed cancel   
  }
}
View Full Code Here

        @Override
        protected String getNewInputObject() {
            String str = null;
            InputDialog dialog = new InputDialog(Display.getCurrent().getActiveShell(),
                    Messages.TileSet_dialog_new_title, Messages.TileSet_dialog_new_desc, str, null);
            int result = dialog.open();
            if (result == Window.OK) {
                str = dialog.getValue();
            }
            if (str == null || "".equals(str)) { //$NON-NLS-1$
                return null; // nothing to add
View Full Code Here

            public void run() {
                final Folder folder = (Folder) selection.getFirstElement();
                final InputDialog dialog = new InputDialog(Display.getDefault().getActiveShell(),
                        Messages.RenameFolderAction_dialogTitle,
                        Messages.RenameFolderAction_dialogMsg, folder.getName(), null);
                final int folderNameDialogResult = dialog.open();
                if (folderNameDialogResult == Dialog.OK) {
                    folder.setName(dialog.getValue());
                }
                viewer.refresh();
            }
View Full Code Here

                    InputDialog dialog = new InputDialog(
                            Display.getCurrent().getActiveShell(),
                            Messages.BookmarkAction_dialogtitle_bookmarklocation,
                            Messages.BookmarkAction_dialogprompt_enterbookmarkname,
                            bookmark.getName(), null);
                    dialog.open();
                    if (dialog.getReturnCode() == Window.OK) {
                        String name = dialog.getValue();
                        bookmark.setName(name);
                        bmManager = BookmarksPlugin.getBookmarkService();
                        bmManager.addBookmark(bookmark);
View Full Code Here

                InputDialog dialog = new InputDialog(Display.getCurrent()
                        .getActiveShell(),
                        Messages.BookmarkAction_dialogtitle_renamebookmark,
                        Messages.BookmarkAction_dialogprompt_enterbookmarkname,
                        bookmark.getName(), null);
                dialog.open();
                if (dialog.getReturnCode() == Window.OK) {
                    String name = dialog.getValue();
                    bookmark.setName(name);
                    refreshView();
                }
View Full Code Here

                                File oldMapFile = mr.getMapFile();
                                String oldMapName = oldMapFile.getName();

                                InputDialog iDialog = new InputDialog(shell, "New map name",
                                        "Please enter the new name for the map: " + oldMapName, oldMapName + "_new", null);
                                iDialog.open();
                                String newMapName = iDialog.getValue();
                                if (newMapName != null && newMapName.length() > 0) {
                                    newMapName = newMapName.replaceAll("\\s+", "_");

                                    JGrassMapEnvironment oldMapEnvironment = new JGrassMapEnvironment(oldMapFile);
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.