public @Override void run() { DialogDescriptor d = new DialogDescriptor( NbBundle.getMessage(BuildInstallersAction.class, "BuildInstallersAction.NotApp.Warning.Message"), NbBundle.getMessage(BuildInstallersAction.class, "BuildInstallersAction.NotApp.Warning.Title")); d.setModal(true); JButton accept = new JButton(NbBundle.getMessage(BuildInstallersAction.class, "BuildInstallersAction.NotApp.Warning.OK")); accept.setDefaultCapable(true); d.setOptions(new Object[]{ accept}); d.setMessageType(NotifyDescriptor.WARNING_MESSAGE); if (DialogDisplayer.getDefault().notify(d).equals(accept)) { //SuiteCustomizer cpi = prj.getLookup().lookup(org.netbeans.modules.apisupport.project.ui.customizer.SuiteCustomizer.class); //cpi.showCustomizer(SuiteCustomizer.APPLICATION, SuiteCustomizer.APPLICATION_CREATE_STANDALONE_APPLICATION); } } });
public @Override void run() { DialogDescriptor d = new DialogDescriptor( NbBundle.getMessage(BuildInstallersAction.class, "BuildInstallersAction.NotConfigured.Warning.Message"), NbBundle.getMessage(BuildInstallersAction.class, "BuildInstallersAction.NotConfigured.Warning.Title")); d.setModal(true); JButton accept = new JButton(NbBundle.getMessage(BuildInstallersAction.class, "BuildInstallersAction.NotConfigured.Warning.OK")); accept.setDefaultCapable(true); d.setOptions(new Object[]{ accept}); d.setMessageType(NotifyDescriptor.WARNING_MESSAGE); if (DialogDisplayer.getDefault().notify(d).equals(accept)) { //SuiteCustomizer cpi = prj.getLookup().lookup(org.netbeans.modules.apisupport.project.ui.customizer.SuiteCustomizer.class); //cpi.showCustomizer(SuiteCustomizer.APPLICATION, SuiteCustomizer.APPLICATION_CREATE_STANDALONE_APPLICATION); } } });
private void showPlatformWarning() { final JButton closeOption = new JButton(NbBundle.getMessage(J2SEActionProvider.class, "CTL_BrokenPlatform_Close")); closeOption.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(J2SEActionProvider.class, "AD_BrokenPlatform_Close")); final ProjectInformation pi = project.getLookup().lookup(ProjectInformation.class); final String projectDisplayName = pi == null ? NbBundle.getMessage(J2SEActionProvider.class, "TEXT_BrokenPlatform_UnknownProjectName") : pi.getDisplayName(); final DialogDescriptor dd = new DialogDescriptor( NbBundle.getMessage(J2SEActionProvider.class, "TEXT_BrokenPlatform", projectDisplayName), NbBundle.getMessage(J2SEActionProvider.class, "MSG_BrokenPlatform_Title"), true, new Object[]{closeOption}, closeOption, DialogDescriptor.DEFAULT_ALIGN, null, null); dd.setMessageType(DialogDescriptor.WARNING_MESSAGE); final Dialog dlg = DialogDisplayer.getDefault().createDialog(dd); dlg.setVisible(true); }
public void run() { try { MissingConnectionsAlertPanel alert = new MissingConnectionsAlertPanel(); JButton close = new JButton( NbBundle.getMessage(MissingConnectionsAlertPanel.class, "LBL_UpdateDatasourcesCustomizer_Close")); //NOI18N close.getAccessibleContext().setAccessibleDescription( NbBundle.getMessage(MissingConnectionsAlertPanel.class, "ACSD_UpdateDatasourcesCustomizer_Close")); //NOI18N DialogDescriptor dd = new DialogDescriptor( alert, NbBundle.getMessage(MissingConnectionsAlertPanel.class, "MSG_Update_Datasources_Title"), //NOI18N true, new Object[] {close}, close, DialogDescriptor.DEFAULT_ALIGN, null, null); dd.setMessageType(DialogDescriptor.WARNING_MESSAGE); //NOI18N Dialog dlg = DialogDisplayer.getDefault().createDialog(dd); dlg.setVisible(true); } finally { synchronized (MissingConnectionsAlertPanel.class) { brokenAlertLastTime = System.currentTimeMillis(); brokenAlertShown = false; } } } });
public void run() { try { BrokenServerAlertPanel alert = new BrokenServerAlertPanel(); JButton close = new JButton( NbBundle.getMessage(BrokenServerSupport.class, "LBL_BrokenServerCustomizer_Close")); close.getAccessibleContext().setAccessibleDescription( NbBundle.getMessage(BrokenServerSupport.class, "ACSD_BrokenServerCustomizer_Close")); DialogDescriptor dd = new DialogDescriptor( alert, NbBundle.getMessage(BrokenServerAlertPanel.class, "MSG_Broken_Server_Title"), true, new Object[] {close}, close, DialogDescriptor.DEFAULT_ALIGN, null, null); dd.setMessageType(DialogDescriptor.WARNING_MESSAGE); Dialog dlg = DialogDisplayer.getDefault().createDialog(dd); dlg.setVisible(true); } finally { synchronized (BrokenServerSupport.class) { brokenAlertLastTime = System.currentTimeMillis(); brokenAlertShown = false; } } } });
public void run() { try { BrokenServerLibraryAlertPanel alert = new BrokenServerLibraryAlertPanel(); JButton close = new JButton( NbBundle.getMessage(BrokenServerLibrarySupport.class, "LBL_BrokenServerLibrariesCustomizer_Close")); close.getAccessibleContext().setAccessibleDescription( NbBundle.getMessage(BrokenServerLibrarySupport.class, "ACSD_BrokenServerLibrariesCustomizer_Close")); DialogDescriptor dd = new DialogDescriptor( alert, NbBundle.getMessage(BrokenServerAlertPanel.class, "MSG_Broken_Server_Libraries_Title"), true, new Object[] {close}, close, DialogDescriptor.DEFAULT_ALIGN, null, null); dd.setMessageType(DialogDescriptor.WARNING_MESSAGE); Dialog dlg = DialogDisplayer.getDefault().createDialog(dd); dlg.setVisible(true); } finally { synchronized (BrokenServerLibrarySupport.class) { brokenAlertLastTime = System.currentTimeMillis(); brokenAlertShown = false; } } } });
public static boolean showBuildActionWarning(Project project, CustomizerPresenter presenter) { String text = NbBundle.getMessage(DeployOnSaveUtils.class, "LBL_ProjectBuiltAutomatically"); String projectProperties = NbBundle.getMessage(DeployOnSaveUtils.class, "BTN_ProjectProperties"); String cleanAndBuild = NbBundle.getMessage(DeployOnSaveUtils.class, "BTN_CleanAndBuild"); String ok = NbBundle.getMessage(DeployOnSaveUtils.class, "BTN_OK"); String titleFormat = NbBundle.getMessage(DeployOnSaveUtils.class, "TITLE_BuildProjectWarning"); String title = MessageFormat.format(titleFormat, ProjectUtils.getInformation(project).getDisplayName()); DialogDescriptor dd = new DialogDescriptor(text, title, true, new Object[]{projectProperties, cleanAndBuild, ok}, ok, DialogDescriptor.DEFAULT_ALIGN, null, null); dd.setMessageType(NotifyDescriptor.WARNING_MESSAGE); Object result = DialogDisplayer.getDefault().notify(dd); if (result == projectProperties) { if (presenter != null) { presenter.showCustomizer("Run"); // NOI18N } return false; } if (result == cleanAndBuild) { return true; } else { return false; } }
public void run() { try { BrokenDatasourceAlertPanel alert = new BrokenDatasourceAlertPanel(); JButton close = new JButton( NbBundle.getMessage(BrokenDatasourceSupport.class, "LBL_BrokenDatasourcesCustomizer_Close")); close.getAccessibleContext().setAccessibleDescription( NbBundle.getMessage(BrokenDatasourceSupport.class, "ACSD_BrokenDatasourcesCustomizer_Close")); DialogDescriptor dd = new DialogDescriptor( alert, NbBundle.getMessage(BrokenDatasourceAlertPanel.class, "MSG_Broken_Datasources_Title"), true, new Object[] {close}, close, DialogDescriptor.DEFAULT_ALIGN, null, null); dd.setMessageType(DialogDescriptor.WARNING_MESSAGE); Dialog dlg = DialogDisplayer.getDefault().createDialog(dd); dlg.setVisible(true); } finally { synchronized (BrokenDatasourceSupport.class) { brokenAlertLastTime = System.currentTimeMillis(); brokenAlertShown = false; } } } });
desc.setMessageType(NotifyDescriptor.WARNING_MESSAGE); desc.setOptionType(NotifyDescriptor.OK_CANCEL_OPTION); JButton alwaysButton = null;
NbBundle.getMessage(MainClassWarning.class, "CTL_FileMainClass_Title"), // NOI18N true, options, options[0], DialogDescriptor.BOTTOM_ALIGN, null, null); desc.setMessageType(DialogDescriptor.INFORMATION_MESSAGE); Dialog dlg = DialogDisplayer.getDefault().createDialog(desc); dlg.setVisible(true);
descriptor.setMessageType(DialogDescriptor.INFORMATION_MESSAGE); descriptor.setOptions(options); descriptor.setClosingOptions(options);
public void show() { fillText(); String title = Catalog.format("SignalTitle", session); // NOI18N dlg = new DialogDescriptor( panel, title, true, new JButton [] { BDiscardAndPause, BDiscardAndContinue, BForwardAndContinue, }, BDiscardAndPause, DialogDescriptor.DEFAULT_ALIGN, null, // help context? null); dlg.setMessageType(NotifyDescriptor.WARNING_MESSAGE); dialog = DialogDisplayer.getDefault().createDialog(dlg); Catalog.setAccessibleDescription(dialog, "ACSD_SignalCaught"); // NOI18N dialog.setVisible(true); }
private static Object showDialog(String msg, Object[] options) { DialogDescriptor descriptor = new DialogDescriptor(msg, NbBundle.getMessage(RubyPlatform.class, "MissingRuby"), true, options, options[0], DialogDescriptor.DEFAULT_ALIGN, new HelpCtx(RubyPlatform.class), null); descriptor.setMessageType(NotifyDescriptor.Message.ERROR_MESSAGE); descriptor.setModal(true); Dialog dlg = null; try { dlg = DialogDisplayer.getDefault().createDialog(descriptor); dlg.setVisible(true); } finally { if (dlg != null) { dlg.dispose(); } } return descriptor.getValue(); }
protected void ifNecessaryShowNoWebFolderDialog() { if (isShowNoWebFolderDialog()) { final NotWebFolder panel = new NotWebFolder(NO_WEB_FOLDER_WARNING); DialogDescriptor descriptor = new DialogDescriptor(panel, NO_WEB_FOLDER_TITLE, true, NotifyDescriptor.PLAIN_MESSAGE, NotifyDescriptor.YES_OPTION, null); JButton okButton = new JButton( NbBundle.getMessage(PageFlowController.class, "MSG_OkButtonText")); //NOI18N descriptor.setOptions(new Object[]{okButton}); descriptor.setMessageType(NotifyDescriptor.PLAIN_MESSAGE); descriptor.setClosingOptions(new Object[]{okButton}); descriptor.setOptionsAlign(DialogDescriptor.BOTTOM_ALIGN); final Dialog d = DialogDisplayer.getDefault().createDialog(descriptor); d.setSize(400, 200); d.setVisible(true); setShowNoWebFolderDialog(panel.getShowDialog()); } }
dlg.setMessageType(NotifyDescriptor.INFORMATION_MESSAGE);
null); final Dialog dialog = DialogDisplayer.getDefault().createDialog(dlg); dlg.setMessageType(NotifyDescriptor.WARNING_MESSAGE); dlg.setClosingOptions(new Object[]{DialogDescriptor.OK_OPTION}); dialog.setVisible(true);
null); final Dialog dialog = DialogDisplayer.getDefault().createDialog(dlg); dlg.setMessageType(NotifyDescriptor.WARNING_MESSAGE); dlg.setClosingOptions(new Object[]{DialogDescriptor.OK_OPTION}); dialog.setVisible(true);
null, null); dlg.setMessageType(NotifyDescriptor.ERROR_MESSAGE);
final DialogDescriptor desc = new DialogDescriptor(panel, title, true, options, DialogDescriptor.CLOSED_OPTION, DialogDescriptor.DEFAULT_ALIGN, new HelpCtx(MissingDatabaseConnectionWarning.class), null); desc.setMessageType(DialogDescriptor.WARNING_MESSAGE); Dialog dlg = null; try {
final DialogDescriptor desc = new DialogDescriptor(panel, title, true, options, DialogDescriptor.OK_OPTION, DialogDescriptor.DEFAULT_ALIGN, null, null); desc.setMessageType(DialogDescriptor.WARNING_MESSAGE); Dialog dlg = null; try {