To convert from AWT to AFC, instances of java.awt.AWTEvent should be transformed into instances of com.ms.ui.event.UIEvent.
AWTEvent extends EventObject: be sure to see its changes.
UIEvents are defined to match their AWT counterparts. This class defines base level functionality of UIEvents.
This is the set of changes you need to make to port all AWTEvent methods to UIEvent methods. Any method not listed here or below does not need to be changed.
AWT Code | AFC Code | Comments |
AWTEvent(Object, int) | UIEvent((IUIComponent) Object, int) | When creating a UIEvent, you need to specify an IUIComponent with it, so you can work with multiple components. |
id | getId() |
Some methods in java.awt.AWTEvent are not directly supported in com.ms.ui.event.UIEvent. Those methods and suggested changes are described here.
AWT Code/Suggested AFC Code | Comments |
AWTEvent(Event) (no suggestions) |
This constructor allows you to convert 1.0.2 event objects to 1.1 event objects. UI is built around the 1.1 event model and so this is unnecessary to the model. |
consumed,
consume(), isConsumed() (no suggestions) |
AFC does not use consume. |