All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.bulletproof.gui.Checkbox

java.lang.Object
   |
   +----com.bulletproof.gui.Component
           |
           +----com.bulletproof.gui.Checkbox

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


Constructor Index

 o Checkbox(String)
Constructs a Checkbox with the specified label.
 o Checkbox(String, CheckboxGroup, boolean)
Constructs a Checkbox with the specified label, set to the specified state, and in the specified check box group.

Method Index

 o addItemListener(ItemListener)
 o getCheckboxGroup()
Gets the CheckboxGroup.
 o getLabel()
Gets the label of the check box.
 o getMinimumSize()
Gets the minimum size of this component.
 o getSelectedObjects()
Returns the selected items or null if no items are selected.
 o getState()
Returns the boolean state of the Checkbox.
 o paint(Graphics)
Paints the component.
 o processItemEvent(ItemEvent)
 o processMouseEvent(MouseEvent)
Processes mouse events occurring on this component by dispatching them to any registered MouseListener objects.
 o removeItemListener(ItemListener)
 o setCheckboxGroup(CheckboxGroup)
Sets the CheckboxGroup to the specified group.
 o setLabel(String)
Sets this check box's label to be the specified string.
 o setState(boolean)
Sets the Checkbox to the specifed boolean state.
 o update(Graphics)
Updates the component.

Constructors

 o Checkbox
 public Checkbox(String s)
Constructs a Checkbox with the specified label. The check box starts in a false state and is not part of any check box group.

Parameters:
label - the label on the Checkbox
 o Checkbox
 public Checkbox(String s,
                 CheckboxGroup group,
                 boolean state)
Constructs a Checkbox with the specified label, set to the specified state, and in the specified check box group.

Parameters:
label - the label on the Checkbox
group - the CheckboxGroup this Checkbox is in
state - is the initial state of this Checkbox

Methods

 o addItemListener
 public void addItemListener(ItemListener al)
 o removeItemListener
 public void removeItemListener(ItemListener al)
 o getState
 public boolean getState()
Returns the boolean state of the Checkbox.

 o update
 public void update(Graphics g)
Updates the component.

Overrides:
update in class Component
 o paint
 public void paint(Graphics g)
Paints the component.

Overrides:
paint in class Component
 o processMouseEvent
 public void processMouseEvent(MouseEvent e)
Processes mouse events occurring on this component by dispatching them to any registered MouseListener objects.

Overrides:
processMouseEvent in class Component
 o processItemEvent
 public void processItemEvent(ItemEvent e)
 o getSelectedObjects
 public Object[] getSelectedObjects()
Returns the selected items or null if no items are selected.

 o setCheckboxGroup
 public void setCheckboxGroup(CheckboxGroup newGroup)
Sets the CheckboxGroup to the specified group.

Parameters:
g - the new CheckboxGroup
See Also:
getCheckboxGroup
 o getCheckboxGroup
 public CheckboxGroup getCheckboxGroup()
Gets the CheckboxGroup.

Returns:
the CheckboxGroup
 o setState
 public void setState(boolean sel)
Sets the Checkbox to the specifed boolean state.

Parameters:
state - the boolean state
See Also:
getState
 o getLabel
 public String getLabel()
Gets the label of the check box.

See Also:
setLabel
 o setLabel
 public void setLabel(String s)
Sets this check box's label to be the specified string.

Parameters:
label - the label of the button
See Also:
getLabel
 o getMinimumSize
 public Dimension getMinimumSize()
Gets the minimum size of this component.

Overrides:
getMinimumSize in class Component

All Packages  Class Hierarchy  This Package  Previous  Next  Index