IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

com.ibm.btt.rcp.xui.action
Class Action

java.lang.Object
  extended by com.ibm.btt.rcp.xui.action.Action
All Implemented Interfaces:
IAction
Direct Known Subclasses:
HelpButtonAction, OperationAction, StateChangeAction

public abstract class Action
extends java.lang.Object
implements IAction

Abstract class for Action, all implementations of IAction should extends from this abstract class


Constructor Summary
Action()
           
 
Method Summary
 void focusGained(IXUIWidget source)
          Invoke when a control loses focus.
 void focusLost(IXUIWidget source)
          Invoke when a control gets focus.
 boolean keyPressed(IXUIWidget source, char character, int keyCode, int stateMask)
          Invoke when a key is pressed on the system keyboard.
 boolean keyReleased(IXUIWidget source, char character, int keyCode, int stateMask)
          Invoke when a key is pressed on the system keyboard.
 void modifyText(IXUIWidget source)
          Invoke when the text is modified.
 void mouseDoubleClick(IXUIWidget source, int type, int stateMask)
          Invoke when a mouse button is pressed twice within the (operating system specified) double click period.
 void mouseDown(IXUIWidget source, int type, int stateMask)
          Invoke when a mouse button is pressed.
 void mouseUp(IXUIWidget source, int type, int stateMask)
          Invoke when a mouse button is released.
 boolean verifyText(IXUIWidget source, int start, int end, java.lang.String text)
          Invoke when the text is about to be modified.
 void widgetDisposed(IXUIWidget source)
          Invoke when the widget is disposed.
 boolean widgetSelected(IXUIWidget source)
          Invoke when selection occurs in the control.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Action

public Action()
Method Detail

keyPressed

public boolean keyPressed(IXUIWidget source,
                          char character,
                          int keyCode,
                          int stateMask)
Description copied from interface: IAction
Invoke when a key is pressed on the system keyboard.

Specified by:
keyPressed in interface IAction
Parameters:
source - source widget which invoke this action
character - the character represented by the key that was typed. This is the final character that results after all modifiers have been applied. For example, when the user types Ctrl+A, the character value is 0x01. It is important that applications do not attempt to modify the character value based on a stateMask (such as SWT.CTRL) or the resulting character will not be correct.
keyCode - the key code of the key that was typed, as defined by the key code constants in class SWT. When the character field of the event is ambiguous, this field contains the unicode value of the original character. For example, typing Ctrl+M or Return both result in the character '\r' but the keyCode field will also contain '\r' when Return was typed.
stateMask - the state of the keyboard modifier keys at the time the event was generated, as defined by the key code constants in class SWT.
Returns:
boolean value which depending on the event, a flag indicating whether the operation should be allowed. Setting this field to false will cancel the operation.

keyReleased

public boolean keyReleased(IXUIWidget source,
                           char character,
                           int keyCode,
                           int stateMask)
Description copied from interface: IAction
Invoke when a key is pressed on the system keyboard.

Specified by:
keyReleased in interface IAction
Parameters:
source - source widget which invoke this action
character - the character represented by the key that was typed. This is the final character that results after all modifiers have been applied. For example, when the user types Ctrl+A, the character value is 0x01. It is important that applications do not attempt to modify the character value based on a stateMask (such as SWT.CTRL) or the resulting character will not be correct.
keyCode - the key code of the key that was typed, as defined by the key code constants in class SWT. When the character field of the event is ambiguous, this field contains the unicode value of the original character. For example, typing Ctrl+M or Return both result in the character '\r' but the keyCode field will also contain '\r' when Return was typed.
stateMask - the state of the keyboard modifier keys at the time the event was generated, as defined by the key code constants in class SWT.
Returns:
boolean value which depending on the event, a flag indicating whether the operation should be allowed. Setting this field to false will cancel the operation.

widgetSelected

public boolean widgetSelected(IXUIWidget source)
Description copied from interface: IAction
Invoke when selection occurs in the control.

For example, selection occurs in a List when the user selects an item or items with the keyboard or mouse. On some platforms, the event occurs when a mouse button or key is pressed. On others, it happens when the mouse or key is released. The exact key or mouse gesture that causes this event is platform specific.

Current support widgets: Button, Table, ComboBox, RadioButton, CheckBox, List

Specified by:
widgetSelected in interface IAction
Parameters:
source - source widget which invoke this action
Returns:
boolean value which depending on the event, a flag indicating whether the operation should be allowed. Setting this field to false will cancel the operation.

focusLost

public void focusLost(IXUIWidget source)
Description copied from interface: IAction
Invoke when a control gets focus.

Specified by:
focusLost in interface IAction
Parameters:
source - source widget which invoke this action

focusGained

public void focusGained(IXUIWidget source)
Description copied from interface: IAction
Invoke when a control loses focus.

Specified by:
focusGained in interface IAction
Parameters:
source - source widget which invoke this action

mouseDoubleClick

public void mouseDoubleClick(IXUIWidget source,
                             int type,
                             int stateMask)
Description copied from interface: IAction
Invoke when a mouse button is pressed twice within the (operating system specified) double click period.

Specified by:
mouseDoubleClick in interface IAction
Parameters:
source - source widget which invoke this action
type - the button that was pressed or released; 1 for the first button, 2 for the second button, and 3 for the third button, etc.
stateMask - the state of the keyboard modifier keys at the time the event was generated

mouseDown

public void mouseDown(IXUIWidget source,
                      int type,
                      int stateMask)
Description copied from interface: IAction
Invoke when a mouse button is pressed.

Specified by:
mouseDown in interface IAction
Parameters:
source - source widget which invoke this action
type - the button that was pressed or released; 1 for the first button, 2 for the second button, and 3 for the third button, etc.
stateMask - the state of the keyboard modifier keys at the time the event was generated

mouseUp

public void mouseUp(IXUIWidget source,
                    int type,
                    int stateMask)
Description copied from interface: IAction
Invoke when a mouse button is released.

Specified by:
mouseUp in interface IAction
Parameters:
source - source widget which invoke this action
type - the button that was pressed or released; 1 for the first button, 2 for the second button, and 3 for the third button, etc.
stateMask - the state of the keyboard modifier keys at the time the event was generated

widgetDisposed

public void widgetDisposed(IXUIWidget source)
Description copied from interface: IAction
Invoke when the widget is disposed.

Specified by:
widgetDisposed in interface IAction
Parameters:
source - source widget which invoke this action

modifyText

public void modifyText(IXUIWidget source)
Description copied from interface: IAction
Invoke when the text is modified.

Current support widgets: Text widgets and ComboBox

Specified by:
modifyText in interface IAction
Parameters:
source - source widget which invoke this action

verifyText

public boolean verifyText(IXUIWidget source,
                          int start,
                          int end,
                          java.lang.String text)
Description copied from interface: IAction
Invoke when the text is about to be modified.

A verify action occurs after the user has done something to modify the text (typically typed a key), but before the text is modified. The return value indicates whether or not to modify the text.

Current support widgets: Text widgets and ComboBox

Specified by:
verifyText in interface IAction
start - the start point of text being modified.
end - the end point of text being modified.
text - the new text that will be inserted.
Returns:
boolean value which depending on the event, a flag indicating whether the operation should be allowed. Setting this field to false will cancel the operation.

IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2010