protected XMLReader createXMLReader() { XMLReader parser = null; try { parser = XMLUtil.createXMLReader(false, true); try { parser.setProperty("http://xml.org/sax/properties/lexical-handler", this); //NOI18N } catch (SAXException sex) { Logger.getLogger(XMLMIMEComponent.class.getName()).fine(NbBundle.getMessage(XMLMIMEComponent.class, "W-003")); //NOI18N } } catch (SAXException ex) { Logger.getLogger(XMLMIMEComponent.class.getName()).log(Level.WARNING, null, ex); } return parser; }
private void updateButtonAccessibleDescription() { assert SwingUtilities.isEventDispatchThread() : "Call only in AWT queue."; String stepName = ((contentData != null) && (contentSelectedIndex > 0) && ((contentSelectedIndex - 1) < contentData.length)) ? contentData[contentSelectedIndex - 1] : ""; // NOI18N try { previousButton.getAccessibleContext().setAccessibleDescription( NbBundle.getMessage(WizardDescriptor.class, "ACSD_PREVIOUS", new Integer(contentSelectedIndex), stepName) ); } catch (IllegalArgumentException iae) { err.log (Level.INFO, iae.getLocalizedMessage() + " while setting ACSD_PREVIOUS with params " + stepName + ", " + contentSelectedIndex, iae); // NOI18N } stepName = ((contentData != null) && (contentSelectedIndex < (contentData.length - 1)) && ((contentSelectedIndex + 1) >= 0)) ? contentData[contentSelectedIndex + 1] : ""; // NOI18N try { nextButton.getAccessibleContext().setAccessibleDescription( NbBundle.getMessage(WizardDescriptor.class, "ACSD_NEXT", new Integer(contentSelectedIndex + 2), stepName) ); } catch (IllegalArgumentException iae) { err.log (Level.INFO, iae.getLocalizedMessage() + " while setting ACSD_NEXT with params " + stepName + ", " + (contentSelectedIndex + 2), iae); // NOI18N } }
area.setEditable(false); area.setFocusable(true); area.getAccessibleContext().setAccessibleName(NbBundle.getMessage(NotifyDescriptor.class, "ACN_NotifyDescriptor_MessageJTextArea")); // NOI18N area.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(NotifyDescriptor.class, "ACD_NotifyDescriptor_MessageJTextArea")); // NOI18N newMessage = area;
private String[] createSteps() { List<String> arr = new ArrayList<String>(); arr.add(NbBundle.getMessage(SampleAppWizardIterator.class, "LBL_CreateProjectStep")); return arr.toArray(new String[0]); }
@Override public Action[] getActions () { List<Action> actions = new ArrayList<Action>(); if (!master.isIncomingSearch()) { actions.add(new AbstractAction(NbBundle.getMessage(SummaryView.class, "CTL_SummaryView_DiffRevision")) { //NOI18N @Override public void actionPerformed(ActionEvent e) { diffPrevious(master, revision); } }); } actions.addAll(Arrays.asList(revision.getActions())); return actions.toArray(new Action[actions.size()]); }
private void warnIssue204880(final String msg) { LOG.log(Level.SEVERE, msg + " (issue 204880)."); // NOI18N Exception npe = new NullPointerException(msg + " (issue 204880)."); // NOI18N npe.printStackTrace(); NotifyDescriptor d = new NotifyDescriptor.Message( NbBundle.getMessage(JavaFXProjectWizardIterator.class,"WARN_Issue204880"), NotifyDescriptor.ERROR_MESSAGE); // NOI18N DialogDisplayer.getDefault().notify(d); } }
public void showEditor() { String title = NbBundle.getMessage(MappingEditor.class, "TITLE_filter_mapping"); //NOI18N editDialog = new DialogDescriptor(this, title, true, DialogDescriptor.OK_CANCEL_OPTION, DialogDescriptor.CANCEL_OPTION, DialogDescriptor.BOTTOM_ALIGN, null, this); dialog = DialogDisplayer.getDefault().createDialog(editDialog); dialog.pack(); dialog.setVisible(true); }
/** Notifies user that the drop was not succesfull. */ static void dropNotSuccesfull() { DialogDisplayer.getDefault().notify( new Message( NbBundle.getMessage(TreeViewDropSupport.class, "MSG_NoPasteTypes"), NotifyDescriptor.WARNING_MESSAGE ) ); }
public boolean open() { DialogDescriptor input = new DialogDescriptor( this, NbBundle.getMessage(PasswordPanel.class, "LBL_EnterPassword", configurationName), true, NotifyDescriptor.OK_CANCEL_OPTION, NotifyDescriptor.OK_OPTION, null); return DialogDisplayer.getDefault().notify(input) == NotifyDescriptor.OK_OPTION; }
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; }
@Override public String call() throws Exception { try { try (ResultSet rs = dmd.getTables(catalog, schema, "%", new String[] {"TABLE"})) { while (rs.next()) { tables.add(rs.getString("TABLE_NAME")); // NOI18N } } return null; } catch (SQLException e) { Exceptions.printStackTrace(e); return NbBundle.getMessage(TableGeneratorPanel.class, "ERR_DatabaseMetadata"); } } });
@Override public Action[] getUserActions () { List<Action> actions = new ArrayList<Action>(); if (!master.isIncomingSearch()) { actions.add(new AbstractAction(NbBundle.getMessage(SummaryView.class, "CTL_SummaryView_DiffToPrevious")) { // NOI18N @Override public void actionPerformed(ActionEvent e) { diffPrevious(master, event); } }); actions.addAll(Arrays.asList(event.getActions())); } return actions.toArray(new Action[actions.size()]); }
protected void createData(String name) throws IOException { File f = getFile(name); boolean isError = true; IOException creationException = null; String annotationMsg = null; try { isError = f.createNewFile() ? false : true; isError = isError ? true : (!f.exists()); if (isError) { annotationMsg = NbBundle.getMessage(LocalFileSystem.class, "EXC_DataAlreadyExist", f.getName(), getDisplayName(), f.getAbsolutePath()); creationException = new SyncFailedException(annotationMsg); } } catch (IOException iex) { isError = true; creationException = iex; annotationMsg = iex.getLocalizedMessage(); } if (isError) { LOG.log(Level.INFO, "Trying to create new file {0}.", f.getPath()); ExternalUtil.annotate(creationException, annotationMsg); throw creationException; } }
public boolean showWindow() { DialogDescriptor dd = new DialogDescriptor(this, NbBundle.getMessage(FilterEditor.class, "LBL_FilterEditor"), true, //NOI18N new Object[]{btnOk, btnCancel}, btnOk, DialogDescriptor.DEFAULT_ALIGN, HelpCtx.DEFAULT_HELP, null); Dialog dlg = DialogDisplayer.getDefault().createDialog(dd); dlg.setVisible(true); if (btnOk.equals(dd.getValue())) { updateFilters(); return true; } return false; }
private void notifyPortConflict() { String message = NbBundle.getMessage(RailsServerManager.class, "Conflict", Integer.toString(originalPort)); NotifyDescriptor nd = new NotifyDescriptor.Message(message, NotifyDescriptor.Message.ERROR_MESSAGE); DialogDisplayer.getDefault().notify(nd); }
private void includeExcludeButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_includeExcludeButtonActionPerformed IncludeExcludeVisualizer v = new IncludeExcludeVisualizer(); uiProperties.loadIncludesExcludes(v); DialogDescriptor dd = new DialogDescriptor(v.getVisualizerPanel(), NbBundle.getMessage(CustomizerSources.class, "CustomizerSources.title.includeExclude")); dd.setOptionType(NotifyDescriptor.OK_CANCEL_OPTION); if (NotifyDescriptor.OK_OPTION.equals(DialogDisplayer.getDefault().notify(dd))) { uiProperties.storeIncludesExcludes(v); } }//GEN-LAST:event_includeExcludeButtonActionPerformed
panel.getAccessibleContext().setAccessibleDescription( NbBundle.getMessage(NotifyDescriptor.class, "ACSD_InputPanel") ); textField.getAccessibleContext().setAccessibleDescription( NbBundle.getMessage(NotifyDescriptor.class, "ACSD_InputField") );
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 List<StatusCode> initStatusCodes() { List<StatusCode> result = new ArrayList<StatusCode>(STATUS_CODE_KEYS.length); NbBundle.getBundle(RubyHttpStatusCodeCompleter.class); for (String key : STATUS_CODE_KEYS) { String shortDesc = NbBundle.getMessage(RubyHttpStatusCodeCompleter.class, "SC_" + key); String longDesc = NbBundle.getMessage(RubyHttpStatusCodeCompleter.class, "SC_" + key + "_DESC"); result.add(new StatusCode(key, shortDesc, longDesc)); } return result; }
final String msg = NbBundle.getMessage(LocalFileSystem.class, "EXC_CannotRename", oldName, getDisplayName(), newName, existsNF, rename); if (retry > 10) { throw new FSException(msg); LOG.log(Level.WARNING, "Rename #{0} failed: {1}", new Object[]{retry, msg}); if (rndm == null) { rndm = new Random(); LOG.log(Level.INFO, "Sleeping for {0} ms", sleep); try { Thread.sleep(sleep); } catch (InterruptedException ex) { LOG.log(Level.FINE, null, ex);