public abstract class AbstractInteractionHandler extends Object implements InteractionHandler
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractInteractionHandler(String name)
Creates an AbstractInteractionHandler.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
altKeyPressed(RecordPlot plot,
KeyEvent event)
Called when the alt key is pressed.
|
boolean |
altKeyReleased(RecordPlot plot,
KeyEvent event)
Called when the alt key is released.
|
boolean |
ctrlKeyPressed(RecordPlot plot,
KeyEvent event)
Called when the ctrl key is pressed.
|
boolean |
ctrlKeyReleased(RecordPlot plot,
KeyEvent event)
Called when the ctrl key is released.
|
boolean |
ctrlMetaKeyPressed(RecordPlot plot,
KeyEvent event)
Called when the ctrl (other OSs) or meta (MacOS) key is pressed key is pressed.
|
boolean |
ctrlMetaKeyReleased(RecordPlot plot,
KeyEvent event)
Called when the ctrl (other OSs) or meta (MacOS) key is released.
|
boolean |
equals(Object other)
Overridden to use interaction handler name in comparisons.
|
boolean |
escKeyPressed(RecordPlot plot,
KeyEvent event)
Called when the esc key is pressed.
|
boolean |
escKeyReleased(RecordPlot plot,
KeyEvent event)
Called when the esc key is released.
|
int |
getHeight()
Returns the height of the interaction panel.
|
Icon |
getIcon(int size)
Returns associated icon
|
String |
getID() |
String |
getName()
Returns the name of the Interaction Handler.
|
int |
getWidth()
Returns the width of the interaction panel.
|
int |
hashCode()
Overridden to use interaction handler name to generate hash code.
|
boolean |
keyTyped(RecordPlot plot,
KeyEvent event)
Called when a key is typed.
|
boolean |
metaKeyPressed(RecordPlot plot,
KeyEvent event)
Called when the meta/option key is pressed.
|
boolean |
metaKeyReleased(RecordPlot plot,
KeyEvent event)
Called when the meta/option key is released.
|
void |
mouseButton1Clicked(RecordPlot plot,
MouseEvent event)
Called when mouse button 1 is clicked
|
void |
mouseButton1DragEnded(RecordPlot plot,
MouseEvent event)
Called when mouse button 1 is ending a drag
|
void |
mouseButton1Dragged(RecordPlot plot,
MouseEvent event)
Called when mouse button 1 is dragged
|
void |
mouseButton1DragStarted(RecordPlot plot,
MouseEvent event)
Called when mouse button 1 is starting a drag
|
void |
mouseButton1Pressed(RecordPlot plot,
MouseEvent event)
Called when mouse button 1 is pressed
|
void |
mouseButton1Released(RecordPlot plot,
MouseEvent event)
Called when mouse button 1 is released
|
void |
mouseEntered(RecordPlot plot,
MouseEvent event)
Called when the mouse is entering the component
|
void |
mouseExited(RecordPlot plot,
MouseEvent event)
Called when the mouse is exitting the component
|
void |
mouseMoved(RecordPlot plot,
MouseEvent event)
Called when the mouse is moved
|
void |
mouseWheelMoved(RecordPlot plot,
MouseWheelEvent event)
Called when the mousewheel is moved
|
boolean |
otherKeyPressed(RecordPlot plot,
KeyEvent event)
Called when any other key is pressed.
|
boolean |
otherKeyReleased(RecordPlot plot,
KeyEvent event)
Called when any other key is released.
|
void |
reset(RecordPlot plot,
InputEvent event)
Called to reset the interaction handler in its initial state.
|
void |
restore(org.freehep.xml.io.XMLIOManager xmlioManager,
org.jdom.Element nodeEl) |
void |
save(org.freehep.xml.io.XMLIOManager xmlioManager,
org.jdom.Element nodeEl) |
void |
setRecord(RecordPlot plot,
Object record)
Sets the Record which is displayed in the GraphicsPanel.
|
void |
setSelected(RecordPlot plot,
boolean selected)
Called when underlying plot is selected/unselected.
|
void |
setSize(RecordPlot plot,
int width,
int height)
Sets the size of the wired plot on the handler, to be able to move/resize
objects drawn by the handler.
|
boolean |
shiftKeyPressed(RecordPlot plot,
KeyEvent event)
Called when the shift key is pressed.
|
boolean |
shiftKeyReleased(RecordPlot plot,
KeyEvent event)
Called when the esc key is released.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitchangeCursor, getDescription, isSupportedByprotected AbstractInteractionHandler(String name)
public String getID()
getID in interface WiredRegistry.IDpublic String getName()
InteractionHandlergetName in interface InteractionHandlerpublic void setRecord(RecordPlot plot, Object record)
InteractionHandlersetRecord in interface InteractionHandlerpublic void setSelected(RecordPlot plot, boolean selected)
InteractionHandlersetSelected in interface InteractionHandlerpublic void setSize(RecordPlot plot, int width, int height)
InteractionHandlersetSize in interface InteractionHandlerpublic int getWidth()
InteractionHandlergetWidth in interface InteractionHandlerpublic int getHeight()
InteractionHandlergetHeight in interface InteractionHandlerpublic Icon getIcon(int size)
InteractionHandlergetIcon in interface InteractionHandlerpublic void reset(RecordPlot plot, InputEvent event)
InteractionHandlerreset in interface InteractionHandlerpublic void mouseButton1Clicked(RecordPlot plot, MouseEvent event)
InteractionHandlermouseButton1Clicked in interface InteractionHandlerpublic void mouseButton1Pressed(RecordPlot plot, MouseEvent event)
InteractionHandlermouseButton1Pressed in interface InteractionHandlerpublic void mouseButton1Released(RecordPlot plot, MouseEvent event)
InteractionHandlermouseButton1Released in interface InteractionHandlerpublic void mouseButton1DragStarted(RecordPlot plot, MouseEvent event)
InteractionHandlermouseButton1DragStarted in interface InteractionHandlerpublic void mouseButton1Dragged(RecordPlot plot, MouseEvent event)
InteractionHandlermouseButton1Dragged in interface InteractionHandlerpublic void mouseButton1DragEnded(RecordPlot plot, MouseEvent event)
InteractionHandlermouseButton1DragEnded in interface InteractionHandlerpublic void mouseMoved(RecordPlot plot, MouseEvent event)
InteractionHandlermouseMoved in interface InteractionHandlerpublic void mouseEntered(RecordPlot plot, MouseEvent event)
InteractionHandlermouseEntered in interface InteractionHandlerpublic void mouseExited(RecordPlot plot, MouseEvent event)
InteractionHandlermouseExited in interface InteractionHandlerpublic void mouseWheelMoved(RecordPlot plot, MouseWheelEvent event)
InteractionHandlermouseWheelMoved in interface InteractionHandlerpublic boolean escKeyPressed(RecordPlot plot, KeyEvent event)
InteractionHandlerescKeyPressed in interface InteractionHandlerpublic boolean escKeyReleased(RecordPlot plot, KeyEvent event)
InteractionHandlerescKeyReleased in interface InteractionHandlerpublic boolean altKeyPressed(RecordPlot plot, KeyEvent event)
InteractionHandleraltKeyPressed in interface InteractionHandlerpublic boolean altKeyReleased(RecordPlot plot, KeyEvent event)
InteractionHandleraltKeyReleased in interface InteractionHandlerpublic boolean ctrlKeyPressed(RecordPlot plot, KeyEvent event)
InteractionHandlerctrlKeyPressed in interface InteractionHandlerpublic boolean ctrlKeyReleased(RecordPlot plot, KeyEvent event)
InteractionHandlerctrlKeyReleased in interface InteractionHandlerpublic boolean shiftKeyPressed(RecordPlot plot, KeyEvent event)
InteractionHandlershiftKeyPressed in interface InteractionHandlerpublic boolean shiftKeyReleased(RecordPlot plot, KeyEvent event)
InteractionHandlershiftKeyReleased in interface InteractionHandlerpublic boolean metaKeyPressed(RecordPlot plot, KeyEvent event)
InteractionHandlermetaKeyPressed in interface InteractionHandlerpublic boolean metaKeyReleased(RecordPlot plot, KeyEvent event)
InteractionHandlermetaKeyReleased in interface InteractionHandlerpublic boolean ctrlMetaKeyPressed(RecordPlot plot, KeyEvent event)
InteractionHandlerctrlMetaKeyPressed in interface InteractionHandlerpublic boolean ctrlMetaKeyReleased(RecordPlot plot, KeyEvent event)
InteractionHandlerctrlMetaKeyReleased in interface InteractionHandlerpublic boolean otherKeyPressed(RecordPlot plot, KeyEvent event)
InteractionHandlerotherKeyPressed in interface InteractionHandlerpublic boolean otherKeyReleased(RecordPlot plot, KeyEvent event)
InteractionHandlerotherKeyReleased in interface InteractionHandlerpublic boolean keyTyped(RecordPlot plot, KeyEvent event)
InteractionHandlerkeyTyped in interface InteractionHandlerpublic void save(org.freehep.xml.io.XMLIOManager xmlioManager,
org.jdom.Element nodeEl)
save in interface org.freehep.xml.io.XMLIOpublic void restore(org.freehep.xml.io.XMLIOManager xmlioManager,
org.jdom.Element nodeEl)
restore in interface org.freehep.xml.io.XMLIOpublic boolean equals(Object other)
Copyright © 1996-2014 FreeHEP. All Rights Reserved.