|
JavaTM 2 Platform Std. Ed. v1.3 |
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Object | +--java.awt.font.GraphicAttribute | +--java.awt.font.ImageGraphicAttribute
ImageGraphicAttribute
クラスは、TextLayout
の中にイメージを描画する GraphicAttribute
の実装です。
GraphicAttribute
クラス java.awt.font.GraphicAttribute から継承したフィールド |
BOTTOM_ALIGNMENT, CENTER_BASELINE, HANGING_BASELINE, ROMAN_BASELINE, TOP_ALIGNMENT |
コンストラクタの概要 | |
ImageGraphicAttribute(Image image,
int alignment)
指定された Image から ImageGraphicAttribute を構築します。 |
|
ImageGraphicAttribute(Image image,
int alignment,
float originX,
float originY)
指定された Image から ImageGraphicAttribute を構築します。 |
メソッドの概要 | |
void |
draw(Graphics2D graphics,
float x,
float y)
指定された位置にグラフィックを描画します。 |
boolean |
equals(ImageGraphicAttribute rhs)
この ImageGraphicAttribute を、指定された ImageGraphicAttribute と比較します。 |
boolean |
equals(Object rhs)
この ImageGraphicAttribute を、指定された Object と比較します。 |
float |
getAdvance()
この ImageGraphicAttribute の有効幅を返します。 |
float |
getAscent()
この ImageGraphicAttribute のアセントを返します。 |
Rectangle2D |
getBounds()
描画位置を基準に、この ImageGraphicAttribute によって描画されるすべてのビットを囲む Rectangle2D を返します。 |
float |
getDescent()
この ImageGraphicAttribute のディセントを返します。 |
int |
hashCode()
この ImageGraphicAttribute 用のハッシュコードを返します。 |
クラス java.awt.font.GraphicAttribute から継承したメソッド |
getAlignment, getJustificationInfo |
クラス java.lang.Object から継承したメソッド |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
コンストラクタの詳細 |
public ImageGraphicAttribute(Image image, int alignment)
Image
から ImageGraphicAttribute
を構築します。原点の位置は (0, 0) です。image
- この ImageGraphicAttribute
で描画される Image
。このオブジェクトは、image
への参照を格納するalignment
- ImageGraphicAttribute
に指定された配置方法のうちの 1 つpublic ImageGraphicAttribute(Image image, int alignment, float originX, float originY)
Image
から ImageGraphicAttribute
を構築します。テキスト内の ImageGraphicAttribute
の原点には、Image
内の点 (originX
, originY
) が表示されます。image
- この ImageGraphicAttribute
で描画される Image
。このオブジェクトは、image
への参照を格納するalignment
- ImageGraphicAttribute
に指定された配置方法のうちの 1 つoriginX, originY
- テキスト行にある ImageGraphicAttribute
の原点に表示される Image
内の点の座標メソッドの詳細 |
public float getAscent()
ImageGraphicAttribute
のアセントを返します。ImageGraphicAttribute
のアセントは、イメージの上端から原点までの距離です。GraphicAttribute
内の getAscent
ImageGraphicAttribute
のアセントpublic float getDescent()
ImageGraphicAttribute
のディセントを返します。ImageGraphicAttribute
のディセントは、原点からイメージの下端までの距離です。GraphicAttribute
内の getDescent
ImageGraphicAttribute
のディセントpublic float getAdvance()
ImageGraphicAttribute
の有効幅を返します。ImageGraphicAttribute
の有効幅は、原点からイメージの右端までの距離です。GraphicAttribute
内の getAdvance
ImageGraphicAttribute
の有効幅public Rectangle2D getBounds()
ImageGraphicAttribute
によって描画されるすべてのビットを囲む Rectangle2D
を返します。グラフィックは、その原点、アセント、ディセント、または有効幅を超えて描画できます。しかしその場合は、このメソッドの実装でグラフィックの描画位置を示さなければなりません。GraphicAttribute
内の getBounds
ImageGraphicAttribute
によって描画されるすべてのビットを囲む Rectangle2D
public void draw(Graphics2D graphics, float x, float y)
GraphicAttribute
内の draw
graphics
- 内部にグラフィックを描画する Graphics2D
x
- グラフィックが描画されるユーザ領域の座標public int hashCode()
ImageGraphicAttribute
用のハッシュコードを返します。Object
内の hashCode
public boolean equals(Object rhs)
ImageGraphicAttribute
を、指定された Object
と比較します。Object
内の equals
rhs
- 比較対象の Object
ImageGraphicAttribute
が rhs
と等しい場合は true
、そうでない場合は false
public boolean equals(ImageGraphicAttribute rhs)
ImageGraphicAttribute
を、指定された ImageGraphicAttribute
と比較します。rhs
- 比較対象の ImageGraphicAttribute
ImageGraphicAttribute
が rhs
と等しい場合は true
、そうでない場合は false
|
JavaTM 2 Platform Std. Ed. v1.3 |
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
Java、Java 2D、JDBC は、米国およびその他の国における米国 Sun Microsystems, Inc. の商標もしくは登録商標です。
Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.