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.
-
Checkbox(String)
- Constructs a Checkbox with the specified label.
-
Checkbox(String, CheckboxGroup, boolean)
- Constructs a Checkbox with the specified label, set to the
specified state, and in the specified check box group.
-
addItemListener(ItemListener)
-
-
getCheckboxGroup()
- Gets the CheckboxGroup.
-
getLabel()
- Gets the label of the check box.
-
getMinimumSize()
- Gets the minimum size of this component.
-
getSelectedObjects()
- Returns the selected items or null if no items are selected.
-
getState()
-
Returns the boolean state of the Checkbox.
-
paint(Graphics)
-
Paints the component.
-
processItemEvent(ItemEvent)
-
-
processMouseEvent(MouseEvent)
-
Processes mouse events occurring on this component by
dispatching them to any registered MouseListener objects.
-
removeItemListener(ItemListener)
-
-
setCheckboxGroup(CheckboxGroup)
- Sets the CheckboxGroup to the specified group.
-
setLabel(String)
- Sets this check box's label to be the specified string.
-
setState(boolean)
-
Sets the Checkbox to the specifed boolean state.
-
update(Graphics)
-
Updates the component.
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
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
addItemListener
public void addItemListener(ItemListener al)
removeItemListener
public void removeItemListener(ItemListener al)
getState
public boolean getState()
- Returns the boolean state of the Checkbox.
update
public void update(Graphics g)
- Updates the component.
- Overrides:
- update in class Component
paint
public void paint(Graphics g)
- Paints the component.
- Overrides:
- paint in class Component
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
processItemEvent
public void processItemEvent(ItemEvent e)
getSelectedObjects
public Object[] getSelectedObjects()
- Returns the selected items or null if no items are selected.
setCheckboxGroup
public void setCheckboxGroup(CheckboxGroup newGroup)
- Sets the CheckboxGroup to the specified group.
- Parameters:
- g - the new CheckboxGroup
- See Also:
- getCheckboxGroup
getCheckboxGroup
public CheckboxGroup getCheckboxGroup()
- Gets the CheckboxGroup.
- Returns:
- the CheckboxGroup
setState
public void setState(boolean sel)
- Sets the Checkbox to the specifed boolean state.
- Parameters:
- state - the boolean state
- See Also:
- getState
getLabel
public String getLabel()
- Gets the label of the check box.
- See Also:
- setLabel
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
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