All Packages Class Hierarchy This Package Previous Next Index
Interface tea.set.Scrollable
- public interface interface Scrollable
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
-
BLOCK_DECREMENT
- Scroll page up.
-
BLOCK_INCREMENT
- Scroll page down.
-
HORIZONTAL
- Horizontal scrollbar.
-
UNIT_DECREMENT
- Scroll line up.
-
UNIT_INCREMENT
- Scroll line down.
-
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.
-
getVisibleAmount(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 static final int VERTICAL
- Vertical scrollbar.
HORIZONTAL
public static final int HORIZONTAL
- Horizontal scrollbar.
BLOCK_DECREMENT
public static final int BLOCK_DECREMENT
- Scroll page up.
BLOCK_INCREMENT
public static final int BLOCK_INCREMENT
- Scroll page down.
UNIT_DECREMENT
public static final int UNIT_DECREMENT
- Scroll line up.
UNIT_INCREMENT
public static final int UNIT_INCREMENT
- 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.
getVisibleAmount
public abstract int getVisibleAmount(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 - UNIT_DECREMENT, UNIT_INCREMENT, BLOCK_DECREMENT,
or BLOCK_INCREMENT.
- 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