Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.MessageBox.open()


    }
    if (badTests) {
      //yell at the user
          MessageBox mb = new MessageBox(Display.getCurrent().getActiveShell(), SWT.ICON_ERROR  | SWT.OK);
          mb.setMessage(Messages.DTOUtils_nullArg);
          mb.open();
      return false;
    }
    return true;
    }
View Full Code Here


            public void run( IProgressMonitor monitor ) throws InvocationTargetException, InterruptedException {
                if (locationName == null || mapsetName == null || crs == null || maps.size() < 1) {
                    MessageBox msgBox = new MessageBox(shell, SWT.ICON_ERROR);
                    msgBox.setMessage("An error occurred in processing the user supplied data.");
                    msgBox.open();
                    return;
                }
                /*
                 * finally do some processing
                 */
 
View Full Code Here

                                        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();
                                            newMapName = null;
                                            return;
                                        }

                                        if (newMapName != null && newMapName.length() > 0) {
View Full Code Here

                    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;
                        return;
                    }

                    if (mapsetName != null && mapsetName.length() > 0) {
View Full Code Here

                if (mapset.length() > 0) {
                    if (mapset.indexOf(' ') != -1) {
                        MessageBox msgBox = new MessageBox(newMapseText.getShell(), SWT.ICON_ERROR);
                        msgBox
                                .setMessage("Mapset names can't contain spaces. Please choose a name without spaces.");
                        msgBox.open();
                        return;
                    }

                    mapsetNames.add(mapset);
                    lv.setInput(mapsetNames);
View Full Code Here

                            String locationName = locationFile.getName();
                            if (locationName.indexOf(' ') != -1) {
                                MessageBox msgBox = new MessageBox(locationPathChooseButton
                                        .getShell(), SWT.ICON_ERROR);
                                msgBox.setMessage("Location names can't contain spaces. Please choose a name without spaces.");
                                msgBox.open();
                                locPathText.setText("");
                                return;
                            }

                            locPathText.setText(path);
View Full Code Here

                getContext().updateUI(new Runnable(){
                    public void run() {
                        Shell shell = PlatformUI.getWorkbench().getDisplay().getActiveShell();
                        MessageBox msgBox = new MessageBox(shell, SWT.ICON_ERROR);
                        msgBox.setMessage("The selected layer can't be read by the available datastores. Unable to create a profile on it.");
                        msgBox.open();
                    }
                });
                super.setActive(false);
                return;
            }
View Full Code Here

        cacheClearBtn.addSelectionListener(new SelectionAdapter() {
            public void widgetSelected(SelectionEvent e) {
              MessageBox mb = new MessageBox(Display.getCurrent().getActiveShell(), SWT.ICON_QUESTION | SWT.OK | SWT.CANCEL);
                mb.setText(Messages.WMSCTilePreferencePage_clearcachebtn);
                mb.setMessage(Messages.WMSCTilePreferencePage_clearcacheConfirm);
                int rc = mb.open();
                if (rc == SWT.OK) {
                  boolean success = clearCache();
                  mb = new MessageBox(Display.getCurrent().getActiveShell(), SWT.OK );
                  mb.setText(Messages.WMSCTilePreferencePage_clearcachebtn);
                  if (!success) {
View Full Code Here

                        mb.setMessage(Messages.WMSCTilePreferencePage_clearcacheError);
                  }
                  else {
                    mb.setMessage(Messages.WMSCTilePreferencePage_clearcacheSuccess);
                  }
                    rc = mb.open();
                }
            }
        });
        cacheClearBtn.setEnabled(diskOn);
  }
View Full Code Here

            try {
                sld = (StyledLayerDescriptor) importe.importFrom(file, null);
            } catch (Exception e1) {
                MessageBox mb = new MessageBox(this.styleEditorDialog.getShell(), SWT.ICON_ERROR | SWT.OK);
                mb.setMessage(MessageFormat.format(Messages.StyleEditor_import_failed, e1.getLocalizedMessage()));
                mb.open();
                throw (RuntimeException) new RuntimeException().initCause(e1);
            }
        }
        if (sld != null) {
            Style newStyle = SLDs.getDefaultStyle(sld);
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.