Package org.openide

Examples of org.openide.NotifyDescriptor


            itsCreationTextArea.setText(txt);
            itsRequestBean = itsAgent.prepareRequest(txt);
            this.openRequestEditor(evt,txt);
        } else {
            // put up the error dialog
            DialogDisplayer.getDefault().notify(new NotifyDescriptor(
                    NbBundle.getMessage(AgentMainJPanel.class,"ERR_PICK_HISTORY_ENTRY"),
                    NbBundle.getMessage(AgentMainJPanel.class,"ERR_PICK_HISTORY_ENTRY_TITLE"),
                    NotifyDescriptor.DEFAULT_OPTION, NotifyDescriptor.ERROR_MESSAGE,
                    null, null));
        }
View Full Code Here


            RequestBean req = itsAgent.prepareRequest(requestText);
            req.setMethod(Constants.CANCEL);
            itsCreationTextArea.setText(req.toString());
        } else {
            // put up the error dialog
            DialogDisplayer.getDefault().notify(new NotifyDescriptor(
                    NbBundle.getMessage(AgentMainJPanel.class,"ERR_PICK_HISTORY_ENTRY"),
                    NbBundle.getMessage(AgentMainJPanel.class,"ERR_PICK_HISTORY_ENTRY_TITLE"),
                    NotifyDescriptor.DEFAULT_OPTION, NotifyDescriptor.ERROR_MESSAGE,
                    null, null));
       
View Full Code Here

            RequestBean req = new RequestBean(resp);
            req.setMethod(Constants.BYE);
            itsCreationTextArea.setText(req.toString());
        } else {
            // put up the error dialog
            DialogDisplayer.getDefault().notify(new NotifyDescriptor(
                    NbBundle.getMessage(AgentMainJPanel.class,"ERR_PICK_HISTORY_ENTRY"),
                    NbBundle.getMessage(AgentMainJPanel.class,"ERR_PICK_HISTORY_ENTRY_TITLE"),
                    NotifyDescriptor.DEFAULT_OPTION, NotifyDescriptor.ERROR_MESSAGE,
                    null, null));
        }
View Full Code Here

            req.setMethod(Constants.ACK);
           
           itsCreationTextArea.setText(req.toString());
        } else {
            // put up the error dialog
            DialogDisplayer.getDefault().notify(new NotifyDescriptor(
                    NbBundle.getMessage(AgentMainJPanel.class,"ERR_PICK_HISTORY_ENTRY"),
                    NbBundle.getMessage(AgentMainJPanel.class,"ERR_PICK_HISTORY_ENTRY_TITLE"),
                    NotifyDescriptor.DEFAULT_OPTION, NotifyDescriptor.ERROR_MESSAGE,
                    null, null));
        }
View Full Code Here

    private boolean askIfCreateDirectory(File directory) {
        String message = directory.getAbsolutePath() + " does not exist. " +
            "Do you want to create it now?";

        NotifyDescriptor d = new NotifyDescriptor.Confirmation(
            message, NotifyDescriptor.OK_CANCEL_OPTION);
        TopManager.getDefault().notify(d);

        if (d.getValue() == NotifyDescriptor.CANCEL_OPTION)
            return false;

        boolean result;
        try {
            result = directory.mkdirs();
        }
        catch (SecurityException se) {
            result = false;
        }

        if (result == false) {
            String tmp = "Error creating: " + directory.getAbsolutePath();
            NotifyDescriptor d2 = new NotifyDescriptor.Message(
                tmp, NotifyDescriptor.ERROR_MESSAGE);
            TopManager.getDefault().notify(d2);
        }
        return result;
    }
View Full Code Here

        }
        else if (language.toLowerCase().equals("beanshell")) {
            sourceFile += ".bsh";
        }
        else {
            NotifyDescriptor d = new NotifyDescriptor.Message(
                "Language not defined for this Parcel Folder");
            TopManager.getDefault().notify(d);
            return;
        }

        FileSystem fs = Repository.getDefault().getDefaultFileSystem();
        DataObject result = null;
        try {
            DataObject dObj = DataObject.find(fs.findResource(sourceFile));
            result = dObj.createFromTemplate(parent);
        }
        catch (IOException ioe) {
            ErrorManager.getDefault().notify(ioe);
        }

        FileObject fo = result.getPrimaryFile();
        if (fo.getExt().equals("java")) {
            FileLock lock = null;
            try {
                PackageRemover.removeDeclaration(FileUtil.toFile(fo));

                // IssueZilla 11986 - rename the FileObject
                // so the JavaNode is resynchronized
                lock = fo.lock();
                if (lock != null) {
                    fo.rename(lock, fo.getName(), fo.getExt());
                }
            }
            catch (IOException ioe) {
                NotifyDescriptor d = new NotifyDescriptor.Message(
                 "Error removing package declaration from file: " +
                 fo.getNameExt() +
                 ". You should manually remove this declaration " +
                 "before building the Parcel Recipe");
                TopManager.getDefault().notify(d);
View Full Code Here

    private boolean isValidIvySettingsFile(String filePath) {
        try {
            ivyFacade.testIvySettings(filePath, getPropertiesFilesAsList());
        } catch (IvyException ex) {
            NotifyDescriptor message = new NotifyDescriptor.Message(NbBundle.getMessage(CustomizerPanel.class, "CustomizerPanel.ivySettingsFile.Error") + ex.getMessage(), NotifyDescriptor.ERROR_MESSAGE);
            DialogDisplayer.getDefault().notify(message);
            return false;
        }
        return true;
    }
View Full Code Here

    private boolean isValidIvyFile(String filePath) {
        try {
            ivyFacade.testIvyFile(filePath, ivySettingsFileText.getText(), getPropertiesFilesAsList());
        } catch (IvyException ex) {
            NotifyDescriptor message = new NotifyDescriptor.Message(NbBundle.getMessage(CustomizerPanel.class, "CustomizerPanel.ivyFile.Error") + ex.getMessage(), NotifyDescriptor.ERROR_MESSAGE);
            DialogDisplayer.getDefault().notify(message);
            return false;
        }
        return true;
    }
View Full Code Here

    private boolean promptForOverwrite(File source, File target) {
        String message = source.getName() + " has already been deployed " +
            "to this target. Do you wish to overwrite it?";

        NotifyDescriptor d = new NotifyDescriptor.Confirmation(
            message, NotifyDescriptor.OK_CANCEL_OPTION);
        TopManager.getDefault().notify(d);

        if (d.getValue() == NotifyDescriptor.CANCEL_OPTION)
            return false;
        else
            return true;
    }
View Full Code Here

                // IssueZilla 11986 - rename the FileObject
                // so the JavaNode is resynchronized
                tmp.rename(tmp.lock(), tmp.getName(), tmp.getExt());
            }
            catch (IOException ioe) {
                NotifyDescriptor d = new NotifyDescriptor.Message(
                 "Error removing package declaration from file: " +
                 tmp.getNameExt() +
                 ". You should manually remove this declaration " +
                 "before building the Parcel Recipe");
                TopManager.getDefault().notify(d);
View Full Code Here

TOP

Related Classes of org.openide.NotifyDescriptor

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.