-
Notifications
You must be signed in to change notification settings - Fork 17
CollapsibleGroup
CollapsibleGroup is a grouping component for WCollapsible and WTabSet. The purpose of a CollapsibleGroup is to define those collapsible components which are to be controlled by a WCollapsibleToggle. Note though that a WTabSet can only be an effective member of a CollapsibleGroup if the WTabSet has TabSetType.ACCORDION and its single property is not true
.
- Contents
- Why use CollapsibleGroup
- Creating a CollapsibleGroup
- Associating a WCollapsibleToggle
- Adding collapsible components
- Related components
- Further information
CollapsibleGroup has one use: to allow a WCollapsibleToggle to control WCollapsible and / or WTabSet components.
CollapsibleGroup has a simple (default) constructor.
CollapsibleGroup group = new CollapsibleGroup();
A CollapsibleGroup is only useful if it is associated with a WCollapsibleToggle. If the UI does not use a WCollapsibleToggle there is no point having a CollapsibleGroup.
// A WCollapsibleToggle can be associated with a
// CollapsibleGroup during construction
WCollapsibleToggle toggle = new WCollapsibleToggle(group);
// alternately a WCollapsibleToggle can be associated with a group
group.setCollapsibleToggle(toggle);
// or even the other way around
toggle.setGroup(group);
A WCollapsible may be associated with a CollapsibleGroup during instantiation or by using a setter as demonstrated below. A WTabSet may only be associated with a CollapsibleGroup using the setter.
// A WCollapsible may be added to the group using a constructor:
WCollapsible collapsible = new WCollapsible(collapsibleContent,
label, mode, group);
// or an existing WCollapsible may be added to a group
// given WCollapsible collapsible2
collapsible2.setGroup(group);
// WTabSet can also be added to a CollapsibleGroup
// given WTabSet accordion
accordion.setGroup(group);