by, 11-10-2011 at 06:59 PM (1606 Views)
A group is also a control that can contain other controls. A group is surrounded by a border and may, optionally, contain a title. As with composites, the position of each control inside a group is relative to the group, so if the group is moved on the shell, the controls inside the group retain their relative positions.
Group provide an etched border with an optional title. Shadow styles are hints and may not be honored by the platform. To create a group with the default shadow style for the platform, do not specify a shadow style.
The styles that are supported by group are SHADOW_ETCHED_IN, SHADOW_ETCHED_OUT, SHADOW_IN, SHADOW_OUT, SHADOW_NONE.
The following are the important constructors of Group class.
Group(Composite parent, int style)
Constructs a new instance of this class given its parent and a style value describing its behavior and appearance.
The following are the important methods of Group class.
protected void checkSubclass()
Checks that this class can be subclassed.
Point computeSize(int wHint, int hHint, boolean changed)
Returns the preferred size of the receiver.
Rectangle computeTrim(int x, int y, int width, int height)
Given a desired client area for the receiver (as described by the arguments), returns the bounding rectangle which would be required to produce that client area.
Returns a rectangle which describes the area of the receiver which is capable of displaying data (that is, not covered by the "trimmings").
Returns the receiver's text, which is the string that the is used as the title.
void setText(String string)
Sets the receiver's text, which is the string that will be displayed as the receiver's title, to the argument, which may not be null.