📄 textattribute.java
字号:
* </TABLE> */ public static final TextAttribute BACKGROUND = new TextAttribute("background"); /** * Attribute key for underline adornments. * * <P><TABLE BORDER="0" CELLSPACING="0" CELLPADDING="1" * SUMMARY="Key, Value, Constants, Default, Description, * and Fallback for TextAttribute UNDERLINE"> * <TR> * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Key</TH> * <TD VALIGN="TOP">UNDERLINE</TD></TR> * <TR> * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Value</TH> * <TD VALIGN="TOP">Integer</TD></TR> * <TR> * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Constants</TH> * <TD VALIGN="TOP">UNDERLINE_ON = 0</TD></TR> * <TR> * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Default</TH> * <TD VALIGN="TOP">none</TD></TR> * <TR> * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Description</TH> * <TD VALIGN="TOP">An embellishment added to the glyphs rendered by a * font.</TD></TR> * <TR> * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Fallback</TH> * <TD VALIGN="TOP"></TD></TR> * </TABLE> */ public static final TextAttribute UNDERLINE = new TextAttribute("underline"); /** * Standard underline at the roman baseline for roman text, and below * the decenders for other text. * * @see #UNDERLINE */ public static final Integer UNDERLINE_ON = new Integer((byte)0); /** * Attribute key for the strikethrough adornment. * * <P><TABLE BORDER="0" CELLSPACING="0" CELLPADDING="1" * SUMMARY="Key, Value, Constants, Default, and Description * for TextAttribute STRIKETHROUGH"> * <TR> * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Key</TH> * <TD VALIGN="TOP">STRIKETHROUGH</TD></TR> * <TR> * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Value</TH> * <TD VALIGN="TOP">Boolean</TD></TR> * <TR> * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Constants</TH> * <TD VALIGN="TOP">true = on, false = off</TD></TR> * <TR> * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Default</TH> * <TD VALIGN="TOP">off</TD></TR> * <TR> * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Description</TH> * <TD VALIGN="TOP">An embellishment added to the glyphs rendered by a * font.</TD></TR> * </TABLE> */ public static final TextAttribute STRIKETHROUGH = new TextAttribute("strikethrough"); /** * A single strikethrough. * * @see #STRIKETHROUGH */ public static final Boolean STRIKETHROUGH_ON = new Boolean(true); // // Attributes use to control layout of text on a line. // /** * Attribute key for the run direction of the line. * * <P><TABLE BORDER="0" CELLSPACING="0" CELLPADDING="1" * SUMMARY="Key, Value, Constants, Default, and Description * of TextAttribute RUN_DIRECTION"> * <TR> * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Key</TH> * <TD VALIGN="TOP">RUN_DIRECTION</TD></TR> * <TR> * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Value</TH> * <TD VALIGN="TOP">Boolean</TD></TR> * <TR> * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Constants</TH> * <TD VALIGN="TOP">RUN_DIRECTION_LTR = true, RUN_DIRECTION_RTL = false * </TD></TR> * <TR> * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Default</TH> * <TD VALIGN="TOP">Use the default Unicode base direction from the BIDI * algorithm.</TD></TR> * <TR> * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Description</TH> * <TD VALIGN="TOP"><P>Specifies which base run direction to use when * positioning mixed directional runs within a paragraph. If this value is * RUN_DIRECTION_DEFAULT, <code>TextLayout</code> uses the default Unicode * base direction from the BIDI algorithm.</P> * <P><I>This attribute should have the same value over the whole * paragraph.</I></TD></TR> * </TABLE> */ public static final TextAttribute RUN_DIRECTION = new TextAttribute("run_direction"); /** * Left-to-right run direction. * @see #RUN_DIRECTION */ public static final Boolean RUN_DIRECTION_LTR = new Boolean(false); /** * Right-to-left run direction. * @see #RUN_DIRECTION */ public static final Boolean RUN_DIRECTION_RTL = new Boolean(true); /** * Attribute key for the embedding level for nested bidirectional runs. * * <P><TABLE BORDER="0" CELLSPACING="0" CELLPADDING="1" * SUMMARY="Key, Value, Limits, Default, and Description * of TextAttribute BIDI_EMBEDDING"> * <TR> * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Key</TH> * <TD VALIGN="TOP">BIDI_EMBEDDING</TD></TR> * <TR> * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Value</TH> * <TD VALIGN="TOP">Integer</TD></TR> * <TR> * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Limits</TH> * <TD VALIGN="TOP">Positive values 1 through 61 are <I>embedding</I> * levels, negative values<BR> through -61 are <I>override</I> levels * </TD></TR> * <TR> * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Default</TH> * <TD VALIGN="TOP">Use standard BIDI to compute levels from formatting * characters in the text.</TD></TR> * <TR> * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Description</TH> * <TD VALIGN="TOP">Specifies the bidi embedding level of the character. * When this attribute is present anywhere in a paragraph, then the * Unicode characters RLO, LRO, RLE, LRE, PDF are disregarded in the BIDI * analysis of that paragraph. * See the Unicode Standard v. 2.0, section 3-11. * </TD></TR> * </TABLE> */ public static final TextAttribute BIDI_EMBEDDING = new TextAttribute("bidi_embedding"); /** * Attribute key for the justification of a paragraph. * * <P><TABLE BORDER="0" CELLSPACING="0" CELLPADDING="1" * SUMMARY="Key, Value, Limits, Default, and Description * of TextAttribute JUSTIFICATION"> * <TR> * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Key</TH> * <TD VALIGN="TOP">JUSTIFICATION</TD></TR> * <TR> * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Value</TH> * <TD VALIGN="TOP">Float</TD></TR> * <TR> * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Limits</TH> * <TD VALIGN="TOP">0.0 through1.0</TD></TR> * <TR> * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Default</TH> * <TD VALIGN="TOP">1.0</TD></TR> * <TR> * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Description</TH> * <TD VALIGN="TOP"><P>Specifies which fraction of the extra space to use * when justification is requested. For example, if the line is 50 points * wide and the margins are 70 points apart, a value of 0.5 means that the * line is padded to reach a width of 60 points.</P> * <P><I>This attribute should have the same value over the whole * paragraph.</I></TD></TR> * </TABLE> */ public static final TextAttribute JUSTIFICATION = new TextAttribute("justification"); /** * Justify the line to the full requested width. * @see #JUSTIFICATION */ public static final Float JUSTIFICATION_FULL = new Float(1.0f); /** * Do not allow the line to be justified. * @see #JUSTIFICATION */ public static final Float JUSTIFICATION_NONE = new Float(0.0f); // // For use by input method. // /** * Attribute key for input method highlight styles. * <p>Values are instances of * {@link java.awt.im.InputMethodHighlight InputMethodHighlight}. * These instances should be wrapped in * {@link java.text.Annotation Annotation} instances * if segments need to be highlighted separately. * <p> * Input method highlights are used while text is being composed * using an input method. Text editing components should retain them * even if they generally only deal with unstyled text, and make them * available to the drawing routines. * @see java.awt.im.InputMethodHighlight */ public static final TextAttribute INPUT_METHOD_HIGHLIGHT = new TextAttribute("input method highlight"); /** * Attribute key for input method underline adornments. * * <P><TABLE BORDER="0" CELLSPACING="0" CELLPADDING="1" * SUMMARY="Key, Value, Limits, Default and Description * of TextAttribute INPUT_METHOD_UNDERLINE"> * <TR> * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Key</TH> * <TD VALIGN="TOP">INPUT_METHOD_UNDERLINE</TD></TR> * <TR> * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Value</TH> * <TD VALIGN="TOP">Integer</TD></TR> * <TR> * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Constants</TH> * <TD VALIGN="TOP">UNDERLINE_LOW_ONE_PIXEL, UNDERLINE_LOW_TWO_PIXEL, * UNDERLINE_LOW_DOTTED, UNDERLINE_LOW_GRAY, UNDERLINE_LOW_DASHED</TD></TR> * <TR> * <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Default</TH> * <TD VALIGN="TOP">no underline</TD></TR> * </TABLE> * @since 1.3 */ public static final TextAttribute INPUT_METHOD_UNDERLINE = new TextAttribute("input method underline"); /** * Single pixel solid low underline. * @see #INPUT_METHOD_UNDERLINE * @since 1.3 */ public static final Integer UNDERLINE_LOW_ONE_PIXEL = new Integer(1); /** * Double pixel solid low underline. * @see #INPUT_METHOD_UNDERLINE * @since 1.3 */ public static final Integer UNDERLINE_LOW_TWO_PIXEL = new Integer(2); /** * Single pixel dotted low underline. * @see #INPUT_METHOD_UNDERLINE * @since 1.3 */ public static final Integer UNDERLINE_LOW_DOTTED = new Integer(3); /** * Double pixel gray low underline. * @see #INPUT_METHOD_UNDERLINE * @since 1.3 */ public static final Integer UNDERLINE_LOW_GRAY = new Integer(4); /** * Single pixel dashed low underline. * @see #INPUT_METHOD_UNDERLINE * @since 1.3 */ public static final Integer UNDERLINE_LOW_DASHED = new Integer(5); /** * Attribute key for swapping foreground and background Paints (or Colors). * * <p>Values are instances of <code>Boolean</code>. * The default is not to swap the foreground and background. * If the foreground and background attributes are both defined, * this causes them to be swapped when rendering text. If either is * defaulted, the exact effect is undefined--generally it will produce * an 'inverted' appearance. */ public static final TextAttribute SWAP_COLORS = new TextAttribute("swap_colors"); /** Swap foreground and background. */ public static final Boolean SWAP_COLORS_ON = new Boolean(true); /** * Attribute key for converting ASCII decimal digits to other decimal ranges. * * <p>Values are instances of <code>NumericShaping</code>. * The default is not to perform numeric shaping. */ public static final TextAttribute NUMERIC_SHAPING = new TextAttribute("numeric_shaping");}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -