Package net.sf.colossus.gui
Class DragListener
java.lang.Object
java.awt.event.MouseAdapter
net.sf.colossus.gui.DragListener
- All Implemented Interfaces:
MouseListener
,MouseMotionListener
,MouseWheelListener
,EventListener
This listener can be used to make a Component draggable.
If subscribed as MouseListener and MouseMotionListener, the component this
listener subscribes to will become draggable by mouse. This subscription is
done by the static method #makeDraggable(Component) to make sure it is done
the right way.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.awt.event.MouseAdapter
mouseClicked, mouseEntered, mouseExited, mousePressed, mouseWheelMoved
-
Field Details
-
component
-
lastMousePos
-
-
Constructor Details
-
DragListener
-
-
Method Details
-
mouseDragged
- Specified by:
mouseDragged
in interfaceMouseMotionListener
- Overrides:
mouseDragged
in classMouseAdapter
-
mouseMoved
- Specified by:
mouseMoved
in interfaceMouseMotionListener
- Overrides:
mouseMoved
in classMouseAdapter
-
mouseReleased
- Specified by:
mouseReleased
in interfaceMouseListener
- Overrides:
mouseReleased
in classMouseAdapter
-
makeDraggable
-