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

📄 componentview.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 3 页
字号:
 axis.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;float</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/ComponentView.html#getPreferredSpan(int)">getPreferredSpan</A></B>(int&nbsp;axis)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Determines the preferred span for this view along an axis.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../java/awt/Shape.html">Shape</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/ComponentView.html#modelToView(int, java.awt.Shape, javax.swing.text.Position.Bias)">modelToView</A></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)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Provides a mapping from the coordinate space of the model to that of the view.</TD></TR><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/ComponentView.html#paint(java.awt.Graphics, java.awt.Shape)">paint</A></B>(<A HREF="../../../java/awt/Graphics.html">Graphics</A>&nbsp;g,      <A HREF="../../../java/awt/Shape.html">Shape</A>&nbsp;a)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The real paint behavior occurs naturally from the association that the component has with its parent container (the same container hosting this view).</TD></TR><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/ComponentView.html#setParent(javax.swing.text.View)">setParent</A></B>(<A HREF="../../../javax/swing/text/View.html">View</A>&nbsp;p)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the parent for a child view.</TD></TR><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/ComponentView.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/ComponentView.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.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#forwardUpdate(javax.swing.event.DocumentEvent.ElementChange, javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)">forwardUpdate</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#getChildAllocation(int, java.awt.Shape)">getChildAllocation</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#getNextVisualPositionFrom(int, javax.swing.text.Position.Bias, java.awt.Shape, int, javax.swing.text.Position.Bias[])">getNextVisualPositionFrom</A>, <A HREF="../../../javax/swing/text/View.html#getParent()">getParent</A>, <A HREF="../../../javax/swing/text/View.html#getResizeWeight(int)">getResizeWeight</A>, <A HREF="../../../javax/swing/text/View.html#getStartOffset()">getStartOffset</A>, <A HREF="../../../javax/swing/text/View.html#getView(int)">getView</A>, <A HREF="../../../javax/swing/text/View.html#getViewCount()">getViewCount</A>, <A HREF="../../../javax/swing/text/View.html#getViewFactory()">getViewFactory</A>, <A HREF="../../../javax/swing/text/View.html#getViewIndex(int, javax.swing.text.Position.Bias)">getViewIndex</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, javax.swing.text.Position.Bias, int, javax.swing.text.Position.Bias, java.awt.Shape)">modelToView</A>, <A HREF="../../../javax/swing/text/View.html#modelToView(int, java.awt.Shape)">modelToView</A>, <A HREF="../../../javax/swing/text/View.html#preferenceChanged(javax.swing.text.View, boolean, boolean)">preferenceChanged</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#replace(int, int, javax.swing.text.View[])">replace</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="ComponentView(javax.swing.text.Element)"><!-- --></A><H3>ComponentView</H3><PRE>public <B>ComponentView</B>(<A HREF="../../../javax/swing/text/Element.html">Element</A>&nbsp;elem)</PRE><DL><DD>Creates a new ComponentView object.<DD><DL><DT><B>Parameters:</B><DD><CODE>elem</CODE> - the element to decorate</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="createComponent()"><!-- --></A><H3>createComponent</H3><PRE>protected <A HREF="../../../java/awt/Component.html">Component</A> <B>createComponent</B>()</PRE><DL><DD>Create the component that is associated with this view.  This will be called when it has been determined that a new component is needed. This would result from a call to setParent or as a result of being notified that attributes have changed.</DL><HR><A NAME="getComponent()"><!-- --></A><H3>getComponent</H3><PRE>public final <A HREF="../../../java/awt/Component.html">Component</A> <B>getComponent</B>()</PRE><DL><DD>Fetch the component associated with the view.</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;a)</PRE><DL><DD>The real paint behavior occurs naturally from the association that the component has with its parent container (the same container hosting this view).  This is implemented to do nothing.<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 graphics context<DD><CODE>a</CODE> - the shape<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.  This is implemented to return the value returned by Component.getPreferredSize along the axis of interest.<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</DL></DD></DL><HR><A NAME="getMinimumSpan(int)"><!-- --></A><H3>getMinimumSpan</H3><PRE>public float <B>getMinimumSpan</B>(int&nbsp;axis)</PRE><DL>

⌨️ 快捷键说明

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