|
Java プラットフォーム 1.2 |
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
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
の境界の上端との正の距離です。ShapeGraphicAttribute
のアセントpublic float getDescent()
ShapeGraphicAttribute
のディセントを返します。ShapeGraphicAttribute
のディセントは、Shape
の原点と Shape
の境界の下端との距離です。ShapeGraphicAttribute
のディセントpublic float getAdvance()
ShapeGraphicAttribute
の有効幅を返します。ShapeGraphicAttribute
の有効幅は、Shape
の原点と Shape
の境界の右端との距離です。ShapeGraphicAttribute
の有効幅public void draw(Graphics2D graphics, float x, float y)
Shape
は (x, y) を原点として描画されます。graphics
- グラフィックの描画領域となる Graphics2D
x, y
- グラフィックが描画されるユーザ領域の座標public Rectangle2D getBounds()
ShapeGraphicAttribute
によって描画されたすべてのビットを囲む Rectangle2D
を返します。グラフィックは原点、アセント、ディセント、または有効幅を超えて描画されることがありますが、その場合、このメソッドの実装はグラフィックの描画位置を示すようにしてください。ShapeGraphicAttribute
によって描画されたすべてのビットを囲む Rectangle2D
public int hashCode()
ShapeGraphicAttribute
のハッシュコードを返します。ShapeGraphicAttribute
のハッシュコードの値public boolean equals(Object rhs)
ShapeGraphicAttribute
を指定された Object
と比較します。rhs
- 比較対象の Object
ShapeGraphicAttribute
が rhs
と等しい場合は true
、そうでない場合は false
public boolean equals(ShapeGraphicAttribute rhs)
ShapeGraphicAttribute
を指定された ShapeGraphicAttribute
と比較します。rhs
- 比較対象の ShapeGraphicAttribute
ShapeGraphicAttribute
が rhs
と等しい場合は true
、そうでない場合は false
|
Java プラットフォーム 1.2 |
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |