/** The name of the filesystem. */ public @Override String getDisplayName() { return NbBundle.getMessage(MultiFileSystem.class, "CTL_MultiFileSystem"); }
Iterator<String> it = NbBundle.getLocalizingSuffixes();
/** * Get a resource bundle with the default class loader and branding. * @param baseName bundle basename * @param locale the locale to use (but still uses {@link #getBranding default branding}) * @return the resource bundle * @exception MissingResourceException if the bundle does not exist */ public static ResourceBundle getBundle(String baseName, Locale locale) throws MissingResourceException { return getBundle(baseName, locale, getLoader()); }
/** Get a resource bundle in the same package as the provided class, * with the default locale/branding and the class' own classloader. * The usual style of invocation is {@link #getMessage(Class,String)} * or one of the other overloads taking message formats. * * @param clazz the class to take the package name from * @return the resource bundle * @exception MissingResourceException if the bundle does not exist */ public static ResourceBundle getBundle(Class<?> clazz) throws MissingResourceException { String name = findName(clazz); return getBundle(name, Locale.getDefault(), clazz.getClassLoader()); }
HTTPPanel() { this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); httpLabel.setText(bundle.getString("enterUrlHttp")); //NOI18N httpLabel.setAlignmentX(JLabel.LEFT_ALIGNMENT); this.add(httpLabel); textField.setMaximumSize(new Dimension(Integer.MAX_VALUE, textField.getPreferredSize().height)); textField.setAlignmentX(JTextField.LEFT_ALIGNMENT); textField.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(StandardUrlPanel.class, "URL_TEXTFIELD_ACCESS_NAME")); textField.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(StandardUrlPanel.class, "URL_TEXTFIELD_ACCESS_DESC")); this.add(textField); } }
bBack.setDisabledIcon(ImageUtilities.loadImageIcon("org/openide/resources/html/back_disabled.png", true)); //NOI18N bBack.setSelectedIcon(bBack.getIcon()); bBack.setToolTipText(NbBundle.getMessage(HtmlBrowser.class, "CTL_Back")); //NOI18N bForward = new JButton(); bForward.setDisabledIcon(ImageUtilities.loadImageIcon("org/openide/resources/html/forward_disabled.png", true)); //NOI18N bForward.setSelectedIcon(bForward.getIcon()); bForward.setToolTipText(NbBundle.getMessage(HtmlBrowser.class, "CTL_Forward")); //NOI18N bReload.setDisabledIcon(ImageUtilities.loadImageIcon("org/openide/resources/html/refresh.png", true)); //NOI18N bReload.setSelectedIcon(bReload.getIcon()); bReload.setToolTipText(NbBundle.getMessage(HtmlBrowser.class, "CTL_Reload")); //NOI18N bReload.setFocusPainted(false); bStop.setDisabledIcon(ImageUtilities.loadImageIcon("org/openide/resources/html/stop.png", true)); //NOI18N bStop.setSelectedIcon(bStop.getIcon()); bStop.setToolTipText(NbBundle.getMessage(HtmlBrowser.class, "CTL_Stop")); //NOI18N bStop.setFocusPainted(false); bBack.getAccessibleContext().setAccessibleName(bBack.getToolTipText()); bForward.getAccessibleContext().setAccessibleName(bForward.getToolTipText()); bReload.getAccessibleContext().setAccessibleName(bReload.getToolTipText()); bStop.getAccessibleContext().setAccessibleName(bStop.getToolTipText()); txtLocation.getAccessibleContext().setAccessibleDescription( NbBundle.getMessage(HtmlBrowser.class, "ACSD_HtmlBrowser_Location") );
private boolean showUpdateDialog() { JButton updateOption = new JButton (NbBundle.getMessage(UpdateProjectImpl.class, "CTL_UpdateOption")); updateOption.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(UpdateProjectImpl.class, "AD_UpdateOption")); return DialogDisplayer.getDefault().notify( new NotifyDescriptor (NbBundle.getMessage(UpdateProjectImpl.class,"TXT_ProjectUpdate", BUILD_NUMBER), NbBundle.getMessage(UpdateProjectImpl.class,"TXT_ProjectUpdateTitle"), NotifyDescriptor.DEFAULT_OPTION, NotifyDescriptor.WARNING_MESSAGE, new Object[] { updateOption, NotifyDescriptor.CANCEL_OPTION }, updateOption)) == updateOption; }
MainClassListener( SourceRoots sourceRoots, JTextField mainClassTextField ) { this.sourceRoots = sourceRoots; this.mainClassTextField = mainClassTextField; this.okButton = new JButton (NbBundle.getMessage (CustomizerRun.class, "LBL_ChooseMainClass_OK")); this.okButton.getAccessibleContext().setAccessibleDescription (NbBundle.getMessage (CustomizerRun.class, "AD_ChooseMainClass_OK")); }
return (Component) option; } else if (option instanceof Icon) { return new JLabel((Icon) option); } else { String text; text = NbBundle.getMessage(DialogDisplayer.class, "CTL_OK"); defcap = true; } else if (option == NotifyDescriptor.CANCEL_OPTION) { text = NbBundle.getMessage(DialogDisplayer.class, "CTL_CANCEL"); defcap = false; } else if (option == NotifyDescriptor.YES_OPTION) { text = NbBundle.getMessage(DialogDisplayer.class, "CTL_YES"); defcap = true; } else if (option == NotifyDescriptor.NO_OPTION) { text = NbBundle.getMessage(DialogDisplayer.class, "CTL_NO"); defcap = false; } else if (option == NotifyDescriptor.CLOSED_OPTION) { JButton b = new JButton(text); b.getAccessibleContext().setAccessibleName(text); b.addActionListener(l);
private void cancelledAction() { JButton ok = new JButton(NbBundle.getMessage(ExceptionHandler.class, "CTL_Action_OK")); // NOI18N NotifyDescriptor descriptor = new NotifyDescriptor( ACTION_CANCELED_BY_USER, NbBundle.getMessage(ExceptionHandler.class, "CTL_ActionCanceled_Title"), // NOI18N NotifyDescriptor.DEFAULT_OPTION, NotifyDescriptor.WARNING_MESSAGE, new Object [] { ok }, ok); DialogDisplayer.getDefault().notify(descriptor); return; }
/** Notifies user that the drop was not succesfull. */ static void dropNotSuccesfull () { DialogDisplayer.getDefault().notify( new Message( NbBundle.getBundle(TreeViewDropSupport.class). getString("MSG_NoPasteTypes"), NotifyDescriptor.WARNING_MESSAGE) ); }
contentList.setOpaque(false); contentList.setEnabled(false); contentList.getAccessibleContext().setAccessibleDescription(""); // NOI18N label = new JLabel(NbBundle.getMessage(WizardDescriptor.class, "CTL_ContentName")); label.setForeground(Color.white); label.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, label.getForeground())); label.setFont(doDeriveFont(label.getFont(), Font.BOLD)); contentLabelPanel = new JPanel(new BorderLayout());
void setPrompt( String prompt ) { if ( prompt == null ) { promptLabel.setVisible( false ); getAccessibleContext().setAccessibleDescription(NbBundle.getBundle(AdminAuthenticator.class).getString("ACSD_NbAuthenticatorPasswordPanel")); } else { promptLabel.setVisible( true ); promptLabel.setText( prompt ); getAccessibleContext().setAccessibleDescription(prompt); } } }
private void initAccessible() { if (nameFormat == null) { ResourceBundle bundle = NbBundle.getBundle(SplittedPanel.class); nameFormat = new MessageFormat(bundle.getString("ACS_SplittedPanel_Name")); getAccessibleContext().setAccessibleName( nameFormat.format( new Object[] { ((firstComponent == null) || !(firstComponent instanceof Accessible)) ? null : firstComponent.getAccessibleContext() .getAccessibleName(), ((secondComponent == null) || !(secondComponent instanceof Accessible)) ? null : secondComponent.getAccessibleContext() .getAccessibleName() ResourceBundle bundle = NbBundle.getBundle(SplittedPanel.class); descriptionFormat = new MessageFormat(bundle.getString("ACS_SplittedPanel_Description"));
public boolean showGeneralDialog () { JButton btn = new JButton(); org.openide.awt.Mnemonics.setLocalizedText(btn, org.openide.util.NbBundle.getMessage(BranchSelector.class, "CTL_BranchSelectorPanel_Action_OK")); // NOI18N btn.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(BranchSelector.class, "ACSD_BranchSelectorPanel_Action_OK")); // NOI18N btn.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(BranchSelector.class, "ACSN_BranchSelectorPanel_Action_OK")); // NOI18N btn.setEnabled(false); return showDialog(btn, NbBundle.getMessage(BranchSelector.class, "CTL_BranchSelectorPanel.title", repository.getName()), //NOI18N NbBundle.getMessage(BranchSelector.class, "BranchSelectorPanel.infoLabel.text")); //NOI18N }
public EmptySplitter(int width) { ResourceBundle bundle = NbBundle.getBundle(SplittedPanel.class); accessibleContext = null; this.width = width; getAccessibleContext().setAccessibleName(bundle.getString("ACS_SplittedPanel_EmptySplitter")); getAccessibleContext().setAccessibleName(bundle.getString("ACSD_SplittedPanel_EmptySplitter")); }
/** Set new option alignment. See aligment constants for * possible values. * Fires property change event if successful. * * @param optionsAlign new options alignment * @throws IllegalArgumentException when unknown alignment is given * @see #DEFAULT_ALIGN */ public void setOptionsAlign(final int optionsAlign) { if ((optionsAlign != BOTTOM_ALIGN) && (optionsAlign != RIGHT_ALIGN)) { throw new IllegalArgumentException( NbBundle.getBundle(DialogDescriptor.class).getString("EXC_OptionsAlign") ); } if (this.optionsAlign == optionsAlign) { return; } int oldValue = this.optionsAlign; this.optionsAlign = optionsAlign; firePropertyChange(PROP_OPTIONS_ALIGN, new Integer(oldValue), new Integer(optionsAlign)); }
panel.setOpaque (false); JLabel textLabel = new JLabel(); Mnemonics.setLocalizedText(textLabel, text); textLabel.setLabelFor(textField); panel.getAccessibleContext().setAccessibleDescription( NbBundle.getMessage(NotifyDescriptor.class, "ACSD_InputPanel") ); textField.getAccessibleContext().setAccessibleDescription( NbBundle.getMessage(NotifyDescriptor.class, "ACSD_InputField") );
public static boolean show(JPanel panel, String title, String okName) { JButton ok = new JButton(okName); ok.getAccessibleContext().setAccessibleDescription(ok.getText()); JButton cancel = new JButton(NbBundle.getMessage(Util.class, "LBL_Cancel")); // NOI18N cancel.getAccessibleContext().setAccessibleDescription(cancel.getText()); final DialogDescriptor dd = new DialogDescriptor( panel, title, true, new Object[]{ok, cancel}, ok, DialogDescriptor.DEFAULT_ALIGN, new HelpCtx(panel.getClass()), null); return DialogDisplayer.getDefault().notify(dd) == ok; }