Class CommonMouseAdapter
java.lang.Object
com.inductiveautomation.ignition.client.util.gui.MouseAdapterEx
com.inductiveautomation.ignition.client.util.gui.CommonMouseAdapter
- All Implemented Interfaces:
MouseListener
,MouseMotionListener
,EventListener
This mouse listener and mouse motion listener implements logic to make handling mouse drags easier. It handles logic
such converting "trivial drags" into clicks, meaning that drags must exceed a minimum drag distance before being
considered a "drag". It also has simple popup trigger handling and other conveniences.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected double
The minimum distance before a drag starts.void
void
void
void
protected void
onClick
(MouseEvent event, Point point, int modifiers) protected void
onDrag
(MouseEvent event, Point start, Point end, Rectangle rect, int modifiers) protected void
onDragEnd
(MouseEvent event, Point start, Point end, Rectangle rect, int modifiers) protected void
onDragStart
(MouseEvent event, Point start, Point end, Rectangle rect, int modifiers) protected void
onMove
(MouseEvent event, Point point, int modifiers) protected void
onPopupTrigger
(MouseEvent event, Point point, int modifiers) protected void
onPress
(MouseEvent event, Point point, int modifiers) protected void
onRelease
(MouseEvent event, Point point, int modifiers) protected boolean
Determines if this mouse event should be processed or not.Methods inherited from class com.inductiveautomation.ignition.client.util.gui.MouseAdapterEx
install, mouseClicked, mouseEntered, mouseExited, uninstall
-
Field Details
-
MIN_DRAG_DIST
public static final double MIN_DRAG_DIST- See Also:
-
-
Constructor Details
-
CommonMouseAdapter
public CommonMouseAdapter()
-
-
Method Details
-
process
Determines if this mouse event should be processed or not. Default implementation does not process consumed mouse events -
getMinDragDistance
protected double getMinDragDistance()The minimum distance before a drag starts. Default is 4.0 -
mousePressed
- Specified by:
mousePressed
in interfaceMouseListener
- Overrides:
mousePressed
in classMouseAdapterEx
-
mouseReleased
- Specified by:
mouseReleased
in interfaceMouseListener
- Overrides:
mouseReleased
in classMouseAdapterEx
-
mouseMoved
- Specified by:
mouseMoved
in interfaceMouseMotionListener
- Overrides:
mouseMoved
in classMouseAdapterEx
-
mouseDragged
- Specified by:
mouseDragged
in interfaceMouseMotionListener
- Overrides:
mouseDragged
in classMouseAdapterEx
-
onDragStart
-
onDrag
-
onDragEnd
-
onMove
-
onPress
-
onRelease
-
onPopupTrigger
-
onClick
-