|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Objectjava.awt.font.GraphicAttribute
java.awt.font.ShapeGraphicAttribute
public final class 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)
GraphicAttribute を、指定された位置に描画します。 |
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 のディセントを返します。 |
Shape |
getOutline(AffineTransform tx)
この ShapeGraphicAttribute によって描画される領域を表す Shape を返します。 |
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 は、ホスト TextLayout のこの ShapeGraphicAttribute の原点を原点にして描画される。このオブジェクトは shape への参照を保持するalignment - この ShapeGraphicAttribute の配置方法の 1 つ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)
GraphicAttribute を、指定された位置に描画します。
GraphicAttribute 内の drawgraphics - グラフィックの描画先の Graphics2Dx - グラフィックが描画されるユーザー空間 X 座標y - グラフィックが描画されるユーザー空間 Y 座標public Rectangle2D getBounds()
ShapeGraphicAttribute によって描画される全ビットを囲む Rectangle2D を返します。 これは、描画位置を基準にして示されます。グラフィックは、原点、アセント、ディセント、有効幅を超えて描画できますが、その場合はグラフィックを描画する位置をこのメソッドの実装で示す必要があります。
GraphicAttribute 内の getBoundsShapeGraphicAttribute によって描画される全ビットを囲む Rectangle2Dpublic Shape getOutline(AffineTransform tx)
ShapeGraphicAttribute によって描画される領域を表す Shape を返します。このメソッドは、TextLayout がテキストの輪郭を返すように要求されたときに使用されます。(変換されていない) 形状は、getBounds によって返される矩形境界の内側に収まっている必要があります。
GraphicAttribute 内の getOutlinetx - この ShapeGraphicAttribute に適用する任意指定の AffineTransform。null を指定できる。
Shapepublic 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 Platform Standard Ed. 6 |
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
Copyright 2009 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Documentation Redistribution Policy も参照してください。