protected void installStrings(JFileChooser fc) { super.installStrings(fc); Locale l = fc.getLocale(); enterFileNameLabelText = UIManager.getString("FileChooser.enterFileNameLabelText", l); enterFileNameLabelMnemonic = UIManager.getInt("FileChooser.enterFileNameLabelMnemonic"); filesLabelText = UIManager.getString("FileChooser.filesLabelText", l); filesLabelMnemonic = UIManager.getInt("FileChooser.filesLabelMnemonic"); foldersLabelText = UIManager.getString("FileChooser.foldersLabelText", l); foldersLabelMnemonic = UIManager.getInt("FileChooser.foldersLabelMnemonic"); pathLabelText = UIManager.getString("FileChooser.pathLabelText", l); pathLabelMnemonic = UIManager.getInt("FileChooser.pathLabelMnemonic"); filterLabelText = UIManager.getString("FileChooser.filterLabelText", l); filterLabelMnemonic = UIManager.getInt("FileChooser.filterLabelMnemonic"); }
/** * Creates the crayons. * * @return Array of crayons in z-order from bottom to top. */ protected Crayon[] createCrayons() { Color[] colors = DefaultPalettes.CRAYONS; crayons = new Crayon[colors.length]; for (int i = 0; i < colors.length; i++) { crayons[i] = new Crayon( colors[i], UIManager.getString( "ColorChooser.crayon." + Integer.toHexString(0xff000000 | colors[i].getRGB()).substring(2)), new Polygon( (int[]) crayonXPoints.clone(), (int[]) crayonYPoints.clone(), crayonXPoints.length)); crayons[i].shape.translate((i % 8) * 22 + 4 + ((i / 8) % 2) * 11, (i / 8) * 20 + 23); } return crayons; }
protected void fileOpened(final Project project, File file, Object value) { if (value == null) { project.setFile(file); project.setEnabled(true); getApplication().addRecentFile(file); } else { JSheet.showMessageSheet( project.getComponent(), "<html>" + UIManager.getString("OptionPane.css") + "<b>Couldn't open the file \"" + file + "\".</b><br>" + value, JOptionPane.ERROR_MESSAGE, new SheetListener() { public void optionSelected(SheetEvent evt) { project.clear(); project.setEnabled(true); } }); } }
/** * Returns the buttons to display from the JOptionPane the receiver is providing the look and feel * for. If the JOptionPane has options set, they will be provided, otherwise if the optionType is * YES_NO_OPTION, yesNoOptions is returned, if the type is YES_NO_CANCEL_OPTION yesNoCancelOptions * is returned, otherwise defaultButtons are returned. */ protected Object[] getButtons() { if (optionPane != null) { Object[] suppliedOptions = optionPane.getOptions(); if (suppliedOptions == null) { Object[] defaultOptions; int type = optionPane.getOptionType(); Locale l = optionPane.getLocale(); int minimumWidth = DefaultLookup.getInt(optionPane, this, "OptionPane.buttonMinimumWidth", -1); if (type == JOptionPane.YES_NO_OPTION) { defaultOptions = new ButtonFactory[2]; defaultOptions[0] = new ButtonFactory( UIManager.getString("OptionPane.yesButtonText", l), getMnemonic("OptionPane.yesButtonMnemonic", l), (Icon) DefaultLookup.get(optionPane, this, "OptionPane.yesIcon"), minimumWidth); defaultOptions[1] = new ButtonFactory( UIManager.getString("OptionPane.noButtonText", l), getMnemonic("OptionPane.noButtonMnemonic", l), (Icon) DefaultLookup.get(optionPane, this, "OptionPane.noIcon"), minimumWidth); } else if (type == JOptionPane.YES_NO_CANCEL_OPTION) { defaultOptions = new ButtonFactory[3]; defaultOptions[0] = new ButtonFactory( UIManager.getString("OptionPane.yesButtonText", l), getMnemonic("OptionPane.yesButtonMnemonic", l), (Icon) DefaultLookup.get(optionPane, this, "OptionPane.yesIcon"), minimumWidth); defaultOptions[1] = new ButtonFactory( UIManager.getString("OptionPane.noButtonText", l), getMnemonic("OptionPane.noButtonMnemonic", l), (Icon) DefaultLookup.get(optionPane, this, "OptionPane.noIcon"), minimumWidth); defaultOptions[2] = new ButtonFactory( UIManager.getString("OptionPane.cancelButtonText", l), getMnemonic("OptionPane.cancelButtonMnemonic", l), (Icon) DefaultLookup.get(optionPane, this, "OptionPane.cancelIcon"), minimumWidth); } else if (type == JOptionPane.OK_CANCEL_OPTION) { defaultOptions = new ButtonFactory[2]; defaultOptions[0] = new ButtonFactory( UIManager.getString("OptionPane.okButtonText", l), getMnemonic("OptionPane.okButtonMnemonic", l), (Icon) DefaultLookup.get(optionPane, this, "OptionPane.okIcon"), minimumWidth); defaultOptions[1] = new ButtonFactory( UIManager.getString("OptionPane.cancelButtonText", l), getMnemonic("OptionPane.cancelButtonMnemonic", l), (Icon) DefaultLookup.get(optionPane, this, "OptionPane.cancelIcon"), minimumWidth); } else { defaultOptions = new ButtonFactory[1]; defaultOptions[0] = new ButtonFactory( UIManager.getString("OptionPane.okButtonText", l), getMnemonic("OptionPane.okButtonMnemonic", l), (Icon) DefaultLookup.get(optionPane, this, "OptionPane.okIcon"), minimumWidth); } return defaultOptions; } return suppliedOptions; } return null; }
protected void installStrings(JFileChooser fc) { Locale l = fc.getLocale(); newFolderErrorText = UIManager.getString("FileChooser.newFolderErrorText", l); newFolderErrorSeparator = UIManager.getString("FileChooser.newFolderErrorSeparator", l); newFolderParentDoesntExistTitleText = UIManager.getString("FileChooser.newFolderParentDoesntExistTitleText", l); newFolderParentDoesntExistText = UIManager.getString("FileChooser.newFolderParentDoesntExistText", l); fileDescriptionText = UIManager.getString("FileChooser.fileDescriptionText", l); directoryDescriptionText = UIManager.getString("FileChooser.directoryDescriptionText", l); saveButtonText = UIManager.getString("FileChooser.saveButtonText", l); openButtonText = UIManager.getString("FileChooser.openButtonText", l); saveDialogTitleText = UIManager.getString("FileChooser.saveDialogTitleText", l); openDialogTitleText = UIManager.getString("FileChooser.openDialogTitleText", l); cancelButtonText = UIManager.getString("FileChooser.cancelButtonText", l); updateButtonText = UIManager.getString("FileChooser.updateButtonText", l); helpButtonText = UIManager.getString("FileChooser.helpButtonText", l); directoryOpenButtonText = UIManager.getString("FileChooser.directoryOpenButtonText", l); saveButtonMnemonic = getMnemonic("FileChooser.saveButtonMnemonic", l); openButtonMnemonic = getMnemonic("FileChooser.openButtonMnemonic", l); cancelButtonMnemonic = getMnemonic("FileChooser.cancelButtonMnemonic", l); updateButtonMnemonic = getMnemonic("FileChooser.updateButtonMnemonic", l); helpButtonMnemonic = getMnemonic("FileChooser.helpButtonMnemonic", l); directoryOpenButtonMnemonic = getMnemonic("FileChooser.directoryOpenButtonMnemonic", l); saveButtonToolTipText = UIManager.getString("FileChooser.saveButtonToolTipText", l); openButtonToolTipText = UIManager.getString("FileChooser.openButtonToolTipText", l); cancelButtonToolTipText = UIManager.getString("FileChooser.cancelButtonToolTipText", l); updateButtonToolTipText = UIManager.getString("FileChooser.updateButtonToolTipText", l); helpButtonToolTipText = UIManager.getString("FileChooser.helpButtonToolTipText", l); directoryOpenButtonToolTipText = UIManager.getString("FileChooser.directoryOpenButtonToolTipText", l); }
public String getDescription() { return UIManager.getString("FileChooser.acceptAllFileFilterText"); }
public MaximizeAction() { super(UIManager.getString("DarculaTitlePane.maximizeTitle", getLocale())); }
public RestoreAction() { super(UIManager.getString("DarculaTitlePane.restoreTitle", getLocale())); }
public IconifyAction() { super(UIManager.getString("DarculaTitlePane.iconifyTitle", getLocale())); }
public CloseAction() { super(UIManager.getString("DarculaTitlePane.closeTitle", getLocale())); }