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

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

Introduction

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

Prototype

public PlasticLookAndFeel() 

Source Link

Document

Constructs the PlasticLookAndFeel, creates the default theme and sets it as current Plastic theme.

Usage

From source file:jsattrak.gui.LookAndFeelJDialog.java

License:Open Source License

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

    //LafChanger.changeLaf(parent, "com.sun.java.swing.plaf.motif.MotifLookAndFeel");
    try {//from   w w  w  . j a  v a  2  s . com
        PlasticLookAndFeel.setPlasticTheme(new ExperienceBlue());
        PlasticLookAndFeel.setTabStyle("Metal"); // makes tabes look much better
        UIManager.setLookAndFeel(new PlasticLookAndFeel());

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

From source file:jsattrak.gui.LookAndFeelJDialog.java

License:Open Source License

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

    // LafChanger.changeLaf(parent, "com.sun.java.swing.plaf.motif.MotifLookAndFeel");
    try {/*from w  w  w.j a v  a  2  s . c o  m*/
        PlasticLookAndFeel.setPlasticTheme(new ExperienceGreen());
        PlasticLookAndFeel.setTabStyle("Metal"); // makes tabes look much better
        UIManager.setLookAndFeel(new PlasticLookAndFeel());

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

From source file:jsattrak.gui.LookAndFeelJDialog.java

License:Open Source License

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

    //LafChanger.changeLaf(parent, "com.sun.java.swing.plaf.motif.MotifLookAndFeel");
    try {/*from  w ww  .  j  a va 2s  .  co m*/
        PlasticLookAndFeel.setPlasticTheme(new Silver());
        PlasticLookAndFeel.setTabStyle("Metal"); // makes tabes look much better
        UIManager.setLookAndFeel(new PlasticLookAndFeel());

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

From source file:net.lidskialf.datadog.ui.DataDog.java

License:Open Source License

/**
 * The entry point!/*from   w w  w .j a  va  2s .  c  o  m*/
 *
 * @param args
 *            Command line arguments
 */
public static void main(String[] args) {

    // set the look and feel for the application
    PlasticLookAndFeel.setMyCurrentTheme(new ExperienceBlue());
    try {
        UIManager.setLookAndFeel(new PlasticLookAndFeel());
    } catch (Exception e) {
        e.printStackTrace();
    }

    // create the main app.
    application = new DataDog();
}

From source file:net.pms.newgui.LooksFrame.java

License:Open Source License

static void initializeLookAndFeel() {
    if (lookAndFeelInitialized) {
        return;/*w  w w.  ja  va  2s  .c o  m*/
    }

    LookAndFeel selectedLaf = null;
    if (Platform.isWindows()) {
        try {
            selectedLaf = (LookAndFeel) Class.forName("com.jgoodies.looks.windows.WindowsLookAndFeel")
                    .newInstance();
        } catch (Exception e) {
            selectedLaf = new PlasticLookAndFeel();
        }
    } else if (System.getProperty("nativelook") == null && !Platform.isMac()) {
        selectedLaf = new PlasticLookAndFeel();
    } else {
        try {
            String systemClassName = UIManager.getSystemLookAndFeelClassName();
            // workaround for Gnome
            try {
                String gtkLAF = "com.sun.java.swing.plaf.gtk.GTKLookAndFeel";
                Class.forName(gtkLAF);

                if (systemClassName.equals("javax.swing.plaf.metal.MetalLookAndFeel")) {
                    systemClassName = gtkLAF;
                }
            } catch (ClassNotFoundException ce) {
                logger.error("Error loading GTK look and feel: ", ce);
            }

            logger.trace("Choosing Java look and feel: " + systemClassName);
            UIManager.setLookAndFeel(systemClassName);
        } catch (Exception e1) {
            selectedLaf = new PlasticLookAndFeel();
            logger.error("Error while setting native look and feel: ", e1);
        }
    }

    if (selectedLaf instanceof PlasticLookAndFeel) {
        PlasticLookAndFeel.setPlasticTheme(PlasticLookAndFeel.createMyDefaultTheme());
        PlasticLookAndFeel.setTabStyle(PlasticLookAndFeel.TAB_STYLE_DEFAULT_VALUE);
        PlasticLookAndFeel.setHighContrastFocusColorsEnabled(false);
    } else if (selectedLaf != null && selectedLaf.getClass() == MetalLookAndFeel.class) {
        MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());
    }

    // Work around caching in MetalRadioButtonUI
    JRadioButton radio = new JRadioButton();
    radio.getUI().uninstallUI(radio);
    JCheckBox checkBox = new JCheckBox();
    checkBox.getUI().uninstallUI(checkBox);

    if (selectedLaf != null) {
        try {
            UIManager.setLookAndFeel(selectedLaf);
        } catch (UnsupportedLookAndFeelException e) {
            logger.warn("Can't change look and feel", e);
        }
    }

    lookAndFeelInitialized = true;
}

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

License:Apache License

public JGoodiesPlasticLookAndFeelHandler() {
    super("Plastic", new PlasticLookAndFeel());
}

From source file:photosrenamer.Main.java

License:Creative Commons License

/**
 * Shows the Files Renamer window./* w  w  w.  ja  v a  2 s.  c o 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:ppciarravano.algoexplorer.gui.GuiUtility.java

License:Open Source License

public static void setLookAndFeel() {
    if (ConstantManager.NOT_STANDARD_LOOK_AND_FEEL) {
        PlasticLookAndFeel.setPlasticTheme(new DesertBlue());
        try {//from w  ww .  j a v a  2s .  com
            //UIManager.setLookAndFeel(new PlasticXPLookAndFeel());
            //UIManager.setLookAndFeel(new Plastic3DLookAndFeel());
            UIManager.setLookAndFeel(new PlasticLookAndFeel());
        } catch (Exception e) {
            Logger.log.error("setLookAndFeel Exception:\n" + Logger.exceptionToString(e));
        }

    }
}

From source file:simplesqlformatter.Main.java

License:Creative Commons License

private static void doWindow(final boolean debug) {
    try {/*from ww  w .  j  a v a2  s .c o  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);
}

From source file:sistemas.Sistemas.java

/**
 * @param args the command line arguments
 *///w ww .  j a  v a2s  .  co  m
public static void main(String[] args) {
    // TODO code application logic here
    //MantenerPromocion mant = new MantenerPromocion();
    //mant.setVisible(true);

    try {
        //  UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); 
        PlasticLookAndFeel.setPlasticTheme(new DesertBlue());
        UIManager.setLookAndFeel(new PlasticLookAndFeel());
    } catch (Exception ex) {
        ex.printStackTrace();
    }
    Login prin = new Login();
    prin.setVisible(true);
    //try { Utils.chartExcel(); } catch (Exception e){}
    /*ArrayList<Object> list = SalesManager.queryDailySalesByProduct(6, 9, 2015, 1);
    for(int i = 0; i<list.size();i++)
       System.out.println("cantidad de producto " + i + " :" + (Integer)list.get(i));*/
}