JavaTM Platform
Standard Ed. 6

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)
          GraphicAttribute を、指定された位置に描画します。
 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, getOutline
 
クラス 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 を構築します。Image のポイント (originXoriginY) は、テキスト内の ImageGraphicAttribute の原点に現われます。

パラメータ:
image - この ImageGraphicAttribute によって 描画される Image。 このオブジェクトは image に対する参照を保持する
alignment - この ImageGraphicAttribute配置方法の 1 つ
originX - テキスト行内の ImageGraphicAttribute の原点に現れる、 Image 内の点の X 座標
originY - テキスト行内の ImageGraphicAttribute の原点に現れる、 Image 内の点の Y 座標
メソッドの詳細

getAscent

public float getAscent()
この ImageGraphicAttribute のアセントを返します。ImageGraphicAttribute のアセントとは、イメージの上端から原点までの距離のことです。

定義:
クラス GraphicAttribute 内の getAscent
戻り値:
この ImageGraphicAttribute のアセント
関連項目:
GraphicAttribute.getBounds()

getDescent

public float getDescent()
この ImageGraphicAttribute のディセントを返します。ImageGraphicAttribute のディセントとは、原点からイメージの下端までの距離のことです。

定義:
クラス GraphicAttribute 内の getDescent
戻り値:
この ImageGraphicAttribute のディセント
関連項目:
GraphicAttribute.getBounds()

getAdvance

public float getAdvance()
この ImageGraphicAttribute の有効幅を返します。ImageGraphicAttribute の有効幅とは、原点からイメージの右端までの距離のことです。

定義:
クラス GraphicAttribute 内の getAdvance
戻り値:
この ImageGraphicAttribute の有効幅
関連項目:
GraphicAttribute.getBounds()

getBounds

public Rectangle2D getBounds()
この ImageGraphicAttribute によって描画される全ビットを囲む Rectangle2D を返します。 これは、描画位置を基準にして示されます。グラフィックは、原点、アセント、ディセント、有効幅を超えて描画できますが、その場合はグラフィックを描画する位置をこのメソッドの実装で示す必要があります。

オーバーライド:
クラス GraphicAttribute 内の getBounds
戻り値:
この ImageGraphicAttribute によって描画される 全ビットを囲む Rectangle2D

draw

public void draw(Graphics2D graphics,
                 float x,
                 float y)
GraphicAttribute を、指定された位置に描画します。

定義:
クラス GraphicAttribute 内の draw
パラメータ:
graphics - グラフィックの描画先の Graphics2D
x - グラフィックが描画されるユーザー空間 X 座標
y - グラフィックが描画されるユーザー空間 Y 座標

hashCode

public int hashCode()
この ImageGraphicAttribute のハッシュコードを返します。

オーバーライド:
クラス Object 内の hashCode
戻り値:
このオブジェクトのハッシュコード値
関連項目:
Object.equals(java.lang.Object), Hashtable

equals

public boolean equals(Object rhs)
この ImageGraphicAttribute を、指定された Object と比較します。

オーバーライド:
クラス Object 内の equals
パラメータ:
rhs - 等しいかどうかを比較する Object
戻り値:
この ImageGraphicAttributerhs と等しい場合は true、 そうでない場合は false
関連項目:
Object.hashCode(), Hashtable

equals

public boolean equals(ImageGraphicAttribute rhs)
この ImageGraphicAttribute を、指定された ImageGraphicAttribute と比較します。

パラメータ:
rhs - 等しいかどうかを比較する ImageGraphicAttribute
戻り値:
この ImageGraphicAttributerhs と等しい場合は true、 そうでない場合は false

JavaTM Platform
Standard Ed. 6

バグの報告と機能のリクエスト
さらに詳しい API リファレンスおよび開発者ドキュメントについては、Java SE 開発者用ドキュメントを参照してください。開発者向けの詳細な解説、概念の概要、用語の定義、バグの回避策、およびコード実例が含まれています。

Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Documentation Redistribution Policy も参照してください。