List of usage examples for com.jgoodies.looks.plastic PlasticLookAndFeel getInstalledThemes
public static List getInstalledThemes()
From source file:org.apache.cayenne.modeler.generic.GenericPlatformInitializer.java
License:Apache License
protected PlasticTheme findTheme() { for (Object object : PlasticLookAndFeel.getInstalledThemes()) { PlasticTheme theme = (PlasticTheme) object; if (DEFAULT_THEME_NAME.equals(theme.getName())) { return theme; }/*from w w w. j a v a2 s. com*/ } return null; }
From source file:org.columba.core.gui.themes.plugin.PlasticLookAndFeelConfigPlugin.java
License:Mozilla Public License
protected PlasticTheme[] computeThemes() { List themes = PlasticLookAndFeel.getInstalledThemes(); return (PlasticTheme[]) themes.toArray(new PlasticTheme[themes.size()]); }
From source file:tvbrowser.ui.settings.looksSettings.JGoodiesLNFSettings.java
License:Open Source License
/** * Create the GUI// www . java 2 s . co m */ private void createGui() { final List themesList = PlasticLookAndFeel.getInstalledThemes(); PlasticTheme[] themes = (PlasticTheme[]) themesList.toArray(new PlasticTheme[themesList.size()]); JPanel content = (JPanel) getContentPane(); content.setLayout(new FormLayout("pref, 3dlu, fill:pref:grow", "pref, 3dlu, pref, fill:3dlu:grow, pref")); content.setBorder(Borders.DLU4_BORDER); CellConstraints cc = new CellConstraints(); content.add(new JLabel(mLocalizer.msg("colorTheme", "Color-Theme") + ":"), cc.xy(1, 1)); mColorScheme = new JComboBox(themes); mColorScheme.setRenderer(new DefaultListCellRenderer() { public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { JLabel label = (JLabel) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); label.setText(((PlasticTheme) value).getName()); return label; } }); String theme = Settings.propJGoodiesTheme.getString(); if (theme == null) { theme = PlasticLookAndFeel.createMyDefaultTheme().getClass().getName(); } for (int i = 0; i < themes.length; i++) { if (themes[i].getClass().getName().equals(theme)) { mColorScheme.setSelectedIndex(i); } } content.add(mColorScheme, cc.xy(3, 1)); mShadow = new JCheckBox(mLocalizer.msg("dropShadow", "Drop Shadow on Menus")); mShadow.setSelected(Settings.propJGoodiesShadow.getBoolean()); content.add(mShadow, cc.xyw(1, 3, 3)); JButton ok = new JButton(Localizer.getLocalization(Localizer.I18N_OK)); ok.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { okPressed(); } }); JButton cancel = new JButton(Localizer.getLocalization(Localizer.I18N_CANCEL)); cancel.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { cancelPressed(); } }); ButtonBarBuilder2 bar = new ButtonBarBuilder2(); bar.addButton(new JButton[] { ok, cancel }); JPanel panel = new JPanel(new FlowLayout(FlowLayout.RIGHT, 0, 0)); panel.add(bar.getPanel()); content.add(panel, cc.xyw(1, 5, 3)); UiUtilities.registerForClosing(this); pack(); }