@Override public Boolean displayConfirmation(String message, String caption, boolean cancellable) { NotifyDescriptor nd = new NotifyDescriptor.Confirmation(message, cancellable ? NotifyDescriptor.YES_NO_CANCEL_OPTION : NotifyDescriptor.YES_NO_OPTION); if (caption != null) nd.setTitle(caption); Object ret = DialogDisplayer.getDefault().notify(nd); if (ret == NotifyDescriptor.YES_OPTION) return Boolean.TRUE; if (ret == NotifyDescriptor.NO_OPTION) return Boolean.FALSE; return null; }
public void run() { NotifyDescriptor d = new NotifyDescriptor.Message(msg, NotifyDescriptor.INFORMATION_MESSAGE); d.setTitle(title); DialogDisplayer.getDefault().notify(d); } });
public void run() { NotifyDescriptor d = new NotifyDescriptor.Message(msg, NotifyDescriptor.INFORMATION_MESSAGE); d.setTitle(title); DialogDisplayer.getDefault().notify(d); } });
public void run() { NotifyDescriptor d = new NotifyDescriptor.Message(msg, NotifyDescriptor.ERROR_MESSAGE); d.setTitle(title); DialogDisplayer.getDefault().notify(d); } });
public void run() { NotifyDescriptor d = new NotifyDescriptor.Message(msg, NotifyDescriptor.INFORMATION_MESSAGE); d.setTitle(title); DialogDisplayer.getDefault().notify(d); } };
private static boolean showModifiedMessage (String title) { String message = NbBundle.getMessage(AppClientProjectProperties.class,"TXT_Regenerate"); JButton regenerateButton = new JButton (NbBundle.getMessage(AppClientProjectProperties.class,"CTL_RegenerateButton")); regenerateButton.setDefaultCapable(true); regenerateButton.getAccessibleContext().setAccessibleDescription (NbBundle.getMessage(AppClientProjectProperties.class,"AD_RegenerateButton")); NotifyDescriptor d = new NotifyDescriptor.Message (message, NotifyDescriptor.WARNING_MESSAGE); d.setTitle(title); d.setOptionType(NotifyDescriptor.OK_CANCEL_OPTION); d.setOptions(new Object[] {regenerateButton, NotifyDescriptor.CANCEL_OPTION}); return DialogDisplayer.getDefault().notify(d) == regenerateButton; }
protected static boolean showModifiedMessage(String title) { String message = NbBundle.getMessage(SharedRubyProjectProperties.class, "TXT_Regenerate"); JButton regenerateButton = new JButton(NbBundle.getMessage(SharedRubyProjectProperties.class, "CTL_RegenerateButton")); regenerateButton.setDefaultCapable(true); regenerateButton.getAccessibleContext().setAccessibleDescription( NbBundle.getMessage(SharedRubyProjectProperties.class, "AD_RegenerateButton")); NotifyDescriptor d = new NotifyDescriptor.Message(message, NotifyDescriptor.WARNING_MESSAGE); d.setTitle(title); d.setOptionType(NotifyDescriptor.OK_CANCEL_OPTION); d.setOptions(new Object[]{regenerateButton, NotifyDescriptor.CANCEL_OPTION}); return DialogDisplayer.getDefault().notify(d) == regenerateButton; }
private static boolean commitAfterMerge (boolean locallyModifiedExcluded, File repository) { // XXX consider usage of repository to determine if there are any non-included files which have to be committed, too // and thus removing the option HgModuleConfig.getDefault().getConfirmCommitAfterMerge() if (locallyModifiedExcluded || HgModuleConfig.getDefault().getConfirmCommitAfterMerge()) { // ask before commit? NotifyDescriptor descriptor = new NotifyDescriptor.Confirmation(NbBundle.getMessage(CommitAction.class, "MSG_COMMIT_AFTER_MERGE_QUERY")); // NOI18N descriptor.setTitle(NbBundle.getMessage(CommitAction.class, "MSG_COMMIT_AFTER_MERGE_TITLE")); // NOI18N descriptor.setMessageType(JOptionPane.WARNING_MESSAGE); descriptor.setOptionType(NotifyDescriptor.YES_NO_OPTION); Object res = DialogDisplayer.getDefault().notify(descriptor); return res == NotifyDescriptor.YES_OPTION; } return true; }
descriptor.setTitle (NbBundle.getMessage (ConfirmDeletionPanel.class, "TITLE_DeleteDialog")); // NOI18N
descriptor.setTitle(NbBundle.getMessage(CreateRefreshAction.class, "MSG_LONG_COMMAND_TITLE")); //NOI18N descriptor.setMessageType(JOptionPane.WARNING_MESSAGE); descriptor.setOptionType(NotifyDescriptor.YES_NO_OPTION);
@Override public void run() { final ExecutionEnvironment env = getSelectedRecord().getExecutionEnvironment(); String versions = null; if (ConnectionManager.getInstance().connect(env)) { versions = getToolCollectionPanel().getVersion(set); } SwingUtilities.invokeLater(new Runnable() { @Override public void run() { btVersions.setEnabled(true); setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); } }); if (versions != null) { NotifyDescriptor nd = new NotifyDescriptor.Message(versions); nd.setTitle(getString("LBL_VersionInfo_Title")); // NOI18N DialogDisplayer.getDefault().notify(nd); } } });
@Override public void run() { final ExecutionEnvironment env = getSelectedRecord().getExecutionEnvironment(); String versions = null; if (ConnectionManager.getInstance().connect(env)) { versions = getToolCollectionPanel().getVersion(set); } SwingUtilities.invokeLater(new Runnable() { @Override public void run() { btVersions.setEnabled(true); setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); } }); if (versions != null) { NotifyDescriptor nd = new NotifyDescriptor.Message(versions); nd.setTitle(getString("LBL_VersionInfo_Title")); // NOI18N DialogDisplayer.getDefault().notify(nd); } } });
e.getLocalizedMessage(), NotifyDescriptor.INFORMATION_MESSAGE); d.setTitle(NbBundle.getMessage(AddDomainWizardIterator.class, "LBL_RegServerFailed")); //NOI18N DialogDisplayer.getDefault().notify(d);
descriptor.setTitle(NbBundle.getMessage(UpdateAction.class, "MSG_UPDATE_CONFIRM")); // NOI18N descriptor.setMessageType(JOptionPane.WARNING_MESSAGE); descriptor.setOptionType(NotifyDescriptor.YES_NO_OPTION);
"MSG_ROLLBACK_INFO_SEP", root.getAbsolutePath())); // NOI18N NotifyDescriptor descriptor = new NotifyDescriptor.Confirmation(NbBundle.getMessage(RollbackAction.class, "MSG_ROLLBACK_CONFIRM_QUERY")); // NOI18N descriptor.setTitle(NbBundle.getMessage(RollbackAction.class, "MSG_ROLLBACK_CONFIRM")); // NOI18N descriptor.setMessageType(JOptionPane.WARNING_MESSAGE); descriptor.setOptionType(NotifyDescriptor.YES_NO_OPTION);
descriptor.setTitle(NbBundle.getMessage(CommitAction.class, "MSG_LONG_COMMAND_TITLE")); //NOI18N descriptor.setMessageType(JOptionPane.WARNING_MESSAGE); descriptor.setOptionType(NotifyDescriptor.YES_NO_OPTION);
private void displayMessage(String message, String caption, String details, int type) { Object msg = message; Object det = details; if (isHtmlString(message)) msg = new NBHTMLLabel(message); if (isHtmlString(details)) det = new NBHTMLLabel(message); NotifyDescriptor nd = det == null ? new NotifyDescriptor.Message(msg, type) : new ProfilerDialogs.MessageWithDetails(msg, det, type, false); if (caption != null) nd.setTitle(caption); ProfilerDialogs.notify(nd); }
descriptor.setTitle(NbBundle.getMessage(DeleteLocalAction.class, "CTL_DeleteLocal_Title")); // NOI18N descriptor.setMessageType(JOptionPane.WARNING_MESSAGE); descriptor.setOptionType(NotifyDescriptor.YES_NO_OPTION);