Package adams.gui.event
Class ImagePanelSelectionEvent
- java.lang.Object
-
- java.util.EventObject
-
- adams.gui.event.ImagePanelSelectionEvent
-
- All Implemented Interfaces:
Serializable
public class ImagePanelSelectionEvent extends EventObject
Event that gets sent in case of a box selection event in theImagePanel
.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Point
m_BottomRight
the bottom-right of the selection.protected int
m_ModifiersEx
the associated modifiers.protected Point
m_TopLeft
the top-left of the selection.protected List<Point>
m_Trace
the trace.-
Fields inherited from class java.util.EventObject
source
-
-
Constructor Summary
Constructors Constructor Description ImagePanelSelectionEvent(ImagePanel source, Point topLeft, Point bottomRight, List<Point> trace, int modifiersEx)
Initializes the event.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Point
getBottomRight()
Returns the bottom-right position.ImagePanel
getImagePanel()
Returns the image panel that triggered the event.int
getModifiersEx()
Returns the associated modifiers.Point
getTopLeft()
Returns the top-left position.List<Point>
getTrace()
Returns the trace.-
Methods inherited from class java.util.EventObject
getSource, toString
-
-
-
-
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 eventtopLeft
- the top-left of the selectionbottomRight
- the bottom-right of the selectiontrace
- the trace of pointsmodifiersEx
- 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()
-
-