|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.uispec4j.AbstractUIComponent
org.uispec4j.Slider
public class Slider
Wrapper for JSlider components.
This class provides means for checking the contents and the current position of the knob, changing the position, etc.
| Field Summary | |
|---|---|
static java.lang.Class[] |
SWING_CLASSES
|
static java.lang.String |
TYPE_NAME
|
| Constructor Summary | |
|---|---|
Slider(javax.swing.JSlider jSlider)
|
|
| Method Summary | |
|---|---|
javax.swing.JSlider |
getAwtComponent()
Returns the Java GUI component represented by this object. |
java.lang.String |
getDescriptionTypeName()
Returns the name of the component as it will appear in the XML representation returned by UIComponent.getDescription(). |
Assertion |
labelsEqual(java.lang.String... expected)
Checks the slider labels in order. |
Assertion |
positionEquals(java.lang.String expectedLabel)
Checks that the current position corresponds to the specified label |
Assertion |
relativePositionEquals(int expectedValue)
Checks the knob position as a percentage (0-100) of the available range. |
void |
setPosition(java.lang.String label)
Moves the knob at the specified label position |
void |
setPrecision(int value)
Sets the precision for the relative position check. |
void |
setRelativePosition(int percentage)
Sets the knob position as a percentage (0-100) of the available range. |
| Methods inherited from class org.uispec4j.AbstractUIComponent |
|---|
addAttributes, backgroundEquals, backgroundNear, foregroundEquals, foregroundNear, getContainer, getContainer, getDescription, getDescription, getLabel, getName, getSubDescription, isEnabled, isVisible, pressKey, releaseKey, typeKey |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String TYPE_NAME
public static final java.lang.Class[] SWING_CLASSES
| Constructor Detail |
|---|
public Slider(javax.swing.JSlider jSlider)
| Method Detail |
|---|
public javax.swing.JSlider getAwtComponent()
UIComponent
public java.lang.String getDescriptionTypeName()
UIComponentUIComponent.getDescription().
public Assertion labelsEqual(java.lang.String... expected)
public void setPosition(java.lang.String label)
throws ItemNotFoundException
ItemNotFoundExceptionpublic Assertion positionEquals(java.lang.String expectedLabel)
public Assertion relativePositionEquals(int expectedValue)
expectedValue - an int between 0 and 100, or -1 if the status is undeterminatesetPrecision(int)public void setRelativePosition(int percentage)
percentage - an int between 0 and 100public void setPrecision(int value)
relativePositionEquals(int)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||