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

📄 asyncboxview.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<DL><DD>Fetch the major axis (the axis the children are tiled along).  This will have a value of either X_AXIS or Y_AXIS.</DL><HR><A NAME="getMinorAxis()"><!-- --></A><H3>getMinorAxis</H3><PRE>public int <B>getMinorAxis</B>()</PRE><DL><DD>Fetch the minor axis (the axis orthoginal  to the tiled axis).  This will have a value of either X_AXIS or Y_AXIS.</DL><HR><A NAME="getTopInset()"><!-- --></A><H3>getTopInset</H3><PRE>public float <B>getTopInset</B>()</PRE><DL><DD>Get the top part of the margin around the view.</DL><HR><A NAME="setTopInset(float)"><!-- --></A><H3>setTopInset</H3><PRE>public void <B>setTopInset</B>(float&nbsp;i)</PRE><DL><DD>Set the top part of the margin around the view.<DD><DL><DT><B>Parameters:</B><DD><CODE>i</CODE> - the value of the inset</DL></DD></DL><HR><A NAME="getBottomInset()"><!-- --></A><H3>getBottomInset</H3><PRE>public float <B>getBottomInset</B>()</PRE><DL><DD>Get the bottom part of the margin around the view.</DL><HR><A NAME="setBottomInset(float)"><!-- --></A><H3>setBottomInset</H3><PRE>public void <B>setBottomInset</B>(float&nbsp;i)</PRE><DL><DD>Set the bottom part of the margin around the view.<DD><DL><DT><B>Parameters:</B><DD><CODE>i</CODE> - the value of the inset</DL></DD></DL><HR><A NAME="getLeftInset()"><!-- --></A><H3>getLeftInset</H3><PRE>public float <B>getLeftInset</B>()</PRE><DL><DD>Get the left part of the margin around the view.</DL><HR><A NAME="setLeftInset(float)"><!-- --></A><H3>setLeftInset</H3><PRE>public void <B>setLeftInset</B>(float&nbsp;i)</PRE><DL><DD>Set the left part of the margin around the view.<DD><DL><DT><B>Parameters:</B><DD><CODE>i</CODE> - the value of the inset</DL></DD></DL><HR><A NAME="getRightInset()"><!-- --></A><H3>getRightInset</H3><PRE>public float <B>getRightInset</B>()</PRE><DL><DD>Get the right part of the margin around the view.</DL><HR><A NAME="setRightInset(float)"><!-- --></A><H3>setRightInset</H3><PRE>public void <B>setRightInset</B>(float&nbsp;i)</PRE><DL><DD>Set the right part of the margin around the view.<DD><DL><DT><B>Parameters:</B><DD><CODE>i</CODE> - the value of the inset</DL></DD></DL><HR><A NAME="getChildState(int)"><!-- --></A><H3>getChildState</H3><PRE>protected <A HREF="../../../javax/swing/text/AsyncBoxView.ChildState.html">AsyncBoxView.ChildState</A> <B>getChildState</B>(int&nbsp;index)</PRE><DL><DD>Fetch the object representing the layout state of of the child at the given index.<DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - the child index.  This should be a   value >= 0 and < getViewCount().</DL></DD></DL><HR><A NAME="getLayoutQueue()"><!-- --></A><H3>getLayoutQueue</H3><PRE>protected <A HREF="../../../javax/swing/text/LayoutQueue.html">LayoutQueue</A> <B>getLayoutQueue</B>()</PRE><DL><DD>Fetch the queue to use for layout.</DL><HR><A NAME="createChildState(javax.swing.text.View)"><!-- --></A><H3>createChildState</H3><PRE>protected <A HREF="../../../javax/swing/text/AsyncBoxView.ChildState.html">AsyncBoxView.ChildState</A> <B>createChildState</B>(<A HREF="../../../javax/swing/text/View.html">View</A>&nbsp;v)</PRE><DL><DD>New ChildState records are created through this method to allow subclasses the extend the ChildState records to do/hold more</DL><HR><A NAME="majorRequirementChange(javax.swing.text.AsyncBoxView.ChildState, float)"><!-- --></A><H3>majorRequirementChange</H3><PRE>protected void <B>majorRequirementChange</B>(<A HREF="../../../javax/swing/text/AsyncBoxView.ChildState.html">AsyncBoxView.ChildState</A>&nbsp;cs,                                      float&nbsp;delta)</PRE><DL><DD>Requirements changed along the major axis. This is called by the thread doing layout for  the given ChildState object when it has completed fetching the child views new preferences. Typically this would be the layout thread, but might be the GUI thread if it is trying to update something immediately (such as to perform a  model/view translation).</DL><HR><A NAME="minorRequirementChange(javax.swing.text.AsyncBoxView.ChildState)"><!-- --></A><H3>minorRequirementChange</H3><PRE>protected void <B>minorRequirementChange</B>(<A HREF="../../../javax/swing/text/AsyncBoxView.ChildState.html">AsyncBoxView.ChildState</A>&nbsp;cs)</PRE><DL><DD>Requirements changed along the minor axis. This is called by the thread doing layout for  the given ChildState object when it has completed fetching the child views new preferences. Typically this would be the layout thread, but might be the GUI thread if it is trying to update something immediately (such as to perform a  model/view translation).</DL><HR><A NAME="flushRequirementChanges()"><!-- --></A><H3>flushRequirementChanges</H3><PRE>protected void <B>flushRequirementChanges</B>()</PRE><DL><DD>Publish the changes in preferences upward to the parent view.  This is called by the layout thread.</DL><HR><A NAME="replace(int, int, javax.swing.text.View[])"><!-- --></A><H3>replace</H3><PRE>public void <B>replace</B>(int&nbsp;offset,                    int&nbsp;length,                    <A HREF="../../../javax/swing/text/View.html">View</A>[]&nbsp;views)</PRE><DL><DD>Calls the superclass to update the child views, and updates the status records for the children.  This is expected to be called while a write lock is held on the model so that interaction with the layout thread will not happen (i.e. the layout thread  acquires a read lock before doing anything).<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/swing/text/View.html#replace(int, int, javax.swing.text.View[])">replace</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>offset</CODE> - the starting offset into the child views >= 0<DD><CODE>length</CODE> - the number of existing views to replace >= 0<DD><CODE>views</CODE> - the child views to insert</DL></DD></DL><HR><A NAME="loadChildren(javax.swing.text.ViewFactory)"><!-- --></A><H3>loadChildren</H3><PRE>protected void <B>loadChildren</B>(<A HREF="../../../javax/swing/text/ViewFactory.html">ViewFactory</A>&nbsp;f)</PRE><DL><DD>Loads all of the children to initialize the view. This is called by the <a href="#setParent">setParent</a>  method.  Subclasses can reimplement this to initialize  their child views in a different manner.  The default implementation creates a child view for each  child element. <p> Normally a write-lock is held on the Document while the children are being changed, which keeps the rendering and layout threads safe.  The exception to this is when  the view is initialized to represent an existing element (via this method), so it is synchronized to exclude  preferenceChanged while we are initializing.<DD><DL><DT><B>Parameters:</B><DD><CODE>f</CODE> - the view factory<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/text/AsyncBoxView.html#setParent(javax.swing.text.View)"><CODE>setParent(javax.swing.text.View)</CODE></A></DL></DD></DL><HR><A NAME="getViewIndexAtPosition(int, javax.swing.text.Position.Bias)"><!-- --></A><H3>getViewIndexAtPosition</H3><PRE>protected int <B>getViewIndexAtPosition</B>(int&nbsp;pos,                                     <A HREF="../../../javax/swing/text/Position.Bias.html">Position.Bias</A>&nbsp;b)</PRE><DL><DD>Fetches the child view index representing the given position in the model.  This is implemented to fetch the view in the case where there is a child view for each child element.<DD><DL><DT><B>Parameters:</B><DD><CODE>pos</CODE> - the position >= 0</DL></DD></DL><HR><A NAME="updateLayout(javax.swing.event.DocumentEvent.ElementChange, javax.swing.event.DocumentEvent, java.awt.Shape)"><!-- --></A><H3>updateLayout</H3><PRE>protected void <B>updateLayout</B>(<A HREF="../../../javax/swing/event/DocumentEvent.ElementChange.html">DocumentEvent.ElementChange</A>&nbsp;ec,                            <A HREF="../../../javax/swing/event/DocumentEvent.html">DocumentEvent</A>&nbsp;e,                            <A HREF="../../../java/awt/Shape.html">Shape</A>&nbsp;a)</PRE><DL><DD>Update the layout in response to receiving notification of change from the model.  This is implemented to note the  change on the ChildLocator so that offsets of the children will be correctly computed.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/swing/text/View.html#updateLayout(javax.swing.event.DocumentEvent.ElementChange, javax.swing.event.DocumentEvent, java.awt.Shape)">updateLayout</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>ec</CODE> - changes to the element this view is responsible  for (may be null if there were no changes).<DD><CODE>e</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#insertUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)"><CODE>View.insertUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)</CODE></A>, <A HREF="../../../javax/swing/text/View.html#removeUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)"><CODE>View.removeUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)</CODE></A>, <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><HR><A NAME="setParent(javax.swing.text.View)"><!-- --></A><H3>setParent</H3><PRE>public void <B>setParent</B>(<A HREF="../../../javax/swing/text/View.html">View</A>&nbsp;parent)</PRE><DL><DD>Sets the parent of the view. This is reimplemented to provide the superclass behavior as well as calling the <code>loadChildren</code> method if this view does not already have children.   The children should not be loaded in the  constructor because the act of setting the parent may cause them to try to search up the hierarchy (to get the hosting Container for example). If this view has children (the view is being moved from one place in the view hierarchy to another),  the <code>loadChildren</code> method will not be called.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/swing/text/View.html#setParent(javax.swing.text.View)">setParent</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>parent</CODE> - the parent of the view, null if none</DL></DD></DL><HR><A NAME="preferenceChanged(javax.swing.text.View, boolean, boolean)"><!-- --></A><H3>preferenceChanged</H3><PRE>public void <B>preferenceChanged</B>(<A HREF="../../../javax/swing/text/View.html">View</A>&nbsp;child,                              boolean&nbsp;width,                              boolean&nbsp;height)</PRE><DL><DD>Child views can call this on the parent to indicate that the preference has changed and should be reconsidered for layout.  This is reimplemented to queue new work on the layout thread.  This method gets messaged from multiple threads via the children.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/swing/text/View.html#preferenceChanged(javax.swing.text.View, boolean, boolean)">preferenceChanged</A></CODE> in class <CODE><A HREF="../../../javax/swing/text/View.html">View</A></CODE></DL></DD>

⌨️ 快捷键说明

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