📄 abstractwriter.html
字号:
<!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:59 PDT 2000 --><TITLE>Java 2 Platform SE v1.3: Class AbstractWriter</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> </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/AbstractWriter.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/AbstractDocument.LeafElement.html"><B>PREV CLASS</B></A> <A HREF="../../../javax/swing/text/AsyncBoxView.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="AbstractWriter.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <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><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">javax.swing.text</FONT><BR>Class AbstractWriter</H2><PRE><A HREF="../../../java/lang/Object.html">java.lang.Object</A> | +--<B>javax.swing.text.AbstractWriter</B></PRE><DL><DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../javax/swing/text/html/HTMLWriter.html">HTMLWriter</A>, <A HREF="../../../javax/swing/text/html/MinimalHTMLWriter.html">MinimalHTMLWriter</A></DD></DL><HR><DL><DT>public abstract class <B>AbstractWriter</B><DT>extends <A HREF="../../../java/lang/Object.html">Object</A></DL><P>AbstractWriter is an abstract class that actually does the work of writing out the element tree including the attributes. In terms of how much is written out per line, the writer defaults to 100. But this value can be set by subclasses.<P><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Field Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected static char</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/AbstractWriter.html#NEWLINE">NEWLINE</A></B></CODE><BR> How the text packages models newlines.</TD></TR></TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected </CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/AbstractWriter.html#AbstractWriter(java.io.Writer, javax.swing.text.Document)">AbstractWriter</A></B>(<A HREF="../../../java/io/Writer.html">Writer</A> w, <A HREF="../../../javax/swing/text/Document.html">Document</A> doc)</CODE><BR> Creates a new AbstractWriter.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected </CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/AbstractWriter.html#AbstractWriter(java.io.Writer, javax.swing.text.Document, int, int)">AbstractWriter</A></B>(<A HREF="../../../java/io/Writer.html">Writer</A> w, <A HREF="../../../javax/swing/text/Document.html">Document</A> doc, int pos, int len)</CODE><BR> Creates a new AbstractWriter.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected </CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/AbstractWriter.html#AbstractWriter(java.io.Writer, javax.swing.text.Element)">AbstractWriter</A></B>(<A HREF="../../../java/io/Writer.html">Writer</A> w, <A HREF="../../../javax/swing/text/Element.html">Element</A> root)</CODE><BR> Creates a new AbstractWriter.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected </CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/AbstractWriter.html#AbstractWriter(java.io.Writer, javax.swing.text.Element, int, int)">AbstractWriter</A></B>(<A HREF="../../../java/io/Writer.html">Writer</A> w, <A HREF="../../../javax/swing/text/Element.html">Element</A> root, int pos, int len)</CODE><BR> Creates a new AbstractWriter.</TD></TR></TABLE> <!-- ========== 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>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/AbstractWriter.html#decrIndent()">decrIndent</A></B>()</CODE><BR> Decrements the indent level.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/AbstractWriter.html#getCanWrapLines()">getCanWrapLines</A></B>()</CODE><BR> Returns whether or not the lines can be wrapped.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/AbstractWriter.html#getCurrentLineLength()">getCurrentLineLength</A></B>()</CODE><BR> Returns the current line length.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected <A HREF="../../../javax/swing/text/Document.html">Document</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/AbstractWriter.html#getDocument()">getDocument</A></B>()</CODE><BR> Fetches the document.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected <A HREF="../../../javax/swing/text/ElementIterator.html">ElementIterator</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/AbstractWriter.html#getElementIterator()">getElementIterator</A></B>()</CODE><BR> Fetches the ElementIterator.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/AbstractWriter.html#getEndOffset()">getEndOffset</A></B>()</CODE><BR> Returns the last offset to be output.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/AbstractWriter.html#getIndentLevel()">getIndentLevel</A></B>()</CODE><BR> Returns the current indentation level.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/AbstractWriter.html#getIndentSpace()">getIndentSpace</A></B>()</CODE><BR> Returns the amount of space to indent.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/AbstractWriter.html#getLineLength()">getLineLength</A></B>()</CODE><BR> Returns the maximum line length.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/AbstractWriter.html#getLineSeparator()">getLineSeparator</A></B>()</CODE><BR> Returns the string used to represent newlines.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/AbstractWriter.html#getStartOffset()">getStartOffset</A></B>()</CODE><BR> Returns the first offset to be output.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected <A HREF="../../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/AbstractWriter.html#getText(javax.swing.text.Element)">getText</A></B>(<A HREF="../../../javax/swing/text/Element.html">Element</A> elem)</CODE><BR> Returns the text associated with the element.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected <A HREF="../../../java/io/Writer.html">Writer</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/AbstractWriter.html#getWriter()">getWriter</A></B>()</CODE><BR> Returns the Writer that is used to output the content.</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/AbstractWriter.html#incrIndent()">incrIndent</A></B>()</CODE><BR> Increments the indent level.</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/AbstractWriter.html#indent()">indent</A></B>()</CODE><BR> Does indentation.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/AbstractWriter.html#inRange(javax.swing.text.Element)">inRange</A></B>(<A HREF="../../../javax/swing/text/Element.html">Element</A> next)</CODE><BR> This method determines whether the current element is in the range specified.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/AbstractWriter.html#isLineEmpty()">isLineEmpty</A></B>()</CODE><BR> Returns true if the current line should be considered empty.</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/AbstractWriter.html#output(char[], int, int)">output</A></B>(char[] content, int start, int length)</CODE><BR> The last stop in writing out content.</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/AbstractWriter.html#setCanWrapLines(boolean)">setCanWrapLines</A></B>(boolean newValue)</CODE><BR> Sets whether or not lines can be wrapped.</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/AbstractWriter.html#setCurrentLineLength(int)">setCurrentLineLength</A></B>(int length)</CODE><BR> Sets the current line length.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -