Window to UIWindow

To convert from AWT to AFC, instances of java.awt.Window should be transformed into instances of com.ms.ui.UIWindow.

Window extends Container: be sure to see its changes.

Purpose and Usage

The conversion from Window to UIWindow is minimal: the advantages come from UIComponent's advantages. One advantage of UIWindow is that you can specify an edge style for the window: those styles are listed in Container.

 

Porting

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

 

AWT Code AFC Code Comments
Window(Frame) UIWindow(Frame) or
UIWindow(Frame, int)
UIWindows can also be instantiated with a specific edge style: see above.
getFocusOwner() getFocusComponent()  

 

Unsupported Methods

Some methods in java.awt.Window are not directly supported in com.ms.ui.UIWindow. Those methods and suggested changes are listed below.

 

 

AWT Code/Suggested AFC Code Comments
dispose()

(no suggestions)

 
getLocale()

(no suggestions)

 
getWarningString()

(no suggestions)

 
isShowing()

isVisible(false)

The false input is needed because windows do not have parents.
toBack()

(no suggestions)

 
toFront()

(no suggestions)