ActionEvent to UIActionEvent

To convert from AWT to AFC, instances of java.awt.event.ActionEvent should be transformed into instances of com.ms.ui.event.UIActionEvent.

ActionEvent extends AWTEvent: be sure to see its changes.

Purpose and Usage

AFC provides an adapter class, UIActionAdapter, for this event. UI events are always associated with an IUIComponent: the method getActionItem() will find this component.

 

Porting

This is the set of changes you need to make to port all ActionEvent methods to UIActionEvent methods. Any method not listed here or below does not need to be changed.

 

AWT Code AFC Code Comments
ActionEvent(Object, int, String) ActionEvent(Object, int, IUIComponent, String) UIEvents are always associated with an IUIComponent.
ActionEvent(Object, int, String, int) ActionEvent(Object, int, IUIComponent, String, int) UIEvents are always associated with an IUIComponent. UIActionEvents also have more modifiers than ActionEvents: see the documentation for more information.
ActionEvent.ALT_MASK UIInputEvent.ALT_MASK The modifiers that are useful here come from UIInputEvent.
ActionEvent.CTRL_MASK UIInputEvent.CTRL_MASK  
ActionEvent.META_MASK UIInputEvent.META_MASK  
ActionEvent.SHIFT_MASK UIInputEvent.SHIFT_MASK  

 

Unsupported Constants

Some constants in java.awt.event.ActionEvent are not directly supported in com.ms.ui.event.UIActionEvent. Those constants are listed here.

ACTION_FIRST

ACTION_LAST