Example usage for com.jgoodies.looks.plastic PlasticXPLookAndFeel PlasticXPLookAndFeel

List of usage examples for com.jgoodies.looks.plastic PlasticXPLookAndFeel PlasticXPLookAndFeel

Introduction

In this page you can find the example usage for com.jgoodies.looks.plastic PlasticXPLookAndFeel PlasticXPLookAndFeel.

Prototype

public PlasticXPLookAndFeel() 

Source Link

Document

Constructs the JGoodies PlasticXP look&feel.

Usage

From source file:fr.itris.glips.svgeditor.Editor.java

License:LGPL

/**
 * The constructor of the class//  ww w  .  java2  s . c  om
 */
public Editor() {

    try {
        PlasticXPLookAndFeel laf = new PlasticXPLookAndFeel();
        PlasticXPLookAndFeel.set3DEnabled(true);
        UIManager.setLookAndFeel(laf);
    } catch (Exception e) {
    }

    editor = this;
}

From source file:jsattrak.gui.LookAndFeelJDialog.java

License:Open Source License

private void jButton9ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton9ActionPerformed

    //LafChanger.changeLaf(parent, "com.sun.java.swing.plaf.motif.MotifLookAndFeel");
    try {/*from  w w w .ja va  2 s.c  o  m*/
        UIManager.setLookAndFeel(new PlasticXPLookAndFeel());

        SwingUtilities.updateComponentTreeUI(parent); // apply look and feel over current L&F (otherwise nimbus shows up in correctly)
    } catch (Exception ex) {
        System.err.println("err:" + ex.toString());
    }
}

From source file:net.dpml.depot.desktop.Settings.java

License:Apache License

public static Settings createDefault() {
    Settings settings = new Settings();
    settings.setSelectedLookAndFeel(new PlasticXPLookAndFeel());
    //settings.setSelectedTheme(PlasticLookAndFeel.createMyDefaultTheme());
    settings.setSelectedTheme(new Silver());
    settings.setUseSystemFonts(Boolean.TRUE);
    settings.setFontSizeHints(FontSizeHints.MIXED);
    settings.setUseNarrowButtons(false);
    settings.setTabIconsEnabled(true);//from  ww  w  .  ja  v a 2s.c o  m
    settings.setPlasticTabStyle(PlasticLookAndFeel.TAB_STYLE_DEFAULT_VALUE);
    settings.setPlasticHighContrastFocusEnabled(false);
    settings.setMenuBarHeaderStyle(null);
    settings.setMenuBarPlasticBorderStyle(null);
    settings.setMenuBarWindowsBorderStyle(null);
    settings.setMenuBar3DHint(null);
    settings.setToolBarHeaderStyle(null);
    settings.setToolBarPlasticBorderStyle(null);
    settings.setToolBarWindowsBorderStyle(null);
    settings.setToolBar3DHint(null);
    return settings;
}

From source file:org.codehaus.griffon.runtime.lookandfeel.jgoodies.JGoodiesPlasticXPLookAndFeelHandler.java

License:Apache License

public JGoodiesPlasticXPLookAndFeelHandler() {
    super("PlasticXP", new PlasticXPLookAndFeel());
}

From source file:org.columba.core.gui.themes.plugin.PlasticLookAndFeelPlugin.java

License:Mozilla Public License

/**
 * @see org.columba.core.gui.themes.plugin.AbstractThemePlugin#setLookAndFeel()
 *//*from  w w  w  .  jav a  2s .c om*/
public void setLookAndFeel() throws Exception {

    Options.setDefaultIconSize(new Dimension(16, 16));
    Options.setUseNarrowButtons(false);
    Options.setPopupDropShadowEnabled(true);

    XmlElement options = Config.getInstance().get("options").getElement("/options");
    XmlElement gui = options.getElement("gui");
    XmlElement themeElement = gui.getElement("theme");

    try {
        // UIManager.setLookAndFeel(lafName);
        String theme = themeElement.getAttribute("theme");

        if (theme != null) {
            PlasticTheme t = getTheme(theme);
            LookUtils.setLookAndTheme(new PlasticXPLookAndFeel(), t);
        } else {
            PlasticTheme t = PlasticLookAndFeel.createMyDefaultTheme();
            LookUtils.setLookAndTheme(new PlasticXPLookAndFeel(), t);
        }

    } catch (Exception e) {
        System.err.println("Can't set look & feel:" + e);
    }

    ;
}

From source file:org.datacleaner.util.LookAndFeelManager.java

License:Open Source License

public void init() {
    try {// w  ww  .  ja  va  2 s. c o  m
        LookAndFeel laf = new PlasticXPLookAndFeel();
        UIManager.setLookAndFeel(laf);
        logger.info("Look and feel set to: {}", UIManager.getLookAndFeel());
    } catch (UnsupportedLookAndFeelException e) {
        throw new IllegalStateException(e);
    }

    UIManager.put("ClassLoader", LookUtils.class.getClassLoader());

    Set<Object> propertyKeys = UIManager.getLookAndFeelDefaults().keySet();

    for (Object propertyKey : propertyKeys) {
        if (propertyKey instanceof String) {
            String str = (String) propertyKey;

            if (str.endsWith(".font")) {
                // set default font
                UIManager.put(propertyKey, WidgetUtils.FONT_NORMAL);
            } else if (str.endsWith(".background")) {
                // set default background color
                UIManager.put(propertyKey, WidgetUtils.COLOR_DEFAULT_BACKGROUND);
            }
        }
    }

    ToolTipManager.sharedInstance().setInitialDelay(500);
    PopupFactory.setSharedInstance(new DCPopupFactory());

    EmptyBorder emptyBorder = new EmptyBorder(0, 0, 0, 0);
    UIManager.put("ScrollPane.border", emptyBorder);

    // OptionPane background and Panel background are linked because the
    // JOptionPane features unstyleable and opaque Panels.
    UIManager.put("OptionPane.background", WidgetUtils.COLOR_WELL_BACKGROUND);
    UIManager.put("Panel.background", WidgetUtils.COLOR_WELL_BACKGROUND);

    UIManager.put("List.selectionForeground", WidgetUtils.BG_COLOR_BRIGHTEST);
    UIManager.put("List.selectionBackground", WidgetUtils.BG_COLOR_LESS_DARK);
    UIManager.put("List.focusCellHighlightBorder", WidgetUtils.BORDER_THIN);

    UIManager.put("Tree.selectionForeground", WidgetUtils.BG_COLOR_BRIGHTEST);
    UIManager.put("Tree.selectionBackground", WidgetUtils.BG_COLOR_LESS_DARK);
    UIManager.put("Tree.selectionBorderColor", WidgetUtils.BG_COLOR_MEDIUM);

    UIManager.put("Table.selectionForeground", WidgetUtils.BG_COLOR_BRIGHTEST);
    UIManager.put("Table.selectionBackground", WidgetUtils.BG_COLOR_LESS_DARK);
    UIManager.put("Table.focusCellHighlightBorder", WidgetUtils.BORDER_THIN);

    // splitpane "flattening" (remove bevel like borders in divider)
    UIManager.put("SplitPane.border", new EmptyBorder(0, 0, 0, 0));
    UIManager.put("SplitPaneDivider.border", new EmptyBorder(0, 0, 0, 0));

    final Color menuBackground = WidgetUtils.BG_COLOR_LESS_BRIGHT;
    UIManager.put("PopupMenu.background", menuBackground);
    UIManager.put("PopupMenu.foreground", WidgetUtils.BG_COLOR_DARK);
    UIManager.put("PopupMenu.border", emptyBorder);
    UIManager.put("Menu.background", menuBackground);
    UIManager.put("Menu.foreground", WidgetUtils.BG_COLOR_DARK);
    UIManager.put("Menu.border", WidgetUtils.BORDER_MENU_ITEM);
    UIManager.put("MenuItem.selectionForeground", WidgetUtils.BG_COLOR_DARKEST);
    UIManager.put("MenuItem.selectionBackground", WidgetUtils.BG_COLOR_MEDIUM);
    UIManager.put("MenuItem.background", menuBackground);
    UIManager.put("MenuItem.foreground", WidgetUtils.BG_COLOR_DARK);
    UIManager.put("MenuItem.border", WidgetUtils.BORDER_MENU_ITEM);
    UIManager.put("MenuBar.background", menuBackground);
    UIManager.put("MenuBar.foreground", WidgetUtils.BG_COLOR_DARK);
    UIManager.put("MenuBar.border", emptyBorder);

    // separator styling
    final Color separatorColor = WidgetUtils.slightlyDarker(menuBackground);
    UIManager.put("Separator.background", separatorColor);
    UIManager.put("Separator.foreground", separatorColor);
    UIManager.put("Separator.highlight", separatorColor);
    UIManager.put("Separator.shadow", separatorColor);

    // white background for input components
    UIManager.put("Tree.background", WidgetUtils.BG_COLOR_BRIGHTEST);
    UIManager.put("EditorPane.background", WidgetUtils.BG_COLOR_BRIGHTEST);
    UIManager.put("Spinner.background", WidgetUtils.BG_COLOR_BRIGHTEST);

    // Buttons
    // UIManager.put("Button.background", WidgetUtils.BG_COLOR_BLUE_MEDIUM);
    // UIManager.put("Button.darkShadow", WidgetUtils.BG_COLOR_BLUE_MEDIUM);
    // UIManager.put("Button.shadow", WidgetUtils.BG_COLOR_BLUE_MEDIUM);
    // UIManager.put("Button.highlight", WidgetUtils.BG_COLOR_BLUE_MEDIUM);
    // UIManager.put("Button.light", WidgetUtils.BG_COLOR_BLUE_MEDIUM);
    // UIManager.put("Button.select", WidgetUtils.BG_COLOR_BLUE_DARK);
    // UIManager.put("Button.foreground", WidgetUtils.BG_COLOR_BRIGHTEST);
    // UIManager.put("Button.is3DEnabled", Boolean.FALSE);
    // UIManager.put("Button.borderPaintsFocus", Boolean.FALSE);
    // UIManager.put("Button.border", WidgetUtils.BORDER_BUTTON);

    // Input fields
    UIManager.put("TextField.border", WidgetUtils.BORDER_INPUT);
    UIManager.put("TextField.background", WidgetUtils.BG_COLOR_BRIGHTEST);
    UIManager.put("TextField.disabledBackground", WidgetUtils.BG_COLOR_BRIGHT);

    UIManager.put("TextArea.border", WidgetUtils.BORDER_INPUT);
    UIManager.put("TextArea.background", WidgetUtils.BG_COLOR_BRIGHTEST);

    UIManager.put("PasswordField.border", WidgetUtils.BORDER_INPUT);
    UIManager.put("PasswordField.background", WidgetUtils.BG_COLOR_BRIGHTEST);
    UIManager.put("PasswordField.disabledBackground", WidgetUtils.BG_COLOR_BRIGHT);

    UIManager.put("FormattedTextField.border", WidgetUtils.BORDER_INPUT);
    UIManager.put("FormattedTextField.background", WidgetUtils.BG_COLOR_BRIGHTEST);

    UIManager.put("ComboBox.border", WidgetUtils.BORDER_INPUT);
    UIManager.put("ComboBox.background", WidgetUtils.BG_COLOR_BRIGHTEST);
    UIManager.put("ComboBox.arrowButtonBorder", BorderFactory.createEmptyBorder());
    UIManager.put("ComboBox.editorBorder", BorderFactory.createEmptyBorder());
    UIManager.put("ComboBox.selectionBackground", WidgetUtils.BG_COLOR_BRIGHTEST);
    UIManager.put("ComboBoxUI", DCComboBoxUI.class.getName());

    // table header styling
    UIManager.put("TableHeader.background", WidgetUtils.COLOR_WELL_BACKGROUND);
    UIManager.put("TableHeader.focusCellBackground", WidgetUtils.COLOR_WELL_BACKGROUND);
    UIManager.put("TableHeader.foreground", WidgetUtils.BG_COLOR_DARKEST);
    UIManager.put("TableHeader.font", WidgetUtils.FONT_TABLE_HEADER);
    UIManager.put("TableHeader.cellBorder", new CompoundBorder(
            new MatteBorder(0, 0, 0, 1, WidgetUtils.BG_COLOR_LESS_BRIGHT), WidgetUtils.BORDER_EMPTY));

    // titled borders
    UIManager.put("TitledBorder.font", WidgetUtils.FONT_HEADER1);
    UIManager.put("TitledBorder.titleColor", WidgetUtils.BG_COLOR_BLUE_MEDIUM);

    // tool tip colors
    UIManager.put("ToolTip.background", WidgetUtils.COLOR_ALTERNATIVE_BACKGROUND);
    UIManager.put("ToolTip.foreground", WidgetUtils.BG_COLOR_BRIGHT);
    UIManager.put("ToolTip.border", WidgetUtils.BORDER_WIDE_ALTERNATIVE);

    // task pane colors
    UIManager.put("TaskPaneContainer.background", WidgetUtils.COLOR_WELL_BACKGROUND);
    UIManager.put("TaskPane.background", WidgetUtils.COLOR_DEFAULT_BACKGROUND);
    UIManager.put("TaskPane.font", WidgetUtils.FONT_TABLE_HEADER);
    UIManager.put("TaskPane.titleForeground", WidgetUtils.BG_COLOR_BRIGHTEST);
    UIManager.put("TaskPane.titleBackgroundGradientStart", WidgetUtils.COLOR_ALTERNATIVE_BACKGROUND);
    UIManager.put("TaskPane.titleBackgroundGradientEnd", WidgetUtils.COLOR_ALTERNATIVE_BACKGROUND);
    UIManager.put("TaskPane.borderColor", WidgetUtils.BG_COLOR_LESS_DARK);

    // scrollbar color
    UIManager.put("ScrollBar.thumb", WidgetUtils.BG_COLOR_LESS_BRIGHT);
    UIManager.put("ScrollBar.thumbHighlight", WidgetUtils.slightlyDarker(WidgetUtils.BG_COLOR_LESS_BRIGHT));
    UIManager.put("ScrollBar.thumbShadow", WidgetUtils.slightlyDarker(WidgetUtils.BG_COLOR_LESS_BRIGHT));
    UIManager.put("ScrollBar.thumbDarkShadow", WidgetUtils.BG_COLOR_LESS_BRIGHT);
    UIManager.put("ScrollBar.highlight", WidgetUtils.COLOR_DEFAULT_BACKGROUND);
    UIManager.put("ScrollBar.shadow", WidgetUtils.COLOR_DEFAULT_BACKGROUND);
    UIManager.put("ScrollBar.darkShadow", WidgetUtils.COLOR_DEFAULT_BACKGROUND);
    UIManager.put("ScrollBar.background", WidgetUtils.COLOR_DEFAULT_BACKGROUND);
    UIManager.put("ScrollBar.foreground", WidgetUtils.COLOR_DEFAULT_BACKGROUND);
    UIManager.put("ScrollBar.track", WidgetUtils.COLOR_DEFAULT_BACKGROUND);
    UIManager.put("ScrollBar.trackForeground", WidgetUtils.COLOR_DEFAULT_BACKGROUND);
    UIManager.put("ScrollBar.trackHighlight", WidgetUtils.COLOR_DEFAULT_BACKGROUND);
    UIManager.put("ScrollBar.trackHighlightForeground", WidgetUtils.COLOR_DEFAULT_BACKGROUND);
    UIManager.put("ScrollBarUI", DCScrollBarUI.class.getName());

    // progressbar color
    UIManager.put("ProgressBar.foreground", WidgetUtils.BG_COLOR_BLUE_BRIGHT);

    // file chooser
    UIManager.put("FileChooser.detailsViewIcon",
            imageManager.getImageIcon("images/filetypes/view-details.png"));
    UIManager.put("FileChooser.listViewIcon", imageManager.getImageIcon("images/filetypes/view-list.png"));
    UIManager.put("FileChooser.homeFolderIcon", imageManager.getImageIcon("images/filetypes/home-folder.png"));
    UIManager.put("FileChooser.newFolderIcon", imageManager.getImageIcon("images/filetypes/new-folder.png"));
    UIManager.put("FileChooser.upFolderIcon", imageManager.getImageIcon("images/filetypes/parent-folder.png"));

    // date picker month view
    UIManager.put("JXMonthView.foreground", WidgetUtils.BG_COLOR_DARK);
    UIManager.put("JXMonthView.monthStringForeground", WidgetUtils.BG_COLOR_DARK);
    UIManager.put("JXMonthView.daysOfTheWeekForeground", WidgetUtils.BG_COLOR_DARK);
    UIManager.put("JXMonthView.weekOfTheYearForeground", WidgetUtils.BG_COLOR_DARK);
    UIManager.put("JXMonthView.unselectableDayForeground", WidgetUtils.BG_COLOR_MEDIUM);

    // tool tip tweaks
    ToolTipManager.sharedInstance().setDismissDelay(10 * 1000);
    ToolTipManager.sharedInstance().setInitialDelay(100);
}

From source file:org.egomez.irpgeditor.FrameiRPGEditor.java

License:Open Source License

public static void main(String[] args) throws Exception {
    FrameiRPGEditor frame;//from  w w w  .java2s. c  o m
    splash = new WindowSplash(new JFrame());

    try {
        String SO = System.getProperty("os.name");
        if (SO.toUpperCase().indexOf("WINDOWS") == -1) {
            PlasticXPLookAndFeel.setPlasticTheme(new ExperienceBlue());
            UIManager.setLookAndFeel(new PlasticXPLookAndFeel());
        } else {
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
        }
        // LoggerFactory.getLogger(FrameiRPGEditor.class).info("test");
        Environment.loadSettings();
    } catch (Exception e) {
        // e.printStackTrace();
        LoggerFactory.getLogger(FrameiRPGEditor.class).error(e.getMessage());
    }

    // Center the window
    frame = new FrameiRPGEditor();
    frame.setVisible(true);
    dlgTips = new WindowsTips();
    dlgTips.setVisible(true);
}

From source file:org.eobjects.datacleaner.util.LookAndFeelManager.java

License:Open Source License

public void init() {
    try {//from  ww  w  . j ava 2  s . c  o  m
        LookAndFeel laf = new PlasticXPLookAndFeel();
        UIManager.setLookAndFeel(laf);
        logger.info("Look and feel set to: {}", UIManager.getLookAndFeel());
    } catch (UnsupportedLookAndFeelException e) {
        throw new IllegalStateException(e);
    }

    UIManager.put("ClassLoader", LookUtils.class.getClassLoader());

    Set<Object> propertyKeys = UIManager.getLookAndFeelDefaults().keySet();

    for (Object propertyKey : propertyKeys) {
        if (propertyKey instanceof String) {
            String str = (String) propertyKey;

            if (str.endsWith(".font")) {
                // set default font
                UIManager.put(propertyKey, WidgetUtils.FONT_NORMAL);
            } else if (str.endsWith(".background")) {
                // set default background color
                UIManager.put(propertyKey, WidgetUtils.BG_COLOR_BRIGHT);
            }
        }
    }

    ToolTipManager.sharedInstance().setInitialDelay(500);
    PopupFactory.setSharedInstance(new DCPopupFactory());

    EmptyBorder emptyBorder = new EmptyBorder(0, 0, 0, 0);
    LineBorder borderDarkest3 = new LineBorder(WidgetUtils.BG_COLOR_DARKEST, 3);
    UIManager.put("ScrollPane.border", emptyBorder);
    UIManager.put("Menu.border", borderDarkest3);
    UIManager.put("Menu.background", WidgetUtils.BG_COLOR_DARKEST);
    UIManager.put("Menu.foreground", WidgetUtils.BG_COLOR_BRIGHTEST);

    UIManager.put("MenuItem.selectionForeground", WidgetUtils.BG_COLOR_BRIGHTEST);
    UIManager.put("MenuItem.selectionBackground", WidgetUtils.BG_COLOR_LESS_DARK);

    UIManager.put("List.selectionForeground", WidgetUtils.BG_COLOR_BRIGHTEST);
    UIManager.put("List.selectionBackground", WidgetUtils.BG_COLOR_LESS_DARK);
    UIManager.put("List.focusCellHighlightBorder", WidgetUtils.BORDER_THIN);

    UIManager.put("Tree.selectionForeground", WidgetUtils.BG_COLOR_BRIGHTEST);
    UIManager.put("Tree.selectionBackground", WidgetUtils.BG_COLOR_LESS_DARK);
    UIManager.put("Tree.selectionBorderColor", WidgetUtils.BG_COLOR_MEDIUM);

    UIManager.put("Table.selectionForeground", WidgetUtils.BG_COLOR_BRIGHTEST);
    UIManager.put("Table.selectionBackground", WidgetUtils.BG_COLOR_LESS_DARK);
    UIManager.put("Table.focusCellHighlightBorder", WidgetUtils.BORDER_THIN);

    // splitpane "flattening" (remove bevel like borders in divider)
    UIManager.put("SplitPane.border", new EmptyBorder(0, 0, 0, 0));
    UIManager.put("SplitPaneDivider.border", new EmptyBorder(0, 0, 0, 0));

    UIManager.put("PopupMenu.border", emptyBorder);
    UIManager.put("PopupMenu.background", WidgetUtils.BG_COLOR_DARKEST);
    UIManager.put("PopupMenu.foreground", WidgetUtils.BG_COLOR_BRIGHTEST);
    UIManager.put("MenuItem.border", borderDarkest3);
    UIManager.put("MenuItem.background", WidgetUtils.BG_COLOR_DARKEST);
    UIManager.put("MenuItem.foreground", WidgetUtils.BG_COLOR_BRIGHTEST);
    UIManager.put("MenuBar.border", emptyBorder);
    UIManager.put("MenuBar.background", WidgetUtils.BG_COLOR_DARKEST);
    UIManager.put("MenuBar.foreground", WidgetUtils.BG_COLOR_BRIGHTEST);

    // white background for input components
    UIManager.put("Tree.background", WidgetUtils.BG_COLOR_BRIGHTEST);
    UIManager.put("TextArea.background", WidgetUtils.BG_COLOR_BRIGHTEST);
    UIManager.put("PasswordField.background", WidgetUtils.BG_COLOR_BRIGHTEST);
    UIManager.put("FormattedTextField.background", WidgetUtils.BG_COLOR_BRIGHTEST);
    UIManager.put("EditorPane.background", WidgetUtils.BG_COLOR_BRIGHTEST);
    UIManager.put("ComboBox.background", WidgetUtils.BG_COLOR_BRIGHTEST);
    UIManager.put("TextField.background", WidgetUtils.BG_COLOR_BRIGHTEST);
    UIManager.put("Spinner.background", WidgetUtils.BG_COLOR_BRIGHTEST);

    // table header styling
    UIManager.put("TableHeader.background", WidgetUtils.BG_COLOR_DARK);
    UIManager.put("TableHeader.focusCellBackground", WidgetUtils.BG_COLOR_LESS_DARK);
    UIManager.put("TableHeader.foreground", WidgetUtils.BG_COLOR_BRIGHTEST);
    UIManager.put("TableHeader.cellBorder", new LineBorder(WidgetUtils.BG_COLOR_LESS_DARK));

    // titled borders
    UIManager.put("TitledBorder.font", WidgetUtils.FONT_HEADER1);
    UIManager.put("TitledBorder.titleColor", WidgetUtils.BG_COLOR_BLUE_BRIGHT);

    // tool tip colors
    UIManager.put("ToolTip.background", WidgetUtils.BG_COLOR_DARK);
    UIManager.put("ToolTip.foreground", WidgetUtils.BG_COLOR_BRIGHTEST);
    UIManager.put("ToolTip.border", WidgetUtils.BORDER_THIN);

    // task pane colors
    UIManager.put("TaskPaneContainer.background", WidgetUtils.BG_COLOR_BRIGHTEST);
    UIManager.put("TaskPane.font", WidgetUtils.FONT_NORMAL);
    UIManager.put("TaskPane.titleForeground", WidgetUtils.BG_COLOR_BRIGHTEST);
    UIManager.put("TaskPane.titleBackgroundGradientStart", WidgetUtils.BG_COLOR_DARKEST);
    UIManager.put("TaskPane.titleBackgroundGradientEnd", WidgetUtils.BG_COLOR_DARKEST);
    UIManager.put("TaskPane.borderColor", WidgetUtils.BG_COLOR_DARKEST);
    UIManager.put("TaskPane.background", WidgetUtils.BG_COLOR_BRIGHT);

    // scrollbar color
    UIManager.put("ScrollBar.thumb", WidgetUtils.BG_COLOR_DARK);
    UIManager.put("ScrollBar.thumbHighlight", WidgetUtils.BG_COLOR_DARK);
    UIManager.put("ScrollBar.thumbShadow", WidgetUtils.BG_COLOR_DARK);

    // progressbar color
    UIManager.put("ProgressBar.foreground", WidgetUtils.BG_COLOR_BLUE_BRIGHT);

    // file chooser
    UIManager.put("FileChooser.detailsViewIcon",
            imageManager.getImageIcon("images/filetypes/view-details.png"));
    UIManager.put("FileChooser.listViewIcon", imageManager.getImageIcon("images/filetypes/view-list.png"));
    UIManager.put("FileChooser.homeFolderIcon", imageManager.getImageIcon("images/filetypes/home-folder.png"));
    UIManager.put("FileChooser.newFolderIcon", imageManager.getImageIcon("images/filetypes/new-folder.png"));
    UIManager.put("FileChooser.upFolderIcon", imageManager.getImageIcon("images/filetypes/parent-folder.png"));

    // date picker month view
    UIManager.put("JXMonthView.foreground", WidgetUtils.BG_COLOR_DARK);
    UIManager.put("JXMonthView.monthStringForeground", WidgetUtils.BG_COLOR_DARK);
    UIManager.put("JXMonthView.daysOfTheWeekForeground", WidgetUtils.BG_COLOR_DARK);
    UIManager.put("JXMonthView.weekOfTheYearForeground", WidgetUtils.BG_COLOR_DARK);
    UIManager.put("JXMonthView.unselectableDayForeground", WidgetUtils.BG_COLOR_MEDIUM);
}

From source file:org.jahia.loganalyzer.internal.JahiaLogAnalyzerImpl.java

License:Apache License

public static void initUI() {
    try {/* w  w w. j  a v  a2 s  .  co  m*/
        for (UIManager.LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
            if ("Nimbus".equals(info.getName())) {
                UIManager.setLookAndFeel(info.getClassName());
                break;
            }
        }
    } catch (Exception e) {
        // If Nimbus is not available, you can set the GUI to another look and feel.
        try {
            UIManager.setLookAndFeel(new PlasticXPLookAndFeel());
        } catch (Throwable t) {
            log.error("Error setting look and feel", t);
        }
    }
}

From source file:org.jimcat.gui.SwingClient.java

License:Open Source License

/**
 * a call to this Methode will cause the Swing GUI to create a new Frame and
 * show it./*w w w. j a  va  2s . c om*/
 */
public void startup() {
    // check if it hasn't been started yet
    if (started) {
        return;
    }

    SplashScreen.setProgressText("Loading Library");
    // create controles
    tagControl = new TagControl(this);
    imageControl = new ImageControl();
    albumControl = new AlbumControl(this);
    smartListControl = new SmartListControl(this);
    // create a new ViewControl
    viewControl = new ViewControl();

    started = true;

    SplashScreen.setProgressText("Creating GUI");
    // SplashScreen.fadeProgressBar();
    // Install LookAndFeel
    try {

        String theme = Configuration.getString("theme", DEFAULT_THEME);

        if (theme.equals("substance")) {
            UIManager.setLookAndFeel(new SubstanceLookAndFeel());
            SubstanceLookAndFeel.setSkin(new OfficeSilver2007Skin());
            UIManager.put(SubstanceLookAndFeel.NO_EXTRA_ELEMENTS, Boolean.TRUE);
            UIManager.put(LafWidget.ANIMATION_KIND, AnimationKind.NONE);
        } else if (theme.equals("jgoodies")) {
            PlasticLookAndFeel.setPlasticTheme(new SkyBlue());
            UIManager.setLookAndFeel(new PlasticXPLookAndFeel());
        }

    } catch (Exception e) {
        e.printStackTrace();
        System.exit(1);
    }

    // Build up Frame - in right Thread
    EventQueue.invokeLater(new Runnable() {
        public void run() {
            startupProcess();
        }
    });
}