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

Variable Index

 o eventDispatch
Event dispatcher.

Constructor Index

 o Scrollbar()
Default constructor.
 o Scrollbar(int)
Constructs a new scrollbar with a specific orientation
 o Scrollbar(int, int, int, int, int)
Constructs a new scrollbar with the specific values
 o Scrollbar(methodRef)
Constructs a new scrollbar and sets the SCROLL_* event handlers.
 o Scrollbar(int, methodRef)
Constructs a new scrollbar with a specific orientation and sets the SCROLL_* events handlers.
 o Scrollbar(int, int, int, int, int, methodRef)
Constructs a new scrollbar with the specific values and sets the SCROLL_* events handlers.

Method Index

 o addCallback(methodRef)
Adds user defined methodRef.
 o handleEvent(Event)
event handler.

Variables

 o eventDispatch
  public EventDispatch eventDispatch
Event dispatcher. Dispatches the SCROLL_* event to the appropriate user defined method.
See Also:
Event, EventDispatch, Callback

Constructors

 o Scrollbar
  public Scrollbar()
Default constructor.
 o 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
 o 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
 o 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
 o 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
 o 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.

Methods

 o 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
 o 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