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

📄 styleddocument.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Thu Apr 27 23:41:55 PDT 2000 --><TITLE>Java 2 Platform SE v1.3: Interface  StyledDocument</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"></HEAD><BODY BGCOLOR="white"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_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><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">javax.swing.text</FONT><BR>Interface  StyledDocument</H2><DL><DT><B>All Superinterfaces:</B> <DD><A HREF="../../../javax/swing/text/Document.html">Document</A></DD></DL><DL><DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../javax/swing/text/DefaultStyledDocument.html">DefaultStyledDocument</A></DD></DL><HR><DL><DT>public interface <B>StyledDocument</B><DT>extends <A HREF="../../../javax/swing/text/Document.html">Document</A></DL><P>Interface for a generic styled document.<P><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="fields_inherited_from_class_javax.swing.text.Document"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields inherited from interface javax.swing.text.<A HREF="../../../javax/swing/text/Document.html">Document</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../javax/swing/text/Document.html#StreamDescriptionProperty">StreamDescriptionProperty</A>, <A HREF="../../../javax/swing/text/Document.html#TitleProperty">TitleProperty</A></CODE></TD></TR></TABLE>&nbsp;<!-- ======== CONSTRUCTOR SUMMARY ======== --><!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../javax/swing/text/Style.html">Style</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/StyledDocument.html#addStyle(java.lang.String, javax.swing.text.Style)">addStyle</A></B>(<A HREF="../../../java/lang/String.html">String</A>&nbsp;nm,         <A HREF="../../../javax/swing/text/Style.html">Style</A>&nbsp;parent)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a new style into the logical style hierarchy.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../java/awt/Color.html">Color</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/StyledDocument.html#getBackground(javax.swing.text.AttributeSet)">getBackground</A></B>(<A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A>&nbsp;attr)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Takes a set of attributes and turn it into a background color specification.</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/StyledDocument.html#getCharacterElement(int)">getCharacterElement</A></B>(int&nbsp;pos)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the element that represents the character that is at the given offset within the document.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../java/awt/Font.html">Font</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/StyledDocument.html#getFont(javax.swing.text.AttributeSet)">getFont</A></B>(<A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A>&nbsp;attr)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Takes a set of attributes and turn it into a font specification.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../java/awt/Color.html">Color</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/StyledDocument.html#getForeground(javax.swing.text.AttributeSet)">getForeground</A></B>(<A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A>&nbsp;attr)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Takes a set of attributes and turn it into a foreground color specification.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../javax/swing/text/Style.html">Style</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/StyledDocument.html#getLogicalStyle(int)">getLogicalStyle</A></B>(int&nbsp;p)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets a logical style for a given position in a paragraph.</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/StyledDocument.html#getParagraphElement(int)">getParagraphElement</A></B>(int&nbsp;pos)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the element that represents the paragraph that encloses the given offset within 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/Style.html">Style</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/StyledDocument.html#getStyle(java.lang.String)">getStyle</A></B>(<A HREF="../../../java/lang/String.html">String</A>&nbsp;nm)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Fetches a named style previously added.</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/StyledDocument.html#removeStyle(java.lang.String)">removeStyle</A></B>(<A HREF="../../../java/lang/String.html">String</A>&nbsp;nm)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes a named style previously added to 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/StyledDocument.html#setCharacterAttributes(int, int, javax.swing.text.AttributeSet, boolean)">setCharacterAttributes</A></B>(int&nbsp;offset,                       int&nbsp;length,                       <A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A>&nbsp;s,                       boolean&nbsp;replace)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Changes the content element attributes used for the given range of existing content in 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/StyledDocument.html#setLogicalStyle(int, javax.swing.text.Style)">setLogicalStyle</A></B>(int&nbsp;pos,                <A HREF="../../../javax/swing/text/Style.html">Style</A>&nbsp;s)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the logical style to use for the paragraph at the given position.</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/StyledDocument.html#setParagraphAttributes(int, int, javax.swing.text.AttributeSet, boolean)">setParagraphAttributes</A></B>(int&nbsp;offset,                       int&nbsp;length,                       <A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A>&nbsp;s,                       boolean&nbsp;replace)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets paragraph attributes.</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_javax.swing.text.Document"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from interface javax.swing.text.<A HREF="../../../javax/swing/text/Document.html">Document</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../javax/swing/text/Document.html#addDocumentListener(javax.swing.event.DocumentListener)">addDocumentListener</A>, <A HREF="../../../javax/swing/text/Document.html#addUndoableEditListener(javax.swing.event.UndoableEditListener)">addUndoableEditListener</A>, <A HREF="../../../javax/swing/text/Document.html#createPosition(int)">createPosition</A>, <A HREF="../../../javax/swing/text/Document.html#getDefaultRootElement()">getDefaultRootElement</A>, <A HREF="../../../javax/swing/text/Document.html#getEndPosition()">getEndPosition</A>, <A HREF="../../../javax/swing/text/Document.html#getLength()">getLength</A>, <A HREF="../../../javax/swing/text/Document.html#getProperty(java.lang.Object)">getProperty</A>, <A HREF="../../../javax/swing/text/Document.html#getRootElements()">getRootElements</A>, <A HREF="../../../javax/swing/text/Document.html#getStartPosition()">getStartPosition</A>, <A HREF="../../../javax/swing/text/Document.html#getText(int, int)">getText</A>, <A HREF="../../../javax/swing/text/Document.html#getText(int, int, javax.swing.text.Segment)">getText</A>, <A HREF="../../../javax/swing/text/Document.html#insertString(int, java.lang.String, javax.swing.text.AttributeSet)">insertString</A>, <A HREF="../../../javax/swing/text/Document.html#putProperty(java.lang.Object, java.lang.Object)">putProperty</A>, <A HREF="../../../javax/swing/text/Document.html#remove(int, int)">remove</A>, <A HREF="../../../javax/swing/text/Document.html#removeDocumentListener(javax.swing.event.DocumentListener)">removeDocumentListener</A>, <A HREF="../../../javax/swing/text/Document.html#removeUndoableEditListener(javax.swing.event.UndoableEditListener)">removeUndoableEditListener</A>, <A HREF="../../../javax/swing/text/Document.html#render(java.lang.Runnable)">render</A></CODE></TD></TR></TABLE>&nbsp;<P><!-- ============ FIELD DETAIL =========== --><!-- ========= 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="addStyle(java.lang.String, javax.swing.text.Style)"><!-- --></A><H3>addStyle</H3><PRE>public <A HREF="../../../javax/swing/text/Style.html">Style</A> <B>addStyle</B>(<A HREF="../../../java/lang/String.html">String</A>&nbsp;nm,                      <A HREF="../../../javax/swing/text/Style.html">Style</A>&nbsp;parent)</PRE><DL><DD>Adds a new style into the logical style hierarchy.  Style attributes resolve from bottom up so an attribute specified in a child will override an attribute specified in the parent.<DD><DL></DL>

⌨️ 快捷键说明

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