public class CheckBoxGroup
extends org.eclipse.swt.widgets.Canvas
implements org.eclipse.swt.events.PaintListener
Modifier and Type | Field and Description |
---|---|
protected org.eclipse.swt.widgets.Button |
button |
Constructor and Description |
---|
CheckBoxGroup(org.eclipse.swt.widgets.Composite parent,
int style)
Constructs a new instance of this class given its parent and a style value
describing its behavior and appearance.
|
Modifier and Type | Method and Description |
---|---|
void |
activate()
Activate the content
|
void |
addSelectionListener(org.eclipse.swt.events.SelectionListener listener)
Adds the listener to the collection of listeners who will be notified when
the user changes the receiver's selection, by sending it one of the messages
defined in the
SelectionListener interface. |
void |
deactivate()
Deactivate the content
|
org.eclipse.swt.widgets.Composite |
getContent() |
org.eclipse.swt.graphics.Font |
getFont() |
org.eclipse.swt.widgets.Layout |
getLayout() |
boolean |
getSelection()
Returns
true if the receiver is selected, and false otherwise |
java.lang.String |
getText() |
boolean |
isActivated() |
boolean |
isTransparent() |
void |
paintControl(org.eclipse.swt.events.PaintEvent paintEvent) |
void |
removeSelectionListener(org.eclipse.swt.events.SelectionListener listener)
Removes the listener from the collection of listeners who will be notified
when the user changes the receiver's selection.
|
boolean |
setFocus() |
void |
setFont(org.eclipse.swt.graphics.Font font) |
void |
setLayout(org.eclipse.swt.widgets.Layout layout) |
void |
setSelection(boolean selection)
Sets the selection state of the receiver
|
void |
setText(java.lang.String text) |
void |
setTransparent(boolean transparent) |
drawBackground, getCaret, getIME, scroll, setCaret, setIME
changed, checkSubclass, drawBackground, getBackgroundMode, getChildren, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setLayoutDeferred, setTabList
computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar
addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getTextDirection, getToolTipText, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, requestLayout, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setTextDirection, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getListeners, getStyle, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData, toString
public CheckBoxGroup(org.eclipse.swt.widgets.Composite parent, int style)
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.
parent
- a widget which will be the parent of the new instance (cannot
be null)style
- the style of widget to constructjava.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- Composite.Composite(Composite, int)
,
SWT.BORDER
,
Widget.getStyle()
public void activate()
public void addSelectionListener(org.eclipse.swt.events.SelectionListener listener)
SelectionListener
interface.
When widgetSelected
is called, the item field of the event
object is valid. If the receiver has the SWT.CHECK
style and the
check selection changes, the event object detail field contains the value
SWT.CHECK
. widgetDefaultSelected
is typically
called when an item is double-clicked. The item field of the event object is
valid for default selection, but the detail field is not used.
listener
- the listener which should be notified when the user changes
the receiver's selectionjava.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- SelectionListener
,
removeSelectionListener(org.eclipse.swt.events.SelectionListener)
,
SelectionEvent
public void deactivate()
public boolean isActivated()
true
if the content is activated, false
otherwisepublic org.eclipse.swt.widgets.Layout getLayout()
getLayout
in class org.eclipse.swt.widgets.Composite
Composite.getLayout()
public void removeSelectionListener(org.eclipse.swt.events.SelectionListener listener)
listener
- the listener which should no longer be notifiedjava.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- SelectionListener
,
addSelectionListener(org.eclipse.swt.events.SelectionListener)
public boolean setFocus()
setFocus
in class org.eclipse.swt.widgets.Composite
Composite.setFocus()
public void setLayout(org.eclipse.swt.widgets.Layout layout)
setLayout
in class org.eclipse.swt.widgets.Composite
Composite.setLayout(org.eclipse.swt.widgets.Layout)
public java.lang.String getText()
public void setText(java.lang.String text)
text
- the text of the button to setpublic org.eclipse.swt.graphics.Font getFont()
getFont
in class org.eclipse.swt.widgets.Control
public void setFont(org.eclipse.swt.graphics.Font font)
setFont
in class org.eclipse.swt.widgets.Canvas
font
- the font to setpublic org.eclipse.swt.widgets.Composite getContent()
public boolean isTransparent()
public void setTransparent(boolean transparent)
public void paintControl(org.eclipse.swt.events.PaintEvent paintEvent)
paintControl
in interface org.eclipse.swt.events.PaintListener
public void setSelection(boolean selection)
selection
- the new selection statepublic boolean getSelection()
true
if the receiver is selected, and false otherwise