< prev index next >
src/java.desktop/share/classes/javax/swing/plaf/metal/DefaultMetalTheme.java
Print this page
*** 47,67 ****
* {@code DefaultMetalTheme} uses bold fonts for many controls. To make all
* controls (with the exception of the internal frame title bars and
* client decorated frame title bars) use plain fonts you can do either of
* the following:
* <ul>
! * <li>Set the system property <code>swing.boldMetal</code> to
! * <code>false</code>. For example,
* <code>java -Dswing.boldMetal=false MyApp</code>.
! * <li>Set the defaults property <code>swing.boldMetal</code> to
! * <code>Boolean.FALSE</code>. For example:
* <code>UIManager.put("swing.boldMetal", Boolean.FALSE);</code>
* </ul>
! * The defaults property <code>swing.boldMetal</code>, if set,
* takes precedence over the system property of the same name. After
* setting this defaults property you need to re-install
! * <code>MetalLookAndFeel</code>, as well as update the UI
* of any previously created widgets. Otherwise the results are undefined.
* The following illustrates how to do this:
* <pre>
* // turn off bold fonts
* UIManager.put("swing.boldMetal", Boolean.FALSE);
--- 47,67 ----
* {@code DefaultMetalTheme} uses bold fonts for many controls. To make all
* controls (with the exception of the internal frame title bars and
* client decorated frame title bars) use plain fonts you can do either of
* the following:
* <ul>
! * <li>Set the system property {@code swing.boldMetal} to
! * {@code false}. For example,
* <code>java -Dswing.boldMetal=false MyApp</code>.
! * <li>Set the defaults property {@code swing.boldMetal} to
! * {@code Boolean.FALSE}. For example:
* <code>UIManager.put("swing.boldMetal", Boolean.FALSE);</code>
* </ul>
! * The defaults property {@code swing.boldMetal}, if set,
* takes precedence over the system property of the same name. After
* setting this defaults property you need to re-install
! * {@code MetalLookAndFeel}, as well as update the UI
* of any previously created widgets. Otherwise the results are undefined.
* The following illustrates how to do this:
* <pre>
* // turn off bold fonts
* UIManager.put("swing.boldMetal", Boolean.FALSE);
*** 78,88 ****
* Serialized objects of this class will not be compatible with
* future Swing releases. The current serialization support is
* appropriate for short term storage or RMI between applications running
* the same version of Swing. As of 1.4, support for long term storage
* of all JavaBeans™
! * has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*
* @see MetalLookAndFeel
* @see MetalLookAndFeel#setCurrentTheme
*
--- 78,88 ----
* Serialized objects of this class will not be compatible with
* future Swing releases. The current serialization support is
* appropriate for short term storage or RMI between applications running
* the same version of Swing. As of 1.4, support for long term storage
* of all JavaBeans™
! * has been added to the {@code java.beans} package.
* Please see {@link java.beans.XMLEncoder}.
*
* @see MetalLookAndFeel
* @see MetalLookAndFeel#setCurrentTheme
*
*** 102,112 ****
private static final String[] fontNames = {
Font.DIALOG,Font.DIALOG,Font.DIALOG,Font.DIALOG,Font.DIALOG,Font.DIALOG
};
/**
* Styles for the fonts. This is ignored if the defaults property
! * <code>swing.boldMetal</code> is false, or PLAIN_FONTS is true.
*/
private static final int[] fontStyles = {
Font.BOLD, Font.PLAIN, Font.PLAIN, Font.BOLD, Font.BOLD, Font.PLAIN
};
/**
--- 102,112 ----
private static final String[] fontNames = {
Font.DIALOG,Font.DIALOG,Font.DIALOG,Font.DIALOG,Font.DIALOG,Font.DIALOG
};
/**
* Styles for the fonts. This is ignored if the defaults property
! * {@code swing.boldMetal} is false, or PLAIN_FONTS is true.
*/
private static final int[] fontStyles = {
Font.BOLD, Font.PLAIN, Font.PLAIN, Font.BOLD, Font.BOLD, Font.PLAIN
};
/**
*** 382,393 ****
return fonts[type];
}
/**
* This is the same as invoking
! * <code>Font.getFont(key)</code>, with the exception
! * that it is wrapped inside a <code>doPrivileged</code> call.
*/
protected Font getPrivilegedFont(final int key) {
return java.security.AccessController.doPrivileged(
new java.security.PrivilegedAction<Font>() {
public Font run() {
--- 382,393 ----
return fonts[type];
}
/**
* This is the same as invoking
! * {@code Font.getFont(key)}, with the exception
! * that it is wrapped inside a {@code doPrivileged} call.
*/
protected Font getPrivilegedFont(final int key) {
return java.security.AccessController.doPrivileged(
new java.security.PrivilegedAction<Font>() {
public Font run() {
< prev index next >