org.eclipse.eef.ide.ui.internal.widgets

## Class RadioGroup

- 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.eef.ide.ui.internal.widgets.RadioGroup

All Implemented Interfaces:
  org.eclipse.swt.graphics.Drawable

    public class RadioGroup
    extends org.eclipse.swt.widgets.Composite

Group of radio widgets.

### Field Summary

### Fields inherited from class org.eclipse.swt.widgets.Control

`view`

### Constructor Summary

Constructors
Constructor and Description
`RadioGroup(org.eclipse.swt.widgets.Composite parent, EEFWidgetFactory widgetFactory, int numberOfColumns)` Constructs a new instance of this class given its parent and a style value describing its behavior and appearance.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `add(java.lang.String string, int index)` Adds the argument to the receiver's list at the given zero-relative index.
`void` `addSelectionListener(org.eclipse.swt.events.SelectionListener listener)` Add selection listener.
`void` `deselectAll()` Deselects all selected items in the receiver's list.
`void` `dispose()`
`int` `getItemCount()` Returns the number of items contained in the receiver's list.
`int[]` `getSelectionIndex()` Returns the zero-relative index of the item which is currently selected in the receiver's list, or -1 if no item is selected.
`void` `remove(int index)` Removes the item from the receiver's list at the given zero-relative index.
`void` `removeAll()` Removes all of the items from the receiver's list and clear the contents of receiver's text field.
`void` `removeSelectionListener(org.eclipse.swt.events.SelectionListener listener)` Remove selection listener.
`void` `select(int index)` Selects the item at the given zero-relative index in the receiver's list.
`void` `setEnabled(boolean enabled)`
`void` `setItem(int index, java.lang.String string)` Sets the text of the item in the receiver's list at the given zero-relative index to the string argument.
`void` `setItem(java.lang.String[] items)` Sets the receiver's list to be the given array of items.

### Methods inherited from class org.eclipse.swt.widgets.Composite

`changed, checkSubclass, computeSize, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList`

### Methods inherited from class org.eclipse.swt.widgets.Scrollable

`computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar`

### Methods inherited from class org.eclipse.swt.widgets.Control

`addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getFont, 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, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setTextDirection, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update`

### Methods inherited from class org.eclipse.swt.widgets.Widget

`addDisposeListener, addListener, checkWidget, getData, getData, getDisplay, getListeners, getStyle, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData, toString`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface org.eclipse.swt.graphics.Drawable

`isAutoScalable`

### Constructor Detail

#### RadioGroup

    public RadioGroup(org.eclipse.swt.widgets.Composite parent,
                      EEFWidgetFactory widgetFactory,
                      int numberOfColumns)

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

Parameters:
  `parent` - a composite control which will be the parent of the new instance (cannot be null)
  `widgetFactory` - the widget factory
  `numberOfColumns` - The number of columns to use to display the candidates

### Method Detail

#### setItem

    public void setItem(int index,
                        java.lang.String string)

Sets the text of the item in the receiver's list at the given zero-relative index to the string argument.

Parameters:
  `index` - the index for the item
  `string` - the new text for the item

#### add

    public void add(java.lang.String string,
                    int index)

Adds the argument to the receiver's list at the given zero-relative index.

Parameters:
  `string` - the new item
  `index` - the index for the item

#### getItemCount

    public int getItemCount()

Returns the number of items contained in the receiver's list.

Returns:
  the number of items

#### addSelectionListener

    public void addSelectionListener(org.eclipse.swt.events.SelectionListener listener)

Add selection listener.

Parameters:
  `listener` - The selection listener

#### removeSelectionListener

    public void removeSelectionListener(org.eclipse.swt.events.SelectionListener listener)

Remove selection listener.

Parameters:
  `listener` - The selection listener

#### getSelectionIndex

    public int[] getSelectionIndex()

Returns the zero-relative index of the item which is currently selected in the receiver's list, or -1 if no item is selected.

Returns:
  the index of the selected item

#### setItem

    public void setItem(java.lang.String[] items)

Sets the receiver's list to be the given array of items.

Parameters:
  `items` - the array of items

#### removeAll

    public void removeAll()

Removes all of the items from the receiver's list and clear the contents of receiver's text field.

#### remove

    public void remove(int index)

Removes the item from the receiver's list at the given zero-relative index.

Parameters:
  `index` - the index for the item

#### select

    public void select(int index)

Selects the item at the given zero-relative index in the receiver's list. If the item at the index was already selected, it remains selected. Indices that are out of range are ignored.

Parameters:
  `index` - the index of the item to select

#### deselectAll

    public void deselectAll()

Deselects all selected items in the receiver's list.

#### dispose

    public void dispose()

Overrides:
  `dispose` in class `org.eclipse.swt.widgets.Widget`
See Also:
  `Widget.dispose()`

#### setEnabled

    public void setEnabled(boolean enabled)

Overrides:
  `setEnabled` in class `org.eclipse.swt.widgets.Control`
See Also:
  `Control.setEnabled(boolean)`