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

📄 defaultstyleddocument.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 4 页
字号:
</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 attributes for a paragraph. <p> This method is thread safe, although most Swing methods are not. Please see  <A HREF="http://java.sun.com/products/jfc/swingdoc-archive/threads.html">Threads and Swing</A> for more information.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/swing/text/StyledDocument.html#setParagraphAttributes(int, int, javax.swing.text.AttributeSet, boolean)">setParagraphAttributes</A></CODE> in interface <CODE><A HREF="../../../javax/swing/text/StyledDocument.html">StyledDocument</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>offset</CODE> - the offset into the paragraph >= 0<DD><CODE>length</CODE> - the number of characters affected >= 0<DD><CODE>s</CODE> - the attributes<DD><CODE>replace</CODE> - whether to replace existing attributes, or merge them</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 paragraph element at the offset <code>pos</code>. A paragraph consists of at least one child Element, which is usually a leaf.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/swing/text/StyledDocument.html#getParagraphElement(int)">getParagraphElement</A></CODE> in interface <CODE><A HREF="../../../javax/swing/text/StyledDocument.html">StyledDocument</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/swing/text/AbstractDocument.html#getParagraphElement(int)">getParagraphElement</A></CODE> in class <CODE><A HREF="../../../javax/swing/text/AbstractDocument.html">AbstractDocument</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>pos</CODE> - the starting 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 a character element based on a position.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/swing/text/StyledDocument.html#getCharacterElement(int)">getCharacterElement</A></CODE> in interface <CODE><A HREF="../../../javax/swing/text/StyledDocument.html">StyledDocument</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>pos</CODE> - the position in the document >= 0<DT><B>Returns:</B><DD>the element</DL></DD></DL><HR><A NAME="insertUpdate(javax.swing.text.AbstractDocument.DefaultDocumentEvent, javax.swing.text.AttributeSet)"><!-- --></A><H3>insertUpdate</H3><PRE>protected void <B>insertUpdate</B>(<A HREF="../../../javax/swing/text/AbstractDocument.DefaultDocumentEvent.html">AbstractDocument.DefaultDocumentEvent</A>&nbsp;chng,                            <A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A>&nbsp;attr)</PRE><DL><DD>Updates document structure as a result of text insertion.  This will happen within a write lock.  This implementation simply parses the inserted content for line breaks and builds up a set of instructions for the element buffer.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/swing/text/AbstractDocument.html#insertUpdate(javax.swing.text.AbstractDocument.DefaultDocumentEvent, javax.swing.text.AttributeSet)">insertUpdate</A></CODE> in class <CODE><A HREF="../../../javax/swing/text/AbstractDocument.html">AbstractDocument</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>chng</CODE> - a description of the document change<DD><CODE>attr</CODE> - the attributes</DL></DD></DL><HR><A NAME="removeUpdate(javax.swing.text.AbstractDocument.DefaultDocumentEvent)"><!-- --></A><H3>removeUpdate</H3><PRE>protected void <B>removeUpdate</B>(<A HREF="../../../javax/swing/text/AbstractDocument.DefaultDocumentEvent.html">AbstractDocument.DefaultDocumentEvent</A>&nbsp;chng)</PRE><DL><DD>Updates document structure as a result of text removal.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/swing/text/AbstractDocument.html#removeUpdate(javax.swing.text.AbstractDocument.DefaultDocumentEvent)">removeUpdate</A></CODE> in class <CODE><A HREF="../../../javax/swing/text/AbstractDocument.html">AbstractDocument</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>chng</CODE> - a description of the document change</DL></DD></DL><HR><A NAME="createDefaultRoot()"><!-- --></A><H3>createDefaultRoot</H3><PRE>protected <A HREF="../../../javax/swing/text/AbstractDocument.AbstractElement.html">AbstractDocument.AbstractElement</A> <B>createDefaultRoot</B>()</PRE><DL><DD>Creates the root element to be used to represent the default document structure.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the element base</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>Gets the foreground color from an attribute set.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/swing/text/StyledDocument.html#getForeground(javax.swing.text.AttributeSet)">getForeground</A></CODE> in interface <CODE><A HREF="../../../javax/swing/text/StyledDocument.html">StyledDocument</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>attr</CODE> - the attribute set<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>Gets the background color from an attribute set.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/swing/text/StyledDocument.html#getBackground(javax.swing.text.AttributeSet)">getBackground</A></CODE> in interface <CODE><A HREF="../../../javax/swing/text/StyledDocument.html">StyledDocument</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>attr</CODE> - the attribute set<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>Gets the font from an attribute set.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/swing/text/StyledDocument.html#getFont(javax.swing.text.AttributeSet)">getFont</A></CODE> in interface <CODE><A HREF="../../../javax/swing/text/StyledDocument.html">StyledDocument</A></CODE></DL></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="styleChanged(javax.swing.text.Style)"><!-- --></A><H3>styleChanged</H3><PRE>protected void <B>styleChanged</B>(<A HREF="../../../javax/swing/text/Style.html">Style</A>&nbsp;style)</PRE><DL><DD>Creates a change event for the whole document and propagates it to the listeners. Subclasses may wish to be inteligent about what gets damaged.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>style</CODE> - The Style that has changed.</DL></DD></DL><HR><A NAME="addDocumentListener(javax.swing.event.DocumentListener)"><!-- --></A><H3>addDocumentListener</H3><PRE>public void <B>addDocumentListener</B>(<A HREF="../../../javax/swing/event/DocumentListener.html">DocumentListener</A>&nbsp;listener)</PRE><DL><DD>Adds a document listener for notification of any changes.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/swing/text/Document.html#addDocumentListener(javax.swing.event.DocumentListener)">addDocumentListener</A></CODE> in interface <CODE><A HREF="../../../javax/swing/text/Document.html">Document</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/swing/text/AbstractDocument.html#addDocumentListener(javax.swing.event.DocumentListener)">addDocumentListener</A></CODE> in class <CODE><A HREF="../../../javax/swing/text/AbstractDocument.html">AbstractDocument</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>listener</CODE> - the listener<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/text/Document.html#addDocumentListener(javax.swing.event.DocumentListener)"><CODE>Document.addDocumentListener(javax.swing.event.DocumentListener)</CODE></A></DL></DD></DL><HR><A NAME="removeDocumentListener(javax.swing.event.DocumentListener)"><!-- --></A><H3>removeDocumentListener</H3><PRE>public void <B>removeDocumentListener</B>(<A HREF="../../../javax/swing/event/DocumentListener.html">DocumentListener</A>&nbsp;listener)</PRE><DL><DD>Removes a document listener.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/swing/text/Document.html#removeDocumentListener(javax.swing.event.DocumentListener)">removeDocumentListener</A></CODE> in interface <CODE><A HREF="../../../javax/swing/text/Document.html">Document</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/swing/text/AbstractDocument.html#removeDocumentListener(javax.swing.event.DocumentListener)">removeDocumentListener</A></CODE> in class <CODE><A HREF="../../../javax/swing/text/AbstractDocument.html">AbstractDocument</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>listener</CODE> - the listener<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/text/Document.html#removeDocumentListener(javax.swing.event.DocumentListener)"><CODE>Document.removeDocumentListener(javax.swing.event.DocumentListener)</CODE></A></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/DefaultStyledDocument.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/DefaultHighlighter.DefaultHighlightPainter.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../javax/swing/text/DefaultStyledDocument.AttributeUndoableEdit.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="DefaultStyledDocument.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY: &nbsp;<A HREF="#inner_class_summary">INNER</A>&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><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 + -