Java プラットフォーム 1.2

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 のアセントは、イメージの上端から原点までの距離です。
戻り値:
ImageGraphicAttribute のアセント
オーバーライド:
クラス GraphicAttribute 内の getAscent

getDescent

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

getAdvance

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

getBounds

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

draw

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

hashCode

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

equals

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

equals

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

Java プラットフォーム 1.2

バグや機能要求の報告
新しい javadoc の表示についてのコメントやご提案
Java は、米国およびその他の国における米国 Sun Microsystems, Inc. の商標もしくは登録商標です。
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.