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

📄 boxview.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/BoxView.html#setSize(float, float)">setSize</A></B>(float&nbsp;width,        float&nbsp;height)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the size of the view.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/BoxView.html#viewToModel(float, float, java.awt.Shape, javax.swing.text.Position.Bias[])">viewToModel</A></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;bias)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Provides a mapping from the view coordinate space to the logical coordinate space of the model.</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_javax.swing.text.CompositeView"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class javax.swing.text.<A HREF="../../../javax/swing/text/CompositeView.html">CompositeView</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../javax/swing/text/CompositeView.html#getBottomInset()">getBottomInset</A>, <A HREF="../../../javax/swing/text/CompositeView.html#getInsideAllocation(java.awt.Shape)">getInsideAllocation</A>, <A HREF="../../../javax/swing/text/CompositeView.html#getLeftInset()">getLeftInset</A>, <A HREF="../../../javax/swing/text/CompositeView.html#getNextEastWestVisualPositionFrom(int, javax.swing.text.Position.Bias, java.awt.Shape, int, javax.swing.text.Position.Bias[])">getNextEastWestVisualPositionFrom</A>, <A HREF="../../../javax/swing/text/CompositeView.html#getNextNorthSouthVisualPositionFrom(int, javax.swing.text.Position.Bias, java.awt.Shape, int, javax.swing.text.Position.Bias[])">getNextNorthSouthVisualPositionFrom</A>, <A HREF="../../../javax/swing/text/CompositeView.html#getNextVisualPositionFrom(int, javax.swing.text.Position.Bias, java.awt.Shape, int, javax.swing.text.Position.Bias[])">getNextVisualPositionFrom</A>, <A HREF="../../../javax/swing/text/CompositeView.html#getRightInset()">getRightInset</A>, <A HREF="../../../javax/swing/text/CompositeView.html#getTopInset()">getTopInset</A>, <A HREF="../../../javax/swing/text/CompositeView.html#getView(int)">getView</A>, <A HREF="../../../javax/swing/text/CompositeView.html#getViewAtPosition(int, java.awt.Rectangle)">getViewAtPosition</A>, <A HREF="../../../javax/swing/text/CompositeView.html#getViewCount()">getViewCount</A>, <A HREF="../../../javax/swing/text/CompositeView.html#getViewIndex(int, javax.swing.text.Position.Bias)">getViewIndex</A>, <A HREF="../../../javax/swing/text/CompositeView.html#getViewIndexAtPosition(int)">getViewIndexAtPosition</A>, <A HREF="../../../javax/swing/text/CompositeView.html#loadChildren(javax.swing.text.ViewFactory)">loadChildren</A>, <A HREF="../../../javax/swing/text/CompositeView.html#modelToView(int, javax.swing.text.Position.Bias, int, javax.swing.text.Position.Bias, java.awt.Shape)">modelToView</A>, <A HREF="../../../javax/swing/text/CompositeView.html#setInsets(short, short, short, short)">setInsets</A>, <A HREF="../../../javax/swing/text/CompositeView.html#setParagraphInsets(javax.swing.text.AttributeSet)">setParagraphInsets</A>, <A HREF="../../../javax/swing/text/CompositeView.html#setParent(javax.swing.text.View)">setParent</A></CODE></TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_javax.swing.text.View"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class javax.swing.text.<A HREF="../../../javax/swing/text/View.html">View</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../javax/swing/text/View.html#append(javax.swing.text.View)">append</A>, <A HREF="../../../javax/swing/text/View.html#breakView(int, int, float, float)">breakView</A>, <A HREF="../../../javax/swing/text/View.html#changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)">changedUpdate</A>, <A HREF="../../../javax/swing/text/View.html#createFragment(int, int)">createFragment</A>, <A HREF="../../../javax/swing/text/View.html#forwardUpdateToView(javax.swing.text.View, javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)">forwardUpdateToView</A>, <A HREF="../../../javax/swing/text/View.html#getAttributes()">getAttributes</A>, <A HREF="../../../javax/swing/text/View.html#getBreakWeight(int, float, float)">getBreakWeight</A>, <A HREF="../../../javax/swing/text/View.html#getContainer()">getContainer</A>, <A HREF="../../../javax/swing/text/View.html#getDocument()">getDocument</A>, <A HREF="../../../javax/swing/text/View.html#getElement()">getElement</A>, <A HREF="../../../javax/swing/text/View.html#getEndOffset()">getEndOffset</A>, <A HREF="../../../javax/swing/text/View.html#getGraphics()">getGraphics</A>, <A HREF="../../../javax/swing/text/View.html#getParent()">getParent</A>, <A HREF="../../../javax/swing/text/View.html#getStartOffset()">getStartOffset</A>, <A HREF="../../../javax/swing/text/View.html#getViewFactory()">getViewFactory</A>, <A HREF="../../../javax/swing/text/View.html#insert(int, javax.swing.text.View)">insert</A>, <A HREF="../../../javax/swing/text/View.html#insertUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)">insertUpdate</A>, <A HREF="../../../javax/swing/text/View.html#isVisible()">isVisible</A>, <A HREF="../../../javax/swing/text/View.html#modelToView(int, java.awt.Shape)">modelToView</A>, <A HREF="../../../javax/swing/text/View.html#remove(int)">remove</A>, <A HREF="../../../javax/swing/text/View.html#removeAll()">removeAll</A>, <A HREF="../../../javax/swing/text/View.html#removeUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)">removeUpdate</A>, <A HREF="../../../javax/swing/text/View.html#updateChildren(javax.swing.event.DocumentEvent.ElementChange, javax.swing.event.DocumentEvent, javax.swing.text.ViewFactory)">updateChildren</A>, <A HREF="../../../javax/swing/text/View.html#updateLayout(javax.swing.event.DocumentEvent.ElementChange, javax.swing.event.DocumentEvent, java.awt.Shape)">updateLayout</A>, <A HREF="../../../javax/swing/text/View.html#viewToModel(float, float, java.awt.Shape)">viewToModel</A></CODE></TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.<A HREF="../../../java/lang/Object.html">Object</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../java/lang/Object.html#clone()">clone</A>, <A HREF="../../../java/lang/Object.html#equals(java.lang.Object)">equals</A>, <A HREF="../../../java/lang/Object.html#finalize()">finalize</A>, <A HREF="../../../java/lang/Object.html#getClass()">getClass</A>, <A HREF="../../../java/lang/Object.html#hashCode()">hashCode</A>, <A HREF="../../../java/lang/Object.html#notify()">notify</A>, <A HREF="../../../java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="../../../java/lang/Object.html#toString()">toString</A>, <A HREF="../../../java/lang/Object.html#wait()">wait</A>, <A HREF="../../../java/lang/Object.html#wait(long)">wait</A>, <A HREF="../../../java/lang/Object.html#wait(long, int)">wait</A></CODE></TD></TR></TABLE>&nbsp;<P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="BoxView(javax.swing.text.Element, int)"><!-- --></A><H3>BoxView</H3><PRE>public <B>BoxView</B>(<A HREF="../../../javax/swing/text/Element.html">Element</A>&nbsp;elem,               int&nbsp;axis)</PRE><DL><DD>Constructs a BoxView.<DD><DL><DT><B>Parameters:</B><DD><CODE>elem</CODE> - the element this view is responsible for<DD><CODE>axis</CODE> - either View.X_AXIS or View.Y_AXIS</DL></DD></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="getAxis()"><!-- --></A><H3>getAxis</H3><PRE>public int <B>getAxis</B>()</PRE><DL><DD>Fetch the axis property.<DD><DL><DT><B>Returns:</B><DD>the major axis of the box, either   View.X_AXIS or View.Y_AXIS.</DL></DD></DL><HR><A NAME="setAxis(int)"><!-- --></A><H3>setAxis</H3><PRE>public void <B>setAxis</B>(int&nbsp;axis)</PRE><DL><DD>Set the axis property.<DD><DL><DT><B>Parameters:</B><DD><CODE>axis</CODE> - either View.X_AXIS or View.Y_AXIS</DL></DD></DL><HR><A NAME="layoutChanged(int)"><!-- --></A><H3>layoutChanged</H3><PRE>public void <B>layoutChanged</B>(int&nbsp;axis)</PRE><DL><DD>Invalidate the layout along an axis.  This happens automatically if the preferences have changed for any of the child views.  In some cases the layout may need to be recalculated when the preferences have not changed.  The layout can be marked as invalid by calling this method.  The layout will be updated the next time the setSize method is called on this view (typically in paint).<DD><DL><DT><B>Parameters:</B><DD><CODE>axis</CODE> - either View.X_AXIS or View.Y_AXIS</DL></DD></DL><HR><A NAME="paintChild(java.awt.Graphics, java.awt.Rectangle, int)"><!-- --></A><H3>paintChild</H3><PRE>protected void <B>paintChild</B>(<A HREF="../../../java/awt/Graphics.html">Graphics</A>&nbsp;g,                          <A HREF="../../../java/awt/Rectangle.html">Rectangle</A>&nbsp;alloc,                          int&nbsp;index)</PRE><DL><DD>Paints a child.  By default that is all it does, but a subclass can use this to paint  things relative to the child.<DD><DL><DT><B>Parameters:</B><DD><CODE>g</CODE> - the graphics context<DD><CODE>alloc</CODE> - the allocated region to paint into<DD><CODE>index</CODE> - the child index, >= 0 && < getViewCount()</DL></DD></DL><HR><A NAME="replace(int, int, javax.swing.text.View[])"><!-- --></A><H3>replace</H3><PRE>public void <B>replace</B>(int&nbsp;index,                    int&nbsp;length,                    <A HREF="../../../javax/swing/text/View.html">View</A>[]&nbsp;elems)</PRE><DL><DD>Invalidates the layout and resizes the cache of  requests/allocations.  The child allocations can still be accessed for the old layout, but the new children will have an offset and span of 0.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/swing/text/CompositeView.html#replace(int, int, javax.swing.text.View[])">replace</A></CODE> in class <CODE><A HREF="../../../javax/swing/text/CompositeView.html">CompositeView</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - the starting index into the child views to insert   the new views.  This should be a value >= 0 and <= getViewCount.<DD><CODE>length</CODE> - the number of existing child views to remove.   This should be a value >= 0 and <= (getViewCount() - offset).<DD><CODE>views</CODE> - the child views to add.  This value can be null   to indicate no children are being added (useful to remove).</DL></DD></DL><HR><A NAME="forwardUpdate(javax.swing.event.DocumentEvent.ElementChange, javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)"><!-- --></A><H3>forwardUpdate</H3><PRE>protected void <B>forwardUpdate</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,                             <A HREF="../../../javax/swing/text/ViewFactory.html">ViewFactory</A>&nbsp;f)</PRE><DL><DD>Forward the given DocumentEvent to the child views that need to be notified of the change to the model. If a child changed it's requirements and the allocation was valid prior to forwarding the portion of the box from the starting child to the end of the box will be repainted.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/swing/text/View.html#forwardUpdate(javax.swing.event.DocumentEvent.ElementChange, javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)">forwardUpdate</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="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>This is called by a child to indicated its  preferred span has changed.  This is implemented to throw away cached layout information so that new calculations will be done the next time the children need an allocation.<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><DD><DL><DT><B>Parameters:</B><DD><CODE>child</CODE> - the child view<DD><CODE>width</CODE> - true if the width preference should change<DD><CODE>height</CODE> - true if the height preference should change</DL></DD></DL><HR><A NAME="getResizeWeight(int)"><!-- --></A><H3>getResizeWeight</H3><PRE>public int <B>getResizeWeight</B>(int&nbsp;axis)</PRE><DL><DD>Gets the resize weight.  A value of 0 or less is not resizable.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/swing/text/View.html#getResizeWeight(int)">getResizeWeight</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>Returns:</B><DD>the weight<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - for an invalid axis</DL></DD></DL><HR>

⌨️ 快捷键说明

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