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 doubleThe minimum distance before a drag starts.voidvoidvoidvoidprotected voidonClick(MouseEvent event, Point point, int modifiers) protected voidonDrag(MouseEvent event, Point start, Point end, Rectangle rect, int modifiers) protected voidonDragEnd(MouseEvent event, Point start, Point end, Rectangle rect, int modifiers) protected voidonDragStart(MouseEvent event, Point start, Point end, Rectangle rect, int modifiers) protected voidonMove(MouseEvent event, Point point, int modifiers) protected voidonPopupTrigger(MouseEvent event, Point point, int modifiers) protected voidonPress(MouseEvent event, Point point, int modifiers) protected voidonRelease(MouseEvent event, Point point, int modifiers) protected booleanDetermines 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:
mousePressedin interfaceMouseListener- Overrides:
mousePressedin classMouseAdapterEx
-
mouseReleased
- Specified by:
mouseReleasedin interfaceMouseListener- Overrides:
mouseReleasedin classMouseAdapterEx
-
mouseMoved
- Specified by:
mouseMovedin interfaceMouseMotionListener- Overrides:
mouseMovedin classMouseAdapterEx
-
mouseDragged
- Specified by:
mouseDraggedin interfaceMouseMotionListener- Overrides:
mouseDraggedin classMouseAdapterEx
-
onDragStart
-
onDrag
-
onDragEnd
-
onMove
-
onPress
-
onRelease
-
onPopupTrigger
-
onClick
-