📄 view.html
字号:
</TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/View.html#getResizeWeight(int)">getResizeWeight</A></B>(int axis)</CODE><BR> Determines the resizability of the view along the given axis.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/View.html#getStartOffset()">getStartOffset</A></B>()</CODE><BR> Fetches the portion of the model that this view is responsible for.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../javax/swing/text/View.html">View</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/View.html#getView(int)">getView</A></B>(int n)</CODE><BR> Gets the nth child view.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/View.html#getViewCount()">getViewCount</A></B>()</CODE><BR> Returns the number of views in this view.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../javax/swing/text/ViewFactory.html">ViewFactory</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/View.html#getViewFactory()">getViewFactory</A></B>()</CODE><BR> Fetches the ViewFactory implementation that is feeding the view hierarchy.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/View.html#getViewIndex(int, javax.swing.text.Position.Bias)">getViewIndex</A></B>(int pos, <A HREF="../../../javax/swing/text/Position.Bias.html">Position.Bias</A> b)</CODE><BR> Returns the child view index representing the given position in the model.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/View.html#insert(int, javax.swing.text.View)">insert</A></B>(int offs, <A HREF="../../../javax/swing/text/View.html">View</A> v)</CODE><BR> Inserts a single child view.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/View.html#insertUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)">insertUpdate</A></B>(<A HREF="../../../javax/swing/event/DocumentEvent.html">DocumentEvent</A> e, <A HREF="../../../java/awt/Shape.html">Shape</A> a, <A HREF="../../../javax/swing/text/ViewFactory.html">ViewFactory</A> f)</CODE><BR> Gives notification that something was inserted into the document in a location that this view is responsible for.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/View.html#isVisible()">isVisible</A></B>()</CODE><BR> Returns a boolean that indicates whether the view is visible or not.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/awt/Shape.html">Shape</A></CODE></FONT></TD><TD><CODE><B><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></B>(int p0, <A HREF="../../../javax/swing/text/Position.Bias.html">Position.Bias</A> b0, int p1, <A HREF="../../../javax/swing/text/Position.Bias.html">Position.Bias</A> b1, <A HREF="../../../java/awt/Shape.html">Shape</A> a)</CODE><BR> Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/awt/Shape.html">Shape</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/View.html#modelToView(int, java.awt.Shape)">modelToView</A></B>(int pos, <A HREF="../../../java/awt/Shape.html">Shape</A> a)</CODE><BR> <B>Deprecated.</B> <I></I> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract <A HREF="../../../java/awt/Shape.html">Shape</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/View.html#modelToView(int, java.awt.Shape, javax.swing.text.Position.Bias)">modelToView</A></B>(int pos, <A HREF="../../../java/awt/Shape.html">Shape</A> a, <A HREF="../../../javax/swing/text/Position.Bias.html">Position.Bias</A> b)</CODE><BR> Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/View.html#paint(java.awt.Graphics, java.awt.Shape)">paint</A></B>(<A HREF="../../../java/awt/Graphics.html">Graphics</A> g, <A HREF="../../../java/awt/Shape.html">Shape</A> allocation)</CODE><BR> Renders using the given rendering surface and area on that surface.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/View.html#preferenceChanged(javax.swing.text.View, boolean, boolean)">preferenceChanged</A></B>(<A HREF="../../../javax/swing/text/View.html">View</A> child, boolean width, boolean height)</CODE><BR> Child views can call this on the parent to indicate that the preference has changed and should be reconsidered for layout.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/View.html#remove(int)">remove</A></B>(int i)</CODE><BR> Removes one of the children at the given position.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/View.html#removeAll()">removeAll</A></B>()</CODE><BR> Removes all of the children.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/View.html#removeUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)">removeUpdate</A></B>(<A HREF="../../../javax/swing/event/DocumentEvent.html">DocumentEvent</A> e, <A HREF="../../../java/awt/Shape.html">Shape</A> a, <A HREF="../../../javax/swing/text/ViewFactory.html">ViewFactory</A> f)</CODE><BR> Gives notification that something was removed from the document in a location that this view is responsible for.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/View.html#replace(int, int, javax.swing.text.View[])">replace</A></B>(int offset, int length, <A HREF="../../../javax/swing/text/View.html">View</A>[] views)</CODE><BR> Replace child views.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/View.html#setParent(javax.swing.text.View)">setParent</A></B>(<A HREF="../../../javax/swing/text/View.html">View</A> parent)</CODE><BR> Establishes the parent view for this view.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/View.html#setSize(float, float)">setSize</A></B>(float width, float height)</CODE><BR> Sets the size of the view.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/View.html#updateChildren(javax.swing.event.DocumentEvent.ElementChange, javax.swing.event.DocumentEvent, javax.swing.text.ViewFactory)">updateChildren</A></B>(<A HREF="../../../javax/swing/event/DocumentEvent.ElementChange.html">DocumentEvent.ElementChange</A> ec, <A HREF="../../../javax/swing/event/DocumentEvent.html">DocumentEvent</A> e, <A HREF="../../../javax/swing/text/ViewFactory.html">ViewFactory</A> f)</CODE><BR> Updates the child views in response to receiving notification that the model changed, and there is change record for the element this view is responsible for.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/View.html#updateLayout(javax.swing.event.DocumentEvent.ElementChange, javax.swing.event.DocumentEvent, java.awt.Shape)">updateLayout</A></B>(<A HREF="../../../javax/swing/event/DocumentEvent.ElementChange.html">DocumentEvent.ElementChange</A> ec, <A HREF="../../../javax/swing/event/DocumentEvent.html">DocumentEvent</A> e, <A HREF="../../../java/awt/Shape.html">Shape</A> a)</CODE><BR> Update the layout in response to receiving notification of change from the model.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/View.html#viewToModel(float, float, java.awt.Shape)">viewToModel</A></B>(float x, float y, <A HREF="../../../java/awt/Shape.html">Shape</A> a)</CODE><BR> <B>Deprecated.</B> <I></I> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/View.html#viewToModel(float, float, java.awt.Shape, javax.swing.text.Position.Bias[])">viewToModel</A></B>(float x, float y, <A HREF="../../../java/awt/Shape.html">Shape</A> a, <A HREF="../../../javax/swing/text/Position.Bias.html">Position.Bias</A>[] biasReturn)</CODE><BR> Provides a mapping from the view coordinate space to the logical coordinate space of the model.</TD></TR></TABLE> <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> <P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD></TR></TABLE><A NAME="BadBreakWeight"><!-- --></A><H3>BadBreakWeight</H3><PRE>public static final int <B>BadBreakWeight</B></PRE><DL><DD>The weight to indicate a view is a bad break opportunity for the purpose of formatting. This value indicates that no attempt should be made to
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -