Package org.opentrafficsim.draw.graphs
Class PointerHandler
java.lang.Object
org.opentrafficsim.draw.graphs.PointerHandler
- All Implemented Interfaces:
MouseListener,MouseMotionListener,EventListener
Handle mouse events for a graph.
Copyright (c) 2013-2023 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
- Author:
- Peter Knoppers
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidvoidmouseExited(MouseEvent mouseEvent) voidmouseMoved(MouseEvent mouseEvent) voidvoidabstract voidupdateHint(double domainValue, double rangeValue) Called when the pointer is positioned inside the data area of the graph, or when it leaves the data area.
-
Constructor Details
-
PointerHandler
public PointerHandler()
-
-
Method Details
-
mouseDragged
- Specified by:
mouseDraggedin interfaceMouseMotionListener
-
mouseMoved
- Specified by:
mouseMovedin interfaceMouseMotionListener
-
updateHint
public abstract void updateHint(double domainValue, double rangeValue) Called when the pointer is positioned inside the data area of the graph, or when it leaves the data area.
When the mouse is outside the data area both parameters are set to Double.NaN.- Parameters:
domainValue- double; the X-value (in domain units), or Double.NaN if the pointer is outside the data arearangeValue- double; the Y-value (in domain units), or Double.NaN if the pointer is outside the data area
-
mouseClicked
- Specified by:
mouseClickedin interfaceMouseListener
-
mousePressed
- Specified by:
mousePressedin interfaceMouseListener
-
mouseReleased
- Specified by:
mouseReleasedin interfaceMouseListener
-
mouseEntered
- Specified by:
mouseEnteredin interfaceMouseListener
-
mouseExited
- Specified by:
mouseExitedin interfaceMouseListener
-