Interface tea.set.Scrollable
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface tea.set.Scrollable

public interface Scrollable
extends Object
Scrollable is an interface used by Scroller to control customized scrolling. If a component implements Scrollable, Scroller will use the Scrollable methods to determine how the scrolling is done.
See Also:
Scroller

Variable Index

 o HORIZONTAL
Horizontal scrollbar.
 o LINE_DOWN
Scroll line down.
 o LINE_UP
Scroll line up.
 o PAGE_DOWN
Scroll page down.
 o PAGE_UP
Scroll page up.
 o VERTICAL
Vertical scrollbar.

Method Index

 o getIncrement(int, int)
Get increment value for the specified scrollbar.
 o getMaximum(int)
Get the maximum value of the specified scrollbar.
 o getMinimum(int)
Get the minimum value of the specified scrollbar.
 o getValue(int)
Get the current value for the specified scrollbar.
 o getVisible(int)
Get the visible value for the specified scrollbar.
 o registerScroller(Scroller)
Register Scroller with the Scrollable components.
 o setValue(int, int)
Set the scroll value for the specified scrollbar.

Variables

 o VERTICAL
  public final static int VERTICAL
Vertical scrollbar.
 o HORIZONTAL
  public final static int HORIZONTAL
Horizontal scrollbar.
 o PAGE_UP
  public final static int PAGE_UP
Scroll page up.
 o PAGE_DOWN
  public final static int PAGE_DOWN
Scroll page down.
 o LINE_UP
  public final static int LINE_UP
Scroll line up.
 o LINE_DOWN
  public final static int LINE_DOWN
Scroll line down.

Methods

 o registerScroller
  public abstract void registerScroller(Scroller scroller)
Register Scroller with the Scrollable components. This method is called automatically by the Scroller upon initialization. The scrollable component can save the reference to Scroller if it need to notify the Scroller for scrolling change. If the parameters for scrollbars change at runtime, the scrollable component can call Scroller.notifyUpdate() method to force a recalculation of the scrollbar parameters.
Parameters:
scroller - this scroller.
 o getMinimum
  public abstract int getMinimum(int orientation)
Get the minimum value of the specified scrollbar.
Parameters:
orientation - HORIZONTAL or VERTICAL scrollbar
Returns:
minimum value for scrollbar.
 o getMaximum
  public abstract int getMaximum(int orientation)
Get the maximum value of the specified scrollbar.
Parameters:
orientation - HORIZONTAL or VERTICAL scrollbar
Returns:
maximum value for scrollbar.
 o getValue
  public abstract int getValue(int orientation)
Get the current value for the specified scrollbar.
Parameters:
orientation - HORIZONTAL or VERTICAL scrollbar
Returns:
value for scrollbar.
 o getVisible
  public abstract int getVisible(int orientation)
Get the visible value for the specified scrollbar.
Parameters:
orientation - HORIZONTAL or VERTICAL scrollbar
Returns:
visible value for scrollbar.
 o getIncrement
  public abstract int getIncrement(int orientation,
                                   int direction)
Get increment value for the specified scrollbar. Everytime a user scroll up or down a page or line at either scrollbar, this method is called by the Scroller to get the increment. If this increment does not change, it would be more efficient to cache the value instead of calculate the increment at every invocation.
Parameters:
orientation - HORIZONTAL or VERTICAL scrollbar
direction - LINE_UP, LINE_DOWN, PAGE_UP, or PAGE_DOWN.
Returns:
increment value for scrollbar.
 o setValue
  public abstract void setValue(int orientation,
                                int v)
Set the scroll value for the specified scrollbar. The scrollable component is responsible for doing the actual scrolling.
Parameters:
orientation - HORIZONTAL or VERTICAL scrollbar
v - scrollbar value.

All Packages  Class Hierarchy  This Package  Previous  Next  Index