Class awtExt.Scrollbar
All Packages Class Hierarchy This Package Previous Next Index
Class awtExt.Scrollbar
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Scrollbar
|
+----awtExt.Scrollbar
- public class Scrollbar
- extends Scrollbar
Extension of standard awt Scrollbar. Provides a callback
mechanism for invoking a user defined method, when a
SCROLL_* event occurs within this awtExt component. The called
back method and target object must have a specific signature.
This allows you to separate your application functionality
from the GUI. i.e, no need to subclass the Scrollbar in order
to invoke your user defined code.
- See Also:
- EventDispatch, Callback, Scrollbar
-
eventDispatch
- Event dispatcher.
-
Scrollbar()
- Default constructor.
-
Scrollbar(int)
- Constructs a new scrollbar with a specific orientation
-
Scrollbar(int, int, int, int, int)
- Constructs a new scrollbar with the specific values
-
Scrollbar(methodRef)
- Constructs a new scrollbar and sets the SCROLL_* event handlers.
-
Scrollbar(int, methodRef)
- Constructs a new scrollbar with a specific orientation
and sets the SCROLL_* events handlers.
-
Scrollbar(int, int, int, int, int, methodRef)
- Constructs a new scrollbar with the specific values
and sets the SCROLL_* events handlers.
-
addCallback(methodRef)
- Adds user defined methodRef.
-
handleEvent(Event)
- event handler.
eventDispatch
public EventDispatch eventDispatch
- Event dispatcher. Dispatches the SCROLL_* event to the appropriate
user defined method.
- See Also:
- Event, EventDispatch, Callback
Scrollbar
public Scrollbar()
- Default constructor.
Scrollbar
public Scrollbar(int orient) throws IllegalArgumentException
- Constructs a new scrollbar with a specific orientation
- Parameters:
- orient - scrollbar's orientation
- Throws: IllegalArgumentException
- if invalid argument
Scrollbar
public Scrollbar(int orient,
int value,
int visible,
int min,
int max)
- Constructs a new scrollbar with the specific values
- Parameters:
- orient - orientation
- value - current value
- visible - size of scrollable region
- min - min value of scrollbar
- max - max value of scrollbar
Scrollbar
public Scrollbar(methodRef mr)
- Constructs a new scrollbar and sets the SCROLL_* event handlers.
- Parameters:
- mr - method reference to callbackable method.
mr must have the target object set.
- See Also:
- setTarget
Scrollbar
public Scrollbar(int orient,
methodRef mr) throws IllegalArgumentException
- Constructs a new scrollbar with a specific orientation
and sets the SCROLL_* events handlers.
- Parameters:
- orient - scrollbar's orientation
- mr - method reference to callbackable method.
mr must have the target object set.
- Throws: IllegalArgumentException
- if invalid argument
- See Also:
- setTarget
Scrollbar
public Scrollbar(int orient,
int value,
int visible,
int min,
int max,
methodRef mr)
- Constructs a new scrollbar with the specific values
and sets the SCROLL_* events handlers.
- Parameters:
- orient - orientation
- value - current value
- visible - size of scrollable region
- min - min value of scrollbar
- max - max value of scrollbar
- mr - method reference to callbackable method.
mr must have the target object set.
addCallback
public void addCallback(methodRef aMethodRef)
- Adds user defined methodRef. This is invoked when a
SCROLL_* event occurs. The methodRef must be
defined using the utility class awtExt.Callback
- Parameters:
- aMethodRef - SCROLL_* event handling method.
- See Also:
- Callback, methodRef
handleEvent
public final boolean handleEvent(Event evt)
- event handler. Dispatches the event to the appropriate
attached methodRef. User defined method(s) can control
the event propagation by setting the processed instance variable
in the CallbackInfo object.
- Parameters:
- evt - The event.
- Overrides:
- handleEvent in class Component
- See Also:
- Event, EventDispatch, processed
All Packages Class Hierarchy This Package Previous Next Index