Class HitInfo

  • Direct Known Subclasses:
    HitInfo.Composite, HitInfo.Interior, HitInfo.Point, HitInfo.Stroke

    public class HitInfo
    extends java.lang.Object
    A HitInfo encapsulates information related to a mouse click that occured on a particular area of an Element.
    Since:
    jpicedt 1.3.2
    Version:
    $Id: HitInfo.java,v 1.11.2.1 2007/09/02 11:56:29 reynal Exp $
    Author:
    Sylvain Reynal
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  HitInfo.Composite
      Represent a particular type of Hit that occured on a child of a branch-element, when one whants to specify both the element and its child.
      static class  HitInfo.EnvelopeStroke
      Deprecated.
      use HighlighterStroke instead
      static class  HitInfo.HighlighterStroke
      Represent a Hit that occured on the stroke of a highlighter (eg tangents of a PicSmoothPolygon).
      static class  HitInfo.Interior
      Represent a Hit that occured on the interior of a Element
      static class  HitInfo.Point
      Represent a Hit that occured on one or several Element's control-points, the latter case occuring necessarily iff some control-points are identical.
      static class  HitInfo.Stroke
      Represent a Hit that occured on an Element.
      static class  HitInfo.Text
      Represent a Hit that occured on some interior area of a TextEditable.
    • Constructor Summary

      Constructors 
      Constructor Description
      HitInfo​(Element clickedObject, PEMouseEvent mouseEvent)
      Construct a new HitInfo when a click occured on an object's end-point
    • Constructor Detail

      • HitInfo

        public HitInfo​(Element clickedObject,
                       PEMouseEvent mouseEvent)
        Construct a new HitInfo when a click occured on an object's end-point
        Parameters:
        clickedObject - the Element on which the hit occured
        type - the hit type
        Since:
        jPicEdt
    • Method Detail

      • getTarget

        public Element getTarget()
        Returns:
        the Element on which the hit occured
        Since:
        jPicEdt
      • getMouseEvent

        public PEMouseEvent getMouseEvent()
        Returns:
        the mouse-event that triggered this HitInfo
        Since:
        jPicEdt