Package javax.swing.plaf

Examples of javax.swing.plaf.FontUIResource


        if (value != null) {
            if (value instanceof Color) {
                return new ColorUIResource((Color) value);
            }
            else if (value instanceof Font) {
                return new FontUIResource((Font) value);
            }
            else if (value instanceof UIDefaults.ProxyLazyValue) {
                value = ((UIDefaults.ProxyLazyValue) value).createValue(null);
            }
            else if (value instanceof UIDefaults.ActiveValue) {
View Full Code Here


            if (value instanceof Color) {
                return new ColorUIResource((Color) value);
            }
            else if (value instanceof Font) {
                if (fontSize != -1 && fontStyle != -1f) {
                    return new FontUIResource(((Font) value).deriveFont(fontStyle, fontSize));
                }
                else if (fontSize != -1) {
                    return new FontUIResource(((Font) value).deriveFont(fontSize));
                }
                else if (fontStyle != -1f) {
                    return new FontUIResource(((Font) value).deriveFont(fontStyle));
                }
                else {
                    return new FontUIResource((Font) value);
                }
            }
            else if (value instanceof UIDefaults.ProxyLazyValue) {
                value = ((UIDefaults.ProxyLazyValue) value).createValue(null);
            }
View Full Code Here

        FontUIResource messageFont;

        String fontFamily = "Verdana";

        public LightZoneFontSet() {
            controlFont = new FontUIResource(fontFamily, Font.BOLD, 11);
            menuFont = new FontUIResource("Arial", Font.PLAIN, 11);
            titleFont = new FontUIResource(fontFamily, Font.BOLD, 9);
            windowTitleFont = new FontUIResource(fontFamily, Font.BOLD, 14);
            smallFont = new FontUIResource(fontFamily, Font.PLAIN, 11);
            messageFont = new FontUIResource(fontFamily, Font.BOLD, 11);
        }
View Full Code Here

   * @return Wrapped font.
   */
  private FontUIResource getWrappedFont(final FontUIResource systemFont) {
    if (log.isDebugEnabled()) log.debug(HelperLog.methodStart(systemFont));

    final FontUIResource result = new FontUIResource(systemFont.getFontName(), systemFont.getStyle(), systemFont.getSize()
        + extra);

    if (log.isDebugEnabled()) log.debug(HelperLog.methodExit(result));
    return result;
  }
View Full Code Here

    String prodFrontParam = ApplicationParamUtil
        .findParamByName("prod_font");
    String infoFrontParam = ApplicationParamUtil
        .findParamByName("info_font");

    font = new FontUIResource("Arial", Font.BOLD, Integer
        .valueOf(prodFrontParam));
    fontInfo = new FontUIResource("Arial", Font.BOLD, Integer
        .valueOf(infoFrontParam));

    currentYear = Util.getCurrentYear();
    currentWeek = Util.getCurrentWeek();
    nokkelProduksjonVManager = (NokkelProduksjonVManager) ModelUtil
View Full Code Here

    protected class FontSizeHandler implements OptionHandler {
        public int handleOption(int i) {
            int size = Integer.parseInt(arguments[++i]);

            Font font = new Font("Dialog", Font.PLAIN, size);
            FontUIResource fontRes = new FontUIResource(font);
            UIManager.put("CheckBox.font", fontRes);
            UIManager.put("PopupMenu.font", fontRes);
            UIManager.put("TextPane.font", fontRes);
            UIManager.put("MenuItem.font", fontRes);
            UIManager.put("ComboBox.font", fontRes);
View Full Code Here

    protected class FontSizeHandler implements OptionHandler {
        public int handleOption(int i) {
            int size = Integer.parseInt(arguments[++i]);

            Font font = new Font("Dialog", Font.PLAIN, size);
            FontUIResource fontRes = new FontUIResource(font);
            UIManager.put("CheckBox.font", fontRes);
            UIManager.put("PopupMenu.font", fontRes);
            UIManager.put("TextPane.font", fontRes);
            UIManager.put("MenuItem.font", fontRes);
            UIManager.put("ComboBox.font", fontRes);
View Full Code Here

        assertNull(tf.getMargin());
        tf.setCaretColor(RED);
        tf.setSelectionColor(GREEN);
        tf.setSelectedTextColor(BLUE);
        tf.setDisabledTextColor(YELLOW);
        tf.setFont(new FontUIResource("SimSun", 8, 8));
        tf.setBackground(BLACK);
        tf.setForeground(YELLOW);
        tf.setBorder(new BorderUIResource.LineBorderUIResource(Color.RED));
        tf.setMargin(new InsetsUIResource(2, 4, 6, 3));
        ((BasicTextUI) tf.getUI()).uninstallDefaults();
View Full Code Here

        Color inactiveForeground = (Color) getProperty(prefix, "inactiveForeground");
        Insets margin = (Insets) getProperty(prefix, "margin");
        Border border = (Border) getProperty(prefix, "border");
        checkProperies(tf, caretForeground, selectionBackground, selectionForeground,
                inactiveForeground, font, background, foreground, margin, border);
        setProperies(tf, RED, GREEN, BLUE, YELLOW, new FontUIResource("SimSun", 8, 8), BLACK,
                YELLOW, new InsetsUIResource(2, 4, 6, 3),
                new BorderUIResource.LineBorderUIResource(Color.RED), 56);
        ((BasicTextUI) tf.getUI()).installDefaults();
        checkProperies(tf, caretForeground, selectionBackground, selectionForeground,
                inactiveForeground, font, background, foreground, margin, border);
View Full Code Here

    protected class FontSizeHandler implements OptionHandler {
        public int handleOption(int i) {
            int size = Integer.parseInt(arguments[++i]);

            Font font = new Font("Dialog", Font.PLAIN, size);
            FontUIResource fontRes = new FontUIResource(font);
            UIManager.put("CheckBox.font", fontRes);
            UIManager.put("PopupMenu.font", fontRes);
            UIManager.put("TextPane.font", fontRes);
            UIManager.put("MenuItem.font", fontRes);
            UIManager.put("ComboBox.font", fontRes);
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.