Package adams.gui.visualization.image
Class SelectionRectangle
- java.lang.Object
-
- java.awt.geom.RectangularShape
-
- java.awt.geom.Rectangle2D
-
- java.awt.Rectangle
-
- adams.gui.visualization.image.SelectionRectangle
-
- All Implemented Interfaces:
Shape
,Serializable
,Cloneable
public class SelectionRectangle extends Rectangle
Stores the index in the report as well.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.awt.geom.Rectangle2D
Rectangle2D.Double, Rectangle2D.Float
-
-
Constructor Summary
Constructors Constructor Description SelectionRectangle(int x, int y, int width, int height)
Constructs a newSelectionRectangle
whose upper-left corner is specified as(x,y)
and whose width and height are specified by the arguments of the same name.SelectionRectangle(int x, int y, int width, int height, int index)
Constructs a newSelectionRectangle
whose upper-left corner is specified as(x,y)
and whose width and height are specified by the arguments of the same name.SelectionRectangle(Rectangle r)
Constructs a newSelectionRectangle
using the specified rectangle.SelectionRectangle(Rectangle r, int index)
Constructs a newSelectionRectangle
using the specified rectangle.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getIndex()
Returns the stored index.void
setIndex(int value)
Sets the index.-
Methods inherited from class java.awt.Rectangle
add, add, add, contains, contains, contains, contains, createIntersection, createUnion, equals, getBounds, getBounds2D, getHeight, getLocation, getSize, getWidth, getX, getY, grow, inside, intersection, intersects, isEmpty, move, outcode, reshape, resize, setBounds, setBounds, setLocation, setLocation, setRect, setSize, setSize, toString, translate, union
-
Methods inherited from class java.awt.geom.Rectangle2D
add, add, add, contains, contains, getPathIterator, getPathIterator, hashCode, intersect, intersects, intersectsLine, intersectsLine, outcode, setFrame, setRect, union
-
Methods inherited from class java.awt.geom.RectangularShape
clone, contains, contains, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.awt.Shape
contains, contains, contains, contains, getPathIterator, getPathIterator, intersects, intersects
-
-
-
-
Constructor Detail
-
SelectionRectangle
public SelectionRectangle(int x, int y, int width, int height)
Constructs a newSelectionRectangle
whose upper-left corner is specified as(x,y)
and whose width and height are specified by the arguments of the same name. Uses -1 for associated index.- Parameters:
x
- the specified X coordinatey
- the specified Y coordinatewidth
- the width of theSelectionRectangle
height
- the height of theSelectionRectangle
-
SelectionRectangle
public SelectionRectangle(int x, int y, int width, int height, int index)
Constructs a newSelectionRectangle
whose upper-left corner is specified as(x,y)
and whose width and height are specified by the arguments of the same name.- Parameters:
x
- the specified X coordinatey
- the specified Y coordinatewidth
- the width of theSelectionRectangle
height
- the height of theSelectionRectangle
index
- the associated index
-
SelectionRectangle
public SelectionRectangle(Rectangle r)
Constructs a newSelectionRectangle
using the specified rectangle.- Parameters:
r
- the rectangle
-
SelectionRectangle
public SelectionRectangle(Rectangle r, int index)
Constructs a newSelectionRectangle
using the specified rectangle.- Parameters:
r
- the rectangleindex
- the associated index
-
-