📄 view.html
字号:
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/View.html#ExcellentBreakWeight">ExcellentBreakWeight</A></B></CODE><BR> The weight to indicate a view supports breaking, and this represents a very attractive place to break.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/View.html#ForcedBreakWeight">ForcedBreakWeight</A></B></CODE><BR> The weight to indicate a view supports breaking, and must be broken to be represented properly when placed in a view that formats it's children by breaking them.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/View.html#GoodBreakWeight">GoodBreakWeight</A></B></CODE><BR> The weight to indicate a view supports breaking, but better opportunities probably exist.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/View.html#X_AXIS">X_AXIS</A></B></CODE><BR> Axis for format/break operations.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/View.html#Y_AXIS">Y_AXIS</A></B></CODE><BR> Axis for format/break operations.</TD></TR></TABLE> <A NAME="fields_inherited_from_class_javax.swing.SwingConstants"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields inherited from interface javax.swing.<A HREF="../../../javax/swing/SwingConstants.html">SwingConstants</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../javax/swing/SwingConstants.html#BOTTOM">BOTTOM</A>, <A HREF="../../../javax/swing/SwingConstants.html#CENTER">CENTER</A>, <A HREF="../../../javax/swing/SwingConstants.html#EAST">EAST</A>, <A HREF="../../../javax/swing/SwingConstants.html#HORIZONTAL">HORIZONTAL</A>, <A HREF="../../../javax/swing/SwingConstants.html#LEADING">LEADING</A>, <A HREF="../../../javax/swing/SwingConstants.html#LEFT">LEFT</A>, <A HREF="../../../javax/swing/SwingConstants.html#NORTH">NORTH</A>, <A HREF="../../../javax/swing/SwingConstants.html#NORTH_EAST">NORTH_EAST</A>, <A HREF="../../../javax/swing/SwingConstants.html#NORTH_WEST">NORTH_WEST</A>, <A HREF="../../../javax/swing/SwingConstants.html#RIGHT">RIGHT</A>, <A HREF="../../../javax/swing/SwingConstants.html#SOUTH">SOUTH</A>, <A HREF="../../../javax/swing/SwingConstants.html#SOUTH_EAST">SOUTH_EAST</A>, <A HREF="../../../javax/swing/SwingConstants.html#SOUTH_WEST">SOUTH_WEST</A>, <A HREF="../../../javax/swing/SwingConstants.html#TOP">TOP</A>, <A HREF="../../../javax/swing/SwingConstants.html#TRAILING">TRAILING</A>, <A HREF="../../../javax/swing/SwingConstants.html#VERTICAL">VERTICAL</A>, <A HREF="../../../javax/swing/SwingConstants.html#WEST">WEST</A></CODE></TD></TR></TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../javax/swing/text/View.html#View(javax.swing.text.Element)">View</A></B>(<A HREF="../../../javax/swing/text/Element.html">Element</A> elem)</CODE><BR> Creates a new View object.</TD></TR></TABLE> <!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></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#append(javax.swing.text.View)">append</A></B>(<A HREF="../../../javax/swing/text/View.html">View</A> v)</CODE><BR> Appends a single child view.</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#breakView(int, int, float, float)">breakView</A></B>(int axis, int offset, float pos, float len)</CODE><BR> Tries to break this view on the given axis.</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#changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)">changedUpdate</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 from the document that attributes were changed 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> <A HREF="../../../javax/swing/text/View.html">View</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/View.html#createFragment(int, int)">createFragment</A></B>(int p0, int p1)</CODE><BR> Create a view that represents a portion of the element.</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#forwardUpdate(javax.swing.event.DocumentEvent.ElementChange, javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)">forwardUpdate</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, <A HREF="../../../javax/swing/text/ViewFactory.html">ViewFactory</A> f)</CODE><BR> Forward the given DocumentEvent to the child views that need to be notified of the change to the model.</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#forwardUpdateToView(javax.swing.text.View, javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)">forwardUpdateToView</A></B>(<A HREF="../../../javax/swing/text/View.html">View</A> v, <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> Forward the DocumentEvent to the give child view.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> float</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/View.html#getAlignment(int)">getAlignment</A></B>(int axis)</CODE><BR> Determines the desired alignment for this view along an axis.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../javax/swing/text/AttributeSet.html">AttributeSet</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/View.html#getAttributes()">getAttributes</A></B>()</CODE><BR> Fetches the attributes to use when rendering.</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#getBreakWeight(int, float, float)">getBreakWeight</A></B>(int axis, float pos, float len)</CODE><BR> Determines how attractive a break opportunity in this view is.</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#getChildAllocation(int, java.awt.Shape)">getChildAllocation</A></B>(int index, <A HREF="../../../java/awt/Shape.html">Shape</A> a)</CODE><BR> Fetches the allocation for the given child view.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/awt/Container.html">Container</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/View.html#getContainer()">getContainer</A></B>()</CODE><BR> Fetches the container hosting the view.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../javax/swing/text/Document.html">Document</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/View.html#getDocument()">getDocument</A></B>()</CODE><BR> Fetches the model associated with the view.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../javax/swing/text/Element.html">Element</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/View.html#getElement()">getElement</A></B>()</CODE><BR> Fetches the structural portion of the subject that this view is mapped to.</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#getEndOffset()">getEndOffset</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="../../../java/awt/Graphics.html">Graphics</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/View.html#getGraphics()">getGraphics</A></B>()</CODE><BR> Fetch a Graphics for rendering.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> float</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/View.html#getMaximumSpan(int)">getMaximumSpan</A></B>(int axis)</CODE><BR> Determines the maximum 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> float</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/View.html#getMinimumSpan(int)">getMinimumSpan</A></B>(int axis)</CODE><BR> Determines the minimum 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> int</CODE></FONT></TD><TD><CODE><B><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></B>(int pos, <A HREF="../../../javax/swing/text/Position.Bias.html">Position.Bias</A> b, <A HREF="../../../java/awt/Shape.html">Shape</A> a, int direction, <A HREF="../../../javax/swing/text/Position.Bias.html">Position.Bias</A>[] biasRet)</CODE><BR> Provides a way to determine the next visually represented model location that one might place a caret.</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#getParent()">getParent</A></B>()</CODE><BR> Returns the parent of the view.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract float</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/View.html#getPreferredSpan(int)">getPreferredSpan</A></B>(int axis)</CODE><BR> Determines the preferred span for this view along an axis.</TD>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -