Package javax.swing.plaf

Examples of javax.swing.plaf.FontUIResource


      this.delegate = delegate;
      this.extra = extra;
    }

    private FontUIResource getWrappedFont(FontUIResource systemFont) {
      return new FontUIResource(systemFont.getFontName(), systemFont
          .getStyle(), systemFont.getSize() + extra);
    }
View Full Code Here


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

        if (isOrigItalic)
          newStyle = Font.ITALIC + Font.BOLD;
        else
          newStyle = Font.BOLD;
      }
      return new FontUIResource(systemFont.deriveFont(
          (float) (systemFont.getSize() + extraFontSize)).deriveFont(
          newStyle));
      // return new FontUIResource(systemFont.getFontName(), newStyle,
      // systemFont.getSize() + extraFontSize);
    }
View Full Code Here

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

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

    for (Iterator<Map.Entry<String, Font>> it = entries.iterator(); it.hasNext();) {
      Map.Entry<String, Font> e = it.next();
      Font origFont = e.getValue();

      if (SCALE_LAF == false) {
        UIManager.put(e.getKey(), new FontUIResource(origFont.deriveFont(origFont.getSize() * fontScale)));
      } else {
        UIManager.put(e.getKey(), null);
      }
    }

View Full Code Here

      {
        if( objs[i].toString().toUpperCase().indexOf( ".FONT" ) != -1 )
        {
          Font font = UIManager.getFont( objs[i] );
          font = font.deriveFont( (float)font.getSize() * uiFontScaleFactor );
          UIManager.put( objs[i], new FontUIResource(font) );
        }
      }
                          
      UIManager.setLookAndFeel(lookAndFeel);
     
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

        Enumeration<Object> keys = defaults.keys();
        while (keys.hasMoreElements()) {
            Object key = keys.nextElement();

            if ((key instanceof String) && (((String) key).endsWith(".font"))) {
                FontUIResource font = (FontUIResource) UIManager.get(key);
                defaults.put (key, new FontUIResource(font.getFontName(), font.getStyle(), fontSize));
            }
        }
     }
View Full Code Here

                throw new SAXException("You must define a name for the font");
            }
            if (size == 0) {
                throw new SAXException("You must define a size for the font");
            }
            font = new FontUIResource(name, style, size);
        }
        else if (name != null || size != 0 || style != Font.PLAIN) {
            throw new SAXException("Name, size and style are not for use " +
                                   "with idref");
        }
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.