textattribute.html
来自「API資料大全」· HTML 代码 · 共 1,550 行 · 第 1/5 页
HTML
1,550 行
<P><TABLE BORDER="0" CELLSPACING="0" CELLPADDING="1"> <TR> <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Key</TH> <TD VALIGN="TOP">POSTURE</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>Constants</TH> <TD VALIGN="TOP">POSTURE_REGULAR = 0, <BR> POSTURE_OBLIQUE = 0.20</TD></TR> <TR> <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Default</TH> <TD VALIGN="TOP">POSTURE_REGULAR</TD></TR> <TR> <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Description</TH> <TD VALIGN="TOP">The value is interpreted generally as a skew slope, positive leans to the right. If the font has a different value for specific constants, then the value is interpolated as described in the class description. With fonts that have italic faces, not only the skew of the character changes, but also the letter shapes might change.<BR> <B>Notes: </B><BR> To set the value by angle, use:<BR> <TT>value = new Float(Math.tan(Math.PI*degrees/180.0)</TT><BR> To determine the angle from the value, use:<BR> <TT>angle = Math.atan(value.floatValue())*180/Math.PI</TT></TD></TR> <TR> <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Fallback</TH> <TD VALIGN="TOP">If an Oblique font is available and matches, use that. Otherwise skew with a transform using the posture value interpreted as run/rise.</TD></TR> </TABLE><DD><DL><DT><B>See Also: </B><DD><A HREF="../../../java/awt/Font.html#getItalicAngle()"><CODE>Font.getItalicAngle()</CODE></A></DL></DD></DL><HR><A NAME="POSTURE_REGULAR"><!-- --></A><H3>POSTURE_REGULAR</H3><PRE>public static final <A HREF="../../../java/lang/Float.html">Float</A> <B>POSTURE_REGULAR</B></PRE><DL><DD>The standard posture, upright.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../../java/awt/font/TextAttribute.html#POSTURE"><CODE>POSTURE</CODE></A></DL></DD></DL><HR><A NAME="POSTURE_OBLIQUE"><!-- --></A><H3>POSTURE_OBLIQUE</H3><PRE>public static final <A HREF="../../../java/lang/Float.html">Float</A> <B>POSTURE_OBLIQUE</B></PRE><DL><DD>The standard italic posture.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../../java/awt/font/TextAttribute.html#POSTURE"><CODE>POSTURE</CODE></A></DL></DD></DL><HR><A NAME="SIZE"><!-- --></A><H3>SIZE</H3><PRE>public static final <A HREF="../../../java/awt/font/TextAttribute.html">TextAttribute</A> <B>SIZE</B></PRE><DL><DD>Attribute key for the font size. <P><TABLE BORDER="0" CELLSPACING="0" CELLPADDING="1"> <TR> <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Key</TH> <TD VALIGN="TOP">SIZE</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>Default</TH> <TD VALIGN="TOP">from System Properties</TD></TR> <TR> <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Description</TH> <TD VALIGN="TOP">Represents point size. Note that the appearance and metrics of a 12pt font with a 2X transform might be different than that of a 24 point font with no transform.</TD></TR> <TR> <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Fallback</TH> <TD VALIGN="TOP">Scale to provided size.</TD></TR> </TABLE></DL><HR><A NAME="TRANSFORM"><!-- --></A><H3>TRANSFORM</H3><PRE>public static final <A HREF="../../../java/awt/font/TextAttribute.html">TextAttribute</A> <B>TRANSFORM</B></PRE><DL><DD>Attribute key for the transform of a font. <P><TABLE BORDER="0" CELLSPACING="0" CELLPADDING="1"> <TR> <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Key</TH> <TD VALIGN="TOP">TRANSFORM</TD></TR> <TR> <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Value</TH> <TD VALIGN="TOP">TransformAttribute</TD></TR> <TR> <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Default</TH> <TD VALIGN="TOP">Identity transform</TD></TR> <TR> <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Description</TH> <TD VALIGN="TOP"><P>Used to transform glyphs rendered by this font. The primary intent is to support scaling, skewing, and translation. In general, large rotations do not produce very useful results. The transform modifies both the glyph and the advance. The translations in the transform are interpreted as a ratio of the point size. That is, with a point size of 12, a translation of 0.5 results in a movement of 6 points. <p> The advance point of the transformed glyph is the transform of the advance point projected onto the baseline. If the advance ends up to the left (top) of the glyph origin, the two points are swapped. <p> <P><EM>Example one</EM>: The point size is 20, the original advance is 10.0, and the transform is a 60 degree counterclockwise rotation plus an offset up and to the right of 0.1, -0.1. The translation results in an offset of <2.0, -2.0>. The original advance point is <10.0, 0.0>; after the rotation it is <6.0, -8.0>; when adding the offset this becomes <8.0,-10.0>, when projecting on the (horizontal) baseline this becomes the new advance point: <8.0, 0.0>. The advance width is the distance from the origin to the advance point: 8.0. The rotated glyph is rendered two points up and to the right of its origin and rotated. This does not affect the baseline for subsequent glyphs.</P></TD></TR> </TABLE></DL><HR><A NAME="SUPERSCRIPT"><!-- --></A><H3>SUPERSCRIPT</H3><PRE>public static final <A HREF="../../../java/awt/font/TextAttribute.html">TextAttribute</A> <B>SUPERSCRIPT</B></PRE><DL><DD>Attribute key for super and subscripting. <P><TABLE BORDER="0" CELLSPACING="0" CELLPADDING="1"> <TR> <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Key</TH> <TD VALIGN="TOP">SUPERSCRIPT</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">SUPERSCRIPT_NONE = 0,<BR> SUPERSCRIPT_SUPER = 1,<BR> SUPERSCRIPT_SUB = -1</TD></TR> <TR> <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Default</TH> <TD VALIGN="TOP">SUPERSCRIPT_NONE</TD></TR> <TR> <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Description</TH> <TD VALIGN="TOP">Requests that the font display the characters with glyphs at a particular superscript level: 0 = none, 1 = superscript, 2 = superscript of superscript,...-1 = subscript, -2 = subscript of subscript,... Requests that the font display text using default superscript (or subscript) glyphs and/or scaling.</TD></TR> <TR> <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Fallback</TH> <TD VALIGN="TOP">Use transform with translation of +/-1/2 and scale of 2/3, progressively for each level. That is, for the transform at level N (with N != 0):<BR> <TT>offset = sign(N)*1/2*(2/3)^(abs(N)-1)<BR> scale = (2/3)^abs(N)</TT></TD></TR> </TABLE></DL><HR><A NAME="SUPERSCRIPT_SUPER"><!-- --></A><H3>SUPERSCRIPT_SUPER</H3><PRE>public static final <A HREF="../../../java/lang/Integer.html">Integer</A> <B>SUPERSCRIPT_SUPER</B></PRE><DL><DD>Standard superscript.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../../java/awt/font/TextAttribute.html#SUPERSCRIPT"><CODE>SUPERSCRIPT</CODE></A></DL></DD></DL><HR><A NAME="SUPERSCRIPT_SUB"><!-- --></A><H3>SUPERSCRIPT_SUB</H3><PRE>public static final <A HREF="../../../java/lang/Integer.html">Integer</A> <B>SUPERSCRIPT_SUB</B></PRE><DL><DD>Standard subscript.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../../java/awt/font/TextAttribute.html#SUPERSCRIPT"><CODE>SUPERSCRIPT</CODE></A></DL></DD></DL><HR><A NAME="FONT"><!-- --></A><H3>FONT</H3><PRE>public static final <A HREF="../../../java/awt/font/TextAttribute.html">TextAttribute</A> <B>FONT</B></PRE><DL><DD>Attribute key for the font to use to render text. <P><TABLE BORDER="0" CELLSPACING="0" CELLPADDING="1"> <TR> <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Key</TH> <TD VALIGN="TOP">FONT</TD></TR> <TR> <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Value</TH> <TD VALIGN="TOP">Font</TD></TR> <TR> <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Default</TH> <TD VALIGN="TOP">None, perform default resolution</TD></TR> <TR> <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Description</TH> <TD VALIGN="TOP">A way for users to override the resolution of font attributes into a <code>Font</code>, or force use of a particular <code>Font</code> instance. This also allows users to specify subclasses of <code>Font</code> in cases where a <code>Font</code> can be subclassed.</TD></TR> </TABLE></DL><HR><A NAME="CHAR_REPLACEMENT"><!-- --></A><H3>CHAR_REPLACEMENT</H3><PRE>public static final <A HREF="../../../java/awt/font/TextAttribute.html">TextAttribute</A> <B>CHAR_REPLACEMENT</B></PRE><DL><DD>Attribute key for a user_defined glyph to display in the text in lieu of a character. <P><TABLE BORDER="0" CELLSPACING="0" CELLPADDING="1"> <TR> <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Key</TH> <TD VALIGN="TOP">CHAR_REPLACEMENT</TD></TR> <TR> <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Value</TH> <TD VALIGN="TOP">GraphicAttribute</TD></TR> <TR> <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Description</TH> <TD VALIGN="TOP">Allows the user to specify an empty position plus metric information. This method is used to reserve space for a graphic or other embedded component. Required for correct BIDI position of 'inline' components within a line. An optional convenience method allows drawing for simple cases. Follows the Microsoft model: the character that this is applied to should be ?.</TD></TR> </TABLE></DL><HR><A NAME="FOREGROUND"><!-- --></A><H3>FOREGROUND</H3><PRE>public static final <A HREF="../../../java/awt/font/TextAttribute.html">TextAttribute</A> <B>FOREGROUND</B></PRE><DL><DD>Attribute key for the foreground paint adornment. <P><TABLE BORDER="0" CELLSPACING="0" CELLPADDING="1"> <TR> <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Key</TH> <TD VALIGN="TOP">FOREGROUND</TD></TR> <TR> <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Value</TH> <TD VALIGN="TOP">Paint</TD></TR> <TR> <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Default</TH> <TD VALIGN="TOP">Color.black</TD></TR> <TR> <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Description</TH> <TD VALIGN="TOP">Specify the foreground Paint (or Color) of the text.</TD></TR> </TABLE></DL><HR><A NAME="BACKGROUND"><!-- --></A><H3>BACKGROUND</H3><PRE>public static final <A HREF="../../../java/awt/font/TextAttribute.html">TextAttribute</A> <B>BACKGROUND</B></PRE><DL><DD>Attribute key for the background Paint adornment. <P><TABLE BORDER="0" CELLSPACING="0" CELLPADDING="1"> <TR> <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Key</TH> <TD VALIGN="TOP">BACKGROUND</TD></TR> <TR> <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Value</TH> <TD VALIGN="TOP">Paint</TD></TR> <TR> <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Default</TH> <TD VALIGN="TOP">null</TD></TR> <TR> <TH VALIGN="TOP" ALIGN="RIGHT"><P ALIGN=RIGHT>Description</TH> <TD VALIGN="TOP">Specify the background Paint (or Color) of the text.</TD></TR> </TABLE></DL><HR><A NAME="UNDERLINE"><!-- --></A><H3>UNDERLINE</H3><PRE>public static final <A HREF="../../../java/awt/font/TextAttribute.html">TextAttribute</A> <B>UNDERLINE</B></PRE><DL><DD>Attribute key for underline adornments. <P><TABLE BORDER="0" CELLSPACING="0" CELLPADDING="1"> <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>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?