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

java.lang.Object
  extended by org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBot<Slider>
      extended by org.eclipse.swtbot.swt.finder.widgets.SWTBotSlider

public class SWTBotSlider
extends AbstractSWTBot<Slider>

Represents a slider.

Version:
$Id$
Author:
Yann N. Dauphin

Field Summary
 
Fields inherited from class org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBot
description, display, log, widget
 
Constructor Summary
SWTBotSlider(Slider widget)
          Constructs a new instance with the given widget.
SWTBotSlider(Slider widget, SelfDescribing description)
          Constructs an instance with the given widget
 
Method Summary
 int getIncrement()
          Return the increment of the slider.
 int getMaximum()
          Return the maximum value the slider will accept.
 int getMinimum()
          Return the minimum value the slider will accept.
 int getPageIncrement()
          Return the page increment of the slider.
 int getSelection()
          Return the current value of the slider.
 int getThumb()
          Return the size of the thumb of the slider.
 void setSelection(int value)
          Set the selection to the specified value.
 
Methods inherited from class org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBot
absoluteLocation, 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

SWTBotSlider

public SWTBotSlider(Slider widget)
             throws WidgetNotFoundException
Constructs a new instance with the given widget.

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

SWTBotSlider

public SWTBotSlider(Slider widget,
                    SelfDescribing description)
             throws WidgetNotFoundException
Constructs an instance with the given widget

Parameters:
widget - 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

getSelection

public int getSelection()
Return the current value of the slider.

Returns:
the current selection in the slider.

setSelection

public void setSelection(int value)
Set the selection to the specified value.

Parameters:
value - the value to set into the slider.

getMaximum

public int getMaximum()
Return the maximum value the slider will accept.

Returns:
the maximum of the slider.

getMinimum

public int getMinimum()
Return the minimum value the slider will accept.

Returns:
the minimum of the slider.

getIncrement

public int getIncrement()
Return the increment of the slider.

Returns:
the increment of the slider.

getPageIncrement

public int getPageIncrement()
Return the page increment of the slider.

Returns:
the increment of the slider.

getThumb

public int getThumb()
Return the size of the thumb of the slider.

Returns:
the size of the thumb of the slider.