Packages
 In this topic

*Constructors

*Methods

 

Packages   PreviousThis PackageNext
Package com.ms.ui   Previous This
Package
Next

 


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

Constructors

UICheckGroup

public UICheckGroup();

Creates a UICheckGroup control with no label.

Remarks:

Use the UIGroup.setName method to add a label.

UICheckGroup

public UICheckGroup(String label);

Creates a check button group box control with the specified label.

ParameterDescription
label The label for the group control.

UICheckGroup

public UICheckGroup(IUIComponent header);

Creates a check button group box control using the specified component as a header.

ParameterDescription
header A IUIComponent label for the group control.

Methods

add

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.

ParameterDescription
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.

add

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.

ParameterDescription
comp A UICheckButton, or a component to use for the name of the UICheckButton that is added to the UICheckGroup.

add

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.

ParameterDescription
name The name of the UICheckButton that is added to the UICheckGroup.
index The zero-based index at which to insert the component.

add

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.

ParameterDescription
name The name of the UICheckButton that is added to the UICheckGroup.

add

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.

ParameterDescription
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.

add

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.

ParameterDescription
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.

handleEvent

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.

ParameterDescription
e The event that occurred within the check group.

setHeader

public void setHeader(IUIComponent header);

Sets the header component for the panel.

Return Value:

No return value.

ParameterDescription
header The component to be used as the group control's header.

See Also: com.ms.ui.UIPanel.getHeader

upnrm.gif © 1998 Microsoft Corporation. All rights reserved. Terms of use.