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

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

Introduction

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

Prototype

Silver

Source Link

Usage

From source file:ch.epfl.lis.gnwgui.GnwGui.java

License:Open Source License

/**
 * //  w  w w . j a v  a 2s.co  m
 */
public static void setLookAndFeel() {

    boolean defautlLAF = GnwGuiSettings.getInstance().useSwingNativeLookAndFeel();

    try {
        if (defautlLAF) {
            // use the native look and feel
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
        } else {
            PlasticLookAndFeel.setPlasticTheme(new Silver());
            UIManager.setLookAndFeel("com.jgoodies.looks.plastic.PlasticXPLookAndFeel");
            PlasticXPLookAndFeel lookXP = new PlasticXPLookAndFeel();
            UIManager.setLookAndFeel(lookXP);
        }
    } catch (ClassNotFoundException e) {
        log.warning("Unable to set Java Look and Feel (ClassNotFoundException): " + e.getMessage());
    } catch (InstantiationException e) {
        log.warning("Unable to set Java Look and Feel (InstantiationException): " + e.getMessage());
    } catch (IllegalAccessException e) {
        log.warning("Unable to set Java Look and Feel (IllegalAccessException): " + e.getMessage());
    } catch (UnsupportedLookAndFeelException e) {
        log.warning("Unable to set Java Look and Feel (UnsupportedLookAndFeelException): " + e.getMessage());
    }
}

From source file:com.sittinglittleduck.DirBuster.gui.StartGUI.java

License:Open Source License

/** Creates new form StartGUI */
public StartGUI() {
    try {/*from w  w w. j  ava2 s  .c o m*/

        System.out.println("Starting OWASP DirBuster " + Config.version);

        /*
         * Set the look and feel
         */
        Options.setTabIconsEnabled(true);
        Options.setDefaultIconSize(new Dimension(18, 18));

        PlasticXPLookAndFeel.setPlasticTheme(new Silver());

        UIManager.setLookAndFeel(Options.PLASTICXP_NAME);

        initComponents();

        /*
         * Detect if the OS is vista, as we need to rsize the gui, as the buttons are not visable
         */
        String os = System.getProperty("os.name");

        if (os.contains("Vista")) {

            java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
            setBounds((screenSize.width - 771) / 2, (screenSize.height - 590) / 2, 771, 590);

        }

        this.setTitle("OWASP DirBuster " + Config.version + " - Web Application Brute Forcing");
        jPanelSetup = new JPanelSetup(this);
        jPanelRunning = new JPanelRunning(this);
        jPanelReport = new JPanelReport(this);
        getContentPane().add(jPanelSetup, java.awt.BorderLayout.CENTER);
        //setIconImage(new ImageIcon(getClass().getResource("/com/sittinglittleduck/DirBuster/images/duck.gif")).getImage());
        setIconImage(ImageCreator.OWASP_IMAGE.getImage());
        manager = Manager.getInstance();
        //set the checkbox for following redirects
        jCheckBoxMenuFollowRedirets.setSelected(Config.followRedirects);
        jCheckBoxMenuDebug.setSelected(Config.debug);
        jCheckBoxMenuParseHTML.setSelected(Config.parseHTML);
        jCheckBoxMenuItemCaseInsensativeMode.setSelected(Config.caseInsensativeMode);

        /*
         * populate the setting with the values from user prefs
         */
        jPanelSetup.jTextFieldFile.setText(manager.getDefaultList());
        jPanelSetup.jTextFieldFileExtention.setText(manager.getDefaultExts());
        jPanelSetup.jSliderThreads.setValue(manager.getDefaultNoThreads());
        jPanelSetup.jLabelThreadsDisplay.setText(manager.getDefaultNoThreads() + " Threads");

        /*
         * load the help
         */
        loadHelp();

        /*
         * check for an update
         */
        checkForUpdate();

    } catch (ClassNotFoundException ex) {
        Logger.getLogger(StartGUI.class.getName()).log(Level.SEVERE, null, ex);
    } catch (InstantiationException ex) {
        Logger.getLogger(StartGUI.class.getName()).log(Level.SEVERE, null, ex);
    } catch (IllegalAccessException ex) {
        Logger.getLogger(StartGUI.class.getName()).log(Level.SEVERE, null, ex);
    } catch (UnsupportedLookAndFeelException ex) {
        Logger.getLogger(StartGUI.class.getName()).log(Level.SEVERE, null, ex);
    }

}

From source file:de.kimminich.agile.demos.lecture4.StartGUI.java

License:Open Source License

/**
 * Creates new form StartGUI//from   www .j  av a  2s . c om
 */
public StartGUI() {
    try {

        System.out.println("Starting OWASP DirBuster " + Config.version);

        /*
         * Set the look and feel
         */
        Options.setTabIconsEnabled(true);
        Options.setDefaultIconSize(new Dimension(18, 18));

        PlasticXPLookAndFeel.setPlasticTheme(new Silver());

        UIManager.setLookAndFeel(Options.PLASTICXP_NAME);

        initComponents();

        /*
         * Detect if the OS is vista, as we need to rsize the gui, as the buttons are not visable
         */
        String os = System.getProperty("os.name");

        if (os.contains("Vista")) {

            Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
            setBounds((screenSize.width - 771) / 2, (screenSize.height - 590) / 2, 771, 590);

        }

        this.setTitle("OWASP DirBuster " + Config.version + " - Web Application Brute Forcing");
        //            jPanelSetup = new JPanelSetup(this);
        //            jPanelRunning = new JPanelRunning(this);
        //            jPanelReport = new JPanelReport(this);
        getContentPane().add(jPanelSetup, java.awt.BorderLayout.CENTER);
        //setIconImage(new ImageIcon(getClass().getResource("/com/sittinglittleduck/DirBuster/images/duck.gif")).getImage());
        setIconImage(ImageCreator.OWASP_IMAGE.getImage());
        manager = Manager.getInstance();
        //set the checkbox for following redirects
        jCheckBoxMenuFollowRedirets.setSelected(Config.followRedirects);
        jCheckBoxMenuDebug.setSelected(Config.debug);
        jCheckBoxMenuParseHTML.setSelected(Config.parseHTML);
        jCheckBoxMenuItemCaseInsensativeMode.setSelected(Config.caseInsensativeMode);

        /*
         * populate the setting with the values from user prefs
         */
        jPanelSetup.jTextFieldFile.setText(manager.getDefaultList());
        jPanelSetup.jTextFieldFileExtention.setText(manager.getDefaultExts());
        jPanelSetup.jSliderThreads.setValue(manager.getDefaultNoThreads());
        jPanelSetup.jLabelThreadsDisplay.setText(manager.getDefaultNoThreads() + " Threads");

        /*
         * load the help
         */
        loadHelp();

        /*
         * check for an update
         */
        checkForUpdate();

    } catch (ClassNotFoundException ex) {
        Logger.getLogger(StartGUI.class.getName()).log(Level.SEVERE, null, ex);
    } catch (InstantiationException ex) {
        Logger.getLogger(StartGUI.class.getName()).log(Level.SEVERE, null, ex);
    } catch (IllegalAccessException ex) {
        Logger.getLogger(StartGUI.class.getName()).log(Level.SEVERE, null, ex);
    } catch (UnsupportedLookAndFeelException ex) {
        Logger.getLogger(StartGUI.class.getName()).log(Level.SEVERE, null, ex);
    }

}

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

License:Mozilla Public License

/**
 * Translates the THM_CHOICE field into a PlasticThem class instance.
 *///  w w w.j  a va  2 s .c om
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.pdfsam.util.ThemeSelector.java

License:Open Source License

/**
 * Sets the theme/*from w w  w .j  av  a 2 s  . c  o  m*/
 * @param theme_number Theme number
 * @return true if no exception in threw
 */
public boolean setTheme(String theme_number) {
    try {
        switch (Integer.parseInt(theme_number)) {
        case 1:
            PlasticLookAndFeel.setPlasticTheme(new DesertBlue());
            break;
        case 2:
            PlasticLookAndFeel.setPlasticTheme(new DesertRed());
            break;
        case 3:
            PlasticLookAndFeel.setPlasticTheme(new Silver());
            break;
        case 4:
            PlasticLookAndFeel.setPlasticTheme(new SkyPink());
            break;
        case 5:
            PlasticLookAndFeel.setPlasticTheme(new SkyKrupp());
            break;
        case 6:
            PlasticLookAndFeel.setPlasticTheme(new SkyYellow());
            break;
        case 7:
            PlasticLookAndFeel.setPlasticTheme(new SkyGreen());
            break;
        case 8:
            PlasticLookAndFeel.setPlasticTheme(new DarkStar());
            break;
        case 9:
            PlasticLookAndFeel.setPlasticTheme(new BrownSugar());
            break;
        case 10:
            PlasticLookAndFeel.setPlasticTheme(new DesertGreen());
            break;
        case 11:
            PlasticLookAndFeel.setPlasticTheme(new ExperienceBlue());
            break;
        case 12:
            PlasticLookAndFeel.setPlasticTheme(new ExperienceGreen());
            break;
        case 13:
            PlasticLookAndFeel.setPlasticTheme(new SkyBlue());
            break;
        case 14:
            PlasticLookAndFeel.setPlasticTheme(new SkyBluer());
        default:
            break;
        }
        return true;
    } catch (NumberFormatException e) {
        return false;
    }
}

From source file:it.pdfsam.utils.ThemeSelector.java

License:Open Source License

/**
 * Sets the theme/*from   ww w  .  j a  va 2  s .c  o m*/
 * @param theme_number Theme number
 * @return true if no exception in threw
 */
public boolean setTheme(String theme_number) {
    try {
        switch (Integer.parseInt(theme_number)) {
        case 1:
            PlasticLookAndFeel.setPlasticTheme(new DesertBlue());
            break;
        case 2:
            PlasticLookAndFeel.setPlasticTheme(new DesertRed());
            break;
        case 3:
            PlasticLookAndFeel.setPlasticTheme(new Silver());
            break;
        case 4:
            PlasticLookAndFeel.setPlasticTheme(new SkyPink());
            break;
        case 5:
            PlasticLookAndFeel.setPlasticTheme(new SkyKrupp());
            break;
        case 6:
            PlasticLookAndFeel.setPlasticTheme(new SkyYellow());
            break;
        case 7:
            PlasticLookAndFeel.setPlasticTheme(new SkyGreen());
            break;
        case 8:
            PlasticLookAndFeel.setPlasticTheme(new DarkStar());
            break;
        case 9:
            PlasticLookAndFeel.setPlasticTheme(new BrownSugar());
            break;
        case 10:
            PlasticLookAndFeel.setPlasticTheme(new DesertGreen());
            break;
        case 11:
            PlasticLookAndFeel.setPlasticTheme(new ExperienceBlue());
            break;
        case 12:
            PlasticLookAndFeel.setPlasticTheme(new ExperienceGreen());
            break;
        case 13:
            PlasticLookAndFeel.setPlasticTheme(new SkyBlue());
            break;
        default:
            break;
        }
        return true;
    } catch (NumberFormatException e) {
        return false;
    }
}

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 {/* w  w w. j ava  2s  .c o 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.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   w  w  w . ja  v a 2  s. 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:net.littlelite.jurpedemo.frames.AbstractJurpeMain.java

License:Open Source License

/**
 * Set Look And Feel/* w w w .  ja  v a  2  s . c om*/
 * 
 * @param n
 */
protected void setLookAndFeel(JurpeLookAndFeel n) {
    String laf = "";

    switch (n) {
    case XPLATFORM:
        laf = UIManager.getCrossPlatformLookAndFeelClassName();
        break;
    case SYSTEM:
        laf = UIManager.getSystemLookAndFeelClassName();
        break;
    case WINDOWS:
        laf = "com.jgoodies.looks.windows.WindowsLookAndFeel";
        break;
    case METAL:
        laf = "javax.swing.plaf.metal.MetalLookAndFeel";
        MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());
        break;
    case OCEAN:
        laf = "javax.swing.plaf.metal.MetalLookAndFeel";
        try {
            MetalLookAndFeel.class.getMethod("getCurrentTheme", (Class[]) null);
            MetalLookAndFeel.setCurrentTheme(
                    (MetalTheme) Class.forName("javax.swing.plaf.metal.OceanTheme").newInstance());
        } catch (Exception e) {
            MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());
        }
        break;
    case PLASTIC:
        PlasticLookAndFeel.setTabStyle(PlasticLookAndFeel.TAB_STYLE_METAL_VALUE);
        PlasticLookAndFeel.setPlasticTheme(new SkyKrupp());
        laf = "com.jgoodies.looks.plastic.PlasticLookAndFeel";
        break;
    case PLASTICXP:
        PlasticLookAndFeel.setTabStyle(PlasticLookAndFeel.TAB_STYLE_METAL_VALUE);
        PlasticLookAndFeel.setPlasticTheme(new ExperienceBlue());
        laf = "com.jgoodies.looks.plastic.PlasticXPLookAndFeel";
        break;
    case LOOKS:
        PlasticLookAndFeel.setTabStyle(PlasticLookAndFeel.TAB_STYLE_DEFAULT_VALUE);
        PlasticLookAndFeel.setPlasticTheme(new Silver());
        laf = "com.jgoodies.looks.plastic.Plastic3DLookAndFeel";
        break;
    default:
        laf = UIManager.getSystemLookAndFeelClassName();
        break;
    }

    try {
        UIManager.setLookAndFeel(laf);
        SwingUtilities.updateComponentTreeUI(this);
        this.validate();
    } catch (ClassNotFoundException cnfe) {
        this.announce("Unknown Look And Feel: " + laf, true);
    } catch (UnsupportedLookAndFeelException ulafe) {
        this.announce("Unsupported Look And Feel: " + laf, true);
    } catch (Exception e) {
        System.err.println(e.getMessage());
        e.printStackTrace();
    }
}

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()]);
}