クラスImageGraphicAttribute

java.lang.Object
java.awt.font.GraphicAttribute
java.awt.font.ImageGraphicAttribute

public final class ImageGraphicAttribute extends GraphicAttribute
ImageGraphicAttributeクラスは、TextLayoutにイメージをレンダリングするGraphicAttributeの実装です。
関連項目:
  • フィールドのサマリー

    クラスで宣言されたフィールド GraphicAttribute

    BOTTOM_ALIGNMENT, CENTER_BASELINE, HANGING_BASELINE, ROMAN_BASELINE, TOP_ALIGNMENT
    修飾子と型
    フィールド
    説明
    static final int
    グラフィックの下端を行の下端にそろえて配置します。
    static final int
    グラフィックの原点を行のセンター・ベースラインにそろえて配置します。
    static final int
    グラフィックの原点を行のぶら下がりベースラインにそろえて配置します。
    static final int
    グラフィックの原点を行のローマン・ベースラインにそろえて配置します。
    static final int
    グラフィックの上端を行の上端にそろえて配置します。
  • コンストラクタのサマリー

    コンストラクタ
    コンストラクタ
    説明
    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
    このImageGraphicAttributeを指定されたImageGraphicAttributeと比較します。
    boolean
    このImageGraphicAttributeを指定されたObjectと比較します。
    float
    このImageGraphicAttributeの有効幅を返します。
    float
    このImageGraphicAttributeのアセントを返します。
    このImageGraphicAttributeによってレンダリングされる全ビットを囲むRectangle2Dを返します。これは、レンダリング位置を基準にして示されます。
    float
    このImageGraphicAttributeのディセントを返します。
    int
    このImageGraphicAttributeのハッシュ・コードを返します。

    クラスで宣言されたメソッド GraphicAttribute

    getAlignment, getJustificationInfo, getOutline
    修飾子と型
    メソッド
    説明
    final int
    GraphicAttributeの配置方法を返します。
    このGraphicAttributeの位置揃えプロパティを返します。
    このGraphicAttributeによってレンダリングされる領域を表すShapeを返します。

    クラスオブジェクトで宣言されたメソッド

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    修飾子と型
    メソッド
    説明
    protected Object
    このオブジェクトのコピーを作成して、返します。
    protected void
    削除予定のため非推奨: このAPI要素は、将来のバージョンで削除される可能性があります。
    最終決定は非推奨であり、将来のリリースで削除される可能性があります。
    final Class<?>
    このObjectの実行時クラスを返します。
    final void
    このオブジェクトのモニターで待機中のスレッドを1つ再開します。
    final void
    このオブジェクトのモニターで待機中のすべてのスレッドを再開します。
    オブジェクトの文字列表現を返します。
    final void
    現在のスレッドが目覚めるまで待機します。通常、notifiedまたはinterruptedです。
    final void
    wait(long timeoutMillis)
    現在のスレッドは、通常、notifiedまたはinterruptedであるか、一定のリアルタイムが経過するまで、目覚めるまで待機します。
    final void
    wait(long timeoutMillis, int nanos)
    現在のスレッドは、通常、notifiedまたはinterruptedであるか、一定のリアルタイムが経過するまで、目覚めるまで待機します。
  • コンストラクタの詳細

    • 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のアセントとは、イメージの上端から原点までの距離のことです。
      定義:
      getAscent、クラスGraphicAttribute
      戻り値:
      このImageGraphicAttributeのアセント。
      関連項目:
    • getDescent

      public float getDescent()
      このImageGraphicAttributeのディセントを返します。 ImageGraphicAttributeのディセントとは、原点からイメージの下端までの距離のことです。
      定義:
      getDescent、クラスGraphicAttribute
      戻り値:
      このImageGraphicAttributeのディセント。
      関連項目:
    • getAdvance

      public float getAdvance()
      このImageGraphicAttributeの有効幅を返します。 ImageGraphicAttributeの有効幅とは、原点からイメージの右端までの距離のことです。
      定義:
      getAdvance、クラスGraphicAttribute
      戻り値:
      このImageGraphicAttributeの有効幅。
      関連項目:
    • getBounds

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

      public void draw(Graphics2D graphics, float x, float y)
      このGraphicAttributeを指定された位置にレンダリングします。
      定義:
      draw、クラスGraphicAttribute
      パラメータ:
      graphics - グラフィックのレンダリング先のGraphics2D
      x - グラフィックがレンダリングされるユーザー空間X座標
      y - グラフィックがレンダリングされるユーザー空間Y座標
    • hashCode

      public int hashCode()
      このImageGraphicAttributeのハッシュ・コードを返します。
      オーバーライド:
      hashCode、クラスObject
      戻り値:
      このオブジェクトのハッシュ・コード値。
      関連項目:
    • equals

      public boolean equals(Object rhs)
      このImageGraphicAttributeを指定されたObjectと比較します。
      オーバーライド:
      equals、クラスObject
      パラメータ:
      rhs - 等しいかどうかを比較するObject
      戻り値:
      このImageGraphicAttributerhsの場合はtrue、それ以外の場合はfalse
      関連項目:
    • equals

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