Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.MessageBox


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

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


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

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

        addButton.addSelectionListener(new SelectionAdapter(){
            public void widgetSelected( SelectionEvent e ) {
                String mapset = newMapseText.getText();
                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

                            locPathText.setText("");
                        } else {
                            File locationFile = new File(path);
                            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

            } else {
                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 = new Button(getFieldEditorParent(), SWT.PUSH);
        cacheClearBtn.setText(Messages.WMSCTilePreferencePage_clearcachebtn);
       
        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) {
                        mb.setMessage(Messages.WMSCTilePreferencePage_clearcacheError);
                  }
                  else {
                    mb.setMessage(Messages.WMSCTilePreferencePage_clearcacheSuccess);
                  }
                    rc = mb.open();
                }
            }
        });
        cacheClearBtn.setEnabled(diskOn);
  }
View Full Code Here

        File file = importe.promptFile(Display.getDefault(), sld);
        if (file != null) {
            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

                                           "icons/delete_item_small.gif" );
        delLink.setToolTipText( "Remove this field action" );

        delLink.addHyperlinkListener( new IHyperlinkListener() {
            public void linkActivated(HyperlinkEvent e) {
                MessageBox dialog = new MessageBox( Display.getCurrent().getActiveShell(),
                                                    SWT.YES | SWT.NO | SWT.ICON_WARNING );
                dialog.setMessage( "Remove this item?" );
                dialog.setText( "Remove this item?" );
                if ( dialog.open() == SWT.YES ) {
                    fact.removeField( row );
                    getModeller().setDirty( true );
                    getModeller().reloadRhs();
                }
            }
View Full Code Here

        ImageHyperlink delLink = addImage(constraintComposite,
                "icons/delete_item_small.gif");
        delLink.setToolTipText("Remove this field action");
        delLink.addHyperlinkListener(new IHyperlinkListener() {
            public void linkActivated(HyperlinkEvent e) {
                MessageBox dialog = new MessageBox(Display.getCurrent()
                        .getActiveShell(), SWT.YES | SWT.NO | SWT.ICON_WARNING);
                dialog.setMessage("Remove this item?");
                dialog.setText("Remove this item?");
                if (dialog.open() == SWT.YES) {
                    set.removeField(currentRow);
                    getModeller().setDirty(true);
                    getModeller().reloadRhs();
                }
            }
View Full Code Here

        ImageHyperlink delLink = addImage( parent,
                                           "icons/delete_item_small.gif" );
        delLink.addHyperlinkListener( new IHyperlinkListener() {

            public void linkActivated(HyperlinkEvent e) {
                MessageBox dialog = new MessageBox( Display.getCurrent().getActiveShell(),
                                                    SWT.YES | SWT.NO | SWT.ICON_WARNING );
                dialog.setMessage( "Remove this DSL sentence?" );
                dialog.setText( "Remove this DSL sentence?" );
                if ( dialog.open() == SWT.YES ) {
                    updateModel();
                }
            }

            public void linkEntered(HyperlinkEvent e) {
View Full Code Here

TOP

Related Classes of org.eclipse.swt.widgets.MessageBox

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.