Package adams.gui.visualization.image
Class SelectionPoint
- java.lang.Object
-
- java.awt.geom.Point2D
-
- java.awt.Point
-
- adams.gui.visualization.image.SelectionPoint
-
- All Implemented Interfaces:
Serializable
,Cloneable
public class SelectionPoint extends Point
Stores the index in the point 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.Point2D
Point2D.Double, Point2D.Float
-
-
Constructor Summary
Constructors Constructor Description SelectionPoint(int x, int y)
Constructs a newSelectionPoint
whose upper-left corner is specified as(x,y)
and whose width and height are specified by the arguments of the same name.SelectionPoint(int x, int y, int index)
Constructs a newSelectionPoint
whose upper-left corner is specified as(x,y)
and whose width and height are specified by the arguments of the same name.SelectionPoint(Point p)
Constructs a newSelectionPoint
using the specified point.SelectionPoint(Point p, int index)
Constructs a newSelectionPoint
using the specified point.
-
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.Point
equals, getLocation, getX, getY, move, setLocation, setLocation, setLocation, toString, translate
-
Methods inherited from class java.awt.geom.Point2D
clone, distance, distance, distance, distanceSq, distanceSq, distanceSq, hashCode, setLocation
-
-
-
-
Constructor Detail
-
SelectionPoint
public SelectionPoint(int x, int y)
Constructs a newSelectionPoint
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 coordinate
-
SelectionPoint
public SelectionPoint(int x, int y, int index)
Constructs a newSelectionPoint
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 coordinateindex
- the associated index
-
SelectionPoint
public SelectionPoint(Point p)
Constructs a newSelectionPoint
using the specified point.- Parameters:
p
- the point
-
SelectionPoint
public SelectionPoint(Point p, int index)
Constructs a newSelectionPoint
using the specified point.- Parameters:
p
- the pointindex
- the associated index
-
-