Package javax.swing.plaf

Examples of javax.swing.plaf.FontUIResource


   */
  public Element writeFontUIResource(Element parent, Object o, String name)
      throws Exception {
   
    Element           node;
    FontUIResource    resource;

    // for debugging only
    if (DEBUG)
       trace(new Throwable(), name);
   
    m_CurrentNode = parent;
   
    resource = (FontUIResource) o;
    node     = addElement(parent, name, resource.getClass().getName(), false);
    invokeWriteToXML(node, new Font(resource.getName(), resource.getStyle(), resource.getSize()), VAL_COLOR);
   
    return node;
  }
View Full Code Here


      else
        System.out.println("WARNING: '" + name
            + "' is not a recognized name for " + node.getAttribute(ATT_NAME) + "!");
    }
   
    result = new FontUIResource(font);

    return result;
  }
View Full Code Here

    /**
     * Crates this Theme
     */
    public KunststoffNotebookTheme()
    {
        menuFont = new FontUIResource("Tahoma",Font.PLAIN, 12);
        controlFont = new FontUIResource("Tahoma",Font.PLAIN, 11);
        windowTitleFont =  new FontUIResource("Tahoma", Font.BOLD, 12);
        monospacedFont = new FontUIResource("Monospaced", Font.PLAIN, 11);
    }
View Full Code Here

    /**
     * Crates this Theme
     */
    public KunststoffPresentationTheme()
    {
        menuFont = new FontUIResource("Tahoma",Font.PLAIN, 17);
        controlFont = new FontUIResource("Tahoma",Font.PLAIN, 16);
        textFont = new FontUIResource("Tahoma",Font.PLAIN, 14);
        windowTitleFont =  new FontUIResource("Tahoma", Font.BOLD, 17);
        monospacedFont = new FontUIResource("Monospaced", Font.PLAIN, 15);
    }
View Full Code Here

    /**
     * Crates this Theme
     */
    public KunststoffDesktopTheme()
    {
        menuFont = new FontUIResource("Tahoma",Font.PLAIN, 12);
        controlFont = new FontUIResource("Tahoma",Font.PLAIN, 11);
        windowTitleFont =  new FontUIResource("Tahoma", Font.BOLD, 12);
        monospacedFont = new FontUIResource("Monospaced", Font.PLAIN, 11);
    }
View Full Code Here

        Enumeration k = uid.keys();
        while (k.hasMoreElements()) {
            Object key = k.nextElement();
            Object val = javax.swing.UIManager.get(key);
            if (val instanceof FontUIResource) {
                FontUIResource fuir = (FontUIResource) val;
                javax.swing.UIManager.put(key, new FontUIResource(font));
            }
        }
    }
View Full Code Here

    // cette fonte sera utilis´┐Że pour TOUS nos composants
    private final FontUIResource font;

    public GanttMetalTheme(UIConfiguration config) {
        super();
        font = new FontUIResource(config.getMenuFont());
    }
View Full Code Here

  }

  public FontUIResource getControlTextFont() {
    if (controlFont == null) {
      try {
        controlFont = new FontUIResource(Font.getFont("swing.plaf.metal.controlFont", new Font("Dialog", Font.PLAIN, 12)));
      }
      catch (Exception e) {
        controlFont = new FontUIResource("Dialog", Font.PLAIN, 12);
      }
    }
    return controlFont;
  }
View Full Code Here

        {
            Object key = keys.nextElement();
            Object value = UIManager.get(key);
            if (value instanceof FontUIResource)
            {
        FontUIResource fr = (javax.swing.plaf.FontUIResource)value;
        if (!key.toString().equals("InternalFrame.titleFont") && fr.isBold())
          UIManager.put(key, new FontUIResource(fr.deriveFont(java.awt.Font.PLAIN)));
            }
        }
        try
        {
            UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
View Full Code Here

                Font font = table.getFont("Label.font");
                if (font == null) {
                    font = new Font("Tahoma", Font.PLAIN, 12); // use default font
                }
                if (defaultFontSize == -1) {
                    boldFont = new FontUIResource(font.deriveFont(Font.BOLD));
                }
                else {
                    boldFont = new WindowsDesktopProperty("win.defaultGUI.font", font, toolkit, defaultFontSize, Font.BOLD);
                }
            }
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.