|
JavaTM 2 Platform Std. Ed. v1.4.0 |
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||||||
java.lang.Object
|
+--java.awt.font.GraphicAttribute
|
+--java.awt.font.ShapeGraphicAttribute
ShapeGraphicAttribute クラスは、TextLayout に形状を描画する GraphicAttribute の実装です。
GraphicAttribute| フィールドの概要 | |
static boolean |
FILL
形状が塗りつぶされることを示すキーです。 |
static boolean |
STROKE
形状が 1 ピクセル幅のストロークで描画されることを示すキーです。 |
| クラス java.awt.font.GraphicAttribute から継承したフィールド |
BOTTOM_ALIGNMENT, CENTER_BASELINE, HANGING_BASELINE, ROMAN_BASELINE, TOP_ALIGNMENT |
| コンストラクタの概要 | |
ShapeGraphicAttribute(Shape shape,
int alignment,
boolean stroke)
指定された Shape の ShapeGraphicAttribute を構築します。 |
|
| メソッドの概要 | |
void |
draw(Graphics2D graphics,
float x,
float y)
指定された位置にグラフィックを描画します。 |
boolean |
equals(Object rhs)
この ShapeGraphicAttribute を指定された Object と比較します。 |
boolean |
equals(ShapeGraphicAttribute rhs)
この ShapeGraphicAttribute を指定された ShapeGraphicAttribute と比較します。 |
float |
getAdvance()
この ShapeGraphicAttribute の有効幅を返します。 |
float |
getAscent()
この ShapeGraphicAttribute のアセントを返します。 |
Rectangle2D |
getBounds()
描画位置を基点として、この ShapeGraphicAttribute によって描画されたすべてのビットを囲む Rectangle2D を返します。 |
float |
getDescent()
この ShapeGraphicAttribute のディセントを返します。 |
int |
hashCode()
この ShapeGraphicAttribute のハッシュコードを返します。 |
| クラス java.awt.font.GraphicAttribute から継承したメソッド |
getAlignment, getJustificationInfo |
| クラス java.lang.Object から継承したメソッド |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| フィールドの詳細 |
public static final boolean STROKE
public static final boolean FILL
| コンストラクタの詳細 |
public ShapeGraphicAttribute(Shape shape,
int alignment,
boolean stroke)
Shape の ShapeGraphicAttribute を構築します。
shape - 描画対象の Shape。Shape は、この ShapeGraphicAttribute の原点を基点としてホスト TextLayout に描画される。オブジェクトは shape への参照を格納するalignment - ShapeGraphicAttribute からの配置方法のひとつstroke - Shape のストロークを描画する場合は true、Shape を塗りつぶす場合は false| メソッドの詳細 |
public float getAscent()
ShapeGraphicAttribute のアセントを返します。ShapeGraphicAttribute のアセントは、Shape の原点と Shape の境界の上端との正の距離です。
GraphicAttribute 内の getAscentShapeGraphicAttribute のアセントGraphicAttribute.getBounds()public float getDescent()
ShapeGraphicAttribute のディセントを返します。ShapeGraphicAttribute のディセントは、Shape の原点と Shape の境界の下端との距離です。
GraphicAttribute 内の getDescentShapeGraphicAttribute のディセントGraphicAttribute.getBounds()public float getAdvance()
ShapeGraphicAttribute の有効幅を返します。ShapeGraphicAttribute の有効幅は、Shape の原点と Shape の境界の右端との距離です。
GraphicAttribute 内の getAdvanceShapeGraphicAttribute の有効幅GraphicAttribute.getBounds()
public void draw(Graphics2D graphics,
float x,
float y)
Shape は (x, y) を原点として描画されます。
GraphicAttribute 内の drawgraphics - グラフィックの描画領域となる Graphics2Dpublic Rectangle2D getBounds()
ShapeGraphicAttribute によって描画されたすべてのビットを囲む Rectangle2D を返します。グラフィックは原点、アセント、ディセント、または有効幅を超えて描画されることがありますが、その場合、このメソッドの実装はグラフィックの描画位置を示すようにしてください。
GraphicAttribute 内の getBoundsShapeGraphicAttribute によって描画されたすべてのビットを囲む Rectangle2Dpublic int hashCode()
ShapeGraphicAttribute のハッシュコードを返します。
Object 内の hashCodeShapeGraphicAttribute のハッシュコードの値Object.equals(java.lang.Object),
Hashtablepublic boolean equals(Object rhs)
ShapeGraphicAttribute を指定された Object と比較します。
Object 内の equalsrhs - 比較対象の Object
ShapeGraphicAttribute が rhs と等しい場合は true、そうでない場合は falseObject.hashCode(),
Hashtablepublic boolean equals(ShapeGraphicAttribute rhs)
ShapeGraphicAttribute を指定された ShapeGraphicAttribute と比較します。
rhs - 比較対象の ShapeGraphicAttribute
ShapeGraphicAttribute が rhs と等しい場合は true、そうでない場合は false
|
JavaTM 2 Platform Std. Ed. v1.4.0 |
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||||||
Java、Java 2D、および JDBC は米国ならびにその他の国における米国 Sun Microsystems, Inc. の商標もしくは登録商標です。
Copyright 1993-2002 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A. All Rights Reserved.