ilog.cpl.interactor
Class IlpKeyStrokeAction

java.lang.Object
  extended by ilog.cpl.interactor.IlpInteractorAction
      extended by ilog.cpl.interactor.IlpKeyStrokeAction

public class IlpKeyStrokeAction
extends IlpInteractorAction

This class represents a bean object that stores information about key strokes and actions to be used by interactors.

A key stroke action is defined by the following attributes:

This class provides support to define interactors using a CSS, as follows:

 Interactor {
   viewInteractor: @+viewInt;
 }
 Subobject#viewInt {
   class: 'ilog.cpl.interactor.IlpDefaultViewInteractor';
   action[0]: @+keyAction0;
 }
 Subobject#keyAction0 {
   class: 'ilog.cpl.interactor.IlpKeyStrokeAction';
   keyStroke: 'typed a';
   action: @+action0;
 }
 Subobject#action0 {
   class: 'mypackage.myActionClass';
 }
 

Since:
JTGO 4.0

Constructor Summary
IlpKeyStrokeAction()
          Default constructor.
IlpKeyStrokeAction(KeyStroke k, Action a)
          Creates a new interactor action with the given configuration.
 
Method Summary
 KeyStroke getKeyStroke()
          Returns the key stroke that triggers an action in the interactor.
 void setKeyStroke(KeyStroke k)
          Defines a key stroke which is used to trigger an action.
 
Methods inherited from class ilog.cpl.interactor.IlpInteractorAction
getAction, setAction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlpKeyStrokeAction

public IlpKeyStrokeAction()
Default constructor.


IlpKeyStrokeAction

public IlpKeyStrokeAction(KeyStroke k,
                          Action a)
Creates a new interactor action with the given configuration.

Parameters:
k - KeyStroke.
a - Action that will be triggered.
Method Detail

setKeyStroke

public void setKeyStroke(KeyStroke k)
Defines a key stroke which is used to trigger an action. It uses the syntax described at KeyStroke.getKeyStroke(java.lang.String)

Parameters:
k - Key stroke.
See Also:
KeyStroke

getKeyStroke

public KeyStroke getKeyStroke()
Returns the key stroke that triggers an action in the interactor.

Returns:
Key stroke configuration.
See Also:
KeyStroke


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.   . All Rights Reserved.