org.eclipse.swtbot.swt.finder.widgets
Class SWTBotRadio

java.lang.Object
  extended by org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBot<T>
      extended by org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBotControl<Button>
          extended by org.eclipse.swtbot.swt.finder.widgets.SWTBotRadio

public class SWTBotRadio
extends AbstractSWTBotControl<Button>

Represents a radio Button of type SWT.RADIO.

Version:
$Id$
Author:
Ketan Padegaonkar <KetanPadegaonkar [at] gmail [dot] com>
See Also:
SWTBotButton, SWTBotCheckBox, SWTBotToggleButton

Field Summary
 
Fields inherited from class org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBot
description, display, log, widget
 
Constructor Summary
SWTBotRadio(Button w)
          Constructs an instance of this with the given widget.
SWTBotRadio(Button w, SelfDescribing description)
          Constructs an instance of this with the given widget.
 
Method Summary
 SWTBotRadio click()
          Selects the radio button.
 boolean isSelected()
          Checks if the item is selected.
 
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, 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

SWTBotRadio

public SWTBotRadio(Button w)
            throws WidgetNotFoundException
Constructs an instance of this with the given widget.

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

SWTBotRadio

public SWTBotRadio(Button w,
                   SelfDescribing description)
            throws WidgetNotFoundException
Constructs an instance of this with the given widget.

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.
Method Detail

click

public SWTBotRadio click()
Selects the radio button.

Overrides:
click in class AbstractSWTBot<Button>
Returns:
itself.

isSelected

public boolean isSelected()
Checks if the item is selected.

Returns:
true if the radio button is selected. Otherwise false.