Top Description Fields Constructors Methods
org.eclipse.swt.widgets

public Class Group

extends Composite
Class Inheritance
Imports
org.eclipse.swt.*, org.eclipse.swt.graphics.*, org.eclipse.swt.internal.*, org.eclipse.swt.internal.gtk.*, org.eclipse.swt.internal.gtk3.*, org.eclipse.swt.internal.gtk4.*

Instances of this class provide an etched border with an optional title.

Shadow styles are hints and may not be honoured by the platform. To create a group with the default shadow style for the platform, do not specify a shadow style.

Styles:
SHADOW_ETCHED_IN, SHADOW_ETCHED_OUT, SHADOW_IN, SHADOW_OUT, SHADOW_NONE
Events:
(none)

Note

Only one of the above styles may be specified.

Important Note

This class is not intended to be subclassed.

See Also
SWT Example: ControlExample, Sample code and further information

Field Summary

Modifier and TypeField and Description
pack-priv long
pack-priv GdkRGBA
pack-priv long
pack-priv String
Inherited from org.eclipse.swt.widgets.Composite:
backgroundModechildrenLoweredembeddedHandlefixClipHandlefixClipMapimHandlelayoutlayoutCountNO_INPUT_METHODnoChildDrawingpopupChildsocketHandletabList

Constructor Summary

AccessConstructor and Description
public
Group(Composite
a composite control which will be the parent of the new instance (cannot be null)
parent
,
int
the style of control to construct
style
)

Constructs a new instance of this class given its parent and a style value describing its behavior and appearance.

Method Summary

Modifier and TypeMethod and Description
pack-priv int
pack-priv static int
protected void
checkSubclass()

Overrides org.eclipse.swt.widgets.Composite.checkSubclass.

Checks that this class can be subclassed.
pack-priv long
pack-priv Point
computeSizeInPixels(int wHint, int hHint, boolean changed)

Overrides org.eclipse.swt.widgets.Composite.computeSizeInPixels.

pack-priv Rectangle
computeTrimInPixels(int x, int y, int width, int height)

Overrides org.eclipse.swt.widgets.Scrollable.computeTrimInPixels.

pack-priv void
pack-priv void
pack-priv void
pack-priv long
pack-priv Rectangle
pack-priv GdkRGBA
pack-priv GdkRGBA
pack-priv String
public String

Returns:

the text
getText
()

Returns the receiver's text, which is the string that the is used as the title.

pack-priv void
pack-priv boolean
pack-priv boolean
pack-priv long
pack-priv long
pack-priv long
pack-priv long
pack-priv void
pack-priv void
pack-priv void
pack-priv int
setBounds(int x, int y, int width, int height, boolean move, boolean resize)

Overrides org.eclipse.swt.widgets.Composite.setBounds.

pack-priv void
pack-priv void
pack-priv void
pack-priv void
public void
setText(String
the new text
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.

pack-priv void
Inherited from org.eclipse.swt.widgets.Composite:
_getChildren_getTabListadjustChildClippingchangedcheckBufferedcheckSubwindowcomputeTabListconnectFixedHandleDrawcreateHandledrawBackgrounddrawBackgroundInPixelsfindDeferredControlfindMenusfixChildrenfixClippingsfixModalfixParentGdkResourcefixStylefixTabListfixZOrderfocusHandleforceFocusgetBackgroundModegetChildrengetChildrenCountgetLayoutgetLayoutDeferredgetTabListgtk4_key_press_eventgtk_button_press_eventgtk_drawgtk_focusgtk_focus_in_eventgtk_focus_out_eventgtk_key_press_eventgtk_mapgtk_realizegtk_scroll_childgtk_style_updatedhasBorderhooksKeysimHandleisLayoutDeferredisTabGrouplayoutlayoutlayoutlayoutlayoutmarkLayoutminimumSizemoveAbovemoveBelowmoveChildrenmustBeVisibleOnInitBoundsprintWidgetpropagateDrawredrawChildrenreleaseChildrenremoveControlresizeHandlereskinChildrensetBackgroundModesetFocussetLayoutsetLayoutDeferredsetScrollBarVisiblesetTabGroupFocussetTabItemFocussetTabListtoStringtranslateMnemonictranslateTraversaltraversalCodeupdateBackgroundModeupdateLayout

Field Detail

clientHandleback to summary
pack-priv long clientHandle
foregroundback to summary
pack-priv GdkRGBA foreground
labelHandleback to summary
pack-priv long labelHandle
textback to summary
pack-priv String text

Constructor Detail

Groupback to summary
public 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 style value is either one of the style constants defined in class SWT which is applicable to instances of this class, or must be built by bitwise OR'ing together (that is, using the int "|" operator) two or more of those SWT style constants. The class description lists the style constants that are applicable to the class. Style bits are also inherited from superclasses.

Parameters
parent:Composite

a composite control which will be the parent of the new instance (cannot be null)

style:int

the style of control to construct

Exceptions
IllegalArgumentException:
  • ERROR_NULL_ARGUMENT - if the parent is null
SWTException:
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent
  • ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass
See Also
SWT#SHADOW_ETCHED_IN, SWT#SHADOW_ETCHED_OUT, SWT#SHADOW_IN, SWT#SHADOW_OUT, SWT#SHADOW_NONE, Widget#checkSubclass, Widget#getStyle

Method Detail

applyThemeBackgroundback to summary
pack-priv int applyThemeBackground()

Overrides org.eclipse.swt.widgets.Composite.applyThemeBackground.

Returns:int

Doc from org.eclipse.swt.widgets.Scrollable.applyThemeBackground.

  • 0 to remove THEME_BACKGROUND
  • 1 to apply THEME_BACKGROUND
  • otherwise don't change THEME_BACKGROUND state
  • Annotations
    @Override
    checkStyleback to summary
    pack-priv static int checkStyle(int style)

    Hides org.eclipse.swt.widgets.Composite.checkStyle.

    checkSubclassback to summary
    protected void checkSubclass()

    Overrides org.eclipse.swt.widgets.Composite.checkSubclass.

    Doc from org.eclipse.swt.widgets.Widget.checkSubclass.

    Checks that this class can be subclassed.

    The SWT class library is intended to be subclassed only at specific, controlled points (most notably, Composite and Canvas when implementing new widgets). This method enforces this rule unless it is overridden.

    Important Note

    By providing an implementation of this method that allows a subclass of a class which does not normally allow subclassing to be created, the implementer agrees to be fully responsible for the fact that any such subclass will likely fail between SWT releases and will be strongly platform specific. No support is provided for user-written classes which are implemented in this fashion.

    The ability to subclass outside of the allowed SWT classes is intended purely to enable those not on the SWT development team to implement patches in order to get around specific limitations in advance of when those limitations can be addressed by the team. Subclassing should not be attempted without an intimate and detailed understanding of the hierarchy.

    Annotations
    @Override
    clientHandleback to summary
    pack-priv long clientHandle()

    Overrides org.eclipse.swt.widgets.Scrollable.clientHandle.

    Annotations
    @Override
    computeSizeInPixelsback to summary
    pack-priv Point computeSizeInPixels(int wHint, int hHint, boolean changed)

    Overrides org.eclipse.swt.widgets.Composite.computeSizeInPixels.

    Annotations
    @Override
    computeTrimInPixelsback to summary
    pack-priv Rectangle computeTrimInPixels(int x, int y, int width, int height)

    Overrides org.eclipse.swt.widgets.Scrollable.computeTrimInPixels.

    Annotations
    @Override
    createHandleback to summary
    pack-priv void createHandle(int index)

    Overrides org.eclipse.swt.widgets.Composite.createHandle.

    Annotations
    @Override
    deregisterback to summary
    pack-priv void deregister()

    Overrides org.eclipse.swt.widgets.Composite.deregister.

    Annotations
    @Override
    enableWidgetback to summary
    pack-priv void enableWidget(boolean enabled)

    Overrides org.eclipse.swt.widgets.Composite.enableWidget.

    Annotations
    @Override
    eventHandleback to summary
    pack-priv long eventHandle()

    Overrides org.eclipse.swt.widgets.Control.eventHandle.

    Annotations
    @Override
    getClientAreaInPixelsback to summary
    pack-priv Rectangle getClientAreaInPixels()

    Overrides org.eclipse.swt.widgets.Composite.getClientAreaInPixels.

    Annotations
    @Override
    getContextBackgroundGdkRGBAback to summary
    pack-priv GdkRGBA getContextBackgroundGdkRGBA()

    Overrides org.eclipse.swt.widgets.Control.getContextBackgroundGdkRGBA.

    Annotations
    @Override
    getContextColorGdkRGBAback to summary
    pack-priv GdkRGBA getContextColorGdkRGBA()

    Overrides org.eclipse.swt.widgets.Control.getContextColorGdkRGBA.

    Annotations
    @Override
    getNameTextback to summary
    pack-priv String getNameText()

    Overrides org.eclipse.swt.widgets.Widget.getNameText.

    Annotations
    @Override
    getTextback to summary
    public String getText()

    Returns the receiver's text, which is the string that the is used as the title. If the text has not previously been set, returns an empty string.

    Returns:String

    the text

    Exceptions
    SWTException:
    • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
    • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
    hookEventsback to summary
    pack-priv void hookEvents()

    Overrides org.eclipse.swt.widgets.Composite.hookEvents.

    Annotations
    @Override
    mnemonicHitback to summary
    pack-priv boolean mnemonicHit(char key)

    Overrides org.eclipse.swt.widgets.Control.mnemonicHit.

    Annotations
    @Override
    mnemonicMatchback to summary
    pack-priv boolean mnemonicMatch(char key)

    Overrides org.eclipse.swt.widgets.Control.mnemonicMatch.

    Annotations
    @Override
    paintHandleback to summary
    pack-priv long paintHandle()

    Overrides org.eclipse.swt.widgets.Control.paintHandle.

    Annotations
    @Override
    paintSurfaceback to summary
    pack-priv long paintSurface()

    Overrides org.eclipse.swt.widgets.Control.paintSurface.

    Annotations
    @Override
    paintWindowback to summary
    pack-priv long paintWindow()

    Overrides org.eclipse.swt.widgets.Control.paintWindow.

    Annotations
    @Override
    parentingHandleback to summary
    pack-priv long parentingHandle()

    Overrides org.eclipse.swt.widgets.Composite.parentingHandle.

    Annotations
    @Override
    registerback to summary
    pack-priv void register()

    Overrides org.eclipse.swt.widgets.Composite.register.

    Annotations
    @Override
    releaseHandleback to summary
    pack-priv void releaseHandle()

    Overrides org.eclipse.swt.widgets.Composite.releaseHandle.

    Annotations
    @Override
    releaseWidgetback to summary
    pack-priv void releaseWidget()

    Overrides org.eclipse.swt.widgets.Composite.releaseWidget.

    Annotations
    @Override
    setBoundsback to summary
    pack-priv int setBounds(int x, int y, int width, int height, boolean move, boolean resize)

    Overrides org.eclipse.swt.widgets.Composite.setBounds.

    Annotations
    @Override
    setFontDescriptionback to summary
    pack-priv void setFontDescription(long font)

    Overrides org.eclipse.swt.widgets.Control.setFontDescription.

    Annotations
    @Override
    setForegroundGdkRGBAback to summary
    pack-priv void setForegroundGdkRGBA(long handle, GdkRGBA rgba)

    Overrides org.eclipse.swt.widgets.Control.setForegroundGdkRGBA.

    Annotations
    @Override
    setForegroundGdkRGBAback to summary
    pack-priv void setForegroundGdkRGBA(GdkRGBA rgba)

    Overrides org.eclipse.swt.widgets.Control.setForegroundGdkRGBA.

    Annotations
    @Override
    setOrientationback to summary
    pack-priv void setOrientation(boolean create)

    Overrides org.eclipse.swt.widgets.Composite.setOrientation.

    Annotations
    @Override
    setTextback to summary
    public 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. The string may include the mnemonic character.

    Mnemonics are indicated by an '&' that causes the next character to be the mnemonic. When the user presses a key sequence that matches the mnemonic, focus is assigned to the first child of the group. On most platforms, the mnemonic appears underlined but may be emphasised in a platform specific manner. The mnemonic indicator character '&' can be escaped by doubling it in the string, causing a single '&' to be displayed.

    Note

    If control characters like '\n', '\t' etc. are used in the string, then the behavior is platform dependent.

    Parameters
    string:String

    the new text

    Exceptions
    IllegalArgumentException:
    • ERROR_NULL_ARGUMENT - if the text is null
    SWTException:
    • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
    • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
    showWidgetback to summary
    pack-priv void showWidget()

    Overrides org.eclipse.swt.widgets.Composite.showWidget.

    Annotations
    @Override