Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.swtbot.swt.finder.widgets
Class SWTBotCombo

    java.lang.Object
      org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBot<T>
          org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBotControl<Combo>
              org.eclipse.swtbot.swt.finder.widgets.SWTBotCombo

    public class SWTBotCombo

extends AbstractSWTBotControl<Combo>

Version:
  $Id$
Author:
  Ketan Padegaonkar <KetanPadegaonkar [at] gmail [dot] com>

Field Summary

Fields inherited from class org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBot
`description, display, log, widget`

Constructor Summary
`SWTBotCombo(Combo w)` Constructs an instance of this with the given combo box.
`SWTBotCombo(Combo w, SelfDescribing description)` Constructs an instance of this with the given combo box.

Method Summary
`int` | `itemCount()` Gets the item count in the combo box.
`String[]` | `items()` Returns an array of `String`s which are the items in the receiver's list.
`String` | `selection()` Attempts to select the current item.
`int` | `selectionIndex()` Sets the selection to the given index.
`void` | `setSelection(int index)` Sets the selection to the specified index.
`void` | `setSelection(String text)` Set the selection to the specified text.
`void` | `setText(String text)` Sets the text of the combo box.
`SWTBotCombo` | `typeText(String text)` Types the string in the combo box.
`SWTBotCombo` | `typeText(String text, int interval)` Types the string in the combo box.

Methods inherited from class org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBotControl
`absoluteLocation, click, moveMouseToWidget, rightClick`

Methods inherited from class org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBot
`assertEnabled, asyncExec, backgroundColor, click, click, clickXY, contextMenu, contextMenu, createEvent, createMouseEvent, createSelectionEvent, doubleClickXY, foregroundColor, getId, getText, getToolTipText, hasStyle, isActive, isEnabled, isEnabledInternal, isVisible, keyboard, notify, notify, notify, pressShortcut, pressShortcut, pressShortcut, rightClick, rightClick, setFocus, sleep, syncExec, syncExec, syncExec, syncExec, syncExec, syncExec, syncExec, syncExec, toString, traverse, waitForEnabled`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### SWTBotCombo

    public SWTBotCombo(Combo w)
                throws WidgetNotFoundException

  Constructs an instance of this with the given combo box.

  Parameters:
    `w` - the widget.
  Throws:
    `WidgetNotFoundException` - if the widget is `null` or widget has been disposed.
  Since:
    1.0

### SWTBotCombo

    public SWTBotCombo(Combo w,
                       SelfDescribing description)
                throws WidgetNotFoundException

  Constructs an instance of this with the given combo box.

  Parameters:
    `w` - the widget.
    `description` - the description of the widget, this will be reported by `AbstractSWTBot.toString()`
  Throws:
    `WidgetNotFoundException` - if the widget is `null` or widget has been disposed.
  Since:
    1.0

Method Detail

### typeText

    public SWTBotCombo typeText(String text)

  Types the string in the combo box.

  Parameters:
    `text` - the text to be typed.
  Returns:
    the same instance.

### typeText

    public SWTBotCombo typeText(String text,
                                int interval)

  Types the string in the combo box.

  Parameters:
    `text` - the text to be typed.
    `interval` - the interval between consecutive key strokes.
  Returns:
    the same instance.

### setSelection

    public void setSelection(String text)

  Set the selection to the specified text.

  Parameters:
    `text` - the text to set into the combo.

### selection

    public String selection()

  Attempts to select the current item.

  Returns:
    the current selection in the combo box.

### selectionIndex

    public int selectionIndex()

  Sets the selection to the given index.

  Returns:
    the zero based index of the current selection.

### setSelection

    public void setSelection(int index)

  Sets the selection to the specified index.

  Parameters:
    `index` - the zero based index.

### itemCount

    public int itemCount()

  Gets the item count in the combo box.

  Returns:
    the number of items in the combo box.

### items

    public String[] items()

  Returns an array of `String`s which are the items in the receiver's list.

  Returns:
    the items in the receiver's list
  Since:
    1.0

### setText

    public void setText(String text)

  Sets the text of the combo box.

  Parameters:
    `text` - the text to set.
  Since:
    1.0

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD