Package com.bc.ceres.swing.figure
Class AbstractInteractor
java.lang.Object
com.bc.ceres.swing.figure.AbstractInteractor
- All Implemented Interfaces:
Interactor,KeyListener,MouseListener,MouseMotionListener,EventListener
- Direct Known Subclasses:
ViewportInteractor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanactivate()voidprotected voidcancelInteraction(InputEvent inputEvent) voidbooleanisActive()protected static booleanprotected static booleanprotected static booleanvoidkeyPressed(KeyEvent event) Invoked when a key has been pressed.voidkeyReleased(KeyEvent event) Invoked when a key has been released.voidInvoked when a key has been typed.voidmouseClicked(MouseEvent event) Invoked when the mouse button has been clicked (pressed and released) on a component.voidmouseDragged(MouseEvent event) Invoked when a mouse button is pressed on a component and then dragged.voidmouseEntered(MouseEvent event) Invoked when the mouse enters a component.voidmouseExited(MouseEvent event) Invoked when the mouse exits a component.voidmouseMoved(MouseEvent event) Invoked when the mouse cursor has been moved onto a component but no buttons have been pushed.voidmousePressed(MouseEvent event) Invoked when a mouse button has been pressed on a component.voidmouseReleased(MouseEvent event) Invoked when a mouse button has been released on a component.voidprotected booleanstartInteraction(InputEvent inputEvent) protected voidstopInteraction(InputEvent inputEvent)
-
Constructor Details
-
AbstractInteractor
protected AbstractInteractor()
-
-
Method Details
-
isActive
public boolean isActive()- Specified by:
isActivein interfaceInteractor
-
activate
public boolean activate()- Specified by:
activatein interfaceInteractor
-
deactivate
public void deactivate()- Specified by:
deactivatein interfaceInteractor
-
getCursor
- Specified by:
getCursorin interfaceInteractor
-
mouseEntered
Invoked when the mouse enters a component.The default implementation does nothing.
- Specified by:
mouseEnteredin interfaceMouseListener- Parameters:
event- The mouse event.
-
mouseExited
Invoked when the mouse exits a component.The default implementation does nothing.
- Specified by:
mouseExitedin interfaceMouseListener- Parameters:
event- The mouse event.
-
mousePressed
Invoked when a mouse button has been pressed on a component.The default implementation does nothing.
- Specified by:
mousePressedin interfaceMouseListener- Parameters:
event- The mouse event.
-
mouseReleased
Invoked when a mouse button has been released on a component.The default implementation does nothing.
- Specified by:
mouseReleasedin interfaceMouseListener- Parameters:
event- The mouse event.
-
mouseClicked
Invoked when the mouse button has been clicked (pressed and released) on a component.The default implementation does nothing.
- Specified by:
mouseClickedin interfaceMouseListener- Parameters:
event- The mouse event.
-
mouseDragged
Invoked when a mouse button is pressed on a component and then dragged.MOUSE_DRAGGEDevents will continue to be delivered to the component where the drag originated until the mouse button is released (regardless of whether the mouse position is within the bounds of the component).Due to platform-dependent Drag&Drop implementations,
MOUSE_DRAGGEDevents may not be delivered during a native Drag&Drop operation.The default implementation does nothing.
- Specified by:
mouseDraggedin interfaceMouseMotionListener- Parameters:
event- The mouse event.
-
mouseMoved
Invoked when the mouse cursor has been moved onto a component but no buttons have been pushed.The default implementation does nothing.
- Specified by:
mouseMovedin interfaceMouseMotionListener- Parameters:
event- The mouse event.
-
keyPressed
Invoked when a key has been pressed. See the class description forKeyEventfor a definition of a key pressed event.The default implementation does nothing.
- Specified by:
keyPressedin interfaceKeyListener- Parameters:
event- The key event.
-
keyReleased
Invoked when a key has been released. See the class description forKeyEventfor a definition of a key released event.The default implementation does nothing.
- Specified by:
keyReleasedin interfaceKeyListener- Parameters:
event- The key event.
-
keyTyped
Invoked when a key has been typed. See the class description forKeyEventfor a definition of a key typed event.The default implementation calls
cancelInteraction(java.awt.event.InputEvent)if the "ESC" key has been typed.- Specified by:
keyTypedin interfaceKeyListener- Parameters:
event- The key event.
-
addListener
- Specified by:
addListenerin interfaceInteractor
-
removeListener
- Specified by:
removeListenerin interfaceInteractor
-
getListeners
- Specified by:
getListenersin interfaceInteractor
-
startInteraction
-
stopInteraction
-
cancelInteraction
-
isSingleButton1Click
-
isMultiButton1Click
-
isLeftMouseButtonDown
-