http://www.jpicedt.org

jpicedt.graphic.view
Class HitInfo.Point

java.lang.Object
  extended by jpicedt.graphic.view.HitInfo.AbstractHitInfo
      extended by 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.


Nested Class Summary
 
Nested classes/interfaces inherited from interface jpicedt.graphic.view.HitInfo
HitInfo.AbstractHitInfo, HitInfo.Composite, HitInfo.EnvelopeStroke, HitInfo.HighlighterStroke, HitInfo.Interior, HitInfo.InverseZOrderingComparator, HitInfo.List, HitInfo.Point, HitInfo.Stroke, HitInfo.Text
 
Field Summary
 
Fields inherited from class jpicedt.graphic.view.HitInfo.AbstractHitInfo
clickedObject, mouseEvent
 
Constructor Summary
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.
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
 
Method Summary
 int getIndex()
           
 int getIndex(int i)
           
 int getNbHitPoints()
          Return the number of points that were hit simultaneously.
 String toString()
           
 
Methods inherited from class jpicedt.graphic.view.HitInfo.AbstractHitInfo
append, getMouseEvent, getTarget
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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.

Method Detail

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

http://www.jpicedt.org

Submit a bug : syd@jpicedt.org