Package javax.swing.plaf.metal

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


  public static void main(String... args) {
    SwingUtilities.invokeLater(new Runnable() {
      @Override
      public void run() {
        try {
          UIManager.setLookAndFeel(new MetalLookAndFeel());
        } catch (Exception exc) {
          exc.printStackTrace();
        }
        BreadCrumbTest test = new BreadCrumbTest();
        test.setSize(550, 385);
View Full Code Here


    UIManager.installLookAndFeel("Squareness",
        "net.beeger.squareness.SquarenessLookAndFeel");

    JFrame.setDefaultLookAndFeelDecorated(true);
    try {
      UIManager.setLookAndFeel(new MetalLookAndFeel());
    } catch (Exception exc) {
    }
    SwingUtilities.invokeLater(new Runnable() {
      public void run() {
        final BasicCheckRibbon c = new BasicCheckRibbon();
View Full Code Here

  private void update()
  {
    MetalLookAndFeel.setCurrentTheme(theme);
    try
    {
      UIManager.setLookAndFeel( new MetalLookAndFeel() );
    } catch (UnsupportedLookAndFeelException e)
    {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
View Full Code Here

    MyTheme theme = new MyTheme();
    theme.load();
    MetalLookAndFeel.setCurrentTheme(theme);
    try
    {
      UIManager.setLookAndFeel( new MetalLookAndFeel() );
    } catch (UnsupportedLookAndFeelException e)
    {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
View Full Code Here

            list.setModel(deserialized);
        }
    }
   
    public void testMetalLookAndFeel() {
        LookAndFeel plaf = new MetalLookAndFeel();
        String originalXml = xstream.toXML(plaf);
        assertBothWays(plaf, originalXml);
    }
View Full Code Here

    public JFrameRTest(final String name) {
        super(name);
    }

    public void testInitDecorations() throws Exception {
        UIManager.setLookAndFeel(new MetalLookAndFeel() {
            private static final long serialVersionUID = 1L;

            @Override
            public boolean getSupportsWindowDecorations() {
                return false;
View Full Code Here

    }

    public void testMakeIcon() {
        Object icon = LookAndFeel.makeIcon(lf.getClass(), "empty_path");
        assertNull(((UIDefaults.LazyValue) icon).createValue(new UIDefaults()));
        lf = new MetalLookAndFeel();
        icon = LookAndFeel.makeIcon(MetalLookAndFeel.class, "icons/TreeLeaf.gif");
        assertTrue(icon instanceof UIDefaults.LazyValue);
    }
View Full Code Here

        UIDefaults defaults = lf.getDefaults();
        assertNull(defaults);
    }

    public void testInstallColors() {
        lf = new MetalLookAndFeel();
        JLabel label = new JLabel();
        LookAndFeel.installColors(label, "Tree.selectionBackground", "TextPane.background");
        UIDefaults defaults = lf.getDefaults();
        assertNotNull(defaults);
        assertEquals(UIManager.get("Tree.selectionBackground"), label.getBackground());
View Full Code Here

        assertEquals(UIManager.get("Tree.selectionBackground"), label.getBackground());
        assertEquals(UIManager.get("TextPane.background"), label.getForeground());
    }

    public void testInstallErrorColors() {
        lf = new MetalLookAndFeel();
        JLabel label = new JLabel();
        LookAndFeel.installColors(label, "bbb", "fff");
        assertNull(label.getForeground());
        assertNull(label.getBackground());
    }
View Full Code Here

        assertNull(label.getForeground());
        assertNull(label.getBackground());
    }

    public void testInstallColorAndFonts() {
        lf = new MetalLookAndFeel();
        JLabel label = new JLabel();
        LookAndFeel.installColorsAndFont(label, "Tree.selectionBackground",
                "TextPane.background", "CheckBox.font");
        UIDefaults defaults = lf.getDefaults();
        assertNotNull(defaults);
View Full Code Here

TOP

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

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.