Class ImagePanelSelectionEvent

  • All Implemented Interfaces:
    Serializable

    public class ImagePanelSelectionEvent
    extends EventObject
    Event that gets sent in case of a box selection event in the ImagePanel.
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_TopLeft

        protected Point m_TopLeft
        the top-left of the selection.
      • m_BottomRight

        protected Point m_BottomRight
        the bottom-right of the selection.
      • m_Trace

        protected List<Point> m_Trace
        the trace.
      • m_ModifiersEx

        protected int m_ModifiersEx
        the associated modifiers.
    • Constructor Detail

      • ImagePanelSelectionEvent

        public ImagePanelSelectionEvent​(ImagePanel source,
                                        Point topLeft,
                                        Point bottomRight,
                                        List<Point> trace,
                                        int modifiersEx)
        Initializes the event.
        Parameters:
        source - the source of the event
        topLeft - the top-left of the selection
        bottomRight - the bottom-right of the selection
        trace - the trace of points
        modifiersEx - the extended modifiers associated with the event when releasing the mouse
    • Method Detail

      • getImagePanel

        public ImagePanel getImagePanel()
        Returns the image panel that triggered the event.
        Returns:
        the image panel
      • getTopLeft

        public Point getTopLeft()
        Returns the top-left position.
        Returns:
        the position
      • getBottomRight

        public Point getBottomRight()
        Returns the bottom-right position.
        Returns:
        the position
      • getTrace

        public List<Point> getTrace()
        Returns the trace.
        Returns:
        the traced points from the selection
      • getModifiersEx

        public int getModifiersEx()
        Returns the associated modifiers.
        Returns:
        the modifiers
        See Also:
        MouseEvent.getModifiersEx()