|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.umd.cfar.lamp.apploader.HotkeyProcessor
Constructor Summary | |
HotkeyProcessor()
Creates a new, empty hotkey processor. |
Method Summary | |
void |
addActionator(edu.umd.cfar.lamp.apploader.Actionator ax,
java.awt.Component bean,
int type,
javax.swing.KeyStroke key,
com.hp.hpl.jena.rdf.model.Resource when,
java.lang.String description)
Adds a new hotkey (or replaces the binding) to the given bean with the given type. |
void |
addActionator(com.hp.hpl.jena.rdf.model.Statement binding)
Creates a hotkey for the given inputAction statement [ a lal:Bean] hotkeys:inputAction [a hotkeys:HotkeyBinding] . |
boolean |
dispatchKeyEvent(java.awt.event.KeyEvent e)
|
static java.lang.String |
event2stroke(java.awt.event.KeyEvent e)
Converts the key event into its corresponding key stroke object. |
AppLoader |
getCore()
|
static java.lang.String |
getKeyText(int keyCode)
Get the text representation of the given key code. |
static java.lang.String |
keyStroke2String(javax.swing.KeyStroke key)
Converts a keystroke into a format parsable by the KeyStroke constructor. |
static javax.swing.KeyStroke |
parseKeyTyped(java.lang.String s)
Converts the given string into the corresponding keystroke. |
boolean |
postProcessKeyEvent(java.awt.event.KeyEvent e)
Use the key as a hotkey, if possible. |
void |
setCore(AppLoader core)
Sets the core. |
java.lang.String |
toHtml()
Gets an html listing of all the bindings. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public HotkeyProcessor()
Method Detail |
public static java.lang.String getKeyText(int keyCode)
keyCode
- the key code
public static java.lang.String keyStroke2String(javax.swing.KeyStroke key)
key
- the stroke to output as a String
public static java.lang.String event2stroke(java.awt.event.KeyEvent e)
e
- the event
public boolean postProcessKeyEvent(java.awt.event.KeyEvent e)
postProcessKeyEvent
in interface java.awt.KeyEventPostProcessor
e
- the event to process
public boolean dispatchKeyEvent(java.awt.event.KeyEvent e)
dispatchKeyEvent
in interface java.awt.KeyEventDispatcher
KeyEventDispatcher.dispatchKeyEvent(java.awt.event.KeyEvent)
public void addActionator(edu.umd.cfar.lamp.apploader.Actionator ax, java.awt.Component bean, int type, javax.swing.KeyStroke key, com.hp.hpl.jena.rdf.model.Resource when, java.lang.String description)
ax
- The action to invoke when the hotkey is pressed (in the
context defined by the bean and type).bean
- The Component with the key bindingtype
- The type, e.g. input map type (window, has focus, contains focus)key
- The key presswhen
- indicates if the key should be processed in the pre-stage or the post-stagedescription
- text description of the action the binding performspublic void addActionator(com.hp.hpl.jena.rdf.model.Statement binding)
[ a lal:Bean] hotkeys:inputAction [a hotkeys:HotkeyBinding] .
binding
- adds the given binding to the list of hotkey bindingspublic AppLoader getCore()
public void setCore(AppLoader core)
core
- The core to setpublic static javax.swing.KeyStroke parseKeyTyped(java.lang.String s)
s
- a keystroke string
public java.lang.String toHtml()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |