All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class dtai.gwt.CheckboxGadget

java.lang.Object
   |
   +----dtai.gwt.Gadget
           |
           +----dtai.gwt.ContainerGadget
                   |
                   +----dtai.gwt.PanelGadget
                           |
                           +----dtai.gwt.BorderGadget
                                   |
                                   +----dtai.gwt.ClickableGadget
                                           |
                                           +----dtai.gwt.CheckboxGadget

public class CheckboxGadget
extends ClickableGadget
implements ItemSelectable
A Checkbox object is a graphical user interface element that has a boolean state.


Variable Index

 o CHECK
 o RADIO

Constructor Index

 o CheckboxGadget()
Constructs a Checkbox with no label.
 o CheckboxGadget(Image)
CheckboxGadget
 o CheckboxGadget(String)
Constructs a Checkbox with the given label.
 o CheckboxGadget(String, boolean)
Constructs a Checkbox with the given label and state.
 o CheckboxGadget(String, boolean, CheckboxGadgetGroup)
Constructs a Checkbox with the given label, state and group.
 o CheckboxGadget(String, Image)
CheckboxGadget

Method Index

 o addItemListener(ItemListener)
Adds the specified listener to be notified when component events occur on this component.
 o click(AWTEvent)
click
 o getCheckboxGadgetGroup()
Returns the checkbox group.
 o getLabel()
Gets the label of the button.
 o getSelectedIndexes()
Returns the selected indexes or null if no items are selected.
 o getSelectedItems()
Returns the selected items or null if no items are selected.
 o getState()
Returns the boolean state of the Checkbox.
 o getType()
getType
 o processEvent(AWTEvent)
processEvent
 o processFocusEvent(FocusEvent)
processFocusEvent
 o processItemEvent(ItemEvent)
 o removeItemListener(ItemListener)
Removes the specified listener so it no longer receives item events on this item.
 o setCheckboxGadgetGroup(CheckboxGadgetGroup)
setCheckboxGadgetGroup
 o setImage(Image)
setImage - sets the button with the specified Image
 o setLabel(String)
Sets the button with the specified label.
 o setMouseState(int)
setMouseState
 o setParent(ContainerGadget, boolean)
setParent
 o setState(boolean)
setState
 o setState(boolean, AWTEvent)
setState
 o setType(int)
setType

Variables

 o CHECK
 public static final int CHECK
 o RADIO
 public static final int RADIO

Constructors

 o CheckboxGadget
 public CheckboxGadget()
Constructs a Checkbox with no label.

 o CheckboxGadget
 public CheckboxGadget(String label)
Constructs a Checkbox with the given label.

Parameters:
label - the label of the Checkbox.
 o CheckboxGadget
 public CheckboxGadget(String label,
                       boolean state)
Constructs a Checkbox with the given label and state.

Parameters:
label - label of the Checkbox
state - boolean state of the Checkbox
 o CheckboxGadget
 public CheckboxGadget(String label,
                       boolean state,
                       CheckboxGadgetGroup group)
Constructs a Checkbox with the given label, state and group.

Parameters:
label - label of the Checkbox
state - boolean state of the Checkbox
group - group of the Checkbox
 o CheckboxGadget
 public CheckboxGadget(Image image)
CheckboxGadget

Parameters:
image - image of the Checkbox
 o CheckboxGadget
 public CheckboxGadget(String label,
                       Image image)
CheckboxGadget

Parameters:
label - - label of the Checkbox
image - - image of the Checkbox

Methods

 o setType
 public void setType(int type)
setType

Parameters:
type - - either CHECK, in which case indicator gets a new CheckGadget, or something else, in which case indicator gets a new RadioGadget.
 o getType
 public int getType()
getType

Returns:
CHECK or RADIO, depending on indicator
 o setState
 public void setState(boolean state)
setState

Parameters:
state - boolean SELECTED/DESELECTED
 o setState
 protected void setState(boolean state,
                         AWTEvent mouse)
setState

Parameters:
state - boolean SELECTED/DESELECTED
mouse - the firing AWTEvent
 o getState
 public boolean getState()
Returns the boolean state of the Checkbox.

Returns:
boolean
See Also:
setState
 o setCheckboxGadgetGroup
 public void setCheckboxGadgetGroup(CheckboxGadgetGroup group)
setCheckboxGadgetGroup

Parameters:
group - the CheckboxGadgetGroup to add this gadget to, or null
 o setParent
 public void setParent(ContainerGadget parent,
                       boolean notifyParent)
setParent

Parameters:
parent - the parent ContainerGadget
notifyParent - to notify the parent or not
Overrides:
setParent in class Gadget
 o getCheckboxGadgetGroup
 public CheckboxGadgetGroup getCheckboxGadgetGroup()
Returns the checkbox group.

Returns:
CheckboxGadgetGroup
 o getLabel
 public String getLabel()
Gets the label of the button.

Returns:
the button label
See Also:
setLabel
 o setLabel
 public void setLabel(String label)
Sets the button with the specified label.

Parameters:
label - the label to set the button with
See Also:
getLabel
 o setImage
 public void setImage(Image image)
setImage - sets the button with the specified Image

Parameters:
image - the Image to set
 o setMouseState
 public void setMouseState(int state)
setMouseState

Parameters:
state - new state value
Overrides:
setMouseState in class ClickableGadget
 o click
 public void click(AWTEvent mouse)
click

Parameters:
mouse - the firing AWTEvent
Overrides:
click in class ClickableGadget
 o getSelectedIndexes
 public int[] getSelectedIndexes()
Returns the selected indexes or null if no items are selected.

Returns:
the selected indexes, or null
 o getSelectedItems
 public String[] getSelectedItems()
Returns the selected items or null if no items are selected.

Returns:
the selected items, or null
 o processFocusEvent
 protected void processFocusEvent(FocusEvent e)
processFocusEvent

Parameters:
e - the firing FocusEvent
Returns:
boolean
Overrides:
processFocusEvent in class ClickableGadget
 o addItemListener
 public synchronized void addItemListener(ItemListener l)
Adds the specified listener to be notified when component events occur on this component.

Parameters:
l - the listener to receive the events
 o removeItemListener
 public synchronized void removeItemListener(ItemListener l)
Removes the specified listener so it no longer receives item events on this item.

Parameters:
l - the listener to remove
 o processEvent
 protected void processEvent(AWTEvent e)
processEvent

Parameters:
e - a ItemEvent
Returns:
boolean result
Overrides:
processEvent in class ContainerGadget
 o processItemEvent
 protected void processItemEvent(ItemEvent e)

All Packages  Class Hierarchy  This Package  Previous  Next  Index