📄 paragraphview.html
字号:
<A NAME="nextTabStop(float, int)"><!-- --></A><H3>nextTabStop</H3><PRE>public float <B>nextTabStop</B>(float x, int tabOffset)</PRE><DL><DD>Returns the next tab stop position given a reference position. This view implements the tab coordinate system, and calls <code>getTabbedSpan</code> on the logical children in the process of layout to determine the desired span of the children. The logical children can delegate their tab expansion upward to the paragraph which knows how to expand tabs. <code>LabelView</code> is an example of a view that delegates its tab expansion needs upward to the paragraph. <p> This is implemented to try and locate a <code>TabSet</code> in the paragraph element's attribute set. If one can be found, its settings will be used, otherwise a default expansion will be provided. The base location for for tab expansion is the left inset from the paragraphs most recent allocation (which is what the layout of the children is based upon).<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/swing/text/TabExpander.html#nextTabStop(float, int)">nextTabStop</A></CODE> in interface <CODE><A HREF="../../../javax/swing/text/TabExpander.html">TabExpander</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>x</CODE> - the X reference position<DD><CODE>tabOffset</CODE> - the position within the text stream that the tab occurred at >= 0.<DT><B>Returns:</B><DD>the trailing end of the tab expansion >= 0<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/text/TabSet.html"><CODE>TabSet</CODE></A>, <A HREF="../../../javax/swing/text/TabStop.html"><CODE>TabStop</CODE></A>, <A HREF="../../../javax/swing/text/LabelView.html"><CODE>LabelView</CODE></A></DL></DD></DL><HR><A NAME="getTabSet()"><!-- --></A><H3>getTabSet</H3><PRE>protected <A HREF="../../../javax/swing/text/TabSet.html">TabSet</A> <B>getTabSet</B>()</PRE><DL><DD>Gets the Tabset to be used in calculating tabs.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the TabSet</DL></DD></DL><HR><A NAME="getPartialSize(int, int)"><!-- --></A><H3>getPartialSize</H3><PRE>protected float <B>getPartialSize</B>(int startOffset, int endOffset)</PRE><DL><DD>Returns the size used by the views between <code>startOffset</code> and <code>endOffset</code>. This uses getPartialView to calculate the size if the child view implements the TabableView interface. If a size is needed and a View does not implement the TabableView interface, the preferredSpan will be used.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>startOffset</CODE> - the starting document offset >= 0<DD><CODE>endOffset</CODE> - the ending document offset >= startOffset<DT><B>Returns:</B><DD>the size >= 0</DL></DD></DL><HR><A NAME="findOffsetToCharactersInString(char[], int)"><!-- --></A><H3>findOffsetToCharactersInString</H3><PRE>protected int <B>findOffsetToCharactersInString</B>(char[] string, int start)</PRE><DL><DD>Finds the next character in the document with a character in <code>string</code>, starting at offset <code>start</code>. If there are no characters found, -1 will be returned.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>string</CODE> - the string of characters<DD><CODE>start</CODE> - where to start in the model >= 0<DT><B>Returns:</B><DD>the document offset or -1</DL></DD></DL><HR><A NAME="getTabBase()"><!-- --></A><H3>getTabBase</H3><PRE>protected float <B>getTabBase</B>()</PRE><DL><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>where tabs are calculated from.</DL></DD></DL><HR><A NAME="paint(java.awt.Graphics, java.awt.Shape)"><!-- --></A><H3>paint</H3><PRE>public void <B>paint</B>(<A HREF="../../../java/awt/Graphics.html">Graphics</A> g, <A HREF="../../../java/awt/Shape.html">Shape</A> a)</PRE><DL><DD>Renders using the given rendering surface and area on that surface. This is implemented to delgate to the superclass after stashing the base coordinate for tab calculations.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/swing/text/BoxView.html#paint(java.awt.Graphics, java.awt.Shape)">paint</A></CODE> in class <CODE><A HREF="../../../javax/swing/text/BoxView.html">BoxView</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>g</CODE> - the rendering surface to use<DD><CODE>a</CODE> - the allocated region to render into<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/text/View.html#paint(java.awt.Graphics, java.awt.Shape)"><CODE>View.paint(java.awt.Graphics, java.awt.Shape)</CODE></A></DL></DD></DL><HR><A NAME="getAlignment(int)"><!-- --></A><H3>getAlignment</H3><PRE>public float <B>getAlignment</B>(int axis)</PRE><DL><DD>Determines the desired alignment for this view along an axis. This is implemented to give the alignment to the center of the first row along the y axis, and the default along the x axis.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/swing/text/BoxView.html#getAlignment(int)">getAlignment</A></CODE> in class <CODE><A HREF="../../../javax/swing/text/BoxView.html">BoxView</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>axis</CODE> - may be either View.X_AXIS or View.Y_AXIS</DL></DD></DL><HR><A NAME="breakView(int, float, java.awt.Shape)"><!-- --></A><H3>breakView</H3><PRE>public <A HREF="../../../javax/swing/text/View.html">View</A> <B>breakView</B>(int axis, float len, <A HREF="../../../java/awt/Shape.html">Shape</A> a)</PRE><DL><DD>Breaks this view on the given axis at the given length.<p> ParagraphView instances are breakable along the Y_AXIS only, and only if <code>len</code> is after the first line.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>axis</CODE> - may be either View.X_AXIS or View.Y_AXIS<DD><CODE>len</CODE> - specifies where a potential break is desired along the given axis >= 0<DD><CODE>a</CODE> - the current allocation of the view<DT><B>Returns:</B><DD>the fragment of the view that represents the given span, if the view can be broken. If the view doesn't support breaking behavior, the view itself is returned.<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/text/View.html#breakView(int, int, float, float)"><CODE>View.breakView(int, int, float, float)</CODE></A></DL></DD></DL><HR><A NAME="getBreakWeight(int, float)"><!-- --></A><H3>getBreakWeight</H3><PRE>public int <B>getBreakWeight</B>(int axis, float len)</PRE><DL><DD>Gets the break weight for a given location. ParagraphView instances are breakable along the Y_AXIS only, and only if <code>len</code> is after the first row. If the length is less than one row, a value of BadBreakWeight is returned.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>axis</CODE> - may be either View.X_AXIS or View.Y_AXIS<DD><CODE>len</CODE> - specifies where a potential break is desired >= 0<DT><B>Returns:</B><DD>a value indicating the attractiveness of breaking here<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/text/View.html#getBreakWeight(int, float, float)"><CODE>View.getBreakWeight(int, float, float)</CODE></A></DL></DD></DL><HR><A NAME="changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)"><!-- --></A><H3>changedUpdate</H3><PRE>public void <B>changedUpdate</B>(<A HREF="../../../javax/swing/event/DocumentEvent.html">DocumentEvent</A> changes, <A HREF="../../../java/awt/Shape.html">Shape</A> a, <A HREF="../../../javax/swing/text/ViewFactory.html">ViewFactory</A> f)</PRE><DL><DD>Gives notification from the document that attributes were changed in a location that this view is responsible for.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/swing/text/FlowView.html#changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)">changedUpdate</A></CODE> in class <CODE><A HREF="../../../javax/swing/text/FlowView.html">FlowView</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>changes</CODE> - the change information from the associated document<DD><CODE>a</CODE> - the current allocation of the view<DD><CODE>f</CODE> - the factory to use to rebuild if the view has children<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/text/View.html#changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)"><CODE>View.changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)</CODE></A></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/ParagraphView.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/LayoutQueue.html"><B>PREV CLASS</B></A> <A HREF="../../../javax/swing/text/PasswordView.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="ParagraphView.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.FlowView">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 + -