⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 styleddocument.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 2 页
字号:
</DD><DD><DL><DT><B>Parameters:</B><DD><CODE>nm</CODE> - the name of the style (must be unique within the   collection of named styles).  The name may be null if the style   is unnamed, but the caller is responsible   for managing the reference returned as an unnamed style can't   be fetched by name.  An unnamed style may be useful for things   like character attribute overrides such as found in a style   run.<DD><CODE>parent</CODE> - the parent style.  This may be null if unspecified   attributes need not be resolved in some other style.<DT><B>Returns:</B><DD>the style</DL></DD></DL><HR><A NAME="removeStyle(java.lang.String)"><!-- --></A><H3>removeStyle</H3><PRE>public void <B>removeStyle</B>(<A HREF="../../../java/lang/String.html">String</A>&nbsp;nm)</PRE><DL><DD>Removes a named style previously added to the document.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>nm</CODE> - the name of the style to remove</DL></DD></DL><HR><A NAME="getStyle(java.lang.String)"><!-- --></A><H3>getStyle</H3><PRE>public <A HREF="../../../javax/swing/text/Style.html">Style</A> <B>getStyle</B>(<A HREF="../../../java/lang/String.html">String</A>&nbsp;nm)</PRE><DL><DD>Fetches a named style previously added.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>nm</CODE> - the name of the style<DT><B>Returns:</B><DD>the style</DL></DD></DL><HR><A NAME="setCharacterAttributes(int, int, javax.swing.text.AttributeSet, boolean)"><!-- --></A><H3>setCharacterAttributes</H3><PRE>public void <B>setCharacterAttributes</B>(int&nbsp;offset,                                   int&nbsp;length,                                   <A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A>&nbsp;s,                                   boolean&nbsp;replace)</PRE><DL><DD>Changes the content element attributes used for the given range of existing content in the document.  All of the attributes defined in the given Attributes argument are applied to the given range.  This method can be used to completely remove all content level attributes for the given range by giving an Attributes argument that has no attributes defined and setting replace to true.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>offset</CODE> - the start of the change >= 0<DD><CODE>length</CODE> - the length of the change >= 0<DD><CODE>s</CODE> - the non-null attributes to change to.  Any attributes  defined will be applied to the text for the given range.<DD><CODE>replace</CODE> - indicates whether or not the previous  attributes should be cleared before the new attributes  as set.  If true, the operation will replace the  previous attributes entirely.  If false, the new  attributes will be merged with the previous attributes.</DL></DD></DL><HR><A NAME="setParagraphAttributes(int, int, javax.swing.text.AttributeSet, boolean)"><!-- --></A><H3>setParagraphAttributes</H3><PRE>public void <B>setParagraphAttributes</B>(int&nbsp;offset,                                   int&nbsp;length,                                   <A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A>&nbsp;s,                                   boolean&nbsp;replace)</PRE><DL><DD>Sets paragraph attributes.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>offset</CODE> - the start of the change >= 0<DD><CODE>length</CODE> - the length of the change >= 0<DD><CODE>s</CODE> - the non-null attributes to change to.  Any attributes  defined will be applied to the text for the given range.<DD><CODE>replace</CODE> - indicates whether or not the previous  attributes should be cleared before the new attributes  are set.  If true, the operation will replace the  previous attributes entirely.  If false, the new  attributes will be merged with the previous attributes.</DL></DD></DL><HR><A NAME="setLogicalStyle(int, javax.swing.text.Style)"><!-- --></A><H3>setLogicalStyle</H3><PRE>public void <B>setLogicalStyle</B>(int&nbsp;pos,                            <A HREF="../../../javax/swing/text/Style.html">Style</A>&nbsp;s)</PRE><DL><DD>Sets the logical style to use for the paragraph at the given position.  If attributes aren't explicitly set for character and paragraph attributes they will resolve through the logical style assigned to the paragraph, which in turn may resolve through some hierarchy completely independent of the element hierarchy in the document.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>pos</CODE> - the starting position >= 0<DD><CODE>s</CODE> - the style to set</DL></DD></DL><HR><A NAME="getLogicalStyle(int)"><!-- --></A><H3>getLogicalStyle</H3><PRE>public <A HREF="../../../javax/swing/text/Style.html">Style</A> <B>getLogicalStyle</B>(int&nbsp;p)</PRE><DL><DD>Gets a logical style for a given position in a paragraph.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>p</CODE> - the position >= 0<DT><B>Returns:</B><DD>the style</DL></DD></DL><HR><A NAME="getParagraphElement(int)"><!-- --></A><H3>getParagraphElement</H3><PRE>public <A HREF="../../../javax/swing/text/Element.html">Element</A> <B>getParagraphElement</B>(int&nbsp;pos)</PRE><DL><DD>Gets the element that represents the paragraph that encloses the given offset within the document.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>pos</CODE> - the offset >= 0<DT><B>Returns:</B><DD>the element</DL></DD></DL><HR><A NAME="getCharacterElement(int)"><!-- --></A><H3>getCharacterElement</H3><PRE>public <A HREF="../../../javax/swing/text/Element.html">Element</A> <B>getCharacterElement</B>(int&nbsp;pos)</PRE><DL><DD>Gets the element that represents the character that is at the given offset within the document.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>pos</CODE> - the offset >= 0<DT><B>Returns:</B><DD>the element</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>&nbsp;attr)</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></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="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>&nbsp;attr)</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></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="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>&nbsp;attr)</PRE><DL><DD>Takes a set of attributes and turn it into a font specification.  This can be used to turn things like family, style, size, etc into a font that is available on the system the document is currently being used on.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>attr</CODE> - the set of attributes<DT><B>Returns:</B><DD>the font</DL></DD></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>&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/StyledDocument.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="../../../javax/swing/text/Style.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../javax/swing/text/TabableView.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="StyledDocument.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;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: &nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<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 + -