src/share/classes/java/awt/font/TextAttribute.java

Print this page




  78  *   will be ignored.
  79  *   <li>The identity of the value does not matter, only the actual
  80  *   value.  For example, <code>TextAttribute.WEIGHT_BOLD</code> and
  81  *   <code>new Float(2.0)</code>
  82  *   indicate the same <code>WEIGHT</code>.
  83  *   <li>Attribute values of type <code>Number</code> (used for
  84  *   <code>WEIGHT</code>, <code>WIDTH</code>, <code>POSTURE</code>,
  85  *   <code>SIZE</code>, <code>JUSTIFICATION</code>, and
  86  *   <code>TRACKING</code>) can vary along their natural range and are
  87  *   not restricted to the predefined constants.
  88  *   <code>Number.floatValue()</code> is used to get the actual value
  89  *   from the <code>Number</code>.
  90  *   <li>The values for <code>WEIGHT</code>, <code>WIDTH</code>, and
  91  *   <code>POSTURE</code> are interpolated by the system, which
  92  *   can select the 'nearest available' font or use other techniques to
  93  *   approximate the user's request.
  94  *
  95  * </UL>
  96  *
  97  * <h4>Summary of attributes</h4>
  98  * <table style="float:center" border="0" cellspacing="0" cellpadding="2" width="%95"
  99  *     summary="Key, value type, principal constants, and default value
 100  *     behavior of all TextAttributes">
 101  * <tr style="background-color:#ccccff">
 102  * <th valign="TOP" align="CENTER">Key</th>
 103  * <th valign="TOP" align="CENTER">Value Type</th>
 104  * <th valign="TOP" align="CENTER">Principal Constants</th>
 105  * <th valign="TOP" align="CENTER">Default Value</th>
 106  * </tr>
 107  * <tr>
 108  * <td valign="TOP">{@link #FAMILY}</td>
 109  * <td valign="TOP">String</td>
 110  * <td valign="TOP">See Font {@link java.awt.Font#DIALOG DIALOG},
 111  * {@link java.awt.Font#DIALOG_INPUT DIALOG_INPUT},<br> {@link java.awt.Font#SERIF SERIF},
 112  * {@link java.awt.Font#SANS_SERIF SANS_SERIF}, and {@link java.awt.Font#MONOSPACED MONOSPACED}.
 113  * </td>
 114  * <td valign="TOP">"Default" (use platform default)</td>
 115  * </tr>
 116  * <tr style="background-color:#eeeeff">
 117  * <td valign="TOP">{@link #WEIGHT}</td>
 118  * <td valign="TOP">Number</td>




  78  *   will be ignored.
  79  *   <li>The identity of the value does not matter, only the actual
  80  *   value.  For example, <code>TextAttribute.WEIGHT_BOLD</code> and
  81  *   <code>new Float(2.0)</code>
  82  *   indicate the same <code>WEIGHT</code>.
  83  *   <li>Attribute values of type <code>Number</code> (used for
  84  *   <code>WEIGHT</code>, <code>WIDTH</code>, <code>POSTURE</code>,
  85  *   <code>SIZE</code>, <code>JUSTIFICATION</code>, and
  86  *   <code>TRACKING</code>) can vary along their natural range and are
  87  *   not restricted to the predefined constants.
  88  *   <code>Number.floatValue()</code> is used to get the actual value
  89  *   from the <code>Number</code>.
  90  *   <li>The values for <code>WEIGHT</code>, <code>WIDTH</code>, and
  91  *   <code>POSTURE</code> are interpolated by the system, which
  92  *   can select the 'nearest available' font or use other techniques to
  93  *   approximate the user's request.
  94  *
  95  * </UL>
  96  *
  97  * <h4>Summary of attributes</h4>
  98  * <table style="float:center" border="0" cellspacing="0" cellpadding="2" width="95%"
  99  *     summary="Key, value type, principal constants, and default value
 100  *     behavior of all TextAttributes">
 101  * <tr style="background-color:#ccccff">
 102  * <th valign="TOP" align="CENTER">Key</th>
 103  * <th valign="TOP" align="CENTER">Value Type</th>
 104  * <th valign="TOP" align="CENTER">Principal Constants</th>
 105  * <th valign="TOP" align="CENTER">Default Value</th>
 106  * </tr>
 107  * <tr>
 108  * <td valign="TOP">{@link #FAMILY}</td>
 109  * <td valign="TOP">String</td>
 110  * <td valign="TOP">See Font {@link java.awt.Font#DIALOG DIALOG},
 111  * {@link java.awt.Font#DIALOG_INPUT DIALOG_INPUT},<br> {@link java.awt.Font#SERIF SERIF},
 112  * {@link java.awt.Font#SANS_SERIF SANS_SERIF}, and {@link java.awt.Font#MONOSPACED MONOSPACED}.
 113  * </td>
 114  * <td valign="TOP">"Default" (use platform default)</td>
 115  * </tr>
 116  * <tr style="background-color:#eeeeff">
 117  * <td valign="TOP">{@link #WEIGHT}</td>
 118  * <td valign="TOP">Number</td>