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.
-
CHECK
-
-
RADIO
-
-
CheckboxGadget()
- Constructs a Checkbox with no label.
-
CheckboxGadget(Image)
- CheckboxGadget
-
CheckboxGadget(String)
- Constructs a Checkbox with the given label.
-
CheckboxGadget(String, boolean)
- Constructs a Checkbox with the given label and state.
-
CheckboxGadget(String, boolean, CheckboxGadgetGroup)
- Constructs a Checkbox with the given label, state and group.
-
CheckboxGadget(String, Image)
- CheckboxGadget
-
addItemListener(ItemListener)
- Adds the specified listener to be notified when component
events occur on this component.
-
click(AWTEvent)
- click
-
getCheckboxGadgetGroup()
- Returns the checkbox group.
-
getLabel()
- Gets the label of the button.
-
getSelectedIndexes()
- Returns the selected indexes or null if no items are selected.
-
getSelectedItems()
- Returns the selected items or null if no items are selected.
-
getState()
- Returns the boolean state of the Checkbox.
-
getType()
- getType
-
processEvent(AWTEvent)
- processEvent
-
processFocusEvent(FocusEvent)
- processFocusEvent
-
processItemEvent(ItemEvent)
-
-
removeItemListener(ItemListener)
- Removes the specified listener so it no longer receives
item events on this item.
-
setCheckboxGadgetGroup(CheckboxGadgetGroup)
- setCheckboxGadgetGroup
-
setImage(Image)
- setImage - sets the button with the specified Image
-
setLabel(String)
- Sets the button with the specified label.
-
setMouseState(int)
- setMouseState
-
setParent(ContainerGadget, boolean)
- setParent
-
setState(boolean)
- setState
-
setState(boolean, AWTEvent)
- setState
-
setType(int)
- setType
CHECK
public static final int CHECK
RADIO
public static final int RADIO
CheckboxGadget
public CheckboxGadget()
- Constructs a Checkbox with no label.
CheckboxGadget
public CheckboxGadget(String label)
- Constructs a Checkbox with the given label.
- Parameters:
- label - the label of the Checkbox.
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
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
CheckboxGadget
public CheckboxGadget(Image image)
- CheckboxGadget
- Parameters:
- image - image of the Checkbox
CheckboxGadget
public CheckboxGadget(String label,
Image image)
- CheckboxGadget
- Parameters:
- label - - label of the Checkbox
- image - - image of the Checkbox
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.
getType
public int getType()
- getType
- Returns:
- CHECK or RADIO, depending on indicator
setState
public void setState(boolean state)
- setState
- Parameters:
- state - boolean SELECTED/DESELECTED
setState
protected void setState(boolean state,
AWTEvent mouse)
- setState
- Parameters:
- state - boolean SELECTED/DESELECTED
- mouse - the firing AWTEvent
getState
public boolean getState()
- Returns the boolean state of the Checkbox.
- Returns:
- boolean
- See Also:
- setState
setCheckboxGadgetGroup
public void setCheckboxGadgetGroup(CheckboxGadgetGroup group)
- setCheckboxGadgetGroup
- Parameters:
- group - the CheckboxGadgetGroup to add this gadget to, or null
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
getCheckboxGadgetGroup
public CheckboxGadgetGroup getCheckboxGadgetGroup()
- Returns the checkbox group.
- Returns:
- CheckboxGadgetGroup
getLabel
public String getLabel()
- Gets the label of the button.
- Returns:
- the button label
- See Also:
- setLabel
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
setImage
public void setImage(Image image)
- setImage - sets the button with the specified Image
- Parameters:
- image - the Image to set
setMouseState
public void setMouseState(int state)
- setMouseState
- Parameters:
- state - new state value
- Overrides:
- setMouseState in class ClickableGadget
click
public void click(AWTEvent mouse)
- click
- Parameters:
- mouse - the firing AWTEvent
- Overrides:
- click in class ClickableGadget
getSelectedIndexes
public int[] getSelectedIndexes()
- Returns the selected indexes or null if no items are selected.
- Returns:
- the selected indexes, or null
getSelectedItems
public String[] getSelectedItems()
- Returns the selected items or null if no items are selected.
- Returns:
- the selected items, or null
processFocusEvent
protected void processFocusEvent(FocusEvent e)
- processFocusEvent
- Parameters:
- e - the firing FocusEvent
- Returns:
- boolean
- Overrides:
- processFocusEvent in class ClickableGadget
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
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
processEvent
protected void processEvent(AWTEvent e)
- processEvent
- Parameters:
- e - a ItemEvent
- Returns:
- boolean result
- Overrides:
- processEvent in class ContainerGadget
processItemEvent
protected void processItemEvent(ItemEvent e)
All Packages Class Hierarchy This Package Previous Next Index