org.eclipse.swt.widgets
Class Group

java.lang.Object
  |
  +--org.eclipse.swt.widgets.Widget
        |
        +--org.eclipse.swt.widgets.Control
              |
              +--org.eclipse.swt.widgets.Scrollable
                    |
                    +--org.eclipse.swt.widgets.Composite
                          |
                          +--org.eclipse.swt.widgets.Group
All Implemented Interfaces:
Drawable

public class Group
extends Composite

Safe: 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: This class is not intended to be subclassed.


Field Summary
(package private) static org.eclipse.swt.internal.win32.TCHAR GroupClass
           
(package private) static int GroupProc
           
 
Fields inherited from class org.eclipse.swt.widgets.Composite
font, layout, lpwp, tabList
 
Fields inherited from class org.eclipse.swt.widgets.Scrollable
horizontalBar, verticalBar
 
Fields inherited from class org.eclipse.swt.widgets.Control
ACCENTS, accessible, background, drawCount, foreground, handle, hCursor, layoutData, menu, parent, toolTipText
 
Fields inherited from class org.eclipse.swt.widgets.Widget
CANVAS, COMCTL32_MAJOR, COMCTL32_MINOR, data, DEFAULT_HEIGHT, DEFAULT_WIDTH, DISABLED, DISPOSED, eventTable, HIDDEN, keys, MAJOR, MINOR, Mnemonic, state, style, values
 
Constructor Summary
Group(Composite parent, int style)
          Enabled: Constructs a new instance of this class given its parent and a style value describing its behavior and appearance.
 
Method Summary
(package private)  int callWindowProc(int msg, int wParam, int lParam)
           
(package private) static int checkStyle(int style)
           
protected  void checkSubclass()
          Checks that this class can be subclassed.
 Point computeSize(int wHint, int hHint, boolean changed)
          Enabled:
 Rectangle computeTrim(int x, int y, int width, int height)
          Enabled:
(package private)  void createHandle()
           
 Rectangle getClientArea()
          Enabled:
(package private)  String getNameText()
           
 String getText()
          Enabled: Returns the receiver's text, which is the string that the is used as the title.
(package private)  boolean mnemonicHit(char key)
           
(package private)  boolean mnemonicMatch(char key)
           
 void setText(String string)
          Enabled: 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.
(package private)  int widgetStyle()
           
(package private)  org.eclipse.swt.internal.win32.TCHAR windowClass()
           
(package private)  int windowProc()
           
(package private)  org.eclipse.swt.internal.win32.LRESULT WM_ERASEBKGND(int wParam, int lParam)
           
(package private)  org.eclipse.swt.internal.win32.LRESULT WM_MOUSEMOVE(int wParam, int lParam)
           
(package private)  org.eclipse.swt.internal.win32.LRESULT WM_NCHITTEST(int wParam, int lParam)
           
(package private)  org.eclipse.swt.internal.win32.LRESULT WM_PRINTCLIENT(int wParam, int lParam)
           
(package private)  org.eclipse.swt.internal.win32.LRESULT WM_SIZE(int wParam, int lParam)
           
 
Methods inherited from class org.eclipse.swt.widgets.Composite
_getChildren, _getTabList, computeTabList, getChildren, getChildrenCount, getLayout, getTabList, hooksKeys, layout, layout, minimumSize, moveAbove, moveBelow, releaseChildren, releaseWidget, resizeChildren, resizeChildren, setFocus, setLayout, setResizeChildren, setTabGroupFocus, setTabItemFocus, setTabList, toolTipText, translateMnemonic, updateFont, WM_GETDLGCODE, WM_GETFONT, WM_LBUTTONDOWN, WM_NOTIFY, WM_PAINT, WM_SETFONT, WM_SYSCOLORCHANGE, WM_SYSCOMMAND
 
Methods inherited from class org.eclipse.swt.widgets.Scrollable
createScrollBar, createWidget, getHorizontalBar, getVerticalBar, widgetExtStyle, WM_HSCROLL, WM_MOUSEWHEEL, WM_VSCROLL, wmScroll
 
Methods inherited from class org.eclipse.swt.widgets.Control
addControlListener, addFocusListener, addHelpListener, addKeyListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addPaintListener, addTraverseListener, checkOrientation, computeSize, computeTabGroup, computeTabRoot, defaultBackground, defaultFont, defaultForeground, deregister, destroyWidget, drawBackground, drawBackground, findBrush, findCursor, findMnemonic, fixFocus, forceFocus, forceResize, getAccessible, getBackground, getBackgroundPixel, getBorderWidth, getBounds, getCodePage, getDisplay, getEnabled, getFont, getForeground, getForegroundPixel, getLayoutData, getLocation, getMenu, getParent, getPath, getShell, getSize, getToolTipText, getVisible, hasCursor, hasFocus, internal_dispose_GC, internal_new_GC, isActive, isDisposed, isEnabled, isFocusAncestor, isFocusControl, isReparentable, isShowing, isTabGroup, isTabItem, isVisible, menuShell, moveAbove, moveBelow, new_Accessible, pack, pack, redraw, redraw, register, releaseHandle, removeControlListener, removeFocusListener, removeHelpListener, removeKeyListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removePaintListener, removeTraverseListener, sendKeyEvent, sendKeyEvent, sendMouseEvent, sendMouseEvent, setBackground, setBackgroundPixel, setBounds, setBounds, setBounds, setCapture, setCursor, setDefaultFont, setEnabled, setFont, setForeground, setForegroundPixel, setLayoutData, setLocation, setLocation, setMenu, setParent, setRadioFocus, setRadioSelection, setRedraw, setSavedFocus, setSize, setSize, setToolTipText, setVisible, sort, subclass, toControl, toControl, toDisplay, toDisplay, transferActive, transferFocus, translateAccelerator, translateMnemonic, translateTraversal, traverse, traverse, traverseEscape, traverseGroup, traverseItem, traverseMnemonic, traversePage, traverseReturn, unsubclass, update, update, windowProc, WM_ACTIVATE, WM_CHAR, WM_CLEAR, WM_CLOSE, WM_COMMAND, WM_CONTEXTMENU, WM_CTLCOLOR, WM_CUT, WM_DESTROY, WM_DRAWITEM, WM_ENDSESSION, WM_GETOBJECT, WM_HELP, WM_HOTKEY, WM_IME_CHAR, WM_IME_COMPOSITION, WM_INITMENUPOPUP, WM_KEYDOWN, WM_KEYUP, WM_KILLFOCUS, WM_LBUTTONDBLCLK, WM_LBUTTONUP, WM_MBUTTONDBLCLK, WM_MBUTTONDOWN, WM_MBUTTONUP, WM_MEASUREITEM, WM_MENUCHAR, WM_MENUSELECT, WM_MOUSEACTIVATE, WM_MOUSEHOVER, WM_MOUSELEAVE, WM_MOVE, WM_NCACTIVATE, WM_NCCALCSIZE, WM_PALETTECHANGED, WM_PASTE, WM_QUERYENDSESSION, WM_QUERYNEWPALETTE, WM_QUERYOPEN, WM_RBUTTONDBLCLK, WM_RBUTTONDOWN, WM_RBUTTONUP, WM_SETCURSOR, WM_SETFOCUS, WM_SETREDRAW, WM_SETTINGCHANGE, WM_SHOWWINDOW, WM_SYSCHAR, WM_SYSKEYDOWN, WM_SYSKEYUP, WM_TIMER, WM_UNDO, WM_WINDOWPOSCHANGING, wmColorChild, wmCommandChild, wmDrawChild, wmMeasureChild, wmNotifyChild, wmScrollChild
 
Methods inherited from class org.eclipse.swt.widgets.Widget
addDisposeListener, addListener, checkBits, checkParent, checkWidget, dispose, error, filters, getData, getData, getName, getStyle, hooks, isListening, isValidSubclass, isValidThread, mbcsToWcs, mbcsToWcs, notifyListeners, postEvent, postEvent, releaseChild, releaseResources, removeDisposeListener, removeListener, removeListener, sendEvent, sendEvent, sendEvent, sendEvent, setData, setData, setInputState, setKeyState, toString, wcsToMbcs, wcsToMbcs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

GroupProc

static final int GroupProc

GroupClass

static final org.eclipse.swt.internal.win32.TCHAR GroupClass
Constructor Detail

Group

public Group(Composite parent,
             int style)
Enabled: 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 - a composite control which will be the parent of the new instance (cannot be null)
style - the style of control to construct
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

callWindowProc

int callWindowProc(int msg,
                   int wParam,
                   int lParam)
Overrides:
callWindowProc in class Scrollable

checkStyle

static int checkStyle(int style)

checkSubclass

protected void checkSubclass()
Description copied from class: Widget
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: 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.

Overrides:
checkSubclass in class Composite

computeSize

public Point computeSize(int wHint,
                         int hHint,
                         boolean changed)
Enabled:

Overrides:
computeSize in class Composite
Parameters:
wHint - the width hint (can be SWT.DEFAULT)
hHint - the height hint (can be SWT.DEFAULT)
changed - true if the control's contents have changed, and false otherwise
Returns:
the preferred size of the control.
See Also:
Layout, Control.getBorderWidth(), Control.getBounds(), Control.getSize(), Control.pack(), "computeTrim, getClientArea for controls that implement them"

computeTrim

public Rectangle computeTrim(int x,
                             int y,
                             int width,
                             int height)
Enabled:

Overrides:
computeTrim in class Scrollable
Returns:
the required bounds to produce the given client area
See Also:
Scrollable.getClientArea()

createHandle

void createHandle()
Overrides:
createHandle in class Composite

getClientArea

public Rectangle getClientArea()
Enabled:

Overrides:
getClientArea in class Scrollable
Returns:
the client area
See Also:
Scrollable.computeTrim(int, int, int, int)

getNameText

String getNameText()
Overrides:
getNameText in class Widget

getText

public String getText()
Enabled: 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:
the text

mnemonicHit

boolean mnemonicHit(char key)
Overrides:
mnemonicHit in class Control

mnemonicMatch

boolean mnemonicMatch(char key)
Overrides:
mnemonicMatch in class Control

setText

public void setText(String string)
Enabled: 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 assgned 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.


widgetStyle

int widgetStyle()
Overrides:
widgetStyle in class Composite

windowClass

org.eclipse.swt.internal.win32.TCHAR windowClass()
Overrides:
windowClass in class Scrollable

windowProc

int windowProc()
Overrides:
windowProc in class Scrollable

WM_ERASEBKGND

org.eclipse.swt.internal.win32.LRESULT WM_ERASEBKGND(int wParam,
                                                     int lParam)
Overrides:
WM_ERASEBKGND in class Composite

WM_NCHITTEST

org.eclipse.swt.internal.win32.LRESULT WM_NCHITTEST(int wParam,
                                                    int lParam)
Overrides:
WM_NCHITTEST in class Control

WM_MOUSEMOVE

org.eclipse.swt.internal.win32.LRESULT WM_MOUSEMOVE(int wParam,
                                                    int lParam)
Overrides:
WM_MOUSEMOVE in class Control

WM_PRINTCLIENT

org.eclipse.swt.internal.win32.LRESULT WM_PRINTCLIENT(int wParam,
                                                      int lParam)
Overrides:
WM_PRINTCLIENT in class Control

WM_SIZE

org.eclipse.swt.internal.win32.LRESULT WM_SIZE(int wParam,
                                               int lParam)
Overrides:
WM_SIZE in class Composite


comments?