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 Pointm_BottomRightthe bottom-right of the selection.protected intm_ModifiersExthe associated modifiers.protected Pointm_TopLeftthe top-left of the selection.protected List<Point>m_Tracethe 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 PointgetBottomRight()Returns the bottom-right position.ImagePanelgetImagePanel()Returns the image panel that triggered the event.intgetModifiersEx()Returns the associated modifiers.PointgetTopLeft()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()
-
-