Uses of Class
java.awt.geom.Rectangle2D
Packages that use Rectangle2D
Package
Description
Contains all of the classes for creating user interfaces and for painting
graphics and images.
Provides classes and interface relating to fonts.
Provides the Java 2D classes for defining and performing operations on
objects related to two-dimensional geometry.
Provides classes for creating and modifying images.
Provides classes and interfaces for producing rendering-independent images.
Provides one interface and many abstract classes that Swing uses to provide
its pluggable look-and-feel capabilities.
Provides user interface objects built according to the Basic look and feel.
Provides classes and interfaces that deal with editable and noneditable text
components.
-
Uses of Rectangle2D in java.awt
Subclasses of Rectangle2D in java.awtModifier and TypeClassDescriptionclassARectanglespecifies an area in a coordinate space that is enclosed by theRectangleobject's upper-left point(x,y)in the coordinate space, its width, and its height.Methods in java.awt that return Rectangle2DModifier and TypeMethodDescriptionRectangle.createIntersection(Rectangle2D r) Returns a newRectangle2Dobject representing the intersection of thisRectangle2Dwith the specifiedRectangle2D.Rectangle.createUnion(Rectangle2D r) Returns a newRectangle2Dobject representing the union of thisRectangle2Dwith the specifiedRectangle2D.TexturePaint.getAnchorRect()Returns a copy of the anchor rectangle which positions and sizes the textured image.Polygon.getBounds2D()Returns a high precision and more accurate bounding box of theShapethan thegetBoundsmethod.Rectangle.getBounds2D()Returns a high precision and more accurate bounding box of theShapethan thegetBoundsmethod.Shape.getBounds2D()Returns a high precision and more accurate bounding box of theShapethan thegetBoundsmethod.Font.getMaxCharBounds(FontRenderContext frc) Returns the bounds for the character with the maximum bounds as defined in the specifiedFontRenderContext.FontMetrics.getMaxCharBounds(Graphics context) Returns the bounds for the character with the maximum bounds in the specifiedGraphicscontext.Font.getStringBounds(char[] chars, int beginIndex, int limit, FontRenderContext frc) Returns the logical bounds of the specified array of characters in the specifiedFontRenderContext.Font.getStringBounds(String str, int beginIndex, int limit, FontRenderContext frc) Returns the logical bounds of the specifiedStringin the specifiedFontRenderContext.Font.getStringBounds(String str, FontRenderContext frc) Returns the logical bounds of the specifiedStringin the specifiedFontRenderContext.Font.getStringBounds(CharacterIterator ci, int beginIndex, int limit, FontRenderContext frc) Returns the logical bounds of the characters indexed in the specifiedCharacterIteratorin the specifiedFontRenderContext.FontMetrics.getStringBounds(char[] chars, int beginIndex, int limit, Graphics context) Returns the bounds of the specified array of characters in the specifiedGraphicscontext.FontMetrics.getStringBounds(String str, int beginIndex, int limit, Graphics context) Returns the bounds of the specifiedStringin the specifiedGraphicscontext.FontMetrics.getStringBounds(String str, Graphics context) Returns the bounds of the specifiedStringin the specifiedGraphicscontext.FontMetrics.getStringBounds(CharacterIterator ci, int beginIndex, int limit, Graphics context) Returns the bounds of the characters indexed in the specifiedCharacterIteratorin the specifiedGraphicscontext.Methods in java.awt with parameters of type Rectangle2DModifier and TypeMethodDescriptionbooleanPolygon.contains(Rectangle2D r) Tests if the interior of theShapeentirely contains the specifiedRectangle2D.booleanShape.contains(Rectangle2D r) Tests if the interior of theShapeentirely contains the specifiedRectangle2D.Color.createContext(ColorModel cm, Rectangle r, Rectangle2D r2d, AffineTransform xform, RenderingHints hints) Creates and returns aPaintContextused to generate a solid color field pattern.GradientPaint.createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints) Creates and returns aPaintContextused to generate a linear color gradient pattern.LinearGradientPaint.createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform transform, RenderingHints hints) Creates and returns aPaintContextused to generate a linear color gradient pattern.Paint.createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints) Creates and returns aPaintContextused to generate the color pattern.RadialGradientPaint.createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform transform, RenderingHints hints) Creates and returns aPaintContextused to generate a circular radial color gradient pattern.TexturePaint.createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints) Creates and returns aPaintContextused to generate a tiled image pattern.Rectangle.createIntersection(Rectangle2D r) Returns a newRectangle2Dobject representing the intersection of thisRectangle2Dwith the specifiedRectangle2D.Rectangle.createUnion(Rectangle2D r) Returns a newRectangle2Dobject representing the union of thisRectangle2Dwith the specifiedRectangle2D.booleanPolygon.intersects(Rectangle2D r) Tests if the interior of theShapeintersects the interior of a specifiedRectangle2D.booleanShape.intersects(Rectangle2D r) Tests if the interior of theShapeintersects the interior of a specifiedRectangle2D.Constructors in java.awt with parameters of type Rectangle2DModifierConstructorDescriptionRadialGradientPaint(Rectangle2D gradientBounds, float[] fractions, Color[] colors, MultipleGradientPaint.CycleMethod cycleMethod) Constructs aRadialGradientPaintwith a defaultSRGBcolor space.TexturePaint(BufferedImage txtr, Rectangle2D anchor) Constructs aTexturePaintobject. -
Uses of Rectangle2D in java.awt.font
Methods in java.awt.font that return Rectangle2DModifier and TypeMethodDescriptionGraphicAttribute.getBounds()Returns aRectangle2Dthat encloses all of the bits drawn by thisGraphicAttributerelative to the rendering position.ImageGraphicAttribute.getBounds()Returns aRectangle2Dthat encloses all of the bits rendered by thisImageGraphicAttribute, relative to the rendering position.ShapeGraphicAttribute.getBounds()Returns aRectangle2Dthat encloses all of the bits drawn by thisShapeGraphicAttributerelative to the rendering position.TextLayout.getBounds()Returns the bounds of thisTextLayout.GlyphMetrics.getBounds2D()Returns the bounds of the glyph.abstract Rectangle2DGlyphVector.getLogicalBounds()Returns the logical bounds of thisGlyphVector.abstract Rectangle2DGlyphVector.getVisualBounds()Returns the visual bounds of thisGlyphVectorThe visual bounds is the bounding box of the outline of thisGlyphVector.Methods in java.awt.font with parameters of type Rectangle2DModifier and TypeMethodDescriptionfloat[]TextLayout.getCaretInfo(TextHitInfo hit, Rectangle2D bounds) Returns information about the caret corresponding tohit.TextLayout.getCaretShape(TextHitInfo hit, Rectangle2D bounds) Returns aShaperepresenting the caret at the specified hit inside the specified bounds.Shape[]TextLayout.getCaretShapes(int offset, Rectangle2D bounds) Returns two paths corresponding to the strong and weak caret.Shape[]TextLayout.getCaretShapes(int offset, Rectangle2D bounds, TextLayout.CaretPolicy policy) Returns two paths corresponding to the strong and weak caret.TextLayout.getLogicalHighlightShape(int firstEndpoint, int secondEndpoint, Rectangle2D bounds) Returns aShapeenclosing the logical selection in the specified range, extended to the specifiedbounds.TextLayout.getVisualHighlightShape(TextHitInfo firstEndpoint, TextHitInfo secondEndpoint, Rectangle2D bounds) Returns a path enclosing the visual selection in the specified range, extended tobounds.TextLayout.hitTestChar(float x, float y, Rectangle2D bounds) Returns aTextHitInfocorresponding to the specified point.Constructors in java.awt.font with parameters of type Rectangle2DModifierConstructorDescriptionGlyphMetrics(boolean horizontal, float advanceX, float advanceY, Rectangle2D bounds, byte glyphType) Constructs aGlyphMetricsobject.GlyphMetrics(float advance, Rectangle2D bounds, byte glyphType) Constructs aGlyphMetricsobject. -
Uses of Rectangle2D in java.awt.geom
Subclasses of Rectangle2D in java.awt.geomModifier and TypeClassDescriptionstatic classTheDoubleclass defines a rectangle specified in double coordinates.static classTheFloatclass defines a rectangle specified in float coordinates.Methods in java.awt.geom that return Rectangle2DModifier and TypeMethodDescriptionabstract Rectangle2DRectangle2D.createIntersection(Rectangle2D r) Returns a newRectangle2Dobject representing the intersection of thisRectangle2Dwith the specifiedRectangle2D.Rectangle2D.Double.createIntersection(Rectangle2D r) Returns a newRectangle2Dobject representing the intersection of thisRectangle2Dwith the specifiedRectangle2D.Rectangle2D.Float.createIntersection(Rectangle2D r) Returns a newRectangle2Dobject representing the intersection of thisRectangle2Dwith the specifiedRectangle2D.abstract Rectangle2DRectangle2D.createUnion(Rectangle2D r) Returns a newRectangle2Dobject representing the union of thisRectangle2Dwith the specifiedRectangle2D.Rectangle2D.Double.createUnion(Rectangle2D r) Returns a newRectangle2Dobject representing the union of thisRectangle2Dwith the specifiedRectangle2D.Rectangle2D.Float.createUnion(Rectangle2D r) Returns a newRectangle2Dobject representing the union of thisRectangle2Dwith the specifiedRectangle2D.Arc2D.getBounds2D()Returns the high-precision framing rectangle of the arc.Area.getBounds2D()Returns a high precision boundingRectangle2Dthat completely encloses thisArea.CubicCurve2D.Double.getBounds2D()Returns a high precision and more accurate bounding box of theShapethan thegetBoundsmethod.CubicCurve2D.Float.getBounds2D()Returns a high precision and more accurate bounding box of theShapethan thegetBoundsmethod.Ellipse2D.Double.getBounds2D()Returns a high precision and more accurate bounding box of theShapethan thegetBoundsmethod.Ellipse2D.Float.getBounds2D()Returns a high precision and more accurate bounding box of theShapethan thegetBoundsmethod.Line2D.Double.getBounds2D()Returns a high precision and more accurate bounding box of theShapethan thegetBoundsmethod.Line2D.Float.getBounds2D()Returns a high precision and more accurate bounding box of theShapethan thegetBoundsmethod.final Rectangle2DPath2D.Double.getBounds2D()Returns a high precision and more accurate bounding box of theShapethan thegetBoundsmethod.final Rectangle2DPath2D.Float.getBounds2D()Returns a high precision and more accurate bounding box of theShapethan thegetBoundsmethod.QuadCurve2D.Double.getBounds2D()Returns a high precision and more accurate bounding box of theShapethan thegetBoundsmethod.QuadCurve2D.Float.getBounds2D()Returns a high precision and more accurate bounding box of theShapethan thegetBoundsmethod.Rectangle2D.Double.getBounds2D()Returns a high precision and more accurate bounding box of theShapethan thegetBoundsmethod.Rectangle2D.Float.getBounds2D()Returns a high precision and more accurate bounding box of theShapethan thegetBoundsmethod.Rectangle2D.getBounds2D()Returns a high precision and more accurate bounding box of theShapethan thegetBoundsmethod.RoundRectangle2D.Double.getBounds2D()Returns a high precision and more accurate bounding box of theShapethan thegetBoundsmethod.RoundRectangle2D.Float.getBounds2D()Returns a high precision and more accurate bounding box of theShapethan thegetBoundsmethod.RectangularShape.getFrame()Returns the framingRectangle2Dthat defines the overall shape of this object.protected Rectangle2DArc2D.Double.makeBounds(double x, double y, double w, double h) Constructs aRectangle2Dof the appropriate precision to hold the parameters calculated to be the framing rectangle of this arc.protected Rectangle2DArc2D.Float.makeBounds(double x, double y, double w, double h) Constructs aRectangle2Dof the appropriate precision to hold the parameters calculated to be the framing rectangle of this arc.protected abstract Rectangle2DArc2D.makeBounds(double x, double y, double w, double h) Constructs aRectangle2Dof the appropriate precision to hold the parameters calculated to be the framing rectangle of this arc.Methods in java.awt.geom with parameters of type Rectangle2DModifier and TypeMethodDescriptionvoidRectangle2D.add(Rectangle2D r) Adds aRectangle2Dobject to thisRectangle2D.booleanArc2D.contains(Rectangle2D r) Determines whether or not the interior of the arc entirely contains the specified rectangle.booleanArea.contains(Rectangle2D r) Tests if the interior of theShapeentirely contains the specifiedRectangle2D.booleanCubicCurve2D.contains(Rectangle2D r) Tests if the interior of theShapeentirely contains the specifiedRectangle2D.booleanLine2D.contains(Rectangle2D r) Tests if the interior of thisLine2Dentirely contains the specifiedRectangle2D.static booleanPath2D.contains(PathIterator pi, Rectangle2D r) Tests if the specifiedRectangle2Dis entirely inside the closed boundary of the specifiedPathIterator.final booleanPath2D.contains(Rectangle2D r) Tests if the interior of theShapeentirely contains the specifiedRectangle2D.booleanQuadCurve2D.contains(Rectangle2D r) Tests if the interior of theShapeentirely contains the specifiedRectangle2D.booleanRectangularShape.contains(Rectangle2D r) Tests if the interior of theShapeentirely contains the specifiedRectangle2D.abstract Rectangle2DRectangle2D.createIntersection(Rectangle2D r) Returns a newRectangle2Dobject representing the intersection of thisRectangle2Dwith the specifiedRectangle2D.Rectangle2D.Double.createIntersection(Rectangle2D r) Returns a newRectangle2Dobject representing the intersection of thisRectangle2Dwith the specifiedRectangle2D.Rectangle2D.Float.createIntersection(Rectangle2D r) Returns a newRectangle2Dobject representing the intersection of thisRectangle2Dwith the specifiedRectangle2D.abstract Rectangle2DRectangle2D.createUnion(Rectangle2D r) Returns a newRectangle2Dobject representing the union of thisRectangle2Dwith the specifiedRectangle2D.Rectangle2D.Double.createUnion(Rectangle2D r) Returns a newRectangle2Dobject representing the union of thisRectangle2Dwith the specifiedRectangle2D.Rectangle2D.Float.createUnion(Rectangle2D r) Returns a newRectangle2Dobject representing the union of thisRectangle2Dwith the specifiedRectangle2D.static voidRectangle2D.intersect(Rectangle2D src1, Rectangle2D src2, Rectangle2D dest) Intersects the pair of specified sourceRectangle2Dobjects and puts the result into the specified destinationRectangle2Dobject.booleanArea.intersects(Rectangle2D r) Tests if the interior of theShapeintersects the interior of a specifiedRectangle2D.booleanCubicCurve2D.intersects(Rectangle2D r) Tests if the interior of theShapeintersects the interior of a specifiedRectangle2D.booleanLine2D.intersects(Rectangle2D r) Tests if the interior of theShapeintersects the interior of a specifiedRectangle2D.static booleanPath2D.intersects(PathIterator pi, Rectangle2D r) Tests if the interior of the specifiedPathIteratorintersects the interior of a specifiedRectangle2D.final booleanPath2D.intersects(Rectangle2D r) Tests if the interior of theShapeintersects the interior of a specifiedRectangle2D.booleanQuadCurve2D.intersects(Rectangle2D r) Tests if the interior of theShapeintersects the interior of a specifiedRectangle2D.booleanRectangularShape.intersects(Rectangle2D r) Tests if the interior of theShapeintersects the interior of a specifiedRectangle2D.voidArc2D.setArc(Rectangle2D rect, double angSt, double angExt, int closure) Sets the location, size, angular extents, and closure type of this arc to the specified values.voidRectangularShape.setFrame(Rectangle2D r) Sets the framing rectangle of thisShapeto be the specifiedRectangle2D.voidRectangle2D.Double.setRect(Rectangle2D r) Sets thisRectangle2Dto be the same as the specifiedRectangle2D.voidRectangle2D.Float.setRect(Rectangle2D r) Sets thisRectangle2Dto be the same as the specifiedRectangle2D.voidRectangle2D.setRect(Rectangle2D r) Sets thisRectangle2Dto be the same as the specifiedRectangle2D.static voidRectangle2D.union(Rectangle2D src1, Rectangle2D src2, Rectangle2D dest) Unions the pair of sourceRectangle2Dobjects and puts the result into the specified destinationRectangle2Dobject.Constructors in java.awt.geom with parameters of type Rectangle2DModifierConstructorDescriptionDouble(Rectangle2D ellipseBounds, double start, double extent, int type) Constructs a new arc, initialized to the specified location, size, angular extents, and closure type.Float(Rectangle2D ellipseBounds, float start, float extent, int type) Constructs a new arc, initialized to the specified location, size, angular extents, and closure type. -
Uses of Rectangle2D in java.awt.image
Methods in java.awt.image that return Rectangle2DModifier and TypeMethodDescriptionfinal Rectangle2DAffineTransformOp.getBounds2D(BufferedImage src) Returns the bounding box of the transformed destination.final Rectangle2DAffineTransformOp.getBounds2D(Raster src) Returns the bounding box of the transformed destination.final Rectangle2DBandCombineOp.getBounds2D(Raster src) Returns the bounding box of the transformed destination.BufferedImageOp.getBounds2D(BufferedImage src) Returns the bounding box of the filtered destination image.final Rectangle2DColorConvertOp.getBounds2D(BufferedImage src) Returns the bounding box of the destination, given this source.final Rectangle2DColorConvertOp.getBounds2D(Raster src) Returns the bounding box of the destination, given this source.final Rectangle2DConvolveOp.getBounds2D(BufferedImage src) Returns the bounding box of the filtered destination image.final Rectangle2DConvolveOp.getBounds2D(Raster src) Returns the bounding box of the filtered destination Raster.final Rectangle2DLookupOp.getBounds2D(BufferedImage src) Returns the bounding box of the filtered destination image.final Rectangle2DLookupOp.getBounds2D(Raster src) Returns the bounding box of the filtered destination Raster.RasterOp.getBounds2D(Raster src) Returns the bounding box of the filtered destination Raster.final Rectangle2DRescaleOp.getBounds2D(BufferedImage src) Returns the bounding box of the rescaled destination image.final Rectangle2DRescaleOp.getBounds2D(Raster src) Returns the bounding box of the rescaled destination Raster. -
Uses of Rectangle2D in java.awt.image.renderable
Methods in java.awt.image.renderable that return Rectangle2DModifier and TypeMethodDescriptionContextualRenderedImageFactory.getBounds2D(ParameterBlock paramBlock) Returns the bounding box for the output of the operation, performed on a given set of sources, in rendering-independent space. -
Uses of Rectangle2D in javax.swing.plaf
Methods in javax.swing.plaf that return Rectangle2DModifier and TypeMethodDescriptionTextUI.modelToView2D(JTextComponent t, int pos, Position.Bias bias) Converts the given location in the model to a place in the view coordinate system. -
Uses of Rectangle2D in javax.swing.plaf.basic
Subclasses of Rectangle2D in javax.swing.plaf.basicModifier and TypeClassDescriptionstatic classDefault implementation of the interfaceCaret. -
Uses of Rectangle2D in javax.swing.text
Subclasses of Rectangle2D in javax.swing.textMethods in javax.swing.text that return Rectangle2DModifier and TypeMethodDescriptionJTextComponent.modelToView2D(int pos) Converts the given location in the model to a place in the view coordinate system.