📄 glyphview.glyphpainter.html
字号:
</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 =========== --><!-- ========= 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="GlyphView.GlyphPainter()"><!-- --></A><H3>GlyphView.GlyphPainter</H3><PRE>public <B>GlyphView.GlyphPainter</B>()</PRE><DL></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="getSpan(javax.swing.text.GlyphView, int, int, javax.swing.text.TabExpander, float)"><!-- --></A><H3>getSpan</H3><PRE>public abstract float <B>getSpan</B>(<A HREF="../../../javax/swing/text/GlyphView.html">GlyphView</A> v, int p0, int p1, <A HREF="../../../javax/swing/text/TabExpander.html">TabExpander</A> e, float x)</PRE><DL><DD>Determine the span the glyphs given a start location (for tab expansion).</DL><HR><A NAME="getHeight(javax.swing.text.GlyphView)"><!-- --></A><H3>getHeight</H3><PRE>public abstract float <B>getHeight</B>(<A HREF="../../../javax/swing/text/GlyphView.html">GlyphView</A> v)</PRE><DL></DL><HR><A NAME="getAscent(javax.swing.text.GlyphView)"><!-- --></A><H3>getAscent</H3><PRE>public abstract float <B>getAscent</B>(<A HREF="../../../javax/swing/text/GlyphView.html">GlyphView</A> v)</PRE><DL></DL><HR><A NAME="getDescent(javax.swing.text.GlyphView)"><!-- --></A><H3>getDescent</H3><PRE>public abstract float <B>getDescent</B>(<A HREF="../../../javax/swing/text/GlyphView.html">GlyphView</A> v)</PRE><DL></DL><HR><A NAME="paint(javax.swing.text.GlyphView, java.awt.Graphics, java.awt.Shape, int, int)"><!-- --></A><H3>paint</H3><PRE>public abstract void <B>paint</B>(<A HREF="../../../javax/swing/text/GlyphView.html">GlyphView</A> v, <A HREF="../../../java/awt/Graphics.html">Graphics</A> g, <A HREF="../../../java/awt/Shape.html">Shape</A> a, int p0, int p1)</PRE><DL><DD>Paint the glyphs representing the given range.</DL><HR><A NAME="modelToView(javax.swing.text.GlyphView, int, javax.swing.text.Position.Bias, java.awt.Shape)"><!-- --></A><H3>modelToView</H3><PRE>public abstract <A HREF="../../../java/awt/Shape.html">Shape</A> <B>modelToView</B>(<A HREF="../../../javax/swing/text/GlyphView.html">GlyphView</A> v, int pos, <A HREF="../../../javax/swing/text/Position.Bias.html">Position.Bias</A> bias, <A HREF="../../../java/awt/Shape.html">Shape</A> a) throws <A HREF="../../../javax/swing/text/BadLocationException.html">BadLocationException</A></PRE><DL><DD>Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it. This is shared by the broken views.<DD><DL><DT><B>Parameters:</B><DD><CODE>pos</CODE> - the position to convert<DD><CODE>a</CODE> - the allocated region to render into<DD><CODE>rightToLeft</CODE> - true if the text is rendered right to left.<DT><B>Returns:</B><DD>the bounding box of the given position<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/swing/text/BadLocationException.html">BadLocationException</A></CODE> - if the given position does not represent a valid location in the associated document<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/text/View.html#modelToView(int, java.awt.Shape, javax.swing.text.Position.Bias)"><CODE>View.modelToView(int, java.awt.Shape, javax.swing.text.Position.Bias)</CODE></A></DL></DD></DL><HR><A NAME="viewToModel(javax.swing.text.GlyphView, float, float, java.awt.Shape, javax.swing.text.Position.Bias[])"><!-- --></A><H3>viewToModel</H3><PRE>public abstract int <B>viewToModel</B>(<A HREF="../../../javax/swing/text/GlyphView.html">GlyphView</A> v, 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)</PRE><DL><DD>Provides a mapping from the view coordinate space to the logical coordinate space of the model.<DD><DL><DT><B>Parameters:</B><DD><CODE>x</CODE> - the X coordinate<DD><CODE>y</CODE> - the Y coordinate<DD><CODE>a</CODE> - the allocated region to render into<DD><CODE>rightToLeft</CODE> - true if the text is rendered right to left<DT><B>Returns:</B><DD>the location within the model that best represents the given point of view<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/text/View.html#viewToModel(float, float, java.awt.Shape, javax.swing.text.Position.Bias[])"><CODE>View.viewToModel(float, float, java.awt.Shape, javax.swing.text.Position.Bias[])</CODE></A></DL></DD></DL><HR><A NAME="getBoundedPosition(javax.swing.text.GlyphView, int, float, float)"><!-- --></A><H3>getBoundedPosition</H3><PRE>public abstract int <B>getBoundedPosition</B>(<A HREF="../../../javax/swing/text/GlyphView.html">GlyphView</A> v, int p0, float x, float len)</PRE><DL><DD>Determines the model location that represents the maximum advance that fits within the given span. This could be used to break the given view. The result should be a location just shy of the given advance. This differs from viewToModel which returns the closest position which might be proud of the maximum advance.<DD><DL><DT><B>Parameters:</B><DD><CODE>v</CODE> - the view to find the model location to break at.<DD><CODE>p0</CODE> - the location in the model where the fragment should start it's representation >= 0.<DD><CODE>pos</CODE> - the graphic location along the axis that the broken view would occupy >= 0. This may be useful for things like tab calculations.<DD><CODE>len</CODE> - specifies the distance into the view where a potential break is desired >= 0.<DT><B>Returns:</B><DD>the maximum model location possible for a break.<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/text/View.html#breakView(int, int, float, float)"><CODE>View.breakView(int, int, float, float)</CODE></A></DL></DD></DL><HR><A NAME="getPainter(javax.swing.text.GlyphView, int, int)"><!-- --></A><H3>getPainter</H3><PRE>public <A HREF="../../../javax/swing/text/GlyphView.GlyphPainter.html">GlyphView.GlyphPainter</A> <B>getPainter</B>(<A HREF="../../../javax/swing/text/GlyphView.html">GlyphView</A> v, int p0, int p1)</PRE><DL><DD>Create a painter to use for the given GlyphView. If the painter carries state it can create another painter to represent a new GlyphView that is being created. If the painter doesn't hold any significant state, it can return itself. The default behavior is to return itself.</DL><HR><A NAME="getNextVisualPositionFrom(javax.swing.text.GlyphView, int, javax.swing.text.Position.Bias, java.awt.Shape, int, javax.swing.text.Position.Bias[])"><!-- --></A><H3>getNextVisualPositionFrom</H3><PRE>public int <B>getNextVisualPositionFrom</B>(<A HREF="../../../javax/swing/text/GlyphView.html">GlyphView</A> v, 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) throws <A HREF="../../../javax/swing/text/BadLocationException.html">BadLocationException</A></PRE><DL><DD>Provides a way to determine the next visually represented model location that one might place a caret. Some views may not be visible, they might not be in the same order found in the model, or they just might not allow access to some of the locations in the model.<DD><DL><DT><B>Parameters:</B><DD><CODE>v</CODE> - the view to use<DD><CODE>pos</CODE> - the position to convert >= 0<DD><CODE>a</CODE> - the allocated region to render into<DD><CODE>direction</CODE> - the direction from the current position that can be thought of as the arrow keys typically found on a keyboard. This may be SwingConstants.WEST, SwingConstants.EAST, SwingConstants.NORTH, or SwingConstants.SOUTH.<DT><B>Returns:</B><DD>the location within the model that best represents the next location visual position.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/swing/text/BadLocationException.html">BadLocationException</A></CODE> - <DD><CODE><A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - for an invalid direction</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/GlyphView.GlyphPainter.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup> 2 Platform<br>Std. Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../javax/swing/text/GlyphView.html"><B>PREV CLASS</B></A> <A HREF="../../../javax/swing/text/IconView.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="GlyphView.GlyphPainter.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><font size="-1"><a href="http://java.sun.com/cgi-bin/bugreport.cgi">Submit a bug or feature</a><br>For further API reference and developer documentation, see <a href="http://java.sun.com/products/jdk/1.3/devdocs-vs-specs.html">Java 2 SDK SE Developer Documentation</a>. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. <p>Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.<br>Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road<br>Palo Alto, California, 94303, U.S.A. All Rights Reserved.</font></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -