モジュール java.desktop
パッケージ javax.swing

クラスDebugGraphics


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

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

    導入されたバージョン:
    1.2
    関連項目:
    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 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をオーバーライドします。
      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 x, int y, Color bgcolor, ImageObserver observer)
      Graphics.drawImageをオーバーライドします。
      boolean drawImage​(Image img, int x, int y, 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​(String aString, int x, int y)
      Graphics.drawStringをオーバーライドします。
      void drawString​(AttributedCharacterIterator iterator, 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()
      テキスト描画処理に使うFontを返します。
      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)
      テキスト描画処理に使うFontを設定します。
      static void setLogStream​(PrintStream stream)
      DebugGraphicsが描画処理のログをとるストリームを設定します。
      void setPaintMode()
      Graphics.setPaintModeをオーバーライドします。
      void setXORMode​(Color aColor)
      Graphics.setXORModeをオーバーライドします。
      void translate​(int x, int y)
      Graphics.translateをオーバーライドします。
    • フィールドの詳細

      • 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オブジェクトを返すようにします。
        定義:
        create、クラス: Graphics
        戻り値:
        このグラフィックス・コンテキストのコピーである、新しいグラフィックス・コンテキスト。
      • create

        public Graphics create​(int x,
                               int y,
                               int width,
                               int height)
        Graphics.createをオーバーライドして、DebugGraphicsオブジェクトを返すようにします。
        オーバーライド:
        create、クラス: Graphics
        パラメータ:
        x - x座標。
        y - y座標。
        width - クリッピング矩形の幅。
        height - クリッピング矩形の高さ。
        戻り値:
        新しいグラフィックス・コンテキスト。
        関連項目:
        Graphics.translate(int, int), Graphics.clipRect(int, int, int, int)
      • setFlashColor

        public static void setFlashColor​(Color flashColor)
        描画処理をフラッシュするのに使う色を設定します。
        パラメータ:
        flashColor - 描画操作をフラッシュするために使用されるColor
      • flashColor

        public static Color flashColor()
        描画処理をフラッシュするのに使う色を返します。
        戻り値:
        描画操作をフラッシュするために使用されるColor
        関連項目:
        setFlashColor(java.awt.Color)
      • setFlashTime

        public static void setFlashTime​(int flashTime)
        描画処理フラッシュの時間遅延を設定します。
        パラメータ:
        flashTime - 描画動作の時間遅れが点滅
      • flashTime

        public static int flashTime()
        描画処理フラッシュの時間遅延を返します。
        戻り値:
        描画動作の時間遅れが点滅
        関連項目:
        setFlashTime(int)
      • setFlashCount

        public static void setFlashCount​(int flashCount)
        描画処理がフラッシュする回数を設定します。
        パラメータ:
        flashCount - 描画操作が点滅する回数
      • flashCount

        public static int flashCount()
        描画処理がフラッシュする回数を返します。
        戻り値:
        描画操作が点滅する回数
        関連項目:
        setFlashCount(int)
      • setLogStream

        public static void setLogStream​(PrintStream stream)
        DebugGraphicsが描画処理のログをとるストリームを設定します。
        パラメータ:
        stream - DebugGraphicsが描画操作を記録するストリーム
      • logStream

        public static PrintStream logStream()
        DebugGraphicsが描画処理のログをとるストリームを返します。
        戻り値:
        DebugGraphicsが描画操作を記録するストリーム
        関連項目:
        setLogStream(java.io.PrintStream)
      • getFont

        public Font getFont()
        テキスト描画処理に使うFontを返します。
        定義:
        getFont、クラス: Graphics
        戻り値:
        このグラフィックス・コンテキストの現在のフォント。
        関連項目:
        setFont(java.awt.Font)
      • setColor

        public void setColor​(Color aColor)
        線と形状を描画し塗りつぶすのに使う色を設定します。
        定義:
        setColor、クラス: Graphics
        パラメータ:
        aColor - 新しい描画色。
        関連項目:
        Color, Graphics.getColor()
      • getColor

        public Color getColor()
        テキスト描画処理に使う色を返します。
        定義:
        getColor、クラス: Graphics
        戻り値:
        このグラフィックス・コンテキストの現在の色
        関連項目:
        setColor(java.awt.Color)
      • translate

        public void translate​(int x,
                              int y)
        Graphics.translateをオーバーライドします。
        定義:
        translate、クラス: Graphics
        パラメータ:
        x - x座標。
        y - y座標。
      • setPaintMode

        public void setPaintMode()
        Graphics.setPaintModeをオーバーライドします。
        定義:
        setPaintMode、クラス: Graphics
      • setXORMode

        public void setXORMode​(Color aColor)
        Graphics.setXORModeをオーバーライドします。
        定義:
        setXORMode、クラス: Graphics
        パラメータ:
        aColor - XORの交代色
      • clipRect

        public void clipRect​(int x,
                             int y,
                             int width,
                             int height)
        Graphics.clipRectをオーバーライドします。
        定義:
        clipRect、クラス: Graphics
        パラメータ:
        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をオーバーライドします。
        定義:
        setClip、クラス: Graphics
        パラメータ:
        x - 新しいクリップ矩形のx座標。
        y - 新しいクリップ矩形のy座標。
        width - 新しいクリップ矩形の幅。
        height - 新しいクリップ矩形の高さ。
        関連項目:
        Graphics.clipRect(int, int, int, int), Graphics.setClip(Shape), Graphics.getClip()
      • drawRect

        public void drawRect​(int x,
                             int y,
                             int width,
                             int height)
        Graphics.drawRectをオーバーライドします。
        オーバーライド:
        drawRect、クラス: Graphics
        パラメータ:
        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をオーバーライドします。
        定義:
        fillRect、クラス: Graphics
        パラメータ:
        x - 塗りつぶされる矩形のx座標。
        y - 塗りつぶされる矩形のy座標。
        width - 塗りつぶされる矩形の幅。
        height - 塗りつぶされる矩形の高さ。
        関連項目:
        Graphics.clearRect(int, int, int, int), Graphics.drawRect(int, int, int, int)
      • drawRoundRect

        public void drawRoundRect​(int x,
                                  int y,
                                  int width,
                                  int height,
                                  int arcWidth,
                                  int arcHeight)
        Graphics.drawRoundRectをオーバーライドします。
        定義:
        drawRoundRect、クラス: Graphics
        パラメータ:
        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をオーバーライドします。
        定義:
        fillRoundRect、クラス: Graphics
        パラメータ:
        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をオーバーライドします。
        定義:
        drawLine、クラス: Graphics
        パラメータ:
        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をオーバーライドします。
        オーバーライド:
        draw3DRect、クラス: Graphics
        パラメータ:
        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をオーバーライドします。
        オーバーライド:
        fill3DRect、クラス: Graphics
        パラメータ:
        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をオーバーライドします。
        定義:
        drawOval、クラス: Graphics
        パラメータ:
        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をオーバーライドします。
        定義:
        fillOval、クラス: Graphics
        パラメータ:
        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をオーバーライドします。
        定義:
        drawArc、クラス: Graphics
        パラメータ:
        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をオーバーライドします。
        定義:
        fillArc、クラス: Graphics
        パラメータ:
        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をオーバーライドします。
        定義:
        drawPolyline、クラス: Graphics
        パラメータ:
        xPoints - x点の配列
        yPoints - y点の配列
        nPoints - 点の総数
        関連項目:
        Graphics.drawPolygon(int[], int[], int)
      • fillPolygon

        public void fillPolygon​(int[] xPoints,
                                int[] yPoints,
                                int nPoints)
        Graphics.fillPolygonをオーバーライドします。
        定義:
        fillPolygon、クラス: Graphics
        パラメータ:
        xPoints - x座標の配列。
        yPoints - y座標の配列。
        nPoints - 点の総数。
        関連項目:
        Graphics.drawPolygon(int[], int[], int)
      • drawImage

        public boolean drawImage​(Image img,
                                 int x,
                                 int y,
                                 ImageObserver observer)
        Graphics.drawImageをオーバーライドします。
        定義:
        drawImage、クラス: Graphics
        パラメータ:
        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をオーバーライドします。
        定義:
        drawImage、クラス: Graphics
        パラメータ:
        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をオーバーライドします。
        定義:
        drawImage、クラス: Graphics
        パラメータ:
        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をオーバーライドします。
        定義:
        drawImage、クラス: Graphics
        パラメータ:
        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をオーバーライドします。
        定義:
        drawImage、クラス: Graphics
        パラメータ:
        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をオーバーライドします。
        定義:
        drawImage、クラス: Graphics
        パラメータ:
        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をオーバーライドします。
        定義:
        copyArea、クラス: Graphics
        パラメータ:
        x - ソース矩形のx座標。
        y - ソース矩形のy座標。
        width - ソース矩形の幅。
        height - ソース矩形の高さ。
        destX - ピクセルをコピーする水平距離。
        destY - ピクセルをコピーする垂直距離。
      • isDrawingBuffer

        public boolean isDrawingBuffer()
        drawingBufferの値を返します。
        戻り値:
        このオブジェクトがバッファから描画される場合はtrue
      • setDebugOptions

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

        public int getDebugOptions()
        DebugGraphicsの現在のデバッグ・オプションを返します。
        戻り値:
        このDebugGraphicsの現在のデバッグ・オプション
        関連項目:
        setDebugOptions(int)