Class HitInfo.Point

  • Enclosing class:
    HitInfo

    public static class HitInfo.Point
    extends HitInfo
    Represent a Hit that occured on one or several Element's control-points, the latter case occuring necessarily iff some control-points are identical.
    • Constructor Detail

      • Point

        public Point​(Element clickedObject,
                     int pointIndex,
                     PEMouseEvent mouseEvent)
        construct a new HitInfo.Point that occured on the given Element and on the given point index
      • Point

        public Point​(Element clickedObject,
                     java.util.ArrayList 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()
        Return 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)
        Return 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 java.lang.String toString()
        Overrides:
        toString in class java.lang.Object