|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectartofillusion.keystroke.KeystrokeManager
public class KeystrokeManager
This class maintains the list of keystrokes, and executes them in response to KeyEvents.
Constructor Summary | |
---|---|
KeystrokeManager()
|
Method Summary | |
---|---|
static void |
addRecord(KeystrokeRecord record)
Add a new KeystrokeRecord. |
static void |
addRecordsFromXML(java.io.InputStream in)
Read an XML file from an InputStream and add all the keystrokes it contains. |
static void |
executeKeystrokes(java.awt.event.KeyEvent event,
EditingWindow window)
Given a key event, find any matching KeystrokeRecords and execute them. |
static KeystrokeRecord[] |
getAllRecords()
Get a list of all defined KeystrokeRecords. |
static void |
loadRecords()
Locate the file containing keystroke definitions and load them. |
static void |
recordModified()
This should be called whenever a KeystrokeRecord has been modified. |
static void |
removeRecord(KeystrokeRecord record)
Remove a KeystrokeRecord. |
static void |
saveRecords()
Save the list of keystrokes to an XML file. |
static void |
setAllRecords(KeystrokeRecord[] allRecords)
Set the list of all defined KeystrokeRecords, completely replacing the existing ones. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public KeystrokeManager()
Method Detail |
---|
public static KeystrokeRecord[] getAllRecords()
public static void setAllRecords(KeystrokeRecord[] allRecords)
public static void addRecord(KeystrokeRecord record)
public static void removeRecord(KeystrokeRecord record)
public static void recordModified()
public static void executeKeystrokes(java.awt.event.KeyEvent event, EditingWindow window)
event
- the KeyEvent which has occurredwindow
- the EditingWindow in which the event occurredpublic static void loadRecords()
public static void addRecordsFromXML(java.io.InputStream in) throws java.lang.Exception
java.lang.Exception
public static void saveRecords() throws java.lang.Exception
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |