shapegraphicattribute.html
来自「API資料大全」· HTML 代码 · 共 485 行 · 第 1/2 页
HTML
485 行
<B>Field Detail</B></FONT></TD></TR></TABLE><A NAME="STROKE"><!-- --></A><H3>STROKE</H3><PRE>public static final boolean <B>STROKE</B></PRE><DL><DD>A key indicating the shape should be stroked with a 1-pixel wide stroke.</DL><HR><A NAME="FILL"><!-- --></A><H3>FILL</H3><PRE>public static final boolean <B>FILL</B></PRE><DL><DD>A key indicating the shape should be filled.</DL><!-- ========= 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="ShapeGraphicAttribute(java.awt.Shape, int, boolean)"><!-- --></A><H3>ShapeGraphicAttribute</H3><PRE>public <B>ShapeGraphicAttribute</B>(<A HREF="../../../java/awt/Shape.html">Shape</A> shape, int alignment, boolean stroke)</PRE><DL><DD>Constructs a <code>ShapeGraphicAttribute</code> for the specified <A HREF="../../../java/awt/Shape.html"><CODE>Shape</CODE></A>.<DD><DL><DT><B>Parameters:</B><DD><CODE>shape</CODE> - the <code>Shape</code> to render. The <code>Shape</code> is rendered with its origin at the origin of this <code>ShapeGraphicAttribute</code> in the host <code>TextLayout</code>. This object maintains a reference to <code>shape</code>.<DD><CODE>alignment</CODE> - one of the alignments from this <code>ShapeGraphicAttribute</code>.<DD><CODE>stroke</CODE> - <code>true</code> if the <code>Shape</code> should be stroked; <code>false</code> if the <code>Shape</code> should be filled.</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="getAscent()"><!-- --></A><H3>getAscent</H3><PRE>public float <B>getAscent</B>()</PRE><DL><DD>Returns the ascent of this <code>ShapeGraphicAttribute</code>. The ascent of a <code>ShapeGraphicAttribute</code> is the positive distance from the origin of its <code>Shape</code> to the top of bounds of its <code>Shape</code>.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../java/awt/font/GraphicAttribute.html#getAscent()">getAscent</A></CODE> in class <CODE><A HREF="../../../java/awt/font/GraphicAttribute.html">GraphicAttribute</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the ascent of this <code>ShapeGraphicAttribute</code>.</DL></DD></DL><HR><A NAME="getDescent()"><!-- --></A><H3>getDescent</H3><PRE>public float <B>getDescent</B>()</PRE><DL><DD>Returns the descent of this <code>ShapeGraphicAttribute</code>. The descent of a <code>ShapeGraphicAttribute</code> is the distance from the origin of its <code>Shape</code> to the bottom of the bounds of its <code>Shape</code>.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../java/awt/font/GraphicAttribute.html#getDescent()">getDescent</A></CODE> in class <CODE><A HREF="../../../java/awt/font/GraphicAttribute.html">GraphicAttribute</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the descent of this <code>ShapeGraphicAttribute</code>.</DL></DD></DL><HR><A NAME="getAdvance()"><!-- --></A><H3>getAdvance</H3><PRE>public float <B>getAdvance</B>()</PRE><DL><DD>Returns the advance of this <code>ShapeGraphicAttribute</code>. The advance of a <code>ShapeGraphicAttribute</code> is the distance from the origin of its <code>Shape</code> to the right side of the bounds of its <code>Shape</code>.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../java/awt/font/GraphicAttribute.html#getAdvance()">getAdvance</A></CODE> in class <CODE><A HREF="../../../java/awt/font/GraphicAttribute.html">GraphicAttribute</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the advance of this <code>ShapeGraphicAttribute</code>.</DL></DD></DL><HR><A NAME="draw(java.awt.Graphics2D, float, float)"><!-- --></A><H3>draw</H3><PRE>public void <B>draw</B>(<A HREF="../../../java/awt/Graphics2D.html">Graphics2D</A> graphics, float x, float y)</PRE><DL><DD>Draws the graphic at the given location. The <code>Shape</code> is drawn with its origin at (x, y).<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../java/awt/font/GraphicAttribute.html#draw(java.awt.Graphics2D, float, float)">draw</A></CODE> in class <CODE><A HREF="../../../java/awt/font/GraphicAttribute.html">GraphicAttribute</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>graphics</CODE> - the <A HREF="../../../java/awt/Graphics2D.html"><CODE>Graphics2D</CODE></A> into which to draw the graphic<DD><CODE>x, y</CODE> - the user space coordinates where the graphic is drawn</DL></DD></DL><HR><A NAME="getBounds()"><!-- --></A><H3>getBounds</H3><PRE>public <A HREF="../../../java/awt/geom/Rectangle2D.html">Rectangle2D</A> <B>getBounds</B>()</PRE><DL><DD>Returns a <A HREF="../../../java/awt/geom/Rectangle2D.html"><CODE>Rectangle2D</CODE></A> that encloses all of the bits drawn by this <code>ShapeGraphicAttribute</code> relative to the rendering position. A graphic can be rendered beyond its origin, ascent, descent, or advance; but if it does, this method's implementation should indicate where the graphic is rendered.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../java/awt/font/GraphicAttribute.html#getBounds()">getBounds</A></CODE> in class <CODE><A HREF="../../../java/awt/font/GraphicAttribute.html">GraphicAttribute</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>a <code>Rectangle2D</code> that encloses all of the bits rendered by this <code>ShapeGraphicAttribute</code>.</DL></DD></DL><HR><A NAME="hashCode()"><!-- --></A><H3>hashCode</H3><PRE>public int <B>hashCode</B>()</PRE><DL><DD>Returns a hashcode for this <code>ShapeGraphicAttribute</code>.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../java/lang/Object.html#hashCode()">hashCode</A></CODE> in class <CODE><A HREF="../../../java/lang/Object.html">Object</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>a hash code value for this <code>ShapeGraphicAttribute</code>.</DL></DD></DL><HR><A NAME="equals(java.lang.Object)"><!-- --></A><H3>equals</H3><PRE>public boolean <B>equals</B>(<A HREF="../../../java/lang/Object.html">Object</A> rhs)</PRE><DL><DD>Compares this <code>ShapeGraphicAttribute</code> to the specified <code>Object</code>.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../java/lang/Object.html#equals(java.lang.Object)">equals</A></CODE> in class <CODE><A HREF="../../../java/lang/Object.html">Object</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>rhs</CODE> - the <code>Object</code> to compare for equality<DT><B>Returns:</B><DD><code>true</code> if this <code>ShapeGraphicAttribute</code> equals <code>rhs</code>; <code>false</code> otherwise.</DL></DD></DL><HR><A NAME="equals(java.awt.font.ShapeGraphicAttribute)"><!-- --></A><H3>equals</H3><PRE>public boolean <B>equals</B>(<A HREF="../../../java/awt/font/ShapeGraphicAttribute.html">ShapeGraphicAttribute</A> rhs)</PRE><DL><DD>Compares this <code>ShapeGraphicAttribute</code> to the specified <code>ShapeGraphicAttribute</code>.<DD><DL><DT><B>Parameters:</B><DD><CODE>rhs</CODE> - the <code>ShapeGraphicAttribute</code> to compare for equality<DT><B>Returns:</B><DD><code>true</code> if this <code>ShapeGraphicAttribute</code> equals <code>rhs</code>; <code>false</code> otherwise.</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/ShapeGraphicAttribute.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="../../../java/awt/font/LineMetrics.html"><B>PREV CLASS</B></A> <A HREF="../../../java/awt/font/TextAttribute.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="ShapeGraphicAttribute.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | <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 + =
减小字号Ctrl + -
显示快捷键?