クラスjava.awt.geom.Rectangle2D
の使用

Rectangle2Dを使用するパッケージ
パッケージ 説明
java.awt
ユーザー・インタフェースの作成およびグラフィックスとイメージのペイント用のすべてのクラスを含みます。
java.awt.font
フォント関連のクラスおよびインタフェースを提供します。
java.awt.geom
2次元幾何学的図形に関連するオブジェクトで処理を定義および実行するJava 2Dクラスを提供します。
java.awt.image
イメージを作成および修正するためのクラスを提供します。
java.awt.image.renderable
レンダリングに依存しないイメージを作成するためのクラスおよびインタフェースを提供します。
javax.swing.plaf
1つのインタフェースおよび多くのabstractクラスを提供しており、Swingはプラグイン可能なLook & Feel機能を提供するためにこれらを利用します。
javax.swing.plaf.basic
基本Look & Feelに従って構築されたユーザー・インタフェース・オブジェクトを提供します。
javax.swing.text
編集可能なテキスト・コンポーネントと編集不能なテキスト・コンポーネントを処理するクラスとインタフェースを提供します。
  • java.awtでのRectangle2Dの使用

    java.awtRectangle2Dのサブクラス
    修飾子と型 クラス 説明
    class  Rectangle
    Rectangleは、座標空間内のRectangleオブジェクトの左上の点(x,y)、その幅、およびその高さで囲まれた座標空間内の領域を指定します。
    Rectangle2Dを返すjava.awtのメソッド
    修飾子と型 メソッド 説明
    Rectangle2D Rectangle.createIntersection​(Rectangle2D r)
    このRectangle2Dと指定されたRectangle2Dの共通部分を表す新しいRectangle2Dオブジェクトを返します。
    Rectangle2D Rectangle.createUnion​(Rectangle2D r)
    このRectangle2Dと指定されたRectangle2Dの和集合を表す新しいRectangle2Dオブジェクトを返します。
    Rectangle2D TexturePaint.getAnchorRect()
    テクスチャ・イメージの位置とサイズを指定するアンカー矩形のコピーを返します。
    Rectangle2D Polygon.getBounds2D()
    高精度で、かつgetBoundsメソッドより正確なShapeのバウンディング・ボックスを返します。
    Rectangle2D Rectangle.getBounds2D()
    高精度で、かつgetBoundsメソッドより正確なShapeのバウンディング・ボックスを返します。
    Rectangle2D Shape.getBounds2D()
    高精度で、かつgetBoundsメソッドより正確なShapeのバウンディング・ボックスを返します。
    Rectangle2D Font.getMaxCharBounds​(FontRenderContext frc)
    指定されたFontRenderContextで定義された、最大の境界を持つ文字の境界を返します。
    Rectangle2D FontMetrics.getMaxCharBounds​(Graphics context)
    指定されたGraphicsコンテキスト内の最大の境界を持つ文字の境界を返します。
    Rectangle2D Font.getStringBounds​(char[] chars, int beginIndex, int limit, FontRenderContext frc)
    指定されたFontRenderContext内の指定された文字の配列の論理境界を返します。
    Rectangle2D Font.getStringBounds​(String str, int beginIndex, int limit, FontRenderContext frc)
    指定されたFontRenderContext内の指定されたStringの論理境界を返します。
    Rectangle2D Font.getStringBounds​(String str, FontRenderContext frc)
    指定されたFontRenderContext内の指定されたStringの論理境界を返します。
    Rectangle2D Font.getStringBounds​(CharacterIterator ci, int beginIndex, int limit, FontRenderContext frc)
    指定されたFontRenderContext内の指定されたCharacterIteratorでインデックスが付けられた文字の論理境界を返します。
    Rectangle2D FontMetrics.getStringBounds​(char[] chars, int beginIndex, int limit, Graphics context)
    指定されたGraphicsコンテキスト内の指定された文字の配列の境界を返します。
    Rectangle2D FontMetrics.getStringBounds​(String str, int beginIndex, int limit, Graphics context)
    指定されたGraphicsコンテキスト内の指定されたStringの境界を返します。
    Rectangle2D FontMetrics.getStringBounds​(String str, Graphics context)
    指定されたGraphicsコンテキスト内の指定されたStringの境界を返します。
    Rectangle2D FontMetrics.getStringBounds​(CharacterIterator ci, int beginIndex, int limit, Graphics context)
    指定されたGraphicsコンテキスト内の指定されたCharacterIteratorでインデックスが付けられた文字の境界を返します。
    Rectangle2Dのパラメータを持つjava.awtのメソッド
    修飾子と型 メソッド 説明
    boolean Polygon.contains​(Rectangle2D r)
    Shapeの内部に、指定されたRectangle2Dが完全に含まれるかどうかをテストします。
    boolean Shape.contains​(Rectangle2D r)
    Shapeの内部に、指定されたRectangle2Dが完全に含まれるかどうかをテストします。
    PaintContext Color.createContext​(ColorModel cm, Rectangle r, Rectangle2D r2d, AffineTransform xform, RenderingHints hints)
    塗りつぶした色のフィールド・パターンを生成するために使用されるPaintContextを作成して返します。
    PaintContext GradientPaint.createContext​(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints)
    カラーの線形グラデーション・パターンを生成するために使用されるPaintContextを作成して返します。
    PaintContext LinearGradientPaint.createContext​(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform transform, RenderingHints hints)
    カラーの線形グラデーション・パターンを生成するために使用されるPaintContextを作成して返します。
    PaintContext Paint.createContext​(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints)
    カラー・パターンを生成するために使用されるPaintContextを作成して返します。
    PaintContext RadialGradientPaint.createContext​(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform transform, RenderingHints hints)
    色の円放射状グラデーション・パターンを生成するために使用されるPaintContextを作成して返します。
    PaintContext TexturePaint.createContext​(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints)
    タイリングされたイメージ・パターンを生成するために使用されるPaintContextを作成して返します。
    Rectangle2D Rectangle.createIntersection​(Rectangle2D r)
    このRectangle2Dと指定されたRectangle2Dの共通部分を表す新しいRectangle2Dオブジェクトを返します。
    Rectangle2D Rectangle.createUnion​(Rectangle2D r)
    このRectangle2Dと指定されたRectangle2Dの和集合を表す新しいRectangle2Dオブジェクトを返します。
    boolean Polygon.intersects​(Rectangle2D r)
    Shapeの内部が指定されたRectangle2Dの内部と交差しているかどうかをテストします。
    boolean Shape.intersects​(Rectangle2D r)
    Shapeの内部が指定されたRectangle2Dの内部と交差しているかどうかをテストします。
    Rectangle2Dのパラメータを持つjava.awtのコンストラクタ
    コンストラクタ 説明
    RadialGradientPaint​(Rectangle2D gradientBounds, float[] fractions, Color[] colors, MultipleGradientPaint.CycleMethod cycleMethod)
    デフォルトのSRGBカラー・スペースでRadialGradientPaintを構築します。
    TexturePaint​(BufferedImage txtr, Rectangle2D anchor)
    TexturePaintオブジェクトを構築します。
  • java.awt.fontでのRectangle2Dの使用

    Rectangle2Dを返すjava.awt.fontのメソッド
    修飾子と型 メソッド 説明
    Rectangle2D GraphicAttribute.getBounds()
    このGraphicAttributeによってレンダリングされる全ビットを囲む、Rectangle2Dを返します。これは、レンダリング位置を基準にして示されます。
    Rectangle2D ImageGraphicAttribute.getBounds()
    このImageGraphicAttributeによってレンダリングされる全ビットを囲むRectangle2Dを返します。これは、レンダリング位置を基準にして示されます。
    Rectangle2D ShapeGraphicAttribute.getBounds()
    このShapeGraphicAttributeによってレンダリングされる全ビットを囲む、Rectangle2Dを返します。これは、レンダリング位置を基準にして示されます。
    Rectangle2D TextLayout.getBounds()
    このTextLayoutの境界を返します。
    Rectangle2D GlyphMetrics.getBounds2D()
    グリフの境界を返します。
    abstract Rectangle2D GlyphVector.getLogicalBounds()
    GlyphVectorの論理境界を返します。
    abstract Rectangle2D GlyphVector.getVisualBounds()
    このGlyphVectorの視覚境界を返します。視覚境界は、GlyphVectorの輪郭のバウンディング・ボックスです。
    Rectangle2Dのパラメータを持つjava.awt.fontのメソッド
    修飾子と型 メソッド 説明
    float[] TextLayout.getCaretInfo​(TextHitInfo hit, Rectangle2D bounds)
    hitに対応するキャレットについての情報を返します。
    Shape TextLayout.getCaretShape​(TextHitInfo hit, Rectangle2D bounds)
    指定された境界内の指定されたヒットにあるキャレットを表すShapeを返します。
    Shape[] TextLayout.getCaretShapes​(int offset, Rectangle2D bounds)
    強いキャレットと弱いキャレットに対応する2つの輪郭線を返します。
    Shape[] TextLayout.getCaretShapes​(int offset, Rectangle2D bounds, TextLayout.CaretPolicy policy)
    強いキャレットと弱いキャレットに対応する2つの輪郭線を返します。
    Shape TextLayout.getLogicalHighlightShape​(int firstEndpoint, int secondEndpoint, Rectangle2D bounds)
    指定された範囲の論理的な選択範囲を囲むShapeを、指定されたboundsまで拡張して返します。
    Shape TextLayout.getVisualHighlightShape​(TextHitInfo firstEndpoint, TextHitInfo secondEndpoint, Rectangle2D bounds)
    指定された範囲の視覚的な選択範囲を囲む輪郭線を、boundsまで拡張して返します。
    TextHitInfo TextLayout.hitTestChar​(float x, float y, Rectangle2D bounds)
    指定された点に対応するTextHitInfoを返します。
    Rectangle2Dのパラメータを持つjava.awt.fontのコンストラクタ
    コンストラクタ 説明
    GlyphMetrics​(boolean horizontal, float advanceX, float advanceY, Rectangle2D bounds, byte glyphType)
    GlyphMetricsオブジェクトを構築します。
    GlyphMetrics​(float advance, Rectangle2D bounds, byte glyphType)
    GlyphMetricsオブジェクトを構築します。
  • java.awt.geomでのRectangle2Dの使用

    java.awt.geomRectangle2Dのサブクラス
    修飾子と型 クラス 説明
    static class  Rectangle2D.Double
    Doubleクラスは、double座標で指定される矩形を定義します。
    static class  Rectangle2D.Float
    Floatクラスは、float座標で指定される矩形を定義します。
    Rectangle2Dを返すjava.awt.geomのメソッド
    修飾子と型 メソッド 説明
    abstract Rectangle2D Rectangle2D.createIntersection​(Rectangle2D r)
    このRectangle2Dと指定されたRectangle2Dの共通部分を表す新しいRectangle2Dオブジェクトを返します。
    Rectangle2D Rectangle2D.Double.createIntersection​(Rectangle2D r)
    このRectangle2Dと指定されたRectangle2Dの共通部分を表す新しいRectangle2Dオブジェクトを返します。
    Rectangle2D Rectangle2D.Float.createIntersection​(Rectangle2D r)
    このRectangle2Dと指定されたRectangle2Dの共通部分を表す新しいRectangle2Dオブジェクトを返します。
    abstract Rectangle2D Rectangle2D.createUnion​(Rectangle2D r)
    このRectangle2Dと指定されたRectangle2Dの和集合を表す新しいRectangle2Dオブジェクトを返します。
    Rectangle2D Rectangle2D.Double.createUnion​(Rectangle2D r)
    このRectangle2Dと指定されたRectangle2Dの和集合を表す新しいRectangle2Dオブジェクトを返します。
    Rectangle2D Rectangle2D.Float.createUnion​(Rectangle2D r)
    このRectangle2Dと指定されたRectangle2Dの和集合を表す新しいRectangle2Dオブジェクトを返します。
    Rectangle2D Arc2D.getBounds2D()
    弧の高精度表示枠矩形を返します。
    Rectangle2D Area.getBounds2D()
    このAreaを完全に囲む高精度バウンディングRectangle2Dを返します。
    Rectangle2D CubicCurve2D.Double.getBounds2D()
    高精度で、かつgetBoundsメソッドより正確なShapeのバウンディング・ボックスを返します。
    Rectangle2D CubicCurve2D.Float.getBounds2D()
    高精度で、かつgetBoundsメソッドより正確なShapeのバウンディング・ボックスを返します。
    Rectangle2D Ellipse2D.Double.getBounds2D()
    高精度で、かつgetBoundsメソッドより正確なShapeのバウンディング・ボックスを返します。
    Rectangle2D Ellipse2D.Float.getBounds2D()
    高精度で、かつgetBoundsメソッドより正確なShapeのバウンディング・ボックスを返します。
    Rectangle2D Line2D.Double.getBounds2D()
    高精度で、かつgetBoundsメソッドより正確なShapeのバウンディング・ボックスを返します。
    Rectangle2D Line2D.Float.getBounds2D()
    高精度で、かつgetBoundsメソッドより正確なShapeのバウンディング・ボックスを返します。
    Rectangle2D Path2D.Double.getBounds2D()
    高精度で、かつgetBoundsメソッドより正確なShapeのバウンディング・ボックスを返します。
    Rectangle2D Path2D.Float.getBounds2D()
    高精度で、かつgetBoundsメソッドより正確なShapeのバウンディング・ボックスを返します。
    Rectangle2D QuadCurve2D.Double.getBounds2D()
    高精度で、かつgetBoundsメソッドより正確なShapeのバウンディング・ボックスを返します。
    Rectangle2D QuadCurve2D.Float.getBounds2D()
    高精度で、かつgetBoundsメソッドより正確なShapeのバウンディング・ボックスを返します。
    Rectangle2D Rectangle2D.Double.getBounds2D()
    高精度で、かつgetBoundsメソッドより正確なShapeのバウンディング・ボックスを返します。
    Rectangle2D Rectangle2D.Float.getBounds2D()
    高精度で、かつgetBoundsメソッドより正確なShapeのバウンディング・ボックスを返します。
    Rectangle2D Rectangle2D.getBounds2D()
    高精度で、かつgetBoundsメソッドより正確なShapeのバウンディング・ボックスを返します。
    Rectangle2D RoundRectangle2D.Double.getBounds2D()
    高精度で、かつgetBoundsメソッドより正確なShapeのバウンディング・ボックスを返します。
    Rectangle2D RoundRectangle2D.Float.getBounds2D()
    高精度で、かつgetBoundsメソッドより正確なShapeのバウンディング・ボックスを返します。
    Rectangle2D RectangularShape.getFrame()
    このオブジェクトの形状全体を定義する表示枠Rectangle2Dを返します。
    protected Rectangle2D Arc2D.Double.makeBounds​(double x, double y, double w, double h)
    この弧の表示枠矩形になるように計算されたパラメータを格納するために、適切な精度のRectangle2Dを作成します。
    protected Rectangle2D Arc2D.Float.makeBounds​(double x, double y, double w, double h)
    この弧の表示枠矩形になるように計算されたパラメータを格納するために、適切な精度のRectangle2Dを作成します。
    protected abstract Rectangle2D Arc2D.makeBounds​(double x, double y, double w, double h)
    この弧の表示枠矩形になるように計算されたパラメータを格納するために、適切な精度のRectangle2Dを作成します。
    Rectangle2Dのパラメータを持つjava.awt.geomのメソッド
    修飾子と型 メソッド 説明
    void Rectangle2D.add​(Rectangle2D r)
    Rectangle2DオブジェクトをこのRectangle2Dに追加します。
    boolean Arc2D.contains​(Rectangle2D r)
    弧が、指定された矩形を内部に完全に包含しているかどうかを判定します。
    boolean Area.contains​(Rectangle2D r)
    Shapeの内部に、指定されたRectangle2Dが完全に含まれるかどうかをテストします。
    boolean CubicCurve2D.contains​(Rectangle2D r)
    Shapeの内部に、指定されたRectangle2Dが完全に含まれるかどうかをテストします。
    boolean Line2D.contains​(Rectangle2D r)
    このLine2Dの内部が、指定されたRectangle2Dを完全に内包するかどうかを判定します。
    static boolean Path2D.contains​(PathIterator pi, Rectangle2D r)
    指定されたRectangle2D全体が指定されたPathIteratorの閉じた境界内にあるかどうかを判定します。
    boolean Path2D.contains​(Rectangle2D r)
    Shapeの内部に、指定されたRectangle2Dが完全に含まれるかどうかをテストします。
    boolean QuadCurve2D.contains​(Rectangle2D r)
    Shapeの内部に、指定されたRectangle2Dが完全に含まれるかどうかをテストします。
    boolean RectangularShape.contains​(Rectangle2D r)
    Shapeの内部に、指定されたRectangle2Dが完全に含まれるかどうかをテストします。
    abstract Rectangle2D Rectangle2D.createIntersection​(Rectangle2D r)
    このRectangle2Dと指定されたRectangle2Dの共通部分を表す新しいRectangle2Dオブジェクトを返します。
    Rectangle2D Rectangle2D.Double.createIntersection​(Rectangle2D r)
    このRectangle2Dと指定されたRectangle2Dの共通部分を表す新しいRectangle2Dオブジェクトを返します。
    Rectangle2D Rectangle2D.Float.createIntersection​(Rectangle2D r)
    このRectangle2Dと指定されたRectangle2Dの共通部分を表す新しいRectangle2Dオブジェクトを返します。
    abstract Rectangle2D Rectangle2D.createUnion​(Rectangle2D r)
    このRectangle2Dと指定されたRectangle2Dの和集合を表す新しいRectangle2Dオブジェクトを返します。
    Rectangle2D Rectangle2D.Double.createUnion​(Rectangle2D r)
    このRectangle2Dと指定されたRectangle2Dの和集合を表す新しいRectangle2Dオブジェクトを返します。
    Rectangle2D Rectangle2D.Float.createUnion​(Rectangle2D r)
    このRectangle2Dと指定されたRectangle2Dの和集合を表す新しいRectangle2Dオブジェクトを返します。
    static void Rectangle2D.intersect​(Rectangle2D src1, Rectangle2D src2, Rectangle2D dest)
    指定された元のRectangle2Dオブジェクトのペアの共通部分をとり、その結果を指定された転送先Rectangle2Dオブジェクトに格納します。
    boolean Area.intersects​(Rectangle2D r)
    Shapeの内部が指定されたRectangle2Dの内部と交差しているかどうかをテストします。
    boolean CubicCurve2D.intersects​(Rectangle2D r)
    Shapeの内部が指定されたRectangle2Dの内部と交差しているかどうかをテストします。
    boolean Line2D.intersects​(Rectangle2D r)
    Shapeの内部が指定されたRectangle2Dの内部と交差しているかどうかをテストします。
    static boolean Path2D.intersects​(PathIterator pi, Rectangle2D r)
    指定されたPathIteratorの内部が、指定されたRectangle2Dの内部と交差するかどうかを判定します。
    boolean Path2D.intersects​(Rectangle2D r)
    Shapeの内部が指定されたRectangle2Dの内部と交差しているかどうかをテストします。
    boolean QuadCurve2D.intersects​(Rectangle2D r)
    Shapeの内部が指定されたRectangle2Dの内部と交差しているかどうかをテストします。
    boolean RectangularShape.intersects​(Rectangle2D r)
    Shapeの内部が指定されたRectangle2Dの内部と交差しているかどうかをテストします。
    void Arc2D.setArc​(Rectangle2D rect, double angSt, double angExt, int closure)
    この弧の位置、サイズ、角の大きさ、閉じ方の種類を、指定された値に設定します。
    void RectangularShape.setFrame​(Rectangle2D r)
    このShapeの表示枠矩形を、指定されたRectangle2Dに設定します。
    void Rectangle2D.Double.setRect​(Rectangle2D r)
    このRectangle2Dを、指定されたRectangle2Dと同じになるように設定します。
    void Rectangle2D.Float.setRect​(Rectangle2D r)
    このRectangle2Dを、指定されたRectangle2Dと同じになるように設定します。
    void Rectangle2D.setRect​(Rectangle2D r)
    このRectangle2Dを、指定されたRectangle2Dと同じになるように設定します。
    static void Rectangle2D.union​(Rectangle2D src1, Rectangle2D src2, Rectangle2D dest)
    元のRectangle2Dオブジェクトのペアを結合し、その結果を指定された転送先Rectangle2Dオブジェクトに格納します。
    Rectangle2Dのパラメータを持つjava.awt.geomのコンストラクタ
    コンストラクタ 説明
    Double​(Rectangle2D ellipseBounds, double start, double extent, int type)
    新しい弧を構築し、指定された位置、サイズ、角の大きさ、および閉じ方の種類に初期化します。
    Float​(Rectangle2D ellipseBounds, float start, float extent, int type)
    新しい弧を構築し、指定された位置、サイズ、角の大きさ、および閉じ方の種類に初期化します。
  • java.awt.imageでのRectangle2Dの使用

    Rectangle2Dを返すjava.awt.imageのメソッド
    修飾子と型 メソッド 説明
    Rectangle2D AffineTransformOp.getBounds2D​(BufferedImage src)
    変換された転送先のバウンディング・ボックスを返します。
    Rectangle2D AffineTransformOp.getBounds2D​(Raster src)
    変換された転送先のバウンディング・ボックスを返します。
    Rectangle2D BandCombineOp.getBounds2D​(Raster src)
    変換された転送先のバウンディング・ボックスを返します。
    Rectangle2D BufferedImageOp.getBounds2D​(BufferedImage src)
    フィルタ処理された転送先イメージのバウンディング・ボックスを返します。
    Rectangle2D ColorConvertOp.getBounds2D​(BufferedImage src)
    この転送元を指定して、転送先のバウンディング・ボックスを返します。
    Rectangle2D ColorConvertOp.getBounds2D​(Raster src)
    この転送元を指定して、転送先のバウンディング・ボックスを返します。
    Rectangle2D ConvolveOp.getBounds2D​(BufferedImage src)
    フィルタ処理された転送先イメージのバウンディング・ボックスを返します。
    Rectangle2D ConvolveOp.getBounds2D​(Raster src)
    フィルタ処理された転送先Rasterのバウンディング・ボックスを返します。
    Rectangle2D LookupOp.getBounds2D​(BufferedImage src)
    フィルタ処理された転送先イメージのバウンディング・ボックスを返します。
    Rectangle2D LookupOp.getBounds2D​(Raster src)
    フィルタ処理された転送先Rasterのバウンディング・ボックスを返します。
    Rectangle2D RasterOp.getBounds2D​(Raster src)
    フィルタ処理された転送先Rasterのバウンディング・ボックスを返します。
    Rectangle2D RescaleOp.getBounds2D​(BufferedImage src)
    再スケーリングされた転送先イメージのバウンディング・ボックスを返します。
    Rectangle2D RescaleOp.getBounds2D​(Raster src)
    再スケーリングされた転送先Rasterのバウンディング・ボックスを返します。
  • java.awt.image.renderableでのRectangle2Dの使用

    Rectangle2Dを返すjava.awt.image.renderableのメソッド
    修飾子と型 メソッド 説明
    Rectangle2D ContextualRenderedImageFactory.getBounds2D​(ParameterBlock paramBlock)
    レンダリングに依存しないスペースでの、指定されたソースのセットに対して実行される操作の出力のためのバウンディング・ボックスを返します。
  • javax.swing.plafでのRectangle2Dの使用

    Rectangle2Dを返すjavax.swing.plafのメソッド
    修飾子と型 メソッド 説明
    Rectangle2D TextUI.modelToView2D​(JTextComponent t, int pos, Position.Bias bias)
    モデル内の指定された位置を、ビュー座標体系内の場所に変換します。
  • javax.swing.plaf.basicでのRectangle2Dの使用

    javax.swing.plaf.basicRectangle2Dのサブクラス
    修飾子と型 クラス 説明
    static class  BasicTextUI.BasicCaret
    インタフェースCaretのデフォルト実装。
  • javax.swing.textでのRectangle2Dの使用

    javax.swing.textRectangle2Dのサブクラス
    修飾子と型 クラス 説明
    class  DefaultCaret
    Caretのデフォルトの実装です。
    Rectangle2Dを返すjavax.swing.textのメソッド
    修飾子と型 メソッド 説明
    Rectangle2D JTextComponent.modelToView2D​(int pos)
    モデル内の指定された位置を、ビュー座標体系内の場所に変換します。