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, wait
changeCursor, getDescription, isSupportedBy
protected AbstractInteractionHandler(String name)
public String getID()
getID
in interface WiredRegistry.ID
public String getName()
InteractionHandler
getName
in interface InteractionHandler
public void setRecord(RecordPlot plot, Object record)
InteractionHandler
setRecord
in interface InteractionHandler
public void setSelected(RecordPlot plot, boolean selected)
InteractionHandler
setSelected
in interface InteractionHandler
public void setSize(RecordPlot plot, int width, int height)
InteractionHandler
setSize
in interface InteractionHandler
public int getWidth()
InteractionHandler
getWidth
in interface InteractionHandler
public int getHeight()
InteractionHandler
getHeight
in interface InteractionHandler
public Icon getIcon(int size)
InteractionHandler
getIcon
in interface InteractionHandler
public void reset(RecordPlot plot, InputEvent event)
InteractionHandler
reset
in interface InteractionHandler
public void mouseButton1Clicked(RecordPlot plot, MouseEvent event)
InteractionHandler
mouseButton1Clicked
in interface InteractionHandler
public void mouseButton1Pressed(RecordPlot plot, MouseEvent event)
InteractionHandler
mouseButton1Pressed
in interface InteractionHandler
public void mouseButton1Released(RecordPlot plot, MouseEvent event)
InteractionHandler
mouseButton1Released
in interface InteractionHandler
public void mouseButton1DragStarted(RecordPlot plot, MouseEvent event)
InteractionHandler
mouseButton1DragStarted
in interface InteractionHandler
public void mouseButton1Dragged(RecordPlot plot, MouseEvent event)
InteractionHandler
mouseButton1Dragged
in interface InteractionHandler
public void mouseButton1DragEnded(RecordPlot plot, MouseEvent event)
InteractionHandler
mouseButton1DragEnded
in interface InteractionHandler
public void mouseMoved(RecordPlot plot, MouseEvent event)
InteractionHandler
mouseMoved
in interface InteractionHandler
public void mouseEntered(RecordPlot plot, MouseEvent event)
InteractionHandler
mouseEntered
in interface InteractionHandler
public void mouseExited(RecordPlot plot, MouseEvent event)
InteractionHandler
mouseExited
in interface InteractionHandler
public void mouseWheelMoved(RecordPlot plot, MouseWheelEvent event)
InteractionHandler
mouseWheelMoved
in interface InteractionHandler
public boolean escKeyPressed(RecordPlot plot, KeyEvent event)
InteractionHandler
escKeyPressed
in interface InteractionHandler
public boolean escKeyReleased(RecordPlot plot, KeyEvent event)
InteractionHandler
escKeyReleased
in interface InteractionHandler
public boolean altKeyPressed(RecordPlot plot, KeyEvent event)
InteractionHandler
altKeyPressed
in interface InteractionHandler
public boolean altKeyReleased(RecordPlot plot, KeyEvent event)
InteractionHandler
altKeyReleased
in interface InteractionHandler
public boolean ctrlKeyPressed(RecordPlot plot, KeyEvent event)
InteractionHandler
ctrlKeyPressed
in interface InteractionHandler
public boolean ctrlKeyReleased(RecordPlot plot, KeyEvent event)
InteractionHandler
ctrlKeyReleased
in interface InteractionHandler
public boolean shiftKeyPressed(RecordPlot plot, KeyEvent event)
InteractionHandler
shiftKeyPressed
in interface InteractionHandler
public boolean shiftKeyReleased(RecordPlot plot, KeyEvent event)
InteractionHandler
shiftKeyReleased
in interface InteractionHandler
public boolean metaKeyPressed(RecordPlot plot, KeyEvent event)
InteractionHandler
metaKeyPressed
in interface InteractionHandler
public boolean metaKeyReleased(RecordPlot plot, KeyEvent event)
InteractionHandler
metaKeyReleased
in interface InteractionHandler
public boolean ctrlMetaKeyPressed(RecordPlot plot, KeyEvent event)
InteractionHandler
ctrlMetaKeyPressed
in interface InteractionHandler
public boolean ctrlMetaKeyReleased(RecordPlot plot, KeyEvent event)
InteractionHandler
ctrlMetaKeyReleased
in interface InteractionHandler
public boolean otherKeyPressed(RecordPlot plot, KeyEvent event)
InteractionHandler
otherKeyPressed
in interface InteractionHandler
public boolean otherKeyReleased(RecordPlot plot, KeyEvent event)
InteractionHandler
otherKeyReleased
in interface InteractionHandler
public boolean keyTyped(RecordPlot plot, KeyEvent event)
InteractionHandler
keyTyped
in interface InteractionHandler
public void save(org.freehep.xml.io.XMLIOManager xmlioManager, org.jdom.Element nodeEl)
save
in interface org.freehep.xml.io.XMLIO
public void restore(org.freehep.xml.io.XMLIOManager xmlioManager, org.jdom.Element nodeEl)
restore
in interface org.freehep.xml.io.XMLIO
public boolean equals(Object other)
Copyright © 1996-2014 FreeHEP. All Rights Reserved.