Class UICheckGroup
public class UICheckGroup extends UIGroup
{
// Constructors
public UICheckGroup();
public UICheckGroup(String label);
public UICheckGroup(IUIComponent header);
// Methods
public IUIComponent add(IUIComponent comp, int index);
public IUIComponent add(IUIComponent comp);
public IUIComponent add(String name, int index);
public IUIComponent add(String name);
public IUIComponent add(IUIComponent comp, Object constraints,
int index);
public IUIComponent add(String name, Object constraints,
int index);
public boolean handleEvent(Event e);
public void setHeader(IUIComponent header);
}
This class implements a group box control for a list of UICheckButton objects.
This class is very similar to the java.awt.CheckboxGroup class, except that the check boxes do not exhibit radio button behavior (see the UIRadioGroup class).
Note The default layout manager for the UICheckGroup class is the UIVerticalFlowLayout manager, so the constraints parameters of any methods that accept them are typically ignored.
UIComponent
|
+--UIContainer
|
+--UIStateContainer
|
+--UIPanel
|
+--UIGroup
|
+--UICheckGroup
public UICheckGroup();
Creates a UICheckGroup control with no label.
Remarks:
Use the UIGroup.setName method to add a label.
public UICheckGroup(String label);
Creates a check button group box control with the specified label.
Parameter | Description |
label
| The label for the group control.
|
public UICheckGroup(IUIComponent header);
Creates a check button group box control using the specified component as a header.
Parameter | Description |
header
| A IUIComponent label for the group control.
|
public IUIComponent add(IUIComponent comp, int index);
Adds a UICheckButton to the UICheckGroup control at the specified index.
Return Value:
Returns the UICheckButton that was added, if successful; otherwise, returns null.
Parameter | Description |
comp
| A UICheckButton, or a component to use for the name of the UICheckButton that is added to the UICheckGroup.
|
index
| The zero-based index at which to insert the component.
|
public IUIComponent add(IUIComponent comp);
Adds a UICheckButton to the end of the list of objects contained by the UICheckGroup control.
Return Value:
Returns the UICheckButton that was added, if successful; otherwise, returns null.
Parameter | Description |
comp
| A UICheckButton, or a component to use for the name of the UICheckButton that is added to the UICheckGroup.
|
public IUIComponent add(String name, int index);
Adds a UICheckButton to the UICheckGroup control at the specified index.
Return Value:
Returns the UICheckButton that was added, if successful; otherwise, returns null.
Parameter | Description |
name
| The name of the UICheckButton that is added to the UICheckGroup.
|
index
| The zero-based index at which to insert the component.
|
public IUIComponent add(String name);
Adds a UICheckButton to the end of the list of objects contained by the UICheckGroup control.
Return Value:
Returns the UICheckButton that was added, if successful; otherwise, returns null.
public IUIComponent add(IUIComponent comp, Object constraints, int index);
Adds a UICheckButton to the UICheckGroup control, according to the specified constraints and index.
Return Value:
Returns the UICheckButton that was added, if successful; otherwise, returns null.
Parameter | Description |
comp
| A UICheckButton, or a component to use for the name of the UICheckButton that is added to the UICheckGroup.
|
constraints
| The layout constraints, which depend on the current layout manager. For more information about possible values, see the layout manager's addLayoutComponent method.
|
index
| The zero-based index at which to insert the component.
|
public IUIComponent add(String name, Object constraints, int index);
Adds a UICheckButton to the UICheckGroup control, according to the specified constraints and index.
Return Value:
Returns the UICheckButton that was added, if successful; otherwise, returns null.
Parameter | Description |
name
| The name of the UICheckButton that is added to the UICheckGroup.
|
constraints
| The layout constraints, which depend on the current layout manager. For more information about possible values, see the layout manager's addLayoutComponent method.
|
index
| The zero-based index at which to insert the component.
|
public boolean handleEvent(Event e);
Responds to events occurring within the control. This method posts either a LIST_SELECT or a LIST_DESELECT event if the target of the event is a check box within the group control.
Return Value:
Returns true if the event is handled by the check group control, or false if the event is passed to the parent component.
Parameter | Description |
e
| The event that occurred within the check group.
|
public void setHeader(IUIComponent header);
Sets the header component for the panel.
Return Value:
No return value.
Parameter | Description |
header
| The component to be used as the group control's header.
|
See Also: com.ms.ui.UIPanel.getHeader