artofillusion.keystroke
Class KeystrokeRecord

java.lang.Object
  extended by artofillusion.keystroke.KeystrokeRecord

public class KeystrokeRecord
extends java.lang.Object

This class contains information about a keyboard shortcut which automates some operation. A keystroke pairs a key description (key code and modifier) with a Beanshell script to execute when the key is pressed.


Constructor Summary
KeystrokeRecord(int keyCode, int modifiers, java.lang.String name, java.lang.String script)
          Create a new KeystrokeRecord.
KeystrokeRecord(int keyCode, int modifiers, java.lang.String name, java.lang.String script, java.lang.String language)
          Create a new KeystrokeRecord.
 
Method Summary
 KeystrokeRecord duplicate()
          Create an exact duplicate of this record.
 int getKeyCode()
           
 java.lang.String getLanguage()
           
 int getModifiers()
           
 java.lang.String getName()
           
 java.lang.String getScript()
           
 void setKeyCode(int keyCode)
           
 void setLanguage(java.lang.String language)
           
 void setModifiers(int modifiers)
           
 void setName(java.lang.String name)
           
 void setScript(java.lang.String script)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeystrokeRecord

public KeystrokeRecord(int keyCode,
                       int modifiers,
                       java.lang.String name,
                       java.lang.String script,
                       java.lang.String language)
Create a new KeystrokeRecord.

Parameters:
keyCode - the key code (as defined by KeyEvent) for the key which activates this keystroke
modifiers - the modifier keys which must be held down to activate this keystroke
name - a name to identify this keystroke
script - a script to execute when the keystroke is activated
language - the language in which the script is written

KeystrokeRecord

public KeystrokeRecord(int keyCode,
                       int modifiers,
                       java.lang.String name,
                       java.lang.String script)
Create a new KeystrokeRecord. This constructor assumes the script is written in BeanShell, and exists only for backward compatibility.

Parameters:
keyCode - the key code (as defined by KeyEvent) for the key which activates this keystroke
modifiers - the modifier keys which must be held down to activate this keystroke
name - a name to identify this keystroke
script - a BeanShell script to execute when the keystroke is activated
Method Detail

getKeyCode

public int getKeyCode()

setKeyCode

public void setKeyCode(int keyCode)

getModifiers

public int getModifiers()

setModifiers

public void setModifiers(int modifiers)

getName

public java.lang.String getName()

setName

public void setName(java.lang.String name)

getScript

public java.lang.String getScript()

setScript

public void setScript(java.lang.String script)

getLanguage

public java.lang.String getLanguage()

setLanguage

public void setLanguage(java.lang.String language)

duplicate

public KeystrokeRecord duplicate()
Create an exact duplicate of this record.



Copyright © 1999-2011 by Peter Eastman.