jpicedt.graphic.view
Class HitInfo.Point
java.lang.Object
jpicedt.graphic.view.HitInfo.AbstractHitInfo
jpicedt.graphic.view.HitInfo.Point
- All Implemented Interfaces:
- HitInfo
- Enclosing interface:
- HitInfo
public static class HitInfo.Point
- extends HitInfo.AbstractHitInfo
Represent a hit that occured on one or several Element
's
control-points, the latter case occuring necessarily iff some
control-points are identical.
HitInfo.Point
public HitInfo.Point(Element clickedObject,
int pointIndex,
PEMouseEvent mouseEvent)
- construct a new
HitInfo.Point
that occured on the
given Element
and on the given point index
HitInfo.Point
public HitInfo.Point(Element clickedObject,
ArrayList<Integer> pointIndices,
PEMouseEvent mouseEvent)
- construct a new
HitInfo.Point
that occured on the
given Element
and on the given points simultaneously.
Note that the ArrayList argument is not deeply copied.
getIndex
public int getIndex()
- Returns:
- the point index on which the mouse hit occured. If several
control-points were hit simultaneously because they were located at
the same place, return the first one in ascending order according
to the natural ordering of control-point indices.
getIndex
public int getIndex(int i)
- Returns:
- the ith point index on which the mouse hit occured. If only
one control-point was hit, this is similar as
getIndex()
.
getNbHitPoints
public int getNbHitPoints()
- Return the number of points that were hit simultaneously.
toString
public String toString()
- Overrides:
toString
in class Object
Submit a bug : syd@jpicedt.org