📄 plaindocument.html
字号:
<BR> Updates document structure as a result of text insertion.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/PlainDocument.html#removeUpdate(javax.swing.text.AbstractDocument.DefaultDocumentEvent)">removeUpdate</A></B>(<A HREF="../../../javax/swing/text/AbstractDocument.DefaultDocumentEvent.html">AbstractDocument.DefaultDocumentEvent</A> chng)</CODE><BR> Updates any document structure as a result of text removal.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_javax.swing.text.AbstractDocument"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class javax.swing.text.<A HREF="../../../javax/swing/text/AbstractDocument.html">AbstractDocument</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../javax/swing/text/AbstractDocument.html#addDocumentListener(javax.swing.event.DocumentListener)">addDocumentListener</A>, <A HREF="../../../javax/swing/text/AbstractDocument.html#addUndoableEditListener(javax.swing.event.UndoableEditListener)">addUndoableEditListener</A>, <A HREF="../../../javax/swing/text/AbstractDocument.html#createBranchElement(javax.swing.text.Element, javax.swing.text.AttributeSet)">createBranchElement</A>, <A HREF="../../../javax/swing/text/AbstractDocument.html#createLeafElement(javax.swing.text.Element, javax.swing.text.AttributeSet, int, int)">createLeafElement</A>, <A HREF="../../../javax/swing/text/AbstractDocument.html#createPosition(int)">createPosition</A>, <A HREF="../../../javax/swing/text/AbstractDocument.html#dump(java.io.PrintStream)">dump</A>, <A HREF="../../../javax/swing/text/AbstractDocument.html#fireChangedUpdate(javax.swing.event.DocumentEvent)">fireChangedUpdate</A>, <A HREF="../../../javax/swing/text/AbstractDocument.html#fireInsertUpdate(javax.swing.event.DocumentEvent)">fireInsertUpdate</A>, <A HREF="../../../javax/swing/text/AbstractDocument.html#fireRemoveUpdate(javax.swing.event.DocumentEvent)">fireRemoveUpdate</A>, <A HREF="../../../javax/swing/text/AbstractDocument.html#fireUndoableEditUpdate(javax.swing.event.UndoableEditEvent)">fireUndoableEditUpdate</A>, <A HREF="../../../javax/swing/text/AbstractDocument.html#getAsynchronousLoadPriority()">getAsynchronousLoadPriority</A>, <A HREF="../../../javax/swing/text/AbstractDocument.html#getAttributeContext()">getAttributeContext</A>, <A HREF="../../../javax/swing/text/AbstractDocument.html#getBidiRootElement()">getBidiRootElement</A>, <A HREF="../../../javax/swing/text/AbstractDocument.html#getContent()">getContent</A>, <A HREF="../../../javax/swing/text/AbstractDocument.html#getCurrentWriter()">getCurrentWriter</A>, <A HREF="../../../javax/swing/text/AbstractDocument.html#getDocumentProperties()">getDocumentProperties</A>, <A HREF="../../../javax/swing/text/AbstractDocument.html#getEndPosition()">getEndPosition</A>, <A HREF="../../../javax/swing/text/AbstractDocument.html#getLength()">getLength</A>, <A HREF="../../../javax/swing/text/AbstractDocument.html#getListeners(java.lang.Class)">getListeners</A>, <A HREF="../../../javax/swing/text/AbstractDocument.html#getProperty(java.lang.Object)">getProperty</A>, <A HREF="../../../javax/swing/text/AbstractDocument.html#getRootElements()">getRootElements</A>, <A HREF="../../../javax/swing/text/AbstractDocument.html#getStartPosition()">getStartPosition</A>, <A HREF="../../../javax/swing/text/AbstractDocument.html#getText(int, int)">getText</A>, <A HREF="../../../javax/swing/text/AbstractDocument.html#getText(int, int, javax.swing.text.Segment)">getText</A>, <A HREF="../../../javax/swing/text/AbstractDocument.html#insertString(int, java.lang.String, javax.swing.text.AttributeSet)">insertString</A>, <A HREF="../../../javax/swing/text/AbstractDocument.html#postRemoveUpdate(javax.swing.text.AbstractDocument.DefaultDocumentEvent)">postRemoveUpdate</A>, <A HREF="../../../javax/swing/text/AbstractDocument.html#putProperty(java.lang.Object, java.lang.Object)">putProperty</A>, <A HREF="../../../javax/swing/text/AbstractDocument.html#readLock()">readLock</A>, <A HREF="../../../javax/swing/text/AbstractDocument.html#readUnlock()">readUnlock</A>, <A HREF="../../../javax/swing/text/AbstractDocument.html#remove(int, int)">remove</A>, <A HREF="../../../javax/swing/text/AbstractDocument.html#removeDocumentListener(javax.swing.event.DocumentListener)">removeDocumentListener</A>, <A HREF="../../../javax/swing/text/AbstractDocument.html#removeUndoableEditListener(javax.swing.event.UndoableEditListener)">removeUndoableEditListener</A>, <A HREF="../../../javax/swing/text/AbstractDocument.html#render(java.lang.Runnable)">render</A>, <A HREF="../../../javax/swing/text/AbstractDocument.html#setAsynchronousLoadPriority(int)">setAsynchronousLoadPriority</A>, <A HREF="../../../javax/swing/text/AbstractDocument.html#setDocumentProperties(java.util.Dictionary)">setDocumentProperties</A>, <A HREF="../../../javax/swing/text/AbstractDocument.html#writeLock()">writeLock</A>, <A HREF="../../../javax/swing/text/AbstractDocument.html#writeUnlock()">writeUnlock</A></CODE></TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.<A HREF="../../../java/lang/Object.html">Object</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../java/lang/Object.html#clone()">clone</A>, <A HREF="../../../java/lang/Object.html#equals(java.lang.Object)">equals</A>, <A HREF="../../../java/lang/Object.html#finalize()">finalize</A>, <A HREF="../../../java/lang/Object.html#getClass()">getClass</A>, <A HREF="../../../java/lang/Object.html#hashCode()">hashCode</A>, <A HREF="../../../java/lang/Object.html#notify()">notify</A>, <A HREF="../../../java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="../../../java/lang/Object.html#toString()">toString</A>, <A HREF="../../../java/lang/Object.html#wait()">wait</A>, <A HREF="../../../java/lang/Object.html#wait(long)">wait</A>, <A HREF="../../../java/lang/Object.html#wait(long, int)">wait</A></CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD></TR></TABLE><A NAME="tabSizeAttribute"><!-- --></A><H3>tabSizeAttribute</H3><PRE>public static final <A HREF="../../../java/lang/String.html">String</A> <B>tabSizeAttribute</B></PRE><DL><DD>Name of the attribute that specifies the tab size for tabs contained in the content. The type for the value is Integer.</DL><HR><A NAME="lineLimitAttribute"><!-- --></A><H3>lineLimitAttribute</H3><PRE>public static final <A HREF="../../../java/lang/String.html">String</A> <B>lineLimitAttribute</B></PRE><DL><DD>Name of the attribute that specifies the maximum length of a line, if there is a maximum length. The type for the value is Integer.</DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="PlainDocument()"><!-- --></A><H3>PlainDocument</H3><PRE>public <B>PlainDocument</B>()</PRE><DL><DD>Constructs a plain text document. A default model using StringContent is constructed and set.</DL><HR><A NAME="PlainDocument(javax.swing.text.AbstractDocument.Content)"><!-- --></A><H3>PlainDocument</H3><PRE>protected <B>PlainDocument</B>(<A HREF="../../../javax/swing/text/AbstractDocument.Content.html">AbstractDocument.Content</A> c)</PRE><DL><DD>Constructs a plain text document. A default root element is created, and the tab size set to 8.<DD><DL><DT><B>Parameters:</B><DD><CODE>c</CODE> - the container for the content</DL></DD></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="getDefaultRootElement()"><!-- --></A><H3>getDefaultRootElement</H3><PRE>public <A HREF="../../../javax/swing/text/Element.html">Element</A> <B>getDefaultRootElement</B>()</PRE><DL><DD>Gets the default root element for the document model.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/swing/text/AbstractDocument.html#getDefaultRootElement()">getDefaultRootElement</A></CODE> in class <CODE><A HREF="../../../javax/swing/text/AbstractDocument.html">AbstractDocument</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the root<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/text/Document.html#getDefaultRootElement()"><CODE>Document.getDefaultRootElement()</CODE></A></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><DT><B>Returns:</B><DD>the element base</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 pos)</PRE><DL><DD>Get the paragraph element containing the given position. Since this document only models lines, it returns the line instead.<DD><DL><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>Following copied from class: <CODE>javax.swing.text.AbstractDocument</CODE></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="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> chng, <A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A> attr)</PRE><DL><DD>Updates document structure as a result of text insertion. This will happen within a write lock. Since this document simply maps out lines, we refresh the line map.<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> - the change event describing the dit<DD><CODE>attr</CODE> - the set of attributes for the inserted text</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> chng)</PRE><DL><DD>Updates any document structure as a result of text removal. This will happen within a write lock. Since the structure represents a line map, this just checks to see if the removal spans lines. If it does, the two lines outside of the removal area are joined together.<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> - the change event describing the edit</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> </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/PlainDocument.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/PasswordView.html"><B>PREV CLASS</B></A> <A HREF="../../../javax/swing/text/PlainView.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="PlainDocument.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: <A HREF="#inner_classes_inherited_from_class_javax.swing.text.AbstractDocument">INNER</A> | <A HREF="#field_summary">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: <A HREF="#field_detail">FIELD</A> | <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 + -