textattribute.html

来自「API資料大全」· HTML 代码 · 共 1,550 行 · 第 1/5 页

HTML
1,550
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Thu Apr 27 23:33:34 PDT 2000 --><TITLE>Java 2 Platform SE v1.3: Class  TextAttribute</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"></HEAD><BODY BGCOLOR="white"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/TextAttribute.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup>&nbsp;2&nbsp;Platform<br>Std.&nbsp;Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../java/awt/font/ShapeGraphicAttribute.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../java/awt/font/TextHitInfo.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="TextAttribute.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: &nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">java.awt.font</FONT><BR>Class  TextAttribute</H2><PRE><A HREF="../../../java/lang/Object.html">java.lang.Object</A>  |  +--<A HREF="../../../java/text/AttributedCharacterIterator.Attribute.html">java.text.AttributedCharacterIterator.Attribute</A>        |        +--<B>java.awt.font.TextAttribute</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../java/io/Serializable.html">Serializable</A></DD></DL><HR><DL><DT>public final class <B>TextAttribute</B><DT>extends <A HREF="../../../java/text/AttributedCharacterIterator.Attribute.html">AttributedCharacterIterator.Attribute</A></DL><P>The <code>TextAttribute</code> class defines attribute keys and attribute values used for text rendering.  <p> <code>TextAttribute</code> instances are used as attribute keys to identify attributes in  <A HREF="../../../java/text/AttributedCharacterIterator.html"><CODE>AttributedCharacterIterator</CODE></A>,  <A HREF="../../../java/awt/Font.html"><CODE>Font</CODE></A>, and other classes handling text  attributes. Other constants defined in this class are used  as attribute values. <p> For each text attribute, the documentation describes: <UL>   <LI>the type of their values,   <LI>the valid values if there are limitations   <LI>relevant constants   <LI>the default effect if the attribute is absent (or has a	<code>null</code> value).   <LI>a description of the effect.   <LI>the fallback behavior if the exact attribute requested is not 	available. </UL> <p> <H4>Types of Values</H4> <UL>   <LI>The values of attributes must always be immutable.   <LI>Where a list of limitations is given, any value outside of that   set is reserved for future use, and ignored at present.   <LI>If the value is <code>null</code> or not of the proper type	then it has the default effect. The effect of a particular value	can be interpolated, especially in the case of multiple master	fonts. This interpolation is done based on the nearest defined 	constants above and below the request:<BR>      <BLOCKQUOTE><TT>	interpolation = (request - below)/(above - below);	</BLOCKQUOTE></TT> </UL> <p> <H4>Interpolation</H4> <UL>   <LI>Fonts should interpolate values in certain circumstances. For example,   when the WEIGHT value is 2.13. If the nearest surrounding values   in the font are WEIGHT_BOLD = 2.0 and WEIGHT_HEAVY = 2.25 then font would   then interpret the WEIGHT request as being 52% of the way between what   it considers BOLD and what it considers HEAVY. If the nearest surrounding   values are WEIGHT_SEMIBOLD = 1.25 and WEIGHT_ULTRABOLD = 2.75 then the   WEIGHT request is interpreted as being 58.67% of the way between SEMIBOLD   and ULTRABOLD.   <LI>Where a font does not have enough capability to handle a given    request, such as superscript, then it should simulate it to the best of    its ability.  To determine if simulation is being performed, the client   should query the font to see what actual attributes were used. </UL><P><DL><DT><B>See Also: </B><DD><A HREF="../../../java/text/AttributedCharacterIterator.html"><CODE>AttributedCharacterIterator</CODE></A>, <A HREF="../../../java/awt/Font.html"><CODE>Font</CODE></A>, <A HREF="../../../serialized-form.html#java.awt.font.TextAttribute">Serialized Form</A></DL><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Field Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../../../java/awt/font/TextAttribute.html">TextAttribute</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/font/TextAttribute.html#BACKGROUND">BACKGROUND</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Attribute key for the background Paint adornment.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../../../java/awt/font/TextAttribute.html">TextAttribute</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/font/TextAttribute.html#BIDI_EMBEDDING">BIDI_EMBEDDING</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Attribute key for the embedding level for nested bidirectional runs.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../../../java/awt/font/TextAttribute.html">TextAttribute</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/font/TextAttribute.html#CHAR_REPLACEMENT">CHAR_REPLACEMENT</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Attribute key for a user_defined glyph to display in the text in lieu  of a character.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../../../java/awt/font/TextAttribute.html">TextAttribute</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/font/TextAttribute.html#FAMILY">FAMILY</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Attribute key for the unlocalized font family name.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../../../java/awt/font/TextAttribute.html">TextAttribute</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/font/TextAttribute.html#FONT">FONT</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Attribute key for the font to use to render text.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../../../java/awt/font/TextAttribute.html">TextAttribute</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/font/TextAttribute.html#FOREGROUND">FOREGROUND</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Attribute key for the foreground paint  adornment.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../../../java/awt/font/TextAttribute.html">TextAttribute</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/font/TextAttribute.html#INPUT_METHOD_HIGHLIGHT">INPUT_METHOD_HIGHLIGHT</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Attribute key for input method highlight styles.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../../../java/awt/font/TextAttribute.html">TextAttribute</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/font/TextAttribute.html#INPUT_METHOD_UNDERLINE">INPUT_METHOD_UNDERLINE</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Attribute key for input method underline adornments.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../../../java/awt/font/TextAttribute.html">TextAttribute</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/font/TextAttribute.html#JUSTIFICATION">JUSTIFICATION</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Attribute key for the justification of a paragraph.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../../../java/lang/Float.html">Float</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/font/TextAttribute.html#JUSTIFICATION_FULL">JUSTIFICATION_FULL</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Justify the line to the full requested width.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../../../java/lang/Float.html">Float</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/font/TextAttribute.html#JUSTIFICATION_NONE">JUSTIFICATION_NONE</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Do not allow the line to be justified.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../../../java/awt/font/TextAttribute.html">TextAttribute</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/font/TextAttribute.html#POSTURE">POSTURE</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Attribute key for the posture of a font.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../../../java/lang/Float.html">Float</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/font/TextAttribute.html#POSTURE_OBLIQUE">POSTURE_OBLIQUE</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The standard italic posture.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../../../java/lang/Float.html">Float</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/font/TextAttribute.html#POSTURE_REGULAR">POSTURE_REGULAR</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The standard posture, upright.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../../../java/awt/font/TextAttribute.html">TextAttribute</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/font/TextAttribute.html#RUN_DIRECTION">RUN_DIRECTION</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Attribute key for the run direction of the line.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../../../java/lang/Boolean.html">Boolean</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/font/TextAttribute.html#RUN_DIRECTION_LTR">RUN_DIRECTION_LTR</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Left-to-right run direction.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../../../java/lang/Boolean.html">Boolean</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/font/TextAttribute.html#RUN_DIRECTION_RTL">RUN_DIRECTION_RTL</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Right-to-left run direction.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../../../java/awt/font/TextAttribute.html">TextAttribute</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/font/TextAttribute.html#SIZE">SIZE</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Attribute key for the font size.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../../../java/awt/font/TextAttribute.html">TextAttribute</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/font/TextAttribute.html#STRIKETHROUGH">STRIKETHROUGH</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Attribute key for the strikethrough adornment.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../../../java/lang/Boolean.html">Boolean</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/font/TextAttribute.html#STRIKETHROUGH_ON">STRIKETHROUGH_ON</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A single strikethrough.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../../../java/awt/font/TextAttribute.html">TextAttribute</A></CODE></FONT></TD>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?