void setDescriptor(DialogDescriptor dd) { this.dd = dd; this.notificationLineSupport = dd.createNotificationLineSupport(); }
public boolean open() { descriptor = new DialogDescriptor( this, NbBundle.getMessage(NewRemoteConnectionPanel.class, "LBL_CreateNewConnection"), true, DialogDescriptor.OK_CANCEL_OPTION, DialogDescriptor.OK_OPTION, null); descriptor.setValid(false); notificationLineSupport = descriptor.createNotificationLineSupport(); notificationLineSupport.setInformationMessage(NbBundle.getMessage(NewRemoteConnectionPanel.class, "TXT_ProvideConnectionName")); return DialogDisplayer.getDefault().notify(descriptor) == NotifyDescriptor.OK_OPTION; }
public static RunFileActionProvider.RunFileArgs open(RunFileActionProvider.RunFileArgs args, File file, boolean debug) { final RunFilePanel panel = new RunFilePanel(args); panel.dialogDescriptor = new DialogDescriptor( panel, NbBundle.getMessage(RunFilePanel.class, debug ? "LBL_DebugFile" : "LBL_RunFile", file.getName()), true, DialogDescriptor.OK_CANCEL_OPTION, DialogDescriptor.OK_OPTION, null); panel.notificationLineSupport = panel.dialogDescriptor.createNotificationLineSupport(); panel.validateWorkDir(); if (DialogDisplayer.getDefault().notify(panel.dialogDescriptor) == DialogDescriptor.OK_OPTION) { return panel.getArgs(); } return null; }
public boolean open() { descriptor = new DialogDescriptor( this, NbBundle.getMessage(AskForUrlPanel.class, "LBL_SpecifyUrl"), true, null); notificationLineSupport = descriptor.createNotificationLineSupport(); Dialog dialog = DialogDisplayer.getDefault().createDialog(descriptor); try { validateFields(); dialog.setVisible(true); } finally { dialog.dispose(); } boolean ok = descriptor.getValue() == NotifyDescriptor.OK_OPTION; if (ok) { Set<String> urls = new LinkedHashSet<>(); urls.add((String) urlComboBox.getSelectedItem()); for (int i = 0; i < urlComboBox.getItemCount(); ++i) { urls.add(urlComboBox.getItemAt(i)); } ProjectSettings.setDebugUrls(project, new ArrayList<>(urls)); } return ok; }
private void addButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addButtonActionPerformed Collection<String> currentLocales = new HashSet<String>(); ListModel locales = installedLocalesList.getModel(); for (int c = 0; c < locales.getSize(); c++) { currentLocales.add(locales.getElementAt(c).toString()); } JButton okButton = new JButton(NbBundle.getMessage(SpellcheckerOptionsPanel.class, "BTN_Add")); DictionaryInstallerPanel panel = new DictionaryInstallerPanel(okButton, currentLocales); DialogDescriptor dd = new DialogDescriptor(panel, NbBundle.getMessage(SpellcheckerOptionsPanel.class, "LBL_AddDictionary"), true, new Object[] {okButton, DialogDescriptor.CANCEL_OPTION}, okButton, DialogDescriptor.DEFAULT_ALIGN, null, null); dd.setClosingOptions(null); panel.setNotifications(dd.createNotificationLineSupport()); Dialog d = DialogDisplayer.getDefault().createDialog(dd); d.setVisible(true); if (dd.getValue() == okButton) { DictionaryDescription desc = panel.createDescription(); addedDictionaries.add(desc); removedDictionaries.remove(desc.getLocale()); updateLocales(); } fireChanged(); }//GEN-LAST:event_addButtonActionPerformed
public static FileObject open(List<FileObject> sourceRoots, List<FileObject> files) { final SelectFilePanel panel = new SelectFilePanel(sourceRoots, files); panel.dialogDescriptor = new DialogDescriptor( panel, NbBundle.getMessage(SelectFilePanel.class, "LBL_SelectFile"), true, DialogDescriptor.OK_CANCEL_OPTION, DialogDescriptor.OK_OPTION, null); panel.notificationLineSupport = panel.dialogDescriptor.createNotificationLineSupport(); panel.validateSelection(); if (DialogDisplayer.getDefault().notify(panel.dialogDescriptor) == DialogDescriptor.OK_OPTION) { return panel.getSelectedFile(); } return null; }
public static DatabaseConnection selectConnection(DatabaseConnection selectedDBConn, boolean mySQLOnly, boolean passwordRequired) { SelectConnectionPanel panel = new SelectConnectionPanel(selectedDBConn, mySQLOnly, passwordRequired); DialogDescriptor desc = new DialogDescriptor(panel, NbBundle.getMessage(SelectConnectionPanel.class, "MSG_SelectConnection")); desc.createNotificationLineSupport(); panel.initialize(desc); Dialog dialog = DialogDisplayer.getDefault().createDialog(desc); dialog.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(SelectConnectionPanel.class, "ACSD_SelectConnection")); dialog.setVisible(true); dialog.dispose(); if (desc.getValue() == DialogDescriptor.OK_OPTION) { return panel.dbconn; } // If the user cancels, keep the selection they started with, rather than setting it to null return selectedDBConn; }
/**************************************************************************/ public boolean showDialog() { dialogOK = false; descriptor = new DialogDescriptor (this, bundle.getString("LBL_Customizer_InsertPrefix") + " " + displayName, true, // NOI18N DialogDescriptor.OK_CANCEL_OPTION, DialogDescriptor.OK_OPTION, new ActionListener() { public void actionPerformed(ActionEvent e) { if (descriptor.getValue().equals(DialogDescriptor.OK_OPTION)) { evaluateInput(); dialogOK = true; } dialog.dispose(); } } ); statusLine = descriptor.createNotificationLineSupport(); dialog = DialogDisplayer.getDefault().createDialog(descriptor); dialog.setVisible(true); repaint(); return dialogOK; }
/** * @return <code>true</code> if OK button is chosen. */ public boolean open() { dialogDescriptor = new DialogDescriptor( this, NbBundle.getMessage(BrowseTestSources.class, "LBL_DirectoryForProject", ProjectUtils.getInformation(phpProject).getDisplayName()), true, DialogDescriptor.OK_CANCEL_OPTION, DialogDescriptor.OK_OPTION, null); notificationLineSupport = dialogDescriptor.createNotificationLineSupport(); if (info != null) { notificationLineSupport.setInformationMessage(info); } dialogDescriptor.setValid(false); return DialogDisplayer.getDefault().notify(dialogDescriptor) == DialogDescriptor.OK_OPTION; }
public boolean open() { descriptor = new DialogDescriptor( this, NbBundle.getMessage(RunAsWebAdvanced.class, "LBL_AdvancedWebConfiguration"), true, null); notificationLineSupport = descriptor.createNotificationLineSupport(); Dialog dialog = DialogDisplayer.getDefault().createDialog(descriptor); try { validateFields(); dialog.setVisible(true); } finally { dialog.dispose(); } return descriptor.getValue() == NotifyDescriptor.OK_OPTION; }
statusLine = descriptor.createNotificationLineSupport(); validateInput(); dialog = DialogDisplayer.getDefault().createDialog(descriptor);
@NbBundle.Messages({ "ProgressPanel.title=Synchronization", "ProgressPanel.button.cancel=&Cancel" }) public void createPanel(AtomicBoolean cancel) { assert SwingUtilities.isEventDispatchThread(); actionButton = new JButton(); actionButton.addActionListener(new ActionButtionListener(cancel)); Mnemonics.setLocalizedText(actionButton, Bundle.ProgressPanel_button_cancel()); DialogDescriptor descriptor = new DialogDescriptor( this, Bundle.ProgressPanel_title(), true, new Object[] {actionButton}, actionButton, DialogDescriptor.DEFAULT_ALIGN, null, null); descriptor.setValid(false); descriptor.setClosingOptions(new Object[]{}); descriptor.setAdditionalOptions(new Object[]{autoCloseCheckBox}); notificationLineSupport = descriptor.createNotificationLineSupport(); dialog = DialogDisplayer.getDefault().createDialog(descriptor); }
@NbBundle.Messages("UserAnnotationPanel.title=Custom Annotation") public boolean open() { assert EventQueue.isDispatchThread(); descriptor = new DialogDescriptor( this, Bundle.UserAnnotationPanel_title(), true, NotifyDescriptor.OK_CANCEL_OPTION, NotifyDescriptor.OK_OPTION, null); notificationLineSupport = descriptor.createNotificationLineSupport(); final Dialog dialog = DialogDisplayer.getDefault().createDialog(descriptor); validateAnnotation(); boolean okPressed; try { dialog.setVisible(true); okPressed = descriptor.getValue() == NotifyDescriptor.OK_OPTION; } finally { dialog.dispose(); } return okPressed; }
public static TableAndColumns selectTableAndColumns(String connVariable) { TableGeneratorPanel panel = new TableGeneratorPanel(); DialogDescriptor desc = new DialogDescriptor(panel, NbBundle.getMessage(TableGeneratorPanel.class, "MSG_SelectTableAndColumns")); desc.createNotificationLineSupport(); panel.initialize(desc, connVariable); Dialog dialog = DialogDisplayer.getDefault().createDialog(desc); dialog.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(TableGeneratorPanel.class, "ACSD_SelectColumns")); dialog.setVisible(true); dialog.dispose(); if (desc.getValue() == DialogDescriptor.OK_OPTION) { Quoter quoter = SQLIdentifiers.createQuoter(panel.dmd); return new TableAndColumns(quoter, panel.newTable, panel.getAllColumns(), panel.getSelectedColumns(), panel.getConnVariable()); // NOI18N } return null; }
statusLine = descriptor.createNotificationLineSupport();
@NbBundle.Messages("SelectProviderPanel.title=Select Testing Provider") @CheckForNull public static PhpTestingProvider open(List<PhpTestingProvider> providers) { final SelectProviderPanel panel = new SelectProviderPanel(providers); panel.dialogDescriptor = new DialogDescriptor( panel, Bundle.SelectProviderPanel_title(), true, DialogDescriptor.OK_CANCEL_OPTION, DialogDescriptor.OK_OPTION, null); panel.notificationLineSupport = panel.dialogDescriptor.createNotificationLineSupport(); panel.validateSelection(); if (DialogDisplayer.getDefault().notify(panel.dialogDescriptor) == DialogDescriptor.OK_OPTION) { return panel.getSelectedProvider(); } return null; }
private void initDialog() { jsfCustomizer.addChangeListener(listener); dialogDescriptor.createNotificationLineSupport(); dialogDescriptor.setHelpCtx(jsfCustomizer.getHelpCtx()); dialogDescriptor.setButtonListener(new ButtonsListener()); listener.setJsfComponentExtender(jsfCustomizer); listener.setDialogDescriptor(dialogDescriptor); }
DialogDescriptor.DEFAULT_ALIGN, null, null); descriptor.setClosingOptions(new Object[]{actionButton, DialogDescriptor.CANCEL_OPTION}); panel.setMessageLine(descriptor.createNotificationLineSupport());
DialogDescriptor.DEFAULT_ALIGN, null, null); descriptor.setClosingOptions(new Object[] {renameButton, DialogDescriptor.CANCEL_OPTION}); panel.setMessageLine(descriptor.createNotificationLineSupport()); Dialog dlg = null;
DialogDescriptor.DEFAULT_ALIGN, null, null); descriptor.setClosingOptions(new Object[] {tagButton, DialogDescriptor.CANCEL_OPTION}); panel.setMessageLine(descriptor.createNotificationLineSupport()); Dialog dlg = null;