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
-
HORIZONTAL
- Horizontal scrollbar.
-
LINE_DOWN
- Scroll line down.
-
LINE_UP
- Scroll line up.
-
PAGE_DOWN
- Scroll page down.
-
PAGE_UP
- Scroll page up.
-
VERTICAL
- Vertical scrollbar.
-
getIncrement(int, int)
- Get increment value for the specified scrollbar.
-
getMaximum(int)
- Get the maximum value of the specified scrollbar.
-
getMinimum(int)
- Get the minimum value of the specified scrollbar.
-
getValue(int)
- Get the current value for the specified scrollbar.
-
getVisible(int)
- Get the visible value for the specified scrollbar.
-
registerScroller(Scroller)
- Register Scroller with the Scrollable components.
-
setValue(int, int)
- Set the scroll value for the specified scrollbar.
VERTICAL
public final static int VERTICAL
- Vertical scrollbar.
HORIZONTAL
public final static int HORIZONTAL
- Horizontal scrollbar.
PAGE_UP
public final static int PAGE_UP
- Scroll page up.
PAGE_DOWN
public final static int PAGE_DOWN
- Scroll page down.
LINE_UP
public final static int LINE_UP
- Scroll line up.
LINE_DOWN
public final static int LINE_DOWN
- Scroll line down.
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.
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.
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.
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.
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.
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.
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