📄 minimalhtmlwriter.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:42:38 PDT 2000 --><TITLE>Java 2 Platform SE v1.3: Class MinimalHTMLWriter</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/MinimalHTMLWriter.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/html/ListView.html"><B>PREV CLASS</B></A> <A HREF="../../../../javax/swing/text/html/ObjectView.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="MinimalHTMLWriter.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <A HREF="#fields_inherited_from_class_javax.swing.text.AbstractWriter">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: FIELD | <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.html</FONT><BR>Class MinimalHTMLWriter</H2><PRE><A HREF="../../../../java/lang/Object.html">java.lang.Object</A> | +--<A HREF="../../../../javax/swing/text/AbstractWriter.html">javax.swing.text.AbstractWriter</A> | +--<B>javax.swing.text.html.MinimalHTMLWriter</B></PRE><HR><DL><DT>public class <B>MinimalHTMLWriter</B><DT>extends <A HREF="../../../../javax/swing/text/AbstractWriter.html">AbstractWriter</A></DL><P>MinimalHTMLWriter is a fallback writer used by the HTMLEditorKit to write out HTML for a document that is a not produced by the EditorKit. The format for the document is: <pre> <html> <head> <style> <!-- list of named styles p.normal { font-family: SansSerif; margin-height: 0; font-size: 14 } --> </style> </head> <body> <p style=normal> <b>Bold, italic, and underline attributes of the run are emitted as HTML tags. The remaining attributes are emitted as part of the style attribute of a <span> tag. The syntax is similar to inline styles.</b> </p> </body> </html> </pre><P><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="fields_inherited_from_class_javax.swing.text.AbstractWriter"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields inherited from class javax.swing.text.<A HREF="../../../../javax/swing/text/AbstractWriter.html">AbstractWriter</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../../javax/swing/text/AbstractWriter.html#NEWLINE">NEWLINE</A></CODE></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><CODE><B><A HREF="../../../../javax/swing/text/html/MinimalHTMLWriter.html#MinimalHTMLWriter(java.io.Writer, javax.swing.text.StyledDocument)">MinimalHTMLWriter</A></B>(<A HREF="../../../../java/io/Writer.html">Writer</A> w, <A HREF="../../../../javax/swing/text/StyledDocument.html">StyledDocument</A> doc)</CODE><BR> Creates a new MinimalHTMLWriter.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../javax/swing/text/html/MinimalHTMLWriter.html#MinimalHTMLWriter(java.io.Writer, javax.swing.text.StyledDocument, int, int)">MinimalHTMLWriter</A></B>(<A HREF="../../../../java/io/Writer.html">Writer</A> w, <A HREF="../../../../javax/swing/text/StyledDocument.html">StyledDocument</A> doc, int pos, int len)</CODE><BR> Creates a new MinimalHTMLWriter.</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/html/MinimalHTMLWriter.html#endFontTag()">endFontTag</A></B>()</CODE><BR> This is no longer used, instead <span> will be written out.</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/html/MinimalHTMLWriter.html#inFontTag()">inFontTag</A></B>()</CODE><BR> Returns true if we are currently in a <font> tag.</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/html/MinimalHTMLWriter.html#isText(javax.swing.text.Element)">isText</A></B>(<A HREF="../../../../javax/swing/text/Element.html">Element</A> elem)</CODE><BR> Returns true if the element is a text element.</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/html/MinimalHTMLWriter.html#startFontTag(java.lang.String)">startFontTag</A></B>(<A HREF="../../../../java/lang/String.html">String</A> style)</CODE><BR> This is no longer used, instead <span> will be written out.</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/html/MinimalHTMLWriter.html#text(javax.swing.text.Element)">text</A></B>(<A HREF="../../../../javax/swing/text/Element.html">Element</A> elem)</CODE><BR> Writes out text.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/swing/text/html/MinimalHTMLWriter.html#write()">write</A></B>()</CODE><BR> Generates HTML output from a StyledDocument.</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/html/MinimalHTMLWriter.html#writeAttributes(javax.swing.text.AttributeSet)">writeAttributes</A></B>(<A HREF="../../../../javax/swing/text/AttributeSet.html">AttributeSet</A> attr)</CODE><BR> Writes out all the attributes for the following types: StyleConstants.ParagraphConstants, StyleConstants.CharacterConstants, StyleConstants.FontConstants, StyleConstants.ColorConstants.</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/html/MinimalHTMLWriter.html#writeBody()">writeBody</A></B>()</CODE><BR> Iterates over the elements in the document and processes elements based on whether they are branch elements or leaf elements.</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/html/MinimalHTMLWriter.html#writeComponent(javax.swing.text.Element)">writeComponent</A></B>(<A HREF="../../../../javax/swing/text/Element.html">Element</A> elem)</CODE><BR> Responsible for handling Component Elements; deliberately unimplemented.</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/html/MinimalHTMLWriter.html#writeContent(javax.swing.text.Element, boolean)">writeContent</A></B>(<A HREF="../../../../javax/swing/text/Element.html">Element</A> elem, boolean needsIndenting)</CODE><BR> Writes out the attribute set in an HTML-compliant manner.</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/html/MinimalHTMLWriter.html#writeEndParagraph()">writeEndParagraph</A></B>()</CODE><BR> Emits an end tag for a <p>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -