Package javax.swing.plaf

Examples of javax.swing.plaf.FontUIResource


        checkColor(MetalLookAndFeel.getControlTextColor(), defaultMetalTheme
                .getControlTextColor());
    }

    public void testGetControlTextFont() {
        FontUIResource font = MetalLookAndFeel.getControlTextFont();
        assertNotNull(font);
        assertEquals(defaultMetalTheme.getControlTextFont(), font);
    }
View Full Code Here


        checkColor(MetalLookAndFeel.getMenuSelectedForeground(), defaultMetalTheme
                .getMenuSelectedForeground());
    }

    public void testGetMenuTextFont() {
        FontUIResource font = MetalLookAndFeel.getMenuTextFont();
        assertNotNull(font);
        assertEquals(defaultMetalTheme.getMenuTextFont(), font);
    }
View Full Code Here

        checkColor(MetalLookAndFeel.getSeparatorForeground(), defaultMetalTheme
                .getSeparatorForeground());
    }

    public void testSubTextFont() {
        FontUIResource font = MetalLookAndFeel.getSubTextFont();
        assertNotNull(font);
        assertEquals(defaultMetalTheme.getSubTextFont(), font);
    }
View Full Code Here

        checkColor(MetalLookAndFeel.getSystemTextColor(), defaultMetalTheme
                .getSystemTextColor());
    }

    public void testSystemTextFont() {
        FontUIResource font = MetalLookAndFeel.getSystemTextFont();
        assertNotNull(font);
        assertEquals(defaultMetalTheme.getSystemTextFont(), font);
    }
View Full Code Here

        checkColor(MetalLookAndFeel.getTextHighlightColor(), defaultMetalTheme
                .getTextHighlightColor());
    }

    public void testUserTextFont() {
        FontUIResource font = MetalLookAndFeel.getUserTextFont();
        assertNotNull(font);
        assertEquals(defaultMetalTheme.getUserTextFont(), font);
    }
View Full Code Here

        checkColor(MetalLookAndFeel.getWindowTitleBackground(), defaultMetalTheme
                .getWindowTitleBackground());
    }

    public void testGetWindowTitleFont() {
        FontUIResource font = MetalLookAndFeel.getWindowTitleFont();
        assertNotNull(font);
        assertEquals(defaultMetalTheme.getWindowTitleFont(), font);
    }
View Full Code Here

        reader.moveDown(); // into <attributes>
        Map attributes = (Map) context.convertAnother(null, Map.class);
        reader.moveUp(); // out of </attributes>
        Font font = Font.getFont(attributes);
        if (context.getRequiredType() == FontUIResource.class) {
            return new FontUIResource(font);
        } else {
            return font;
        }
    }
View Full Code Here

        .toArray();
    for (int i = 0; i < objs.length; i++) {
      if (objs[i].toString().toUpperCase().indexOf("FONT") != -1) {
        Font font = UIManager.getFont(objs[i]);
        if (font != null) {
          UIManager.put(objs[i], new FontUIResource(font
              .deriveFont((float)font.getSize() + amount)));
        }
      }
    }
View Full Code Here

        System.out.println(Sizes.getUnitConverter().dialogUnitYAsPixel(10, new JLabel()));
        final Object[] objs = UIManager.getLookAndFeel().getDefaults().keySet().toArray();
        for (int i = 0; i < objs.length; i++) {
            if (objs[i].toString().toUpperCase().indexOf("FONT") != -1) {
                final Font font = UIManager.getFont(objs[i]);
                UIManager.put(objs[i], new FontUIResource(font.deriveFont((float)(font.getSize() + adjustAmount))));
            }
        }       
        System.out.println(Sizes.getUnitConverter().dialogUnitYAsPixel(10, new JLabel()));
        ApplicationWindow[] applicationWindows = Application.instance().getWindowManager().getWindows();
        for (int i = 0; i < applicationWindows.length; i++) {
View Full Code Here

   * @param systemFont
   *            Original font.
   * @return Wrapped font.
   */
  private FontUIResource getWrappedFont(FontUIResource systemFont) {
    return new FontUIResource(systemFont.getFontName(), systemFont
        .getStyle(), (int) (systemFont.getSize() * this.scaleFactor));
  }
 
View Full Code Here

TOP

Related Classes of javax.swing.plaf.FontUIResource

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.