Class awtExt.Checkbox
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class awtExt.Checkbox

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Checkbox
                   |
                   +----awtExt.Checkbox

public class Checkbox
extends Checkbox
Extension of standard awt Checkbox object. Provides a callback mechanism for invoking a user defined method, when an ACTION_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 Checkbox object in order to invoke your user defined code.
See Also:
Callback, Checkbox

Constructor Index

 o Checkbox()
Default Constructor.
 o Checkbox(String)
Constructor.
 o Checkbox(String, CheckboxGroup, boolean)
Constructor.
 o Checkbox(String, methodRef)
Constructor.
 o Checkbox(String, Object, String)
Constructor.

Method Index

 o action(Event, Object)
Called when an action occurs.
 o addActionCallback(methodRef)
Adds user defined methodRef.

Constructors

 o Checkbox
  public Checkbox()
Default Constructor.
 o Checkbox
  public Checkbox(String aLabel)
Constructor. Takes a string as a parameter, to be used as the label.
Parameters:
aLabel - label for the checkbox
 o Checkbox
  public Checkbox(String aLabel,
                  CheckboxGroup group,
                  boolean state)
Constructor.
Parameters:
aLabel - label for the checkbox
group - Checkbox group
state - checkbox' state
 o Checkbox
  public Checkbox(String aLabel,
                  methodRef mr)
Constructor.
Parameters:
aLabel - label for the checkbox.
aMethodRef - Fully resolved methodRef, i.e must have the target object set.
See Also:
setTarget
 o Checkbox
  public Checkbox(String aLabel,
                  Object target,
                  String method) throws InvalidMethodRefException
Constructor.
Parameters:
aLabel - label for the checkbox
target - object which is target of the called back method
method - string representation of method to invoke on target object.
Throws: InvalidMethodRefException
If generation of callback fails

Methods

 o addActionCallback
  public void addActionCallback(methodRef aMethodRef)
Adds user defined methodRef. This is invoked when a ACTION_EVENT occurs. The methodRef must be defined using the utility class awtExt.Callback
Parameters:
aMethodRef - ACTION_EVENT event handling method.
See Also:
Callback, methodRef
 o action
  public final boolean action(Event evt,
                              Object obj)
Called when an action occurs. This in turn calls back a user defined method on a target object. The called back method *AND* the target object must have a specific signature. Since the action event for this checkbox is *always* handled here, this action() method returns false to stop the event propagation.
Parameters:
evt - The action event that just occurred.
obj - The label of this object.
Overrides:
action in class Component
See Also:
Callback, CallbackInfo

All Packages  Class Hierarchy  This Package  Previous  Next  Index