Package org.eclipse.birt.core.ui.swt.custom

# Class CustomChooserComposite

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.birt.core.ui.swt.custom.CustomChooserComposite

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

Direct Known Subclasses:
  `TextCombo`

public abstract class CustomChooserComposite extends org.eclipse.swt.widgets.Composite
CustomChooserComposite

## Field Summary

Fields
Modifier and Type
Field
Description
`protected ICustomChoice`
`cnvSelection`
`static final int`
`DROPDOWN_EVENT`
This event occures when the dropdown is about to show.
`static final int`
`SELECTION_EVENT`
This event occurs when the selection is set.

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

`handle`

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

`nativeZoom`

## Constructor Summary

Constructors
Modifier
Constructor
Description
``
`CustomChooserComposite(org.eclipse.swt.widgets.Composite parent, int style)`
`protected`
`CustomChooserComposite(org.eclipse.swt.widgets.Composite parent, int style, Object choiceValue)`

## Method Summary

Modifier and Type
Method
Description
`void`
`addListener(int eventType, org.eclipse.swt.widgets.Listener listener)`
`protected abstract ICustomChoice`
`createChoice(org.eclipse.swt.widgets.Composite parent, Object choiceValue)`
`int`
`getChoiceIndex()`
`Object`
`getChoiceValue()`
Returns the current selected choice
`Object`
`getItem(int index)`
`int`
`getItemCount()`
`Object[]`
`getItems()`
`protected void`
`initAccessible()`
`boolean`
`isEnabled()`
`void`
`removeListener(int eventType, org.eclipse.swt.widgets.Listener listener)`
`void`
`select(int index)`
`void`
`setChoiceValue(Object iValue)`
Sets the value as selected choice, and redraws UI.
`void`
`setEnabled(boolean bState)`
`void`
`setItems(Object[] items)`

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

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

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

`computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar, setScrollbarsMode`

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

`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, getData, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getTextDirection, getToolTipText, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, 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, setAutoscalingMode, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setData, 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, addTypedListener, checkWidget, dispose, getData, getDisplay, getListeners, getStyle, getTypedListeners, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, removeTypedListener, reskin, setData`

### 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`

## Field Details

### SELECTION_EVENT

public static final int SELECTION_EVENT
This event occurs when the selection is set.

See Also:
  - Constant Field Values

### DROPDOWN_EVENT

public static final int DROPDOWN_EVENT
This event occures when the dropdown is about to show.

See Also:
  - Constant Field Values

### cnvSelection

protected ICustomChoice cnvSelection

## Constructor Details

### CustomChooserComposite

public CustomChooserComposite(org.eclipse.swt.widgets.Composite parent, int style)

### CustomChooserComposite

protected CustomChooserComposite(org.eclipse.swt.widgets.Composite parent, int style, Object choiceValue)

## Method Details

### createChoice

protected abstract ICustomChoice createChoice(org.eclipse.swt.widgets.Composite parent, Object choiceValue)

### setItems

public void setItems(Object[] items)

### getItems

public Object[] getItems()

### getItemCount

public int getItemCount()

### getItem

public Object getItem(int index)

### setEnabled

public void setEnabled(boolean bState)

Overrides:
  `setEnabled` in class `org.eclipse.swt.widgets.Control`

### isEnabled

public boolean isEnabled()

Overrides:
  `isEnabled` in class `org.eclipse.swt.widgets.Control`

### select

public void select(int index)

### getChoiceIndex

public int getChoiceIndex()

### getChoiceValue

public Object getChoiceValue()
Returns the current selected choice

### setChoiceValue

public void setChoiceValue(Object iValue)
Sets the value as selected choice, and redraws UI.

Parameters:
  `iValue` - value as selected choice

### addListener

public void addListener(int eventType, org.eclipse.swt.widgets.Listener listener)

Overrides:
  `addListener` in class `org.eclipse.swt.widgets.Widget`

### removeListener

public void removeListener(int eventType, org.eclipse.swt.widgets.Listener listener)

Overrides:
  `removeListener` in class `org.eclipse.swt.widgets.Widget`

### initAccessible

protected void initAccessible()