Adjustable to IUIScroll

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

Adjustable extends Scrollbar: be sure to see its changes.

Purpose and Usage

You will usually want to use UIScroll, which implements IUIScroll. UIScroll provides the same functionality as Adjustable, and adds several more options. See the documentation for more information.

 

Porting

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

 

AWT Code AFC Code
getBlockIncrement() getScrollPage()
getMaximum() getScrollMax()
getMinimum() getScrollMin()
getUnitIncrement() getScrollLine()
getValue() getScrollPos()
getVisibleAmount() getScrollPage()
setBlockIncrement(int) setScrollPage(int)
setMaximum(int) setScrollMax(int)
setMinimum(int) setScrollMin(int)
setUnitIncrement(int) setScrollLine(int)
setValue(int) setScrollPos(int)
setVisibleAmount(int) setScrollPage(int)

 

Unsupported Methods

Some methods in java.awt.Adjustable are not directly supported in com.ms.IUIScroll. Those methods and suggested changes are described here.

 

AWT Code/Suggested AFC Code Comments
HORIZONTAL

(UIScroll).setStyle(0)

Horizontal and vertical settings are set in UIScroll, which implements IUIScroll. UIScroll covers what Adjustable provided.
VERTICAL

(UIScroll).setStyle(UIScroll.VERTICAL)

Horizontal and vertical settings are set in UIScroll, which implements IUIScroll. UIScroll covers what Adjustable provided.
addAdjustmentListener(AdjustmentListener)

(UIScroll).addAdjustmentListener(IUIAdjustmentListener)

UIScroll implements IUIScroll.
getOrientation()

(UIScroll).getStyle()

UIScroll implements IUIScroll.
removeAdjustmentListener(AdjustmentListener)

(UIScroll).removeAdjustmentListener(IUIAdjustmentListener)

UIScroll implements IUIScroll.