JavaTM Platform
Standard Ed. 6

javax.swing
クラス DebugGraphics

java.lang.Object
  上位を拡張 java.awt.Graphics
      上位を拡張 javax.swing.DebugGraphics

public class DebugGraphics
extends Graphics

グラフィックスのデバッグをサポートする Graphics のサブクラスです。Graphics からのほとんどのメソッドをオーバーライドします。DebugGraphics オブジェクトを手作業で構築することはほとんどありません。このようなオブジェクトは通常、JComponent の debugGraphicsOptions が setDebugGraphicsOptions() メソッドを使って変更されたときに自動的に作成されます。

注:DebugGraphics を使うには、ダブルバッファリングをオフに設定しなければなりません。RepaintManager repaintManager = RepaintManager.currentManager(component); repaintManager.setDoubleBufferingEnabled(false);

関連項目:
JComponent.setDebugGraphicsOptions(int), RepaintManager.currentManager(java.awt.Component), RepaintManager.setDoubleBufferingEnabled(boolean)

フィールドの概要
static int BUFFERED_OPTION
          独立したFrame でのバッファー利用処理を示します。
static int FLASH_OPTION
          グラフィックス処理をフラッシュします。
static int LOG_OPTION
          グラフィックス処理のログをとります。
static int NONE_OPTION
          グラフィックス処理をデバッグしません。
 
コンストラクタの概要
DebugGraphics()
          速度の遅い描画をサポートする新しいデバッググラフィックスコンテキストを構築します。
DebugGraphics(Graphics graphics)
          既存のグラフィックスコンテキストから、速度の遅い描画をサポートするデバッググラフィックスコンテキストを構築します。
DebugGraphics(Graphics graphics, JComponent component)
          既存のグラフィックスコンテキストから、指定されたコンポーネントの描画速度を遅くするデバッググラフィックスコンテキストを構築します。
 
メソッドの概要
 void clearRect(int x, int y, int width, int height)
          Graphics.clearRect をオーバーライドします。
 void clipRect(int x, int y, int width, int height)
          Graphics.clipRect をオーバーライドします。
 void copyArea(int x, int y, int width, int height, int destX, int destY)
          Graphics.copyArea をオーバーライドします。
 Graphics create()
          Graphics.create をオーバーライドして、DebugGraphics オブジェクトを返すようにします。
 Graphics create(int x, int y, int width, int height)
          Graphics.create をオーバーライドして、DebugGraphics オブジェクトを返すようにします。
 void dispose()
          Graphics.dispose をオーバーライドします。
 void draw3DRect(int x, int y, int width, int height, boolean raised)
          Graphics.draw3DRect をオーバーライドします。
 void drawArc(int x, int y, int width, int height, int startAngle, int arcAngle)
          Graphics.drawArc をオーバーライドします。
 void drawBytes(byte[] data, int offset, int length, int x, int y)
          Graphics.drawBytes をオーバーライドします。
 void drawChars(char[] data, int offset, int length, int x, int y)
          Graphics.drawChars をオーバーライドします。
 boolean drawImage(Image img, int x, int y, Color bgcolor, ImageObserver observer)
          Graphics.drawImage をオーバーライドします。
 boolean drawImage(Image img, int x, int y, ImageObserver observer)
          Graphics.drawImage をオーバーライドします。
 boolean drawImage(Image img, int x, int y, int width, int height, Color bgcolor, ImageObserver observer)
          Graphics.drawImage をオーバーライドします。
 boolean drawImage(Image img, int x, int y, int width, int height, ImageObserver observer)
          Graphics.drawImage をオーバーライドします。
 boolean drawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, Color bgcolor, ImageObserver observer)
          Graphics.drawImage をオーバーライドします。
 boolean drawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, ImageObserver observer)
          Graphics.drawImage をオーバーライドします。
 void drawLine(int x1, int y1, int x2, int y2)
          Graphics.drawLine をオーバーライドします。
 void drawOval(int x, int y, int width, int height)
          Graphics.drawOval をオーバーライドします。
 void drawPolygon(int[] xPoints, int[] yPoints, int nPoints)
          Graphics.drawPolygon をオーバーライドします。
 void drawPolyline(int[] xPoints, int[] yPoints, int nPoints)
          Graphics.drawPolyline をオーバーライドします。
 void drawRect(int x, int y, int width, int height)
          Graphics.drawRect をオーバーライドします。
 void drawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
          Graphics.drawRoundRect をオーバーライドします。
 void drawString(AttributedCharacterIterator iterator, int x, int y)
          Graphics.drawString をオーバーライドします。
 void drawString(String aString, int x, int y)
          Graphics.drawString をオーバーライドします。
 void fill3DRect(int x, int y, int width, int height, boolean raised)
          Graphics.fill3DRect をオーバーライドします。
 void fillArc(int x, int y, int width, int height, int startAngle, int arcAngle)
          Graphics.fillArc をオーバーライドします。
 void fillOval(int x, int y, int width, int height)
          Graphics.fillOval をオーバーライドします。
 void fillPolygon(int[] xPoints, int[] yPoints, int nPoints)
          Graphics.fillPolygon をオーバーライドします。
 void fillRect(int x, int y, int width, int height)
          Graphics.fillRect をオーバーライドします。
 void fillRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
          Graphics.fillRoundRect をオーバーライドします。
static Color flashColor()
          描画処理をフラッシュするのに使う色を返します。
static int flashCount()
          描画処理がフラッシュする回数を返します。
static int flashTime()
          描画処理フラッシュの時間遅延を返します。
 Shape getClip()
          Graphics.getClip をオーバーライドします。
 Rectangle getClipBounds()
          Graphics.getClipBounds をオーバーライドします。
 Color getColor()
          テキスト描画処理に使う色を返します。
 int getDebugOptions()
          DebugGraphics の現在のデバッグオプションを返します。
 Font getFont()
          テキスト描画処理に使うフォントを返します。
 FontMetrics getFontMetrics()
          Graphics.getFontMetrics をオーバーライドします。
 FontMetrics getFontMetrics(Font f)
          Graphics.getFontMetrics をオーバーライドします。
 boolean isDrawingBuffer()
          drawingBuffer の値を返します。
static PrintStream logStream()
          DebugGraphics が描画処理のログをとるストリームを返します。
 void setClip(int x, int y, int width, int height)
          Graphics.setClip をオーバーライドします。
 void setClip(Shape clip)
          Graphics.setClip をオーバーライドします。
 void setColor(Color aColor)
          線と形状を描画し塗りつぶすのに使う色を設定します。
 void setDebugOptions(int options)
          各グラフィックス処理についての診断情報を有効または無効にします。
static void setFlashColor(Color flashColor)
          描画処理をフラッシュするのに使う色を設定します。
static void setFlashCount(int flashCount)
          描画処理がフラッシュする回数を設定します。
static void setFlashTime(int flashTime)
          描画処理フラッシュの時間遅延を設定します。
 void setFont(Font aFont)
          テキスト描画処理に使うフォントを設定します。
static void setLogStream(PrintStream stream)
          DebugGraphics が描画処理のログをとるストリームを設定します。
 void setPaintMode()
          Graphics.setPaintMode をオーバーライドします。
 void setXORMode(Color aColor)
          Graphics.setXORMode をオーバーライドします。
 void translate(int x, int y)
          Graphics.translate をオーバーライドします。
 
クラス java.awt.Graphics から継承されたメソッド
drawPolygon, fillPolygon, finalize, getClipBounds, getClipRect, hitClip, toString
 
クラス java.lang.Object から継承されたメソッド
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

フィールドの詳細

LOG_OPTION

public static final int LOG_OPTION
グラフィックス処理のログをとります。

関連項目:
定数フィールド値

FLASH_OPTION

public static final int FLASH_OPTION
グラフィックス処理をフラッシュします。

関連項目:
定数フィールド値

BUFFERED_OPTION

public static final int BUFFERED_OPTION
独立したFrame でのバッファー利用処理を示します。

関連項目:
定数フィールド値

NONE_OPTION

public static final int NONE_OPTION
グラフィックス処理をデバッグしません。

関連項目:
定数フィールド値
コンストラクタの詳細

DebugGraphics

public DebugGraphics()
速度の遅い描画をサポートする新しいデバッググラフィックスコンテキストを構築します。


DebugGraphics

public DebugGraphics(Graphics graphics,
                     JComponent component)
既存のグラフィックスコンテキストから、指定されたコンポーネントの描画速度を遅くするデバッググラフィックスコンテキストを構築します。

パラメータ:
graphics - 描画速度を遅くするグラフィックスコンテキスト
component - ゆっくりした速度で描画される JComponent

DebugGraphics

public DebugGraphics(Graphics graphics)
既存のグラフィックスコンテキストから、速度の遅い描画をサポートするデバッググラフィックスコンテキストを構築します。

パラメータ:
graphics - 描画速度を遅くするグラフィックスコンテキスト
メソッドの詳細

create

public Graphics create()
Graphics.create をオーバーライドして、DebugGraphics オブジェクトを返すようにします。

定義:
クラス Graphics 内の create
戻り値:
このグラフィックスコンテキストのコピーである、 新しいグラフィックスコンテキスト

create

public Graphics create(int x,
                       int y,
                       int width,
                       int height)
Graphics.create をオーバーライドして、DebugGraphics オブジェクトを返すようにします。

オーバーライド:
クラス Graphics 内の create
パラメータ:
x - x 座標
y - y 座標
width - クリッピング矩形の幅
height - クリッピング矩形の高さ
戻り値:
新しいグラフィックスコンテキスト
関連項目:
Graphics.translate(int, int), Graphics.clipRect(int, int, int, int)

setFlashColor

public static void setFlashColor(Color flashColor)
描画処理をフラッシュするのに使う色を設定します。


flashColor

public static Color flashColor()
描画処理をフラッシュするのに使う色を返します。

関連項目:
setFlashColor(java.awt.Color)

setFlashTime

public static void setFlashTime(int flashTime)
描画処理フラッシュの時間遅延を設定します。


flashTime

public static int flashTime()
描画処理フラッシュの時間遅延を返します。

関連項目:
setFlashTime(int)

setFlashCount

public static void setFlashCount(int flashCount)
描画処理がフラッシュする回数を設定します。


flashCount

public static int flashCount()
描画処理がフラッシュする回数を返します。

関連項目:
setFlashCount(int)

setLogStream

public static void setLogStream(PrintStream stream)
DebugGraphics が描画処理のログをとるストリームを設定します。


logStream

public static PrintStream logStream()
DebugGraphics が描画処理のログをとるストリームを返します。

関連項目:
setLogStream(java.io.PrintStream)

setFont

public void setFont(Font aFont)
テキスト描画処理に使うフォントを設定します。

定義:
クラス Graphics 内の setFont
パラメータ:
aFont - フォント
関連項目:
Graphics.getFont(), Graphics.drawString(java.lang.String, int, int), Graphics.drawBytes(byte[], int, int, int, int), Graphics.drawChars(char[], int, int, int, int)

getFont

public Font getFont()
テキスト描画処理に使うフォントを返します。

定義:
クラス Graphics 内の getFont
戻り値:
このグラフィックスコンテキストの現在のフォント
関連項目:
setFont(java.awt.Font)

setColor

public void setColor(Color aColor)
線と形状を描画し塗りつぶすのに使う色を設定します。

定義:
クラス Graphics 内の setColor
パラメータ:
aColor - 新しい描画色
関連項目:
Color, Graphics.getColor()

getColor

public Color getColor()
テキスト描画処理に使う色を返します。

定義:
クラス Graphics 内の getColor
戻り値:
このグラフィックスコンテキストの現在の色
関連項目:
setColor(java.awt.Color)

getFontMetrics

public FontMetrics getFontMetrics()
Graphics.getFontMetrics をオーバーライドします。

オーバーライド:
クラス Graphics 内の getFontMetrics
戻り値:
このグラフィックスコンテキストの現在のフォントの フォントメトリックス
関連項目:
Graphics.getFont(), FontMetrics, Graphics.getFontMetrics(Font)

getFontMetrics

public FontMetrics getFontMetrics(Font f)
Graphics.getFontMetrics をオーバーライドします。

定義:
クラス Graphics 内の getFontMetrics
パラメータ:
f - 指定されたフォント
戻り値:
指定されたフォントのフォントメトリックス
関連項目:
Graphics.getFont(), FontMetrics, Graphics.getFontMetrics()

translate

public void translate(int x,
                      int y)
Graphics.translate をオーバーライドします。

定義:
クラス Graphics 内の translate
パラメータ:
x - x 座標
y - y 座標

setPaintMode

public void setPaintMode()
Graphics.setPaintMode をオーバーライドします。

定義:
クラス Graphics 内の setPaintMode

setXORMode

public void setXORMode(Color aColor)
Graphics.setXORMode をオーバーライドします。

定義:
クラス Graphics 内の setXORMode
パラメータ:
aColor - XOR の交代色

getClipBounds

public Rectangle getClipBounds()
Graphics.getClipBounds をオーバーライドします。

定義:
クラス Graphics 内の getClipBounds
戻り値:
現在のクリッピング領域の境界の矩形、 クリップが設定されていない場合は null
関連項目:
Graphics.getClip(), Graphics.clipRect(int, int, int, int), Graphics.setClip(int, int, int, int), Graphics.setClip(Shape)

clipRect

public void clipRect(int x,
                     int y,
                     int width,
                     int height)
Graphics.clipRect をオーバーライドします。

定義:
クラス Graphics 内の clipRect
パラメータ:
x - 交差してクリップする矩形の x 座標
y - 交差してクリップする矩形の y 座標
width - 交差してクリップする矩形の幅
height - 交差してクリップする矩形の高さ
関連項目:
Graphics.setClip(int, int, int, int), Graphics.setClip(Shape)

setClip

public void setClip(int x,
                    int y,
                    int width,
                    int height)
Graphics.setClip をオーバーライドします。

定義:
クラス Graphics 内の setClip
パラメータ:
x - 新しいクリップ矩形の x 座標
y - 新しいクリップ矩形の y 座標
width - 新しいクリップ矩形の幅
height - 新しいクリップ矩形の高さ
関連項目:
Graphics.clipRect(int, int, int, int), Graphics.setClip(Shape), Graphics.getClip()

getClip

public Shape getClip()
Graphics.getClip をオーバーライドします。

定義:
クラス Graphics 内の getClip
戻り値:
現在のクリッピング領域を表す Shape オブジェクト。クリップが設定されていない場合は null
関連項目:
Graphics.getClipBounds(), Graphics.clipRect(int, int, int, int), Graphics.setClip(int, int, int, int), Graphics.setClip(Shape)

setClip

public void setClip(Shape clip)
Graphics.setClip をオーバーライドします。

定義:
クラス Graphics 内の setClip
パラメータ:
clip - クリップ設定に使用する Shape
関連項目:
Graphics.getClip(), Graphics.clipRect(int, int, int, int), Graphics.setClip(int, int, int, int)

drawRect

public void drawRect(int x,
                     int y,
                     int width,
                     int height)
Graphics.drawRect をオーバーライドします。

オーバーライド:
クラス Graphics 内の drawRect
パラメータ:
x - 描画される 矩形の x 座標
y - 描画される 矩形の y 座標
width - 描画される矩形の幅
height - 描画される矩形の高さ
関連項目:
Graphics.fillRect(int, int, int, int), Graphics.clearRect(int, int, int, int)

fillRect

public void fillRect(int x,
                     int y,
                     int width,
                     int height)
Graphics.fillRect をオーバーライドします。

定義:
クラス Graphics 内の fillRect
パラメータ:
x - 塗りつぶされる 矩形の x 座標
y - 塗りつぶされる 矩形の y 座標
width - 塗りつぶされる矩形の幅
height - 塗りつぶされる矩形の高さ
関連項目:
Graphics.clearRect(int, int, int, int), Graphics.drawRect(int, int, int, int)

clearRect

public void clearRect(int x,
                      int y,
                      int width,
                      int height)
Graphics.clearRect をオーバーライドします。

定義:
クラス Graphics 内の clearRect
パラメータ:
x - クリア対象の矩形の x 座標
y - クリア対象の矩形の y 座標
width - クリア対象の矩形の幅
height - クリア対象の矩形の高さ
関連項目:
Graphics.fillRect(int, int, int, int), Graphics.drawRect(int, int, int, int), Graphics.setColor(java.awt.Color), Graphics.setPaintMode(), Graphics.setXORMode(java.awt.Color)

drawRoundRect

public void drawRoundRect(int x,
                          int y,
                          int width,
                          int height,
                          int arcWidth,
                          int arcHeight)
Graphics.drawRoundRect をオーバーライドします。

定義:
クラス Graphics 内の drawRoundRect
パラメータ:
x - 描画される矩形の x 座標
y - 描画される矩形の y 座標
width - 描画される矩形の幅
height - 描画される矩形の高さ
arcWidth - 4 隅の弧の水平方向の 直径
arcHeight - 4 隅の弧の垂直方向の 直径
関連項目:
Graphics.fillRoundRect(int, int, int, int, int, int)

fillRoundRect

public void fillRoundRect(int x,
                          int y,
                          int width,
                          int height,
                          int arcWidth,
                          int arcHeight)
Graphics.fillRoundRect をオーバーライドします。

定義:
クラス Graphics 内の fillRoundRect
パラメータ:
x - 塗りつぶされる矩形の x 座標
y - 塗りつぶされる矩形の y 座標
width - 塗りつぶされる矩形の幅
height - 塗りつぶされる矩形の高さ
arcWidth - 4 隅の弧の水平方向の 直径
arcHeight - 4 隅の弧の垂直方向の 直径
関連項目:
Graphics.drawRoundRect(int, int, int, int, int, int)

drawLine

public void drawLine(int x1,
                     int y1,
                     int x2,
                     int y2)
Graphics.drawLine をオーバーライドします。

定義:
クラス Graphics 内の drawLine
パラメータ:
x1 - 最初の点の x 座標
y1 - 最初の点の y 座標
x2 - 2 番目の点の x 座標
y2 - 2 番目の点の y 座標

draw3DRect

public void draw3DRect(int x,
                       int y,
                       int width,
                       int height,
                       boolean raised)
Graphics.draw3DRect をオーバーライドします。

オーバーライド:
クラス Graphics 内の draw3DRect
パラメータ:
x - 描画される矩形の x 座標
y - 描画される矩形の y 座標
width - 描画される矩形の幅
height - 描画される矩形の高さ
raised - 矩形が表面から浮き出たように見えるか、 表面に彫り込まれたように見えるかを指定する boolean 値
関連項目:
Graphics.fill3DRect(int, int, int, int, boolean)

fill3DRect

public void fill3DRect(int x,
                       int y,
                       int width,
                       int height,
                       boolean raised)
Graphics.fill3DRect をオーバーライドします。

オーバーライド:
クラス Graphics 内の fill3DRect
パラメータ:
x - 塗りつぶされる矩形の x 座標
y - 塗りつぶされる矩形の y 座標
width - 塗りつぶされる矩形の幅
height - 塗りつぶされる矩形の高さ
raised - 矩形が表面から浮き出たように見えるか、 表面に彫り込まれたように見えるかを指定する boolean 値
関連項目:
Graphics.draw3DRect(int, int, int, int, boolean)

drawOval

public void drawOval(int x,
                     int y,
                     int width,
                     int height)
Graphics.drawOval をオーバーライドします。

定義:
クラス Graphics 内の drawOval
パラメータ:
x - 描画される楕円の左上隅の x 座標
y - 描画される楕円の左上隅の y 座標
width - 描画される楕円の幅
height - 描画される楕円の高さ
関連項目:
Graphics.fillOval(int, int, int, int)

fillOval

public void fillOval(int x,
                     int y,
                     int width,
                     int height)
Graphics.fillOval をオーバーライドします。

定義:
クラス Graphics 内の fillOval
パラメータ:
x - 塗りつぶされる楕円の左上隅の x 座標
y - 塗りつぶされる楕円の左上隅の y 座標
width - 塗りつぶされる楕円の幅
height - 塗りつぶされる楕円の高さ
関連項目:
Graphics.drawOval(int, int, int, int)

drawArc

public void drawArc(int x,
                    int y,
                    int width,
                    int height,
                    int startAngle,
                    int arcAngle)
Graphics.drawArc をオーバーライドします。

定義:
クラス Graphics 内の drawArc
パラメータ:
x - 描画される弧の左上隅の x 座標
y - 描画される弧の左上隅の y 座標
width - 描画される孤の幅
height - 描画される孤の高さ
startAngle - 開始角度
arcAngle - 開始角度に対する弧の 展開角度の大きさ
関連項目:
Graphics.fillArc(int, int, int, int, int, int)

fillArc

public void fillArc(int x,
                    int y,
                    int width,
                    int height,
                    int startAngle,
                    int arcAngle)
Graphics.fillArc をオーバーライドします。

定義:
クラス Graphics 内の fillArc
パラメータ:
x - 塗りつぶされる弧の左上隅の x 座標
y - 塗りつぶされる弧の左上隅の y 座標
width - 塗りつぶされる孤の幅
height - 塗りつぶされる孤の高さ
startAngle - 開始角度
arcAngle - 開始角度に対する弧の 展開角度の大きさ
関連項目:
Graphics.drawArc(int, int, int, int, int, int)

drawPolyline

public void drawPolyline(int[] xPoints,
                         int[] yPoints,
                         int nPoints)
Graphics.drawPolyline をオーバーライドします。

定義:
クラス Graphics 内の drawPolyline
パラメータ:
xPoints - x 点の配列
yPoints - y 点の配列
nPoints - 点の総数
関連項目:
Graphics.drawPolygon(int[], int[], int)

drawPolygon

public void drawPolygon(int[] xPoints,
                        int[] yPoints,
                        int nPoints)
Graphics.drawPolygon をオーバーライドします。

定義:
クラス Graphics 内の drawPolygon
パラメータ:
xPoints - x 座標の配列
yPoints - y 座標の配列
nPoints - 点の総数
関連項目:
Graphics.fillPolygon(int[], int[], int), Graphics.drawPolyline(int[], int[], int)

fillPolygon

public void fillPolygon(int[] xPoints,
                        int[] yPoints,
                        int nPoints)
Graphics.fillPolygon をオーバーライドします。

定義:
クラス Graphics 内の fillPolygon
パラメータ:
xPoints - x 座標の配列
yPoints - y 座標の配列
nPoints - 点の総数
関連項目:
Graphics.drawPolygon(int[], int[], int)

drawString

public void drawString(String aString,
                       int x,
                       int y)
Graphics.drawString をオーバーライドします。

定義:
クラス Graphics 内の drawString
パラメータ:
aString - 描画される文字列
x - x 座標
y - y 座標
関連項目:
Graphics.drawBytes(byte[], int, int, int, int), Graphics.drawChars(char[], int, int, int, int)

drawString

public void drawString(AttributedCharacterIterator iterator,
                       int x,
                       int y)
Graphics.drawString をオーバーライドします。

定義:
クラス Graphics 内の drawString
パラメータ:
iterator - 描画されるテキストを持つ反復子
x - x 座標
y - y 座標
関連項目:
Graphics.drawBytes(byte[], int, int, int, int), Graphics.drawChars(char[], int, int, int, int)

drawBytes

public void drawBytes(byte[] data,
                      int offset,
                      int length,
                      int x,
                      int y)
Graphics.drawBytes をオーバーライドします。

オーバーライド:
クラス Graphics 内の drawBytes
パラメータ:
data - 描画されるデータ
offset - データの開始オフセット
length - 描画されるバイト数
x - テキストのベースラインの x 座標
y - テキストのベースラインの y 座標
関連項目:
Graphics.drawChars(char[], int, int, int, int), Graphics.drawString(java.lang.String, int, int)

drawChars

public void drawChars(char[] data,
                      int offset,
                      int length,
                      int x,
                      int y)
Graphics.drawChars をオーバーライドします。

オーバーライド:
クラス Graphics 内の drawChars
パラメータ:
data - 描画される文字の配列
offset - データの開始オフセット
length - 描画される文字数
x - テキストのベースラインの x 座標
y - テキストのベースラインの y 座標
関連項目:
Graphics.drawBytes(byte[], int, int, int, int), Graphics.drawString(java.lang.String, int, int)

drawImage

public boolean drawImage(Image img,
                         int x,
                         int y,
                         ImageObserver observer)
Graphics.drawImage をオーバーライドします。

定義:
クラス Graphics 内の drawImage
パラメータ:
img - 描画される指定イメージimg が null の場合には何も行わない
x - x 座標
y - y 座標
observer - イメージがさらに変換されることが 通知されるオブジェクト
戻り値:
イメージピクセルがまだ変更中の場合は false、 そうでない場合は true
関連項目:
Image, ImageObserver, ImageObserver.imageUpdate(java.awt.Image, int, int, int, int, int)

drawImage

public boolean drawImage(Image img,
                         int x,
                         int y,
                         int width,
                         int height,
                         ImageObserver observer)
Graphics.drawImage をオーバーライドします。

定義:
クラス Graphics 内の drawImage
パラメータ:
img - 描画される指定イメージimg が null の場合には何も行わない
x - x 座標
y - y 座標
width - 矩形の幅
height - 矩形の高さ
observer - イメージがさらに変換されることが 通知されるオブジェクト
戻り値:
イメージピクセルがまだ変更中の場合は false、 そうでない場合は true
関連項目:
Image, ImageObserver, ImageObserver.imageUpdate(java.awt.Image, int, int, int, int, int)

drawImage

public boolean drawImage(Image img,
                         int x,
                         int y,
                         Color bgcolor,
                         ImageObserver observer)
Graphics.drawImage をオーバーライドします。

定義:
クラス Graphics 内の drawImage
パラメータ:
img - 描画される指定イメージimg が null の場合には何も行わない
x - x 座標
y - y 座標
bgcolor - イメージの不透明でない部分の下に 塗られるバックグラウンドカラー
observer - イメージがさらに変換されることが 通知されるオブジェクト
戻り値:
イメージピクセルがまだ変更中の場合は false、 そうでない場合は true
関連項目:
Image, ImageObserver, ImageObserver.imageUpdate(java.awt.Image, int, int, int, int, int)

drawImage

public boolean drawImage(Image img,
                         int x,
                         int y,
                         int width,
                         int height,
                         Color bgcolor,
                         ImageObserver observer)
Graphics.drawImage をオーバーライドします。

定義:
クラス Graphics 内の drawImage
パラメータ:
img - 描画される指定イメージimg が null の場合には何も行わない
x - x 座標
y - y 座標
width - 矩形の幅
height - 矩形の高さ
bgcolor - イメージの不透明でない部分の下に 塗られるバックグラウンドカラー
observer - イメージがさらに変換されることが 通知されるオブジェクト
戻り値:
イメージピクセルがまだ変更中の場合は false、 そうでない場合は true
関連項目:
Image, ImageObserver, ImageObserver.imageUpdate(java.awt.Image, int, int, int, int, int)

drawImage

public boolean drawImage(Image img,
                         int dx1,
                         int dy1,
                         int dx2,
                         int dy2,
                         int sx1,
                         int sy1,
                         int sx2,
                         int sy2,
                         ImageObserver observer)
Graphics.drawImage をオーバーライドします。

定義:
クラス Graphics 内の drawImage
パラメータ:
img - 描画される指定イメージimg が null の場合には何も行わない
dx1 - デスティネーション矩形の最初の隅の x 座標
dy1 - デスティネーション矩形の最初の隅の y 座標
dx2 - デスティネーション矩形の 2 番目の隅の x 座標
dy2 - デスティネーション矩形の 2 番目の隅の y 座標
sx1 - ソース矩形の最初の隅の x 座標
sy1 - ソース矩形の最初の隅の y 座標
sx2 - ソース矩形の 2 番目の隅の x 座標
sy2 - ソース矩形の 2 番目の隅の y 座標
observer - イメージがさらにスケーリングされ、変換されることを 通知するオブジェクト
戻り値:
イメージピクセルがまだ変更中の場合は false、 そうでない場合は true
関連項目:
Image, ImageObserver, ImageObserver.imageUpdate(java.awt.Image, int, int, int, int, int)

drawImage

public boolean drawImage(Image img,
                         int dx1,
                         int dy1,
                         int dx2,
                         int dy2,
                         int sx1,
                         int sy1,
                         int sx2,
                         int sy2,
                         Color bgcolor,
                         ImageObserver observer)
Graphics.drawImage をオーバーライドします。

定義:
クラス Graphics 内の drawImage
パラメータ:
img - 描画される指定イメージimg が null の場合には何も行わない
dx1 - デスティネーション矩形の最初の隅の x 座標
dy1 - デスティネーション矩形の最初の隅の y 座標
dx2 - デスティネーション矩形の 2 番目の隅の x 座標
dy2 - デスティネーション矩形の 2 番目の隅の y 座標
sx1 - ソース矩形の最初の隅の x 座標
sy1 - ソース矩形の最初の隅の y 座標
sx2 - ソース矩形の 2 番目の隅の x 座標
sy2 - ソース矩形の 2 番目の隅の y 座標
bgcolor - イメージの不透明でない部分の下に 塗られるバックグラウンドカラー
observer - イメージがさらにスケーリングされ、変換されることを 通知するオブジェクト
戻り値:
イメージピクセルがまだ変更中の場合は false、 そうでない場合は true
関連項目:
Image, ImageObserver, ImageObserver.imageUpdate(java.awt.Image, int, int, int, int, int)

copyArea

public void copyArea(int x,
                     int y,
                     int width,
                     int height,
                     int destX,
                     int destY)
Graphics.copyArea をオーバーライドします。

定義:
クラス Graphics 内の copyArea
パラメータ:
x - ソース矩形の x 座標
y - ソース矩形の y 座標
width - ソース矩形の幅
height - ソース矩形の高さ
destX - ピクセルをコピーする水平距離
destY - ピクセルをコピーする垂直距離

dispose

public void dispose()
Graphics.dispose をオーバーライドします。

定義:
クラス Graphics 内の dispose
関連項目:
Graphics.finalize(), Component.paint(java.awt.Graphics), Component.update(java.awt.Graphics), Component.getGraphics(), Graphics.create()

isDrawingBuffer

public boolean isDrawingBuffer()
drawingBuffer の値を返します。

戻り値:
このオブジェクトがバッファーから描画される場合は true

setDebugOptions

public void setDebugOptions(int options)
各グラフィックス処理についての診断情報を有効または無効にします。options の値は、この情報の表示方法を示します。LOG_OPTION は、テキストメッセージを出力させます。FLASH_OPTION は、描画に数回にわたってフラッシュさせます。BUFFERED_OPTION は、オフスクリーンバッファーの各処理を示す新しいフレームを作成します。options の値は、現在の値に対するビット単位の論理和です。デバッグを無効にするには、NONE_OPTION を使います。


getDebugOptions

public int getDebugOptions()
DebugGraphics の現在のデバッグオプションを返します。

関連項目:
setDebugOptions(int)

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 も参照してください。