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

📄 asyncboxview.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<DD><DL><DT><B>Parameters:</B><DD><CODE>child</CODE> - the child view<DD><CODE>width</CODE> - true if the width preference has changed<DD><CODE>height</CODE> - true if the height preference has changed<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/JComponent.html#revalidate()"><CODE>JComponent.revalidate()</CODE></A></DL></DD></DL><HR><A NAME="setSize(float, float)"><!-- --></A><H3>setSize</H3><PRE>public void <B>setSize</B>(float&nbsp;width,                    float&nbsp;height)</PRE><DL><DD>Sets the size of the view.  This should cause  layout of the view, if it has any layout duties. <p> This is implemented to check and see if there has been a change in the minor span (since the view is flexible along the minor axis).  If there has been a change, this will add a high priorty task on the layout thread that will mark all of the ChildState records as needing to resize the child, and to spawn a bunch of low priority tasks to  fixup the children. <p> This method will normally be called by the  GUI event thread, which we don't want to slow down in any way if we can help it.  Pushing the  potentially time consuming task of marking each record frees the GUI thread, but also leaves the view open to paint attempts that can't be satisfied. The view is marked as <em>resizing</em> and the ResizeTask will turn off the flag when the children have all been marked.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/swing/text/View.html#setSize(float, float)">setSize</A></CODE> in class <CODE><A HREF="../../../javax/swing/text/View.html">View</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>width</CODE> - the width >= 0<DD><CODE>height</CODE> - the height >= 0</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>&nbsp;g,                  <A HREF="../../../java/awt/Shape.html">Shape</A>&nbsp;alloc)</PRE><DL><DD>Render the view using the given allocation and rendering surface. <p> This is implemented to determine whether or not the desired region to be rendered (i.e. the unclipped  area) is up to date or not.  If up-to-date the children are rendered.  If not up-to-date, a task to build the desired area is placed on the layout queue as a high priority task.  This keeps by event thread moving by rendering if ready, and postponing until a later time if not ready (since paint requests can be rescheduled).<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/swing/text/View.html#paint(java.awt.Graphics, java.awt.Shape)">paint</A></CODE> in class <CODE><A HREF="../../../javax/swing/text/View.html">View</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>g</CODE> - the rendering surface to use<DD><CODE>alloc</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="getPreferredSpan(int)"><!-- --></A><H3>getPreferredSpan</H3><PRE>public float <B>getPreferredSpan</B>(int&nbsp;axis)</PRE><DL><DD>Determines the preferred span for this view along an axis.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/swing/text/View.html#getPreferredSpan(int)">getPreferredSpan</A></CODE> in class <CODE><A HREF="../../../javax/swing/text/View.html">View</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>axis</CODE> - may be either View.X_AXIS or View.Y_AXIS<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - for an invalid axis type</DL></DD></DL><HR><A NAME="getMinimumSpan(int)"><!-- --></A><H3>getMinimumSpan</H3><PRE>public float <B>getMinimumSpan</B>(int&nbsp;axis)</PRE><DL><DD>Determines the minimum span for this view along an axis.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/swing/text/View.html#getMinimumSpan(int)">getMinimumSpan</A></CODE> in class <CODE><A HREF="../../../javax/swing/text/View.html">View</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>axis</CODE> - may be either View.X_AXIS or View.Y_AXIS<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - for an invalid axis type</DL></DD></DL><HR><A NAME="getMaximumSpan(int)"><!-- --></A><H3>getMaximumSpan</H3><PRE>public float <B>getMaximumSpan</B>(int&nbsp;axis)</PRE><DL><DD>Determines the maximum span for this view along an axis.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/swing/text/View.html#getMaximumSpan(int)">getMaximumSpan</A></CODE> in class <CODE><A HREF="../../../javax/swing/text/View.html">View</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>axis</CODE> - may be either View.X_AXIS or View.Y_AXIS<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - for an invalid axis type</DL></DD></DL><HR><A NAME="getViewCount()"><!-- --></A><H3>getViewCount</H3><PRE>public int <B>getViewCount</B>()</PRE><DL><DD>Returns the number of views in this view.  Since the default is to not be a composite view this returns 0.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/swing/text/View.html#getViewCount()">getViewCount</A></CODE> in class <CODE><A HREF="../../../javax/swing/text/View.html">View</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the number of views >= 0<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/text/View.html#getViewCount()"><CODE>View.getViewCount()</CODE></A></DL></DD></DL><HR><A NAME="getView(int)"><!-- --></A><H3>getView</H3><PRE>public <A HREF="../../../javax/swing/text/View.html">View</A> <B>getView</B>(int&nbsp;n)</PRE><DL><DD>Gets the nth child view.  Since there are no children by default, this returns null.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/swing/text/View.html#getView(int)">getView</A></CODE> in class <CODE><A HREF="../../../javax/swing/text/View.html">View</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>n</CODE> - the number of the view to get, >= 0 && < getViewCount()<DT><B>Returns:</B><DD>the view</DL></DD></DL><HR><A NAME="getChildAllocation(int, java.awt.Shape)"><!-- --></A><H3>getChildAllocation</H3><PRE>public <A HREF="../../../java/awt/Shape.html">Shape</A> <B>getChildAllocation</B>(int&nbsp;index,                                <A HREF="../../../java/awt/Shape.html">Shape</A>&nbsp;a)</PRE><DL><DD>Fetches the allocation for the given child view.  This enables finding out where various views are located, without assuming the views store their location.  This returns null since the default is to not have any child views.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/swing/text/View.html#getChildAllocation(int, java.awt.Shape)">getChildAllocation</A></CODE> in class <CODE><A HREF="../../../javax/swing/text/View.html">View</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - the index of the child, >= 0 && < getViewCount()<DD><CODE>a</CODE> - the allocation to this view.<DT><B>Returns:</B><DD>the allocation to the child</DL></DD></DL><HR><A NAME="getViewIndex(int, javax.swing.text.Position.Bias)"><!-- --></A><H3>getViewIndex</H3><PRE>public int <B>getViewIndex</B>(int&nbsp;pos,                        <A HREF="../../../javax/swing/text/Position.Bias.html">Position.Bias</A>&nbsp;b)</PRE><DL><DD>Returns the child view index representing the given position in the model.  By default a view has no children so this is implemented to return -1 to indicate there is no valid child index for any position.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/swing/text/View.html#getViewIndex(int, javax.swing.text.Position.Bias)">getViewIndex</A></CODE> in class <CODE><A HREF="../../../javax/swing/text/View.html">View</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>pos</CODE> - the position >= 0<DT><B>Returns:</B><DD>index of the view representing the given position, or    -1 if no view represents that position<DT><B>Since: </B><DD>1.3</DD></DL></DD></DL><HR><A NAME="modelToView(int, java.awt.Shape, javax.swing.text.Position.Bias)"><!-- --></A><H3>modelToView</H3><PRE>public <A HREF="../../../java/awt/Shape.html">Shape</A> <B>modelToView</B>(int&nbsp;pos,                         <A HREF="../../../java/awt/Shape.html">Shape</A>&nbsp;a,                         <A HREF="../../../javax/swing/text/Position.Bias.html">Position.Bias</A>&nbsp;b)                  throws <A HREF="../../../javax/swing/text/BadLocationException.html">BadLocationException</A></PRE><DL><DD>Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/swing/text/View.html#modelToView(int, java.awt.Shape, javax.swing.text.Position.Bias)">modelToView</A></CODE> in class <CODE><A HREF="../../../javax/swing/text/View.html">View</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>pos</CODE> - the position to convert >= 0<DD><CODE>a</CODE> - the allocated region to render into<DD><CODE>b</CODE> - the bias toward the previous character or the  next character represented by the offset, in case the   position is a boundary of two views.<DT><B>Returns:</B><DD>the bounding box of the given position is returned<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/swing/text/BadLocationException.html">BadLocationException</A></CODE> - if the given position does   not represent a valid location in the associated document<DD><CODE><A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - for an invalid bias argument<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/text/View.html#viewToModel(float, float, java.awt.Shape, javax.swing.text.Position.Bias[])"><CODE>View.viewToModel(float, float, java.awt.Shape, javax.swing.text.Position.Bias[])</CODE></A></DL></DD></DL><HR><A NAME="viewToModel(float, float, java.awt.Shape, javax.swing.text.Position.Bias[])"><!-- --></A><H3>viewToModel</H3><PRE>public int <B>viewToModel</B>(float&nbsp;x,                       float&nbsp;y,                       <A HREF="../../../java/awt/Shape.html">Shape</A>&nbsp;a,                       <A HREF="../../../javax/swing/text/Position.Bias.html">Position.Bias</A>[]&nbsp;biasReturn)</PRE><DL><DD>Provides a mapping from the view coordinate space to the logical coordinate space of the model.  The biasReturn argument will be filled in to indicate that the point given is closer to the next character in the model or the previous character in the model. <p> This is expected to be called by the GUI thread, holding a  read-lock on the associated model.  It is implemented to locate the child view and determine it's allocation with a lock on the ChildLocator object, and to call viewToModel on the child view with a lock on the ChildState object  to avoid interaction with the layout thread.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/swing/text/View.html#viewToModel(float, float, java.awt.Shape, javax.swing.text.Position.Bias[])">viewToModel</A></CODE> in class <CODE><A HREF="../../../javax/swing/text/View.html">View</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>x</CODE> - the X coordinate >= 0<DD><CODE>y</CODE> - the Y coordinate >= 0<DD><CODE>a</CODE> - the allocated region to render into<DT><B>Returns:</B><DD>the location within the model that best represents the  given point in the view >= 0.  The biasReturn argument will be filled in to indicate that the point given is closer to the next character in the model or the previous character in the model.</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>&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/AsyncBoxView.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/AbstractWriter.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../javax/swing/text/AsyncBoxView.ChildLocator.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="AsyncBoxView.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY: &nbsp;<A HREF="#inner_class_summary">INNER</A>&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: &nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<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 + -