posted 17 years ago
I want to write a method requestScroll for a scrollable JList with the method signature
public void RequestScroll(integer line, integer scrollPolicy)
The RequestScroll method scrolls an item to a specified position in the scroll list display area, moving other items into and out of the display area as necessary.
The line parameter specifies the item to scroll.
The scrollPolicy parameter specifies the position to which to scroll the item. It uses the following values:
ValueDefinition
AF_AUTOMATICIf item is above display area, scrolls to first scroll list display line. If line is beneath display area, scrolls to last scroll list display line. No scrolling occurs if item is already in display area.
AF_BOTTOMScrolls row to bottom scroll list display line.
AF_DEFAULTIf item is above display area, scrolls item to top scroll list display line. If item is beneath display area, scrolls to bottom scroll list display line. No scrolling occurs if item is already in display area.
AF_MIDDLEScrolls item to middle scroll list display line.
AF_TOPScrolls item to top scroll list display line.
How do I implement this in a JList??