📄 stylesheet.html
字号:
</DL><HR><A NAME="addAttributes(javax.swing.text.AttributeSet, javax.swing.text.AttributeSet)"><!-- --></A><H3>addAttributes</H3><PRE>public <A HREF="../../../../javax/swing/text/AttributeSet.html">AttributeSet</A> <B>addAttributes</B>(<A HREF="../../../../javax/swing/text/AttributeSet.html">AttributeSet</A> old, <A HREF="../../../../javax/swing/text/AttributeSet.html">AttributeSet</A> attr)</PRE><DL><DD>Adds a set of attributes to the element. If any of these attributes are StyleConstants attributes, they will be converted to CSS prior to forwarding to the superclass behavior.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../javax/swing/text/StyleContext.html#addAttributes(javax.swing.text.AttributeSet, javax.swing.text.AttributeSet)">addAttributes</A></CODE> in class <CODE><A HREF="../../../../javax/swing/text/StyleContext.html">StyleContext</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>old</CODE> - the old attribute set<DD><CODE>attr</CODE> - the attributes to add<DT><B>Returns:</B><DD>the updated attribute set<DT><B>See Also: </B><DD><A HREF="../../../../javax/swing/text/MutableAttributeSet.html#addAttribute(java.lang.Object, java.lang.Object)"><CODE>MutableAttributeSet.addAttribute(java.lang.Object, java.lang.Object)</CODE></A></DL></DD></DL><HR><A NAME="removeAttribute(javax.swing.text.AttributeSet, java.lang.Object)"><!-- --></A><H3>removeAttribute</H3><PRE>public <A HREF="../../../../javax/swing/text/AttributeSet.html">AttributeSet</A> <B>removeAttribute</B>(<A HREF="../../../../javax/swing/text/AttributeSet.html">AttributeSet</A> old, <A HREF="../../../../java/lang/Object.html">Object</A> key)</PRE><DL><DD>Removes an attribute from the set. If the attribute is a StyleConstants attribute, the request will be converted to a CSS attribute prior to forwarding to the superclass behavior.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../javax/swing/text/StyleContext.html#removeAttribute(javax.swing.text.AttributeSet, java.lang.Object)">removeAttribute</A></CODE> in class <CODE><A HREF="../../../../javax/swing/text/StyleContext.html">StyleContext</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>old</CODE> - the old set of attributes<DD><CODE>key</CODE> - the non-null attribute name<DT><B>Returns:</B><DD>the updated attribute set<DT><B>See Also: </B><DD><A HREF="../../../../javax/swing/text/MutableAttributeSet.html#removeAttribute(java.lang.Object)"><CODE>MutableAttributeSet.removeAttribute(java.lang.Object)</CODE></A></DL></DD></DL><HR><A NAME="removeAttributes(javax.swing.text.AttributeSet, java.util.Enumeration)"><!-- --></A><H3>removeAttributes</H3><PRE>public <A HREF="../../../../javax/swing/text/AttributeSet.html">AttributeSet</A> <B>removeAttributes</B>(<A HREF="../../../../javax/swing/text/AttributeSet.html">AttributeSet</A> old, <A HREF="../../../../java/util/Enumeration.html">Enumeration</A> names)</PRE><DL><DD>Removes a set of attributes for the element. If any of the attributes is a StyleConstants attribute, the request will be converted to a CSS attribute prior to forwarding to the superclass behavior.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../javax/swing/text/StyleContext.html#removeAttributes(javax.swing.text.AttributeSet, java.util.Enumeration)">removeAttributes</A></CODE> in class <CODE><A HREF="../../../../javax/swing/text/StyleContext.html">StyleContext</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>old</CODE> - the old attribute set<DD><CODE>names</CODE> - the attribute names<DT><B>Returns:</B><DD>the updated attribute set<DT><B>See Also: </B><DD><A HREF="../../../../javax/swing/text/MutableAttributeSet.html#removeAttributes(java.util.Enumeration)"><CODE>MutableAttributeSet.removeAttributes(java.util.Enumeration)</CODE></A></DL></DD></DL><HR><A NAME="removeAttributes(javax.swing.text.AttributeSet, javax.swing.text.AttributeSet)"><!-- --></A><H3>removeAttributes</H3><PRE>public <A HREF="../../../../javax/swing/text/AttributeSet.html">AttributeSet</A> <B>removeAttributes</B>(<A HREF="../../../../javax/swing/text/AttributeSet.html">AttributeSet</A> old, <A HREF="../../../../javax/swing/text/AttributeSet.html">AttributeSet</A> attrs)</PRE><DL><DD>Removes a set of attributes. If any of the attributes is a StyleConstants attribute, the request will be converted to a CSS attribute prior to forwarding to the superclass behavior.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../javax/swing/text/StyleContext.html#removeAttributes(javax.swing.text.AttributeSet, javax.swing.text.AttributeSet)">removeAttributes</A></CODE> in class <CODE><A HREF="../../../../javax/swing/text/StyleContext.html">StyleContext</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>old</CODE> - the old attribute set<DD><CODE>attrs</CODE> - the attributes<DT><B>Returns:</B><DD>the updated attribute set<DT><B>See Also: </B><DD><A HREF="../../../../javax/swing/text/MutableAttributeSet.html#removeAttributes(java.util.Enumeration)"><CODE>MutableAttributeSet.removeAttributes(java.util.Enumeration)</CODE></A></DL></DD></DL><HR><A NAME="createSmallAttributeSet(javax.swing.text.AttributeSet)"><!-- --></A><H3>createSmallAttributeSet</H3><PRE>protected <A HREF="../../../../javax/swing/text/StyleContext.SmallAttributeSet.html">StyleContext.SmallAttributeSet</A> <B>createSmallAttributeSet</B>(<A HREF="../../../../javax/swing/text/AttributeSet.html">AttributeSet</A> a)</PRE><DL><DD>Creates a compact set of attributes that might be shared. This is a hook for subclasses that want to alter the behavior of SmallAttributeSet. This can be reimplemented to return an AttributeSet that provides some sort of attribute conversion.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../javax/swing/text/StyleContext.html#createSmallAttributeSet(javax.swing.text.AttributeSet)">createSmallAttributeSet</A></CODE> in class <CODE><A HREF="../../../../javax/swing/text/StyleContext.html">StyleContext</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>a</CODE> - The set of attributes to be represented in the the compact form.</DL></DD></DL><HR><A NAME="createLargeAttributeSet(javax.swing.text.AttributeSet)"><!-- --></A><H3>createLargeAttributeSet</H3><PRE>protected <A HREF="../../../../javax/swing/text/MutableAttributeSet.html">MutableAttributeSet</A> <B>createLargeAttributeSet</B>(<A HREF="../../../../javax/swing/text/AttributeSet.html">AttributeSet</A> a)</PRE><DL><DD>Creates a large set of attributes that should trade off space for time. This set will not be shared. This is a hook for subclasses that want to alter the behavior of the larger attribute storage format (which is SimpleAttributeSet by default). This can be reimplemented to return a MutableAttributeSet that provides some sort of attribute conversion.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../javax/swing/text/StyleContext.html#createLargeAttributeSet(javax.swing.text.AttributeSet)">createLargeAttributeSet</A></CODE> in class <CODE><A HREF="../../../../javax/swing/text/StyleContext.html">StyleContext</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>a</CODE> - The set of attributes to be represented in the the larger form.</DL></DD></DL><HR><A NAME="getFont(javax.swing.text.AttributeSet)"><!-- --></A><H3>getFont</H3><PRE>public <A HREF="../../../../java/awt/Font.html">Font</A> <B>getFont</B>(<A HREF="../../../../javax/swing/text/AttributeSet.html">AttributeSet</A> a)</PRE><DL><DD>Fetches the font to use for the given set of attributes.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../javax/swing/text/StyleContext.html#getFont(javax.swing.text.AttributeSet)">getFont</A></CODE> in class <CODE><A HREF="../../../../javax/swing/text/StyleContext.html">StyleContext</A></CODE></DL></DD><DD>Following copied from class: <CODE>javax.swing.text.StyleContext</CODE></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>attr</CODE> - the attribute set<DT><B>Returns:</B><DD>the font</DL></DD></DL><HR><A NAME="getForeground(javax.swing.text.AttributeSet)"><!-- --></A><H3>getForeground</H3><PRE>public <A HREF="../../../../java/awt/Color.html">Color</A> <B>getForeground</B>(<A HREF="../../../../javax/swing/text/AttributeSet.html">AttributeSet</A> a)</PRE><DL><DD>Takes a set of attributes and turn it into a foreground color specification. This might be used to specify things like brighter, more hue, etc.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../javax/swing/text/StyleContext.html#getForeground(javax.swing.text.AttributeSet)">getForeground</A></CODE> in class <CODE><A HREF="../../../../javax/swing/text/StyleContext.html">StyleContext</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>a</CODE> - the set of attributes<DT><B>Returns:</B><DD>the color</DL></DD></DL><HR><A NAME="getBackground(javax.swing.text.AttributeSet)"><!-- --></A><H3>getBackground</H3><PRE>public <A HREF="../../../../java/awt/Color.html">Color</A> <B>getBackground</B>(<A HREF="../../../../javax/swing/text/AttributeSet.html">AttributeSet</A> a)</PRE><DL><DD>Takes a set of attributes and turn it into a background color specification. This might be used to specify things like brighter, more hue, etc.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../javax/swing/text/StyleContext.html#getBackground(javax.swing.text.AttributeSet)">getBackground</A></CODE> in class <CODE><A HREF="../../../../javax/swing/text/StyleContext.html">StyleContext</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>attr</CODE> - the set of attributes<DT><B>Returns:</B><DD>the color</DL></DD></DL><HR><A NAME="getBoxPainter(javax.swing.text.AttributeSet)"><!-- --></A><H3>getBoxPainter</H3><PRE>public <A HREF="../../../../javax/swing/text/html/StyleSheet.BoxPainter.html">StyleSheet.BoxPainter</A> <B>getBoxPainter</B>(<A HREF="../../../../javax/swing/text/AttributeSet.html">AttributeSet</A> a)</PRE><DL><DD>Fetches the box formatter to use for the given set of CSS attributes.</DL><HR><A NAME="getListPainter(javax.swing.text.AttributeSet)"><!-- --></A><H3>getListPainter</H3><PRE>public <A HREF="../../../../javax/swing/text/html/StyleSheet.ListPainter.html">StyleSheet.ListPainter</A> <B>getListPainter</B>(<A HREF="../../../../javax/swing/text/AttributeSet.html">AttributeSet</A> a)</PRE><DL><DD>Fetches the list formatter to use for the given set of CSS attributes.</DL><HR><A NAME="setBaseFontSize(int)"><!-- --></A><H3>setBaseFontSize</H3><PRE>public void <B>setBaseFontSize</B>(int sz)</PRE><DL></DL><HR><A NAME="setBaseFontSize(java.lang.String)"><!-- --></A><H3>setBaseFontSize</H3><PRE>public void <B>setBaseFontSize</B>(<A HREF="../../../../java/lang/String.html">String</A> size)</PRE><DL></DL><HR><A NAME="getIndexOfSize(float)"><!-- --></A><H3>getIndexOfSize</H3><PRE>public static int <B>getIndexOfSize</B>(float pt)</PRE><DL></DL><HR><A NAME="getPointSize(int)"><!-- --></A><H3>getPointSize</H3><PRE>public float <B>getPointSize</B>(int index)</PRE><DL><DD>Returns the point size, given a size index.</DL><HR><A NAME="getPointSize(java.lang.String)"><!-- --></A><H3>getPointSize</H3><PRE>public float <B>getPointSize</B>(<A HREF="../../../../java/lang/String.html">String</A> size)</PRE><DL><DD>Given a string such as "+2", "-2", or "2", returns a point size value.</DL><HR><A NAME="stringToColor(java.lang.String)"><!-- --></A><H3>stringToColor</H3><PRE>public <A HREF="../../../../java/awt/Color.html">Color</A> <B>stringToColor</B>(<A HREF="../../../../java/lang/String.html">String</A> string)</PRE><DL><DD>Converts a color string such as "RED" or "#NNNNNN" to a Color. Note: This will only convert the HTML3.2 color strings or a string of length 7; otherwise, it will return null.</DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_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> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/StyleSheet.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup> 2 Platform<br>Std. Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../javax/swing/text/html/ParagraphView.html"><B>PREV CLASS</B></A> <A HREF="../../../../javax/swing/text/html/StyleSheet.BoxPainter.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> <A HREF="StyleSheet.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: <A HREF="#inner_class_summary">INNER</A> | <A HREF="#fields_inherited_from_class_javax.swing.text.StyleContext">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><font size="-1"><a href="http://java.sun.com/cgi-bin/bugreport.cgi">Submit a bug or feature</a><br>For further API reference and developer documentation, see <a href="http://java.sun.com/products/jdk/1.3/devdocs-vs-specs.html">Java 2 SDK SE Developer Documentation</a>. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. <p>Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.<br>Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road<br>Palo Alto, California, 94303, U.S.A. All Rights Reserved.</font></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -