Examples of MessageBox


Examples of org.eclipse.swt.widgets.MessageBox

        } catch (Exception ex) {
          MainWindow.message( sDate + " is not a valid Date: " + ex.getMessage(), SWT.ICON_ERROR);
          return ;
        }
        if (listener.exists(year, month, day)) {
          MessageBox mb = new MessageBox(getShell(), SWT.ICON_INFORMATION);
          mb.setMessage(Messages.getString("date.date_exists"));
          mb.open();
          if (main != null && dom.isChanged())
            main.dataChanged();
        } else {
          listener.addDate(year, month, day);
          listener.fillList(lDates);
View Full Code Here

Examples of org.eclipse.swt.widgets.MessageBox

  private void startCapture(final String filter) throws InterruptedException {
    synchronized (capture_list) {
      final String [] devices = Capture.listDevices();

      if (devices == null) {
        final MessageBox dialog = new MessageBox(gui.getShell(), SWT.ICON_ERROR | SWT.OK);
        dialog.setText(config.getString("thethereal_error"));
        dialog.setMessage(config.getString("thethereal_error_long"));
        dialog.open();
        return;
      }

      for (final String device : devices) {
        final Matcher match = Pattern.compile("^([0-9]*)\\. ").matcher(device);
View Full Code Here

Examples of org.eclipse.swt.widgets.MessageBox

        cmd_nmap.fork();
      } catch (final IOException ex) {
        // on laisse le ifneeded car pas de synchronized() � l'int�rieur
        getGUI().asyncExecIfNeeded(new Runnable() {
          public void run() {
            final MessageBox dialog = new MessageBox(getGUI().getShell(), SWT.ICON_ERROR | SWT.OK);
            dialog.setText(getGUI().getConfig().getString("nmap_error"));
            dialog.setMessage(getGUI().getConfig().getString("nmap_error_long"));
            dialog.open();
          }
        });

        throw ex;
      }
View Full Code Here

Examples of org.eclipse.swt.widgets.MessageBox

            setDirty( !success );
            monitor.done();
        }
        catch ( Exception e )
        {
            MessageBox messageBox = new MessageBox( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
                SWT.OK | SWT.ICON_ERROR );
            messageBox.setText( Messages.getString( "ServerConfigurationEditor.Error" ) ); //$NON-NLS-1$
            messageBox
                .setMessage( Messages.getString( "ServerConfigurationEditor.AnErrorOccurredWhenWritingTheFileToDisk" ) + "\n" + e.getMessage() ); //$NON-NLS-1$ //$NON-NLS-2$
            messageBox.open();
            setDirty( true );
            monitor.done();
            return;
        }
    }
View Full Code Here

Examples of org.eclipse.swt.widgets.MessageBox

                        setDirty( !success );
                        monitor.done();
                    }
                    catch ( Exception e )
                    {
                        MessageBox messageBox = new MessageBox( PlatformUI.getWorkbench().getActiveWorkbenchWindow()
                            .getShell(), SWT.OK | SWT.ICON_ERROR );
                        messageBox.setText( Messages.getString( "ServerConfigurationEditor.Error" ) ); //$NON-NLS-1$
                        messageBox.setMessage( Messages
                            .getString( "ServerConfigurationEditor.AnErrorOccurredWhenWritingTheFileToDisk" ) + "\n" //$NON-NLS-1$ //$NON-NLS-2$
                            + e.getMessage() );
                        messageBox.open();
                        setDirty( true );
                        monitor.done();
                        return;
                    }
                }
            } );
        }
        catch ( Exception e )
        {
            MessageBox messageBox = new MessageBox( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
                SWT.OK | SWT.ICON_ERROR );
            messageBox.setText( Messages.getString( "ServerConfigurationEditor.Error" ) ); //$NON-NLS-1$
            messageBox
                .setMessage( Messages.getString( "ServerConfigurationEditor.AnErrorOccurredWhenWritingTheFileToDisk" ) + "\n" + e.getMessage() ); //$NON-NLS-1$ //$NON-NLS-2$
            messageBox.open();
            return;
        }
    }
View Full Code Here

Examples of org.eclipse.swt.widgets.MessageBox

        ProjectsHandler projectsHandler = Activator.getDefault().getProjectsHandler();
        StructuredSelection selection = ( StructuredSelection ) viewer.getSelection();

        if ( !selection.isEmpty() )
        {
            MessageBox messageBox = new MessageBox( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
                SWT.YES | SWT.NO | SWT.ICON_QUESTION );
            int count = selection.size();
            if ( count == 1 )
            {
                ProjectWrapper wrapper = ( ProjectWrapper ) selection.getFirstElement();
                messageBox
                    .setMessage( NLS
                        .bind(
                            Messages.getString( "DeleteProjectAction.SureToDeleteProject" ), new String[] { wrapper.getProject().getName() } ) ); //$NON-NLS-1$
            }
            else
            {
                messageBox.setMessage( NLS.bind(
                    Messages.getString( "DeleteProjectAction.SureToDeleteProjects" ), new Object[] { count } ) ); //$NON-NLS-1$
            }
            if ( messageBox.open() == SWT.YES )
            {
                for ( Iterator<?> iterator = selection.iterator(); iterator.hasNext(); )
                {
                    ProjectWrapper wrapper = ( ProjectWrapper ) iterator.next();
                    Project project = wrapper.getProject();
View Full Code Here

Examples of org.eclipse.swt.widgets.MessageBox

    {
        StructuredSelection selection = ( StructuredSelection ) viewer.getSelection();

        if ( !selection.isEmpty() )
        {
            MessageBox messageBox = new MessageBox( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
                SWT.YES | SWT.NO | SWT.ICON_QUESTION );
            int count = selection.size();
            if ( count == 1 )
            {
                Object firstElement = selection.getFirstElement();
                if ( firstElement instanceof AttributeTypeWrapper )
                {
                    messageBox.setMessage( Messages.getString( "DeleteSchemaElementAction.SureToDeleteAttributeType" ) ); //$NON-NLS-1$
                }
                else if ( firstElement instanceof ObjectClassWrapper )
                {
                    messageBox.setMessage( Messages.getString( "DeleteSchemaElementAction.SureToDeleteObjectClass" ) ); //$NON-NLS-1$
                }
                else if ( firstElement instanceof SchemaWrapper )
                {
                    messageBox.setMessage( Messages.getString( "DeleteSchemaElementAction.SureToDeleteSchema" ) ); //$NON-NLS-1$
                }
                else
                {
                    messageBox.setMessage( Messages.getString( "DeleteSchemaElementAction.SureToDeleteItem" ) ); //$NON-NLS-1$
                }

            }
            else
            {
                messageBox.setMessage( NLS.bind(
                    Messages.getString( "DeleteSchemaElementAction.SureToDeleteItems" ), new Object[] { count } ) ); //$NON-NLS-1$
            }
            if ( messageBox.open() == SWT.YES )
            {

                Map<String, Schema> schemasMap = new HashMap<String, Schema>();
                List<SchemaObject> schemaObjectsList = new ArrayList<SchemaObject>();
View Full Code Here

Examples of org.eclipse.swt.widgets.MessageBox

        {
            return false;
        }
        catch ( ServerXmlIOException e )
        {
            MessageBox messageBox = new MessageBox( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
                SWT.OK | SWT.ICON_ERROR );
            messageBox.setText( Messages.getString( "NewApacheDSConfigurationFileWizard.Error" ) ); //$NON-NLS-1$
            messageBox
                .setMessage( Messages.getString( "NewApacheDSConfigurationFileWizard.ErrorReadingFile" ) + e.getMessage() ); //$NON-NLS-1$
            messageBox.open();
            return false;
        }
        return true;
    }
View Full Code Here

Examples of org.eclipse.swt.widgets.MessageBox

        // other than the current ide version -- find out if the user wants
        // to use it anyhow.
        String title = IDEWorkbenchMessages.IDEApplication_versionTitle;
        String message = NLS.bind(IDEWorkbenchMessages.IDEApplication_versionMessage, url.getFile());

        MessageBox mbox = new MessageBox(shell, SWT.OK | SWT.CANCEL
                | SWT.ICON_WARNING | SWT.APPLICATION_MODAL);
        mbox.setText(title);
        mbox.setMessage(message);
        return mbox.open() == SWT.OK;
    }
View Full Code Here

Examples of org.eclipse.swt.widgets.MessageBox

                    setFileName(split[split.length-1]);
                }
                File file = new File(fileName);
                if (file.exists()) {
                    // The file already exists; asks for confirmation
                    MessageBox mb = new MessageBox(dlg.getParent(),
                            SWT.ICON_WARNING
                                    | SWT.YES | SWT.NO);

                    // We really should read this string from a
                    // resource bundle
                    mb.setMessage(fileName
                            + " already exists. Do you want to replace it?");

                    // If they click Yes, we're done and we drop out. If
                    // they click No, we redisplay the File Dialog
                    done = mb.open() == SWT.YES;
                } else {
                    // File does not exist, so drop out
                    done = true;
                }
            }
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.