net.sf.jzeno.echo.components
Class KeyActionCommand

java.lang.Object
  extended by nextapp.echo.AbstractComponent
      extended by net.sf.jzeno.echo.components.KeyActionCommand
All Implemented Interfaces:
java.io.Serializable, EventSource, Precreation, Component

public class KeyActionCommand
extends AbstractComponent
implements EventSource, Precreation

See Also:
Serialized Form

Field Summary
static java.lang.Integer VK_BACK_SPACE
           
static java.lang.Integer VK_DELETE
           
static java.lang.Integer VK_DOWN
           
static java.lang.Integer VK_END
           
static java.lang.Integer VK_ENTER
           
static java.lang.Integer VK_ESCAPE
           
static java.lang.Integer VK_F1
           
static java.lang.Integer VK_F10
           
static java.lang.Integer VK_F11
           
static java.lang.Integer VK_F12
           
static java.lang.Integer VK_F2
           
static java.lang.Integer VK_F3
           
static java.lang.Integer VK_F4
           
static java.lang.Integer VK_F5
           
static java.lang.Integer VK_F6
           
static java.lang.Integer VK_F7
           
static java.lang.Integer VK_F8
           
static java.lang.Integer VK_F9
           
static java.lang.Integer VK_HOME
           
static java.lang.Integer VK_INSERT
           
static java.lang.Integer VK_LEFT
           
static java.lang.Integer VK_RETURN
           
static java.lang.Integer VK_RIGHT
           
static java.lang.Integer VK_TAB
           
static java.lang.Integer VK_UP
           
 
Fields inherited from interface nextapp.echo.Component
BACKGROUND_CHANGED_PROPERTY, CHILDREN_CHANGED_PROPERTY, ENABLED_CHANGED_PROPERTY, FONT_CHANGED_PROPERTY, FOREGROUND_CHANGED_PROPERTY, IDENTIFIER_CHANGED_PROPERTY, LOCALE_CHANGED_PROPERTY, MODEL_CHANGED_PROPERTY, SELECTABLE_CHANGED_PROPERTY, STYLE_BACKGROUND, STYLE_FONT, STYLE_FOREGROUND, UPDATE_PROPERTY, VISIBLE_CHANGED_PROPERTY
 
Constructor Summary
KeyActionCommand()
           
 
Method Summary
 void applyContext()
           
 void fire()
           
 java.lang.String getActionCommand()
           
 java.lang.String getActionScript()
           
 java.lang.Boolean getAlt()
           
 Component getContext()
           
 java.lang.Boolean getCtrl()
           
 int getDelay()
           
 java.lang.Integer getKeyCode()
           
 int getPriority()
           
 java.lang.Boolean getShift()
           
 boolean isAsync()
           
 boolean isCancelEvent()
           
 void setActionCommand(java.lang.String actionCommand)
           
 void setActionScript(java.lang.String actionScript)
          Setting this property causes the given javascript to execute in the browser when the specified keypress is received.
 void setAlt(java.lang.Boolean alt)
           
 void setAsync(boolean async)
          Make the key actionCommand do an asynchronous submit
 void setCancelEvent(boolean cancelEvent)
           
 void setContext(Component context)
          Limit the action command to key events that were generated by this component, or any of the (direct or indirect) child components in the component tree.
 void setCtrl(java.lang.Boolean ctrl)
           
 void setDelay(int delay)
          Only execute associated actionCommand if this KeyActionCommand is not supassed by any other withing the specified delay.
 void setKey(char character)
           
 void setKey(java.lang.Integer keyCode)
           Set the keyCode by specifying a java character.
 void setPriority(int priority)
           
 void setShift(java.lang.Boolean shift)
           
 
Methods inherited from class nextapp.echo.AbstractComponent
add, add, addHierarchyListener, addPropertyChangeListener, applyStyle, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getClientId, getComponent, getComponentCount, getComponents, getEchoInstance, getFont, getForeground, getIdentifier, getListenerList, getLocale, getParent, indexOf, init, isAncestorOf, isDifferent, isEnabled, isFocused, isRecursivelyVisible, isRegistered, isSelectableForScriptRecorder, isShowing, isVisible, processHierarchyEvent, remove, remove, removeAll, removeHierarchyListener, removePropertyChangeListener, setBackground, setClientId, setEnabled, setFocused, setFont, setForeground, setIdentifier, setLocale, setParent, setRegistered, setSelectableForScriptRecorder, setVisible, update, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VK_BACK_SPACE

public static final java.lang.Integer VK_BACK_SPACE

VK_DELETE

public static final java.lang.Integer VK_DELETE

VK_END

public static final java.lang.Integer VK_END

VK_RETURN

public static final java.lang.Integer VK_RETURN

VK_ENTER

public static final java.lang.Integer VK_ENTER

VK_TAB

public static final java.lang.Integer VK_TAB

VK_ESCAPE

public static final java.lang.Integer VK_ESCAPE

VK_F1

public static final java.lang.Integer VK_F1

VK_F2

public static final java.lang.Integer VK_F2

VK_F3

public static final java.lang.Integer VK_F3

VK_F4

public static final java.lang.Integer VK_F4

VK_F5

public static final java.lang.Integer VK_F5

VK_F6

public static final java.lang.Integer VK_F6

VK_F7

public static final java.lang.Integer VK_F7

VK_F8

public static final java.lang.Integer VK_F8

VK_F9

public static final java.lang.Integer VK_F9

VK_F10

public static final java.lang.Integer VK_F10

VK_F11

public static final java.lang.Integer VK_F11

VK_F12

public static final java.lang.Integer VK_F12

VK_HOME

public static final java.lang.Integer VK_HOME

VK_INSERT

public static final java.lang.Integer VK_INSERT

VK_UP

public static final java.lang.Integer VK_UP

VK_DOWN

public static final java.lang.Integer VK_DOWN

VK_LEFT

public static final java.lang.Integer VK_LEFT

VK_RIGHT

public static final java.lang.Integer VK_RIGHT
Constructor Detail

KeyActionCommand

public KeyActionCommand()
Method Detail

isAsync

public boolean isAsync()

setAsync

public void setAsync(boolean async)
Make the key actionCommand do an asynchronous submit


getActionCommand

public java.lang.String getActionCommand()
Specified by:
getActionCommand in interface EventSource

setActionCommand

public void setActionCommand(java.lang.String actionCommand)
Specified by:
setActionCommand in interface EventSource

fire

public void fire()

setKey

public void setKey(java.lang.Integer keyCode)

Set the keyCode by specifying a java character. For convenience.


getKeyCode

public java.lang.Integer getKeyCode()

getAlt

public java.lang.Boolean getAlt()

setAlt

public void setAlt(java.lang.Boolean alt)

getCtrl

public java.lang.Boolean getCtrl()

setCtrl

public void setCtrl(java.lang.Boolean ctrl)

getShift

public java.lang.Boolean getShift()

setShift

public void setShift(java.lang.Boolean shift)

applyContext

public void applyContext()
Specified by:
applyContext in interface Precreation

getContext

public Component getContext()

setContext

public void setContext(Component context)
Limit the action command to key events that were generated by this component, or any of the (direct or indirect) child components in the component tree.


getDelay

public int getDelay()

setDelay

public void setDelay(int delay)
Only execute associated actionCommand if this KeyActionCommand is not supassed by any other withing the specified delay. Handy for autoComplete functionality (in conjunction with key = null

Parameters:
delay -

isCancelEvent

public boolean isCancelEvent()

setCancelEvent

public void setCancelEvent(boolean cancelEvent)

setKey

public void setKey(char character)

getPriority

public int getPriority()

setPriority

public void setPriority(int priority)

getActionScript

public java.lang.String getActionScript()

setActionScript

public void setActionScript(java.lang.String actionScript)
Setting this property causes the given javascript to execute in the browser when the specified keypress is received. When set the actionCommand of this component is ignored.

Parameters:
actionScript -