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

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.SWTBotCheckBox

public class SWTBotCheckBox
extends AbstractSWTBotControl<Button>

Represents a checkbox Button of type SWT.CHECK.

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

Field Summary
 
Fields inherited from class org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBot
description, display, log, widget
 
Constructor Summary
SWTBotCheckBox(Button w)
          Constructs an instance of this object with the given button (Checkbox)
SWTBotCheckBox(Button w, SelfDescribing description)
          Constructs an instance of this object with the given button (Checkbox)
 
Method Summary
 SWTBotCheckBox click()
          Click on the checkbox, toggle it.
 void deselect()
          Deselect the checkbox.
 boolean isChecked()
          Gets if the checkbox button is checked.
protected  void notifyListeners()
          notify listeners about checkbox state change.
 void select()
          Select the checkbox.
protected  void toggle()
          Toggle the checkbox.
 
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

SWTBotCheckBox

public SWTBotCheckBox(Button w)
               throws WidgetNotFoundException
Constructs an instance of this object with the given button (Checkbox)

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

SWTBotCheckBox

public SWTBotCheckBox(Button w,
                      SelfDescribing description)
               throws WidgetNotFoundException
Constructs an instance of this object with the given button (Checkbox)

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

click

public SWTBotCheckBox click()
Click on the checkbox, toggle it.

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

deselect

public void deselect()
Deselect the checkbox.


select

public void select()
Select the checkbox.


toggle

protected void toggle()
Toggle the checkbox.


notifyListeners

protected void notifyListeners()
notify listeners about checkbox state change.


isChecked

public boolean isChecked()
Gets if the checkbox button is checked.

Returns:
true if the checkbox is checked. Otherwise false.