JavaTM 2 Platform
Std. Ed. v1.3

java.awt.font
クラス ImageGraphicAttribute

java.lang.Object
  |
  +--java.awt.font.GraphicAttribute
        |
        +--java.awt.font.ImageGraphicAttribute

public final class ImageGraphicAttribute
extends GraphicAttribute

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
 

コンストラクタの詳細

ImageGraphicAttribute

public ImageGraphicAttribute(Image image,
                             int alignment)
指定された Image から ImageGraphicAttribute を構築します。原点の位置は (0, 0) です。
パラメータ:
image - この ImageGraphicAttribute で描画される Image。このオブジェクトは、image への参照を格納する
alignment - ImageGraphicAttribute に指定された配置方法のうちの 1 つ

ImageGraphicAttribute

public ImageGraphicAttribute(Image image,
                             int alignment,
                             float originX,
                             float originY)
指定された Image から ImageGraphicAttribute を構築します。テキスト内の ImageGraphicAttribute の原点には、Image 内の点 (originXoriginY) が表示されます。
パラメータ:
image - この ImageGraphicAttribute で描画される Image。このオブジェクトは、image への参照を格納する
alignment - ImageGraphicAttribute に指定された配置方法のうちの 1 つ
originX, originY - テキスト行にある ImageGraphicAttribute の原点に表示される Image 内の点の座標
メソッドの詳細

getAscent

public float getAscent()
この ImageGraphicAttribute のアセントを返します。ImageGraphicAttribute のアセントは、イメージの上端から原点までの距離です。
オーバーライド:
クラス GraphicAttribute 内の getAscent
戻り値:
ImageGraphicAttribute のアセント

getDescent

public float getDescent()
この ImageGraphicAttribute のディセントを返します。ImageGraphicAttribute のディセントは、原点からイメージの下端までの距離です。
オーバーライド:
クラス GraphicAttribute 内の getDescent
戻り値:
ImageGraphicAttribute のディセント

getAdvance

public float getAdvance()
この ImageGraphicAttribute の有効幅を返します。ImageGraphicAttribute の有効幅は、原点からイメージの右端までの距離です。
オーバーライド:
クラス GraphicAttribute 内の getAdvance
戻り値:
ImageGraphicAttribute の有効幅

getBounds

public Rectangle2D getBounds()
描画位置を基準に、この ImageGraphicAttribute によって描画されるすべてのビットを囲む Rectangle2D を返します。グラフィックは、その原点、アセント、ディセント、または有効幅を超えて描画できます。しかしその場合は、このメソッドの実装でグラフィックの描画位置を示さなければなりません。
オーバーライド:
クラス GraphicAttribute 内の getBounds
戻り値:
ImageGraphicAttribute によって描画されるすべてのビットを囲む Rectangle2D

draw

public void draw(Graphics2D graphics,
                 float x,
                 float y)
指定された位置にグラフィックを描画します。
オーバーライド:
クラス GraphicAttribute 内の draw
パラメータ:
graphics - 内部にグラフィックを描画する Graphics2D
x - グラフィックが描画されるユーザ領域の座標

hashCode

public int hashCode()
この ImageGraphicAttribute 用のハッシュコードを返します。
オーバーライド:
クラス Object 内の hashCode
戻り値:
このオブジェクト用のハッシュコード値

equals

public boolean equals(Object rhs)
この ImageGraphicAttribute を、指定された Object と比較します。
オーバーライド:
クラス Object 内の equals
パラメータ:
rhs - 比較対象の Object
戻り値:
ImageGraphicAttributerhs と等しい場合は true、そうでない場合は false

equals

public boolean equals(ImageGraphicAttribute rhs)
この ImageGraphicAttribute を、指定された ImageGraphicAttribute と比較します。
パラメータ:
rhs - 比較対象の ImageGraphicAttribute
戻り値:
ImageGraphicAttributerhs と等しい場合は true、そうでない場合は false

JavaTM 2 Platform
Std. Ed. v1.3

バグや機能要求の報告
さらに詳しい API リファレンスおよび開発者ドキュメントについては、 Java 2 SDK SE Developer Documentation を参照してください。このドキュメントには、概念、用語の定義、回避策、 実用的なコード例など、開発者を対象にした詳細な解説が掲載されています。

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.