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

📄 document.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/Document.html#addUndoableEditListener(javax.swing.event.UndoableEditListener)">addUndoableEditListener</A></B>(<A HREF="../../../javax/swing/event/UndoableEditListener.html">UndoableEditListener</A>&nbsp;listener)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Registers the given observer to begin receiving notifications when undoable edits are made to the document.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../javax/swing/text/Position.html">Position</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/Document.html#createPosition(int)">createPosition</A></B>(int&nbsp;offs)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This method allows an application to mark a place in a sequence of character content.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../javax/swing/text/Element.html">Element</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/Document.html#getDefaultRootElement()">getDefaultRootElement</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the root element that views should be based upon, unless some other mechanism for assigning views to element structures is provided.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../javax/swing/text/Position.html">Position</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/Document.html#getEndPosition()">getEndPosition</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a position that represents the end of the document.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/Document.html#getLength()">getLength</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns number of characters of content currently  in the document.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../java/lang/Object.html">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/Document.html#getProperty(java.lang.Object)">getProperty</A></B>(<A HREF="../../../java/lang/Object.html">Object</A>&nbsp;key)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets properties associated with the document.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../javax/swing/text/Element.html">Element</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/Document.html#getRootElements()">getRootElements</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns all of the root elements that are defined.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../javax/swing/text/Position.html">Position</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/Document.html#getStartPosition()">getStartPosition</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a position that represents the start of the document.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/Document.html#getText(int, int)">getText</A></B>(int&nbsp;offset,        int&nbsp;length)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Fetches the text contained within the given portion  of the document.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/Document.html#getText(int, int, javax.swing.text.Segment)">getText</A></B>(int&nbsp;offset,        int&nbsp;length,        <A HREF="../../../javax/swing/text/Segment.html">Segment</A>&nbsp;txt)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Fetches the text contained within the given portion  of the document.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/Document.html#insertString(int, java.lang.String, javax.swing.text.AttributeSet)">insertString</A></B>(int&nbsp;offset,             <A HREF="../../../java/lang/String.html">String</A>&nbsp;str,             <A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A>&nbsp;a)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Inserts a string of content.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/Document.html#putProperty(java.lang.Object, java.lang.Object)">putProperty</A></B>(<A HREF="../../../java/lang/Object.html">Object</A>&nbsp;key,            <A HREF="../../../java/lang/Object.html">Object</A>&nbsp;value)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Puts a new property on the list.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/Document.html#remove(int, int)">remove</A></B>(int&nbsp;offs,       int&nbsp;len)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes a portion of the content of the document.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/Document.html#removeDocumentListener(javax.swing.event.DocumentListener)">removeDocumentListener</A></B>(<A HREF="../../../javax/swing/event/DocumentListener.html">DocumentListener</A>&nbsp;listener)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Unregisters the given observer from the notification list so it will no longer receive change updates.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/Document.html#removeUndoableEditListener(javax.swing.event.UndoableEditListener)">removeUndoableEditListener</A></B>(<A HREF="../../../javax/swing/event/UndoableEditListener.html">UndoableEditListener</A>&nbsp;listener)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Unregisters the given observer from the notification list so it will no longer receive updates.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/Document.html#render(java.lang.Runnable)">render</A></B>(<A HREF="../../../java/lang/Runnable.html">Runnable</A>&nbsp;r)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This allows the model to be safely rendered in the presence of currency, if the model supports being updated asynchronously.</TD></TR></TABLE>&nbsp;<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="StreamDescriptionProperty"><!-- --></A><H3>StreamDescriptionProperty</H3><PRE>public static final <A HREF="../../../java/lang/String.html">String</A> <B>StreamDescriptionProperty</B></PRE><DL><DD>The property name for the description of the stream used to initialize the document.  This should be used if the document was initialized from a stream and  anything is known about the stream.</DL><HR><A NAME="TitleProperty"><!-- --></A><H3>TitleProperty</H3><PRE>public static final <A HREF="../../../java/lang/String.html">String</A> <B>TitleProperty</B></PRE><DL><DD>The property name for the title of the document, if  there is one.</DL><!-- ========= CONSTRUCTOR DETAIL ======== --><!-- ============ 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="getLength()"><!-- --></A><H3>getLength</H3><PRE>public int <B>getLength</B>()</PRE><DL><DD>Returns number of characters of content currently  in the document.<DD><DL><DT><B>Returns:</B><DD>number of characters >= 0</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>Registers the given observer to begin receiving notifications when changes are made to the document.<DD><DL><DT><B>Parameters:</B><DD><CODE>listener</CODE> - the observer to register<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/text/Document.html#removeDocumentListener(javax.swing.event.DocumentListener)"><CODE>removeDocumentListener(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>Unregisters the given observer from the notification list so it will no longer receive change updates.<DD><DL><DT><B>Parameters:</B><DD><CODE>listener</CODE> - the observer to register<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/text/Document.html#addDocumentListener(javax.swing.event.DocumentListener)"><CODE>addDocumentListener(javax.swing.event.DocumentListener)</CODE></A></DL></DD></DL><HR><A NAME="addUndoableEditListener(javax.swing.event.UndoableEditListener)"><!-- --></A><H3>addUndoableEditListener</H3><PRE>public void <B>addUndoableEditListener</B>(<A HREF="../../../javax/swing/event/UndoableEditListener.html">UndoableEditListener</A>&nbsp;listener)</PRE><DL><DD>Registers the given observer to begin receiving notifications when undoable edits are made to the document.<DD><DL><DT><B>Parameters:</B><DD><CODE>listener</CODE> - the observer to register<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/event/UndoableEditEvent.html"><CODE>UndoableEditEvent</CODE></A></DL></DD></DL><HR><A NAME="removeUndoableEditListener(javax.swing.event.UndoableEditListener)"><!-- --></A><H3>removeUndoableEditListener</H3><PRE>public void <B>removeUndoableEditListener</B>(<A HREF="../../../javax/swing/event/UndoableEditListener.html">UndoableEditListener</A>&nbsp;listener)</PRE><DL><DD>Unregisters the given observer from the notification list so it will no longer receive updates.<DD><DL><DT><B>Parameters:</B><DD><CODE>listener</CODE> - the observer to register<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/event/UndoableEditEvent.html"><CODE>UndoableEditEvent</CODE></A></DL></DD></DL><HR><A NAME="getProperty(java.lang.Object)"><!-- --></A><H3>getProperty</H3><PRE>public <A HREF="../../../java/lang/Object.html">Object</A> <B>getProperty</B>(<A HREF="../../../java/lang/Object.html">Object</A>&nbsp;key)</PRE><DL><DD>Gets properties associated with the document.  Allows one to store things like the document title, author, etc.<DD><DL><DT><B>Parameters:</B><DD><CODE>key</CODE> - a non-null property<DT><B>Returns:</B><DD>the properties</DL></DD></DL><HR><A NAME="putProperty(java.lang.Object, java.lang.Object)"><!-- --></A><H3>putProperty</H3><PRE>public void <B>putProperty</B>(<A HREF="../../../java/lang/Object.html">Object</A>&nbsp;key,                        <A HREF="../../../java/lang/Object.html">Object</A>&nbsp;value)</PRE><DL><DD>Puts a new property on the list.<DD><DL><DT><B>Parameters:</B><DD><CODE>key</CODE> - the non-null property key<DD><CODE>value</CODE> - the property value</DL>

⌨️ 快捷键说明

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