Package javax.swing.plaf.metal

Examples of javax.swing.plaf.metal.MetalLookAndFeel$MetalLayoutStyle


    public MetalLnF(String clazz) {
      super(clazz);
    }

    public LookAndFeel create(String themeClass, String licenseCode) throws GUIException {
      MetalLookAndFeel lnf = (MetalLookAndFeel) super.create(themeClass, licenseCode);
      try {
        MetalLookAndFeel.setCurrentTheme((MetalTheme) Class.forName(themeClass).newInstance());
        return lnf;
      } catch (Exception e) {
        throw new GUIException("Error while setting theme", e);
View Full Code Here


     * Metal look and feel's getName() property does not distinguish between versions correctly.
     * A bug has been submitted to the Sun Java bug database and will be reviewed.
     */
    public static String getMetalTheme() {
        try {
            MetalLookAndFeel metalLNF = (MetalLookAndFeel)UIManager.getLookAndFeel();
            Method getCurrentTheme = metalLNF.getClass().getMethod("getCurrentTheme", new Class[0]);
            MetalTheme currentTheme = (MetalTheme)getCurrentTheme.invoke(metalLNF, new Object[0]);
            return "Metal/" + currentTheme.getName();
        } catch(NoSuchMethodException e) {
            // must be Java 1.4 because getCurrentTheme() method does not exist
            // therefore the theme of interest is "Steel"
View Full Code Here

        }
    };

    public static void runBrowser() throws AWTException {
        try {
            javax.swing.UIManager.setLookAndFeel(new MetalLookAndFeel());
        } catch (UnsupportedLookAndFeelException ex) {
            Logger.getLogger(HierarchyView.class.getName()).log(Level.SEVERE, null, ex);
        }
        BrowserDescriptor descr = new BrowserDescriptor() {
View Full Code Here

            }
        });

        try {
            MetalLookAndFeel.setCurrentTheme(new OceanTheme());
            UIManager.setLookAndFeel(new MetalLookAndFeel());
        } catch (Exception x) {
            log.warn("Look And Feel not found: ", x);
        }
        // Create the desktop
        desktopFrame = new DesktopFrame(getScreenSize());
View Full Code Here

  {
    // test with DefaultMetalTheme
    try
      {
        MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());
        UIManager.setLookAndFeel(new MetalLookAndFeel());
      }
    catch (UnsupportedLookAndFeelException e)
      {
        e.printStackTrace()
      }
View Full Code Here

  {
    // test with DefaultMetalTheme
    try
      {
        MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());
        UIManager.setLookAndFeel(new MetalLookAndFeel());
      }
    catch (UnsupportedLookAndFeelException e)
      {
        e.printStackTrace()
      }
View Full Code Here

    harness.checkPoint("getBorderInsets(Component)");
    // test with DefaultMetalTheme
    try
      {
        MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());
        UIManager.setLookAndFeel(new MetalLookAndFeel());
      }
    catch (UnsupportedLookAndFeelException e)
      {
        e.printStackTrace()
      }
View Full Code Here

  {
    // test with a known theme
    try
      {
        MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());
        UIManager.setLookAndFeel(new MetalLookAndFeel());
      }
    catch (UnsupportedLookAndFeelException e)
      {
        e.printStackTrace();  
      }
View Full Code Here

    harness.checkPoint("getBorderInsets(Component, Insets)");
    // test with DefaultMetalTheme
    try
      {
        MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());
        UIManager.setLookAndFeel(new MetalLookAndFeel());
      }
    catch (UnsupportedLookAndFeelException e)
      {
        e.printStackTrace()
      }
View Full Code Here

  {
    // test with DefaultMetalTheme
    try
      {
        MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());
        UIManager.setLookAndFeel(new MetalLookAndFeel());
      }
    catch (UnsupportedLookAndFeelException e)
      {
        e.printStackTrace()
      }
View Full Code Here

TOP

Related Classes of javax.swing.plaf.metal.MetalLookAndFeel$MetalLayoutStyle

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.