Example usage for com.jgoodies.looks.plastic.theme LightGray LightGray

List of usage examples for com.jgoodies.looks.plastic.theme LightGray LightGray

Introduction

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

Prototype

LightGray

Source Link

Usage

From source file:daylightchart.Main.java

License:Open Source License

/**
 * Main window./*from  w  w  w  .java  2s  . c  o m*/
 *
 * @param args
 *        Arguments
 */
public static void main(final String[] args) {

    CommandLineUtility.setLogLevel(args);

    // Parse command line
    final CommandLineParser parser = new CommandLineParser();
    parser.addOption(new BooleanOption(Option.NO_SHORT_FORM, OPTION_SLIMUI));
    parser.addOption(new StringOption(Option.NO_SHORT_FORM, OPTION_PREFERENCES, null));
    parser.addOption(new StringOption(Option.NO_SHORT_FORM, OPTION_LOCATION, null));
    parser.parse(args);
    boolean slimUi = parser.getBooleanOptionValue(OPTION_SLIMUI);
    final String preferencesDirectory = parser.getStringOptionValue(OPTION_PREFERENCES);
    final String locationString = parser.getStringOptionValue(OPTION_LOCATION);
    Location location = null;
    if (locationString != null) {
        try {
            location = LocationsListParser.parseLocation(locationString);
        } catch (final ParserException e) {
            location = null;
        }
    }

    if (StringUtils.isNotBlank(preferencesDirectory)) {
        UserPreferences.initialize(Paths.get(preferencesDirectory));
    }

    // Set UI look and feel
    try {
        PlasticLookAndFeel.setPlasticTheme(new LightGray());
        UIManager.setLookAndFeel(new PlasticLookAndFeel());
    } catch (final Exception e) {
        LOGGER.log(Level.WARNING, "Cannot set look and feel");
    }

    final Options options = UserPreferences.optionsFile().getData();
    if (!slimUi) {
        slimUi = options.isSlimUi();
    }
    options.setSlimUi(slimUi);
    UserPreferences.optionsFile().save(options);
    new DaylightChartGui(location, slimUi).setVisible(true);

}

From source file:etomica.virial.cluster2.mvc.view.ApplicationUI.java

License:Mozilla Public License

/**
 * Translates the THM_CHOICE field into a PlasticThem class instance.
 *//*ww w . j  a  v  a2s. c o  m*/
public static PlasticTheme getTheme() {

    if (THM_DESERTBR.equalsIgnoreCase(THM_CHOICE)) {
        return new DesertBluer();
    } else if (THM_EXPERIENCEB.equalsIgnoreCase(THM_CHOICE)) {
        return new ExperienceBlue();
    } else if (THM_EXPERIENCER.equalsIgnoreCase(THM_CHOICE)) {
        return new ExperienceRoyale();
    } else if (THM_LIGHTGRAY.equalsIgnoreCase(THM_CHOICE)) {
        return new LightGray();
    } else if (THM_SILVER.equalsIgnoreCase(THM_CHOICE)) {
        return new Silver();
    } else if (THM_SKYBLUE.equalsIgnoreCase(THM_CHOICE)) {
        return new SkyBlue();
    } else {
        return new SkyKrupp();
    }
}

From source file:it.unibas.spicygui.Installer.java

License:Open Source License

private void setLookAndFeel() {
    try {//w w w.j ava2  s.  c  o m
        if ((Utilities.getOperatingSystem() & Utilities.OS_LINUX) != 0) {
            Plastic3DLookAndFeel.setPlasticTheme(new LightGray());
            UIManager.setLookAndFeel(new Plastic3DLookAndFeel());
        }
    } catch (UnsupportedLookAndFeelException ex) {
        Exceptions.printStackTrace(ex);
    }
}

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

License:Apache License

public AbstractJGoodiesLookAndFeelHandler(@Nonnull String name, @Nonnull LookAndFeel lookAndFeel) {
    super("JGoodies - " + name);
    this.lookAndFeel = lookAndFeel;

    List<JGoodiesLookAndFeelDescriptor> lafs = new ArrayList<>();
    lafs.add(new JGoodiesLookAndFeelDescriptor("BrownSugar", new BrownSugar()));
    lafs.add(new JGoodiesLookAndFeelDescriptor("DarkStar", new DarkStar()));
    lafs.add(new JGoodiesLookAndFeelDescriptor("DesertBlue", new DesertBlue()));
    lafs.add(new JGoodiesLookAndFeelDescriptor("DesertBluer", new DesertBluer()));
    lafs.add(new JGoodiesLookAndFeelDescriptor("DesertGreen", new DesertGreen()));
    lafs.add(new JGoodiesLookAndFeelDescriptor("DesertRed", new DesertRed()));
    lafs.add(new JGoodiesLookAndFeelDescriptor("DesertYellow", new DesertYellow()));
    lafs.add(new JGoodiesLookAndFeelDescriptor("ExperienceBlue", new ExperienceBlue()));
    lafs.add(new JGoodiesLookAndFeelDescriptor("ExperienceGreen", new ExperienceGreen()));
    lafs.add(new JGoodiesLookAndFeelDescriptor("ExperienceRoyale", new ExperienceRoyale()));
    lafs.add(new JGoodiesLookAndFeelDescriptor("LightGray", new LightGray()));
    lafs.add(new JGoodiesLookAndFeelDescriptor("Silver", new Silver()));
    lafs.add(new JGoodiesLookAndFeelDescriptor("SkyBlue", new SkyBlue()));
    lafs.add(new JGoodiesLookAndFeelDescriptor("SkyBluer", new SkyBluer()));
    lafs.add(new JGoodiesLookAndFeelDescriptor("SkyGreen", new SkyGreen()));
    lafs.add(new JGoodiesLookAndFeelDescriptor("SkyKrupp", new SkyKrupp()));
    lafs.add(new JGoodiesLookAndFeelDescriptor("SkyPink", new SkyPink()));
    lafs.add(new JGoodiesLookAndFeelDescriptor("SkyRed", new SkyRed()));
    lafs.add(new JGoodiesLookAndFeelDescriptor("SkyYellow", new SkyYellow()));
    this.supportedDescriptors = lafs.toArray(new JGoodiesLookAndFeelDescriptor[lafs.size()]);
}

From source file:photosrenamer.Main.java

License:Creative Commons License

/**
 * Shows the Files Renamer window./*www .ja  v  a2 s  .co  m*/
 * 
 * @param args
 *        Command line arguments.
 */
public static void main(final String[] args) {
    try {
        logger.setLevel(Level.ALL);

        PlasticLookAndFeel.setPlasticTheme(new LightGray());
        UIManager.setLookAndFeel(new PlasticLookAndFeel());
    } catch (final Exception e) {
        logger.log(Level.WARNING, e.getMessage(), e);
    }

    new PhotosRenamerWindow().setVisible(true);
}

From source file:simplesqlformatter.Main.java

License:Creative Commons License

private static void doWindow(final boolean debug) {
    try {//from w  ww .  jav a 2  s  .co m
        PlasticLookAndFeel.setPlasticTheme(new LightGray());
        UIManager.setLookAndFeel(new PlasticLookAndFeel());
    } catch (final Exception e) {
        LOGGER.log(Level.WARNING, "Cannot set look and feel");
    }

    new SQLFormatterEditor(debug).setVisible(true);
}