Example usage for com.jgoodies.looks Options PLASTICXP_NAME

List of usage examples for com.jgoodies.looks Options PLASTICXP_NAME

Introduction

In this page you can find the example usage for com.jgoodies.looks Options PLASTICXP_NAME.

Prototype

String PLASTICXP_NAME

To view the source code for com.jgoodies.looks Options PLASTICXP_NAME.

Click Source Link

Document

The class name of the JGoodies PlasticXP L&f.

Usage

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 a  va2s .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.dfki.dmas.owls2wsdl.gui.OWLS2WSDLGui.java

License:Open Source License

public static void createAndShowGUI() {

    if (OWLS2WSDLSettings.getInstance().getProperty("lang").equals("de")) {
        ResourceManager.setBundle("de.dfki.dmas.owls2wsdl.gui.OWLS2WSDL", "de", "DE");
        ResourceManager.setDefaultBundle("de.dfki.dmas.owls2wsdl.gui.OWLS2WSDL", "en", "EN");
    } else if (OWLS2WSDLSettings.getInstance().getProperty("lang").equals("en")) {
        ResourceManager.setBundle("de.dfki.dmas.owls2wsdl.gui.OWLS2WSDL", "en", "EN");
    }/*from w w  w  .  ja  v a 2s  . c o m*/
    // ResourceManager.printResources();

    Settings settings = createDefaultSettings();

    final OWLS2WSDLGui instance = new OWLS2WSDLGui(settings);
    settings.setSelectedLookAndFeel(Options.PLASTICXP_NAME);
    instance.configureUI();

    Runnable r1 = new Runnable() {
        public void run() {
            // TODO: Put back SplashScreen when info edited
            //            SplashScreen.splash(instance, null);
            //            SplashScreen.disposeSplash();
            try {
                jconsole.setVisible(true);
            } catch (java.lang.NullPointerException e) {
                System.out.println("[e] JConsole not yet initiated.");
            }
            instance.setVisible(true);
        }
    };

    Runnable r2 = new Runnable() {
        public void run() {
            // instance.configureUI();
            instance.build();
            instance.setSize(PREFERRED_SIZE);
            // instance.centerWindow(instance);
            instance.locateOnScreen(instance);
            instance.pack(); // System.out.println("[.] pack window");

            if (OWLS2WSDLSettings.getInstance().getProperty("JCONSOLE").equals("yes")) {
                jconsole = new JConsole();
                Dimension screenSize = instance.getToolkit().getScreenSize();
                jconsole.setTitle("JConsole for OWLS2WSDL Tool");
                jconsole.setSize(940, 300);
                jconsole.setLocation(0, screenSize.height - 300);
                jconsole.setAlwaysOnTop(false);
                // jconsole.getConsole().startConsole();
                JConsole.getConsole().startConsole();
                // jconsole.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
                if (!jconsole.isVisible()) {
                    jconsole.setVisible(true);
                    jconsole.toBack();
                }
            }
        }
    };

    java.util.concurrent.ExecutorService executor = java.util.concurrent.Executors.newCachedThreadPool();

    executor.execute(r1);
    executor.execute(r2);
}

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

License:Open Source License

/**
 * Creates new form StartGUI/*from  ww w .  j  a  va2s.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 LF_CHOICE field into a LookAndFeel class name.
 *//*from w  w  w  .j  a  v a 2 s  . c  o m*/
private static String getLookAndFeel() {

    if (LF_WINDOWS.equalsIgnoreCase(LF_CHOICE)) {
        return Options.JGOODIES_WINDOWS_NAME;
    } else if (LF_PLASTIC.equalsIgnoreCase(LF_CHOICE)) {
        return Options.PLASTIC_NAME;
    } else if (LF_PLASTIC3D.equalsIgnoreCase(LF_CHOICE)) {
        return Options.PLASTIC3D_NAME;
    } else if (LF_PLASTICXP.equalsIgnoreCase(LF_CHOICE)) {
        return Options.PLASTICXP_NAME;
    } else {
        return LF_CHOICE;
    }
}

From source file:net.sf.housekeeper.util.PlatformAwareUIConfigurer.java

License:Open Source License

public void afterPropertiesSet() throws Exception {
    if (configurer == null) {
        configurer = new UIManagerConfigurer();
    }/*  w  ww.  jav a2s  . c o  m*/

    if (LookUtils.IS_OS_WINDOWS) {
        LOG.info("Windows detected");
        setLookAndFeel(Options.JGOODIES_WINDOWS_NAME);
    } else if (isOS((MAC_OS_X))) {
        LOG.info("Macintosh OS X detected");
        setLookAndFeel(Options.getSystemLookAndFeelClassName());
    } else {
        setLookAndFeel(Options.PLASTICXP_NAME);
    }
}

From source file:org.jutils.apps.filespy.ui.FileSpyFrameView.java

/***************************************************************************
 * @return//  w  w w . j av a  2 s .c om
 **************************************************************************/
private JMenu createViewMenu() {
    JMenu viewMenu = new JMenu("View");

    JMenuItem menuItem;

    menuItem = new JMenuItem("JG Windows");
    menuItem.addActionListener(new SetLafListener(Options.JGOODIES_WINDOWS_NAME));
    viewMenu.add(menuItem);

    menuItem = new JMenuItem("Plastic");
    menuItem.addActionListener(new SetLafListener(Options.PLASTIC_NAME));
    viewMenu.add(menuItem);

    menuItem = new JMenuItem("Plastic 3D");
    menuItem.addActionListener(new SetLafListener(Options.PLASTIC3D_NAME));
    viewMenu.add(menuItem);

    menuItem = new JMenuItem("Plastic XP");
    menuItem.addActionListener(new SetLafListener(Options.PLASTICXP_NAME));
    viewMenu.add(menuItem);

    viewMenu.addSeparator();

    menuItem = new JMenuItem("Nimbus");
    menuItem.addActionListener(new SetLafListener("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel"));
    viewMenu.add(menuItem);

    return viewMenu;
}

From source file:org.jutils.licensing.LicenseDialog.java

License:Open Source License

/***************************************************************************
 * @param args//from ww w  .j  a  v a2 s .c om
 **************************************************************************/
public static void main(String[] args) {
    SwingUtilities.invokeLater(new Runnable() {
        public void run() {
            try {
                UIManager.setLookAndFeel(Options.PLASTICXP_NAME);
                UIManager.put("TabbedPaneUI", BasicTabbedPaneUI.class.getCanonicalName());
            } catch (Exception e) {
                e.printStackTrace();
            }

            LicenseDialog d = new LicenseDialog(null);

            d.setDefaultCloseOperation(JDialog.EXIT_ON_CLOSE);

            d.validate();
            d.setLocationRelativeTo(null);
            d.setVisible(true);
        }
    });
}

From source file:org.qedeq.gui.se.main.QedeqMainFrame.java

License:Open Source License

public static void main(final String[] args) {
    // load configuration file
    try {/*from   www  .  j a  va2 s .com*/
        QedeqGuiConfig.init(new File(IoUtility.getStartDirectory("qedeq"), "config/org.qedeq.properties"),
                IoUtility.getStartDirectory("qedeq"));
    } catch (Throwable e) {
        e.printStackTrace();
        JOptionPane.showInternalMessageDialog(null, "Configuration file not found!\n\n" + e,
                "Hilbert II - Error", JOptionPane.ERROR_MESSAGE);
        System.exit(-1);
        return;
    }

    try {
        // we make a local file copy of the log4j.properties if it dosen't exist already
        initLog4J(QedeqGuiConfig.getInstance());
    } catch (Throwable e) {
        e.printStackTrace();
        JOptionPane.showMessageDialog(null, "Initialization of Log4J failed!\n\n" + e, "Hilbert II - Error",
                JOptionPane.ERROR_MESSAGE);
        System.exit(-2);
        return;
    }

    try {
        final GuiOptions options = new GuiOptions();
        {
            String lafShortName = QedeqGuiConfig.getInstance().getLookAndFeel();
            String lafClassName;
            if ("Windows".equalsIgnoreCase(lafShortName)) {
                lafClassName = Options.JGOODIES_WINDOWS_NAME;
            } else if ("Plastic".equalsIgnoreCase(lafShortName)) {
                lafClassName = Options.PLASTIC_NAME;
            } else if ("Plastic3D".equalsIgnoreCase(lafShortName)) {
                lafClassName = Options.PLASTIC3D_NAME;
            } else if ("PlasticXP".equalsIgnoreCase(lafShortName)) {
                lafClassName = Options.PLASTICXP_NAME;
            } else if ("Metal".equalsIgnoreCase(lafShortName)) {
                lafClassName = "javax.swing.plaf.metal.MetalLookAndFeel";
            } else {
                lafClassName = lafShortName;
            }
            options.setSelectedLookAndFeel(lafClassName);
        }
        final QedeqMainFrame instance;
        try {
            instance = new QedeqMainFrame(options);
        } catch (IOException e) {
            e.printStackTrace(System.out);
            JOptionPane.showMessageDialog(null, "Application start failed!\n\n" + e, "Hilbert II - Error",
                    JOptionPane.ERROR_MESSAGE);
            KernelContext.getInstance().shutdown();
            System.exit(-3);
            return;
        }
        instance.setSize(PREFERRED_SIZE);
        Dimension paneSize = instance.getSize();
        Dimension screenSize = instance.getToolkit().getScreenSize();
        instance.setLocation((screenSize.width - paneSize.width) / 2,
                (screenSize.height - paneSize.height) / 2);
        instance.setVisible(true);

        // wait till GUI is ready
        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                // now we are ready to fire up the kernel
                KernelContext.getInstance().startup();
            }
        });
    } catch (Throwable e) {
        e.printStackTrace(System.out);
        Trace.fatal(QedeqMainFrame.class, "main(String[])", "Unexpected major failure!", e);
        JOptionPane.showMessageDialog(null, "Unexpected major failure!\n\n" + e, "Hilbert II - Error",
                JOptionPane.ERROR_MESSAGE);
        System.exit(-4);
        return;
    }
}

From source file:phex.gui.common.LookAndFeelUtils.java

License:Open Source License

public static UIManager.LookAndFeelInfo[] getAvailableLAFs() {
    List<UIManager.LookAndFeelInfo> list = new ArrayList<UIManager.LookAndFeelInfo>();

    if (SystemUtils.IS_OS_MAC_OSX) {
        list.add(new UIManager.LookAndFeelInfo("Macintosh", UIManager.getSystemLookAndFeelClassName()));
    }//from   ww  w.jav a 2 s  .c o m

    list.add(new UIManager.LookAndFeelInfo("PlasticXP (default)", Options.PLASTICXP_NAME));

    list.add(new UIManager.LookAndFeelInfo("Metal", "javax.swing.plaf.metal.MetalLookAndFeel"));
    //list.add( new UIManager.LookAndFeelInfo(
    //    "CDE/Motif", Options.EXT_MOTIF_NAME ) );

    if (SystemUtils.IS_OS_WINDOWS) {
        // This LAF will use the Java 1.4.2 avaiable XP look on XP systems
        list.add(
                new UIManager.LookAndFeelInfo("Windows", "com.sun.java.swing.plaf.windows.WindowsLookAndFeel"));
    }

    // The Java 1.4.2 available GTK+ LAF seems to be buggy and is not working
    // correctly together with the Swing UIDefault constants. Therefore we need
    // to wait with support of it
    Class<?> gtkLAFClass;
    try {
        gtkLAFClass = Class.forName("com.sun.java.swing.plaf.gtk.GTKLookAndFeel");
    } catch (ClassNotFoundException e) {
        gtkLAFClass = null;
    }
    if (gtkLAFClass != null) {
        list.add(new UIManager.LookAndFeelInfo("GTK", "com.sun.java.swing.plaf.gtk.GTKLookAndFeel"));
    }

    UIManager.LookAndFeelInfo[] lafs = new UIManager.LookAndFeelInfo[list.size()];
    list.toArray(lafs);
    return lafs;
}

From source file:phex.gui.common.LookAndFeelUtils.java

License:Open Source License

/**
 * @param lafClassName/*w  ww.  j av  a2  s  .  com*/
 */
public static ThemeInfo[] getAvailableThemes(String lafClassName) {
    if (lafClassName.equals(Options.PLASTICXP_NAME)) {
        initPlasticThemes();
        return plasticThemes;
    }
    return new ThemeInfo[0];
}