|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.netbeans.jemmy.operators.Operator
org.netbeans.jemmy.operators.ComponentOperator
org.netbeans.jemmy.operators.ContainerOperator
org.netbeans.jemmy.operators.JComponentOperator
org.netbeans.jemmy.operators.JSpinnerOperator
public class JSpinnerOperator
Provides methods to work with javax.swing.JSpinner
component
JSpinnerOperator.NumberSpinnerOperator
,
JSpinnerOperator.ListSpinnerOperator
,
JSpinnerOperator.DateSpinnerOperator
Nested Class Summary | |
---|---|
static class |
JSpinnerOperator.DateScrollAdjuster
A ScrollAdjuster to be used for JSpinner
component having SpinnerDateModel model. |
class |
JSpinnerOperator.DateSpinnerOperator
Provides some specific functionality for JSpinner
components having SpinnerDateModel model. |
static class |
JSpinnerOperator.ExactScrollAdjuster
Class for a scrolling of a spinner having unknown model type. |
static class |
JSpinnerOperator.JSpinnerByTextFinder
Allows to find component by text. |
static class |
JSpinnerOperator.JSpinnerFinder
Checks component type. |
static class |
JSpinnerOperator.ListScrollAdjuster
A ScrollAdjuster to be used for JSpinner
component having SpinnerListModel model. |
class |
JSpinnerOperator.ListSpinnerOperator
Provides some specific functionality for JSpinner
components having SpinnerListModel model. |
static class |
JSpinnerOperator.NumberScrollAdjuster
A ScrollAdjuster to be used for JSpinner
component having SpinnerNumberModel model. |
class |
JSpinnerOperator.NumberSpinnerOperator
Provides some specific functionality for JSpinner
components having SpinnerNumberModel model. |
static class |
JSpinnerOperator.ObjectScrollAdjuster
Abstract class for a scrolling of a spinner having unknown model type. |
static class |
JSpinnerOperator.SpinnerModelException
Exception is thown whenever spinner model is threated wrong. |
static class |
JSpinnerOperator.ToStringScrollAdjuster
Class for a scrolling of a spinner having unknown model type. |
Nested classes/interfaces inherited from class org.netbeans.jemmy.operators.JComponentOperator |
---|
JComponentOperator.JComponentByTipFinder, JComponentOperator.JComponentFinder |
Nested classes/interfaces inherited from class org.netbeans.jemmy.operators.ContainerOperator |
---|
ContainerOperator.ContainerFinder |
Nested classes/interfaces inherited from class org.netbeans.jemmy.operators.Operator |
---|
Operator.ComponentVisualizer, Operator.DefaultPathParser, Operator.DefaultStringComparator, Operator.Finder, Operator.MapAction, Operator.MapBooleanAction, Operator.MapByteAction, Operator.MapCharacterAction, Operator.MapDoubleAction, Operator.MapFloatAction, Operator.MapIntegerAction, Operator.MapLongAction, Operator.MapVoidAction, Operator.NoBlockingAction, Operator.PathParser, Operator.StringComparator |
Field Summary | |
---|---|
static String |
VALUE_DPROP
Identifier for a "value" property. |
Fields inherited from class org.netbeans.jemmy.operators.JComponentOperator |
---|
A11Y_DATA, A11Y_DESCRIPTION_DPROP, A11Y_NAME_DPROP, TOOLTIP_TEXT_DPROP |
Fields inherited from class org.netbeans.jemmy.operators.ComponentOperator |
---|
HEIGHT_DPROP, IS_SHOWING_DPROP, IS_VISIBLE_DPROP, NAME_DPROP, WIDTH_DPROP, X_DPROP, Y_DPROP |
Fields inherited from class org.netbeans.jemmy.operators.Operator |
---|
CLASS_DPROP, TO_STRING_DPROP |
Constructor Summary | |
---|---|
JSpinnerOperator(ContainerOperator cont)
Constructor. |
|
JSpinnerOperator(ContainerOperator cont,
ComponentChooser chooser)
Constructs a JSpinnerOperator object. |
|
JSpinnerOperator(ContainerOperator cont,
ComponentChooser chooser,
int index)
Constructs a JSpinnerOperator object. |
|
JSpinnerOperator(ContainerOperator cont,
int index)
Constructor. |
|
JSpinnerOperator(ContainerOperator cont,
String text)
Constructs a JSpinnerOperator object. |
|
JSpinnerOperator(ContainerOperator cont,
String text,
int index)
Constructs a JSpinnerOperator object. |
|
JSpinnerOperator(JSpinner b)
Constructor. |
Method Summary | |
---|---|
void |
addChangeListener(ChangeListener changeListener)
Maps JSpinner.addChangeListener(ChangeListener) through queue |
static void |
checkModel(JSpinnerOperator oper,
Class modelClass)
Checks operator's model type. |
void |
commitEdit()
Maps JSpinner.commitEdit() through queue |
static JSpinner |
findJSpinner(Container cont)
Searches 0'th JSpinner in container. |
static JSpinner |
findJSpinner(Container cont,
ComponentChooser chooser)
Searches 0'th JSpinner in container. |
static JSpinner |
findJSpinner(Container cont,
ComponentChooser chooser,
int index)
Searches JSpinner in container. |
static JSpinner |
findJSpinner(Container cont,
int index)
Searches JSpinner in container. |
ChangeListener[] |
getChangeListeners()
Maps JSpinner.getChangeListeners() through queue |
JSpinnerOperator.DateSpinnerOperator |
getDateSpinner()
Returns an instance of DateSpinnerOperator operator,
the operator used for JSpinner having SpinnerDateModel model. |
JButtonOperator |
getDecreaseOperator()
Returns an operator for a button used for value decreasing. |
Hashtable |
getDump()
Returns information about component. |
JComponent |
getEditor()
Maps JSpinner.getEditor() through queue |
JButtonOperator |
getIncreaseOperator()
Returns an operator for a button used for value increasing. |
JSpinnerOperator.ListSpinnerOperator |
getListSpinner()
Returns an instance of ListSpinnerOperator operator,
the operator used for JSpinner having SpinnerListModel model. |
Object |
getMaximum()
Returns a maximal value. |
Object |
getMinimum()
Returns a minimal value. |
SpinnerModel |
getModel()
Maps JSpinner.getModel() through queue |
Object |
getNextValue()
Maps JSpinner.getNextValue() through queue |
JSpinnerOperator.NumberSpinnerOperator |
getNumberSpinner()
Returns an instance of NumberSpinnerOperator operator,
the operator used for JSpinner having SpinnerNumberModel model. |
TestOut |
getOutput()
Returns print output streams or writers. |
Object |
getPreviousValue()
Maps JSpinner.getPreviousValue() through queue |
Timeouts |
getTimeouts()
Return current timeouts. |
SpinnerUI |
getUI()
Maps JSpinner.getUI() through queue |
Object |
getValue()
Maps JSpinner.getValue() through queue |
void |
removeChangeListener(ChangeListener changeListener)
Maps JSpinner.removeChangeListener(ChangeListener) through queue |
void |
scrollTo(ScrollAdjuster adj)
Scrolls to reach a condition specified by ScrollAdjuster |
void |
scrollToMaximum()
Scrolls to maximum value. |
void |
scrollToMinimum()
Scrolls to minimum value. |
void |
scrollToObject(Object value,
int direction)
Scrolls to exact match of a spinner value to the specified value. |
void |
scrollToString(String pattern,
int direction)
Scrolls to matching of getValue().toString() with the pattern. |
void |
scrollToString(String pattern,
Operator.StringComparator comparator,
int direction)
Scrolls to matching of getValue().toString() with the pattern. |
void |
setEditor(JComponent jComponent)
Maps JSpinner.setEditor(JComponent) through queue |
void |
setModel(SpinnerModel spinnerModel)
Maps JSpinner.setModel(SpinnerModel) through queue |
void |
setOutput(TestOut out)
Defines print output streams or writers. |
void |
setTimeouts(Timeouts timeouts)
Defines current timeouts. |
void |
setUI(SpinnerUI spinnerUI)
Maps JSpinner.setUI(SpinnerUI) through queue |
void |
setValue(Object object)
Maps JSpinner.setValue(Object) through queue |
static JSpinner |
waitJSpinner(Container cont)
Waits 0'th JSpinner in container. |
static JSpinner |
waitJSpinner(Container cont,
ComponentChooser chooser)
Waits 0'th JSpinner in container. |
static JSpinner |
waitJSpinner(Container cont,
ComponentChooser chooser,
int index)
Waits JSpinner in container. |
static JSpinner |
waitJSpinner(Container cont,
int index)
Waits JSpinner in container. |
Methods inherited from class org.netbeans.jemmy.operators.ContainerOperator |
---|
add, add, add, add, add, addContainerListener, createSubOperator, createSubOperator, findComponentAt, findComponentAt, findContainer, findContainer, findContainer, findContainer, findContainerUnder, findContainerUnder, findSubComponent, findSubComponent, getComponent, getComponentCount, getComponents, getInsets, getLayout, isAncestorOf, paintComponents, printComponents, remove, remove, removeAll, removeContainerListener, setLayout, waitContainer, waitContainer, waitContainer, waitContainer, waitSubComponent, waitSubComponent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String VALUE_DPROP
getDump()
,
Constant Field ValuesConstructor Detail |
---|
public JSpinnerOperator(JSpinner b)
b
- JSpinner component.public JSpinnerOperator(ContainerOperator cont, ComponentChooser chooser, int index)
cont
- a containerchooser
- a component chooser specifying searching criteria.index
- an index between appropriate ones.
TimeoutExpiredException
public JSpinnerOperator(ContainerOperator cont, ComponentChooser chooser)
cont
- a containerchooser
- a component chooser specifying searching criteria.
TimeoutExpiredException
public JSpinnerOperator(ContainerOperator cont, String text, int index)
cont
- The operator for a container containing the sought for button.text
- toString() representation of the current spinner value.index
- Ordinal component index. The first component has index
0.
TimeoutExpiredException
public JSpinnerOperator(ContainerOperator cont, String text)
cont
- The operator for a container containing the sought for button.text
- toString() representation of the current spinner value.
TimeoutExpiredException
public JSpinnerOperator(ContainerOperator cont, int index)
cont
- Operator pointing a container to search component in.index
- Ordinal component index.
TimeoutExpiredException
public JSpinnerOperator(ContainerOperator cont)
cont
- Operator pointing a container to search component in.
TimeoutExpiredException
Method Detail |
---|
public static JSpinner findJSpinner(Container cont, ComponentChooser chooser, int index)
cont
- Container to search component in.chooser
- org.netbeans.jemmy.ComponentChooser implementation.index
- Ordinal component index.
public static JSpinner findJSpinner(Container cont, ComponentChooser chooser)
cont
- Container to search component in.chooser
- org.netbeans.jemmy.ComponentChooser implementation.
public static JSpinner findJSpinner(Container cont, int index)
cont
- Container to search component in.index
- Ordinal component index.
public static JSpinner findJSpinner(Container cont)
cont
- Container to search component in.
public static JSpinner waitJSpinner(Container cont, ComponentChooser chooser, int index)
cont
- Container to search component in.chooser
- org.netbeans.jemmy.ComponentChooser implementation.index
- Ordinal component index.
TimeoutExpiredException
public static JSpinner waitJSpinner(Container cont, ComponentChooser chooser)
cont
- Container to search component in.chooser
- org.netbeans.jemmy.ComponentChooser implementation.
TimeoutExpiredException
public static JSpinner waitJSpinner(Container cont, int index)
cont
- Container to search component in.index
- Ordinal component index.
TimeoutExpiredException
public static JSpinner waitJSpinner(Container cont)
cont
- Container to search component in.
TimeoutExpiredException
public static void checkModel(JSpinnerOperator oper, Class modelClass)
oper
- an operator to check modelmodelClass
- a model class.
JSpinnerOperator.SpinnerModelException
- if an operator's model is not an instance of
specified class.public void setOutput(TestOut out)
Outputable
setOutput
in interface Outputable
setOutput
in class JComponentOperator
out
- Identify the streams or writers used for print output.Outputable.getOutput()
public TestOut getOutput()
Outputable
getOutput
in interface Outputable
getOutput
in class JComponentOperator
Outputable.setOutput(org.netbeans.jemmy.TestOut)
public void setTimeouts(Timeouts timeouts)
Timeoutable
setTimeouts
in interface Timeoutable
setTimeouts
in class JComponentOperator
timeouts
- A collection of timeout assignments.Timeoutable.getTimeouts()
public Timeouts getTimeouts()
Timeoutable
getTimeouts
in interface Timeoutable
getTimeouts
in class JComponentOperator
Timeoutable.setTimeouts(org.netbeans.jemmy.Timeouts)
public JSpinnerOperator.NumberSpinnerOperator getNumberSpinner()
NumberSpinnerOperator
operator,
the operator used for JSpinner
having SpinnerNumberModel
model.
NumberSpinnerOperator
created for the same JSpinner
as this operator.
JSpinnerOperator.SpinnerModelException
- if an operator's model is not an instance of SpinnerNumberModel
public JSpinnerOperator.ListSpinnerOperator getListSpinner()
ListSpinnerOperator
operator,
the operator used for JSpinner
having SpinnerListModel
model.
ListSpinnerOperator
created for the same JSpinner
as this operator.
JSpinnerOperator.SpinnerModelException
- if an operator's model is not an instance of SpinnerListModel
public JSpinnerOperator.DateSpinnerOperator getDateSpinner()
DateSpinnerOperator
operator,
the operator used for JSpinner
having SpinnerDateModel
model.
DateSpinnerOperator
created for the same JSpinner
as this operator.
JSpinnerOperator.SpinnerModelException
- if an operator's model is not an instance of SpinnerDateModel
public void scrollTo(ScrollAdjuster adj)
ScrollAdjuster
adj
- scrolling criteria.public void scrollToMaximum()
JSpinnerOperator.SpinnerModelException
- if an operator's model does not have a maximum value.public void scrollToMinimum()
JSpinnerOperator.SpinnerModelException
- if an operator's model does not have a minimum value.public void scrollToObject(Object value, int direction)
value
- an value to scroll to.direction
- a scrolling direction - one of ScrollAdjuster.*_SCROLL_DIRECTION
fields.public void scrollToString(String pattern, Operator.StringComparator comparator, int direction)
getValue().toString() with the pattern.
- Parameters:
pattern
- a pattern to compare withcomparator
- a string comparision criteriadirection
- a scrolling direction - one of ScrollAdjuster.*_SCROLL_DIRECTION
fields.
public void scrollToString(String pattern, int direction)
getValue().toString()
with the pattern.
Uses StringComparator
assigned to the operator.
pattern
- a pattern to compare withdirection
- a scrolling direction - one of ScrollAdjuster.*_SCROLL_DIRECTION
fields.public JButtonOperator getIncreaseOperator()
JButton inside this spinner.
public JButtonOperator getDecreaseOperator()
JButton inside this spinner.
public Object getMinimum()
javax.swing.SpinnerDateModel
,
javax.swing.SpinnerListModel
,
javax.swing.SpinnerNumberModel
.
Also, returns null if the model does not have a minimal value.
public Object getMaximum()
javax.swing.SpinnerDateModel
,
javax.swing.SpinnerListModel
,
javax.swing.SpinnerNumberModel
.
Also, returns null if the model does not have a maximal value.
public Hashtable getDump()
ComponentOperator
getDump
in class JComponentOperator
public Object getValue()
JSpinner.getValue()
through queue
public void setValue(Object object)
JSpinner.setValue(Object)
through queue
public SpinnerUI getUI()
JSpinner.getUI()
through queue
public void setUI(SpinnerUI spinnerUI)
JSpinner.setUI(SpinnerUI)
through queue
public void setModel(SpinnerModel spinnerModel)
JSpinner.setModel(SpinnerModel)
through queue
public SpinnerModel getModel()
JSpinner.getModel()
through queue
public Object getNextValue()
JSpinner.getNextValue()
through queue
public void addChangeListener(ChangeListener changeListener)
JSpinner.addChangeListener(ChangeListener)
through queue
public void removeChangeListener(ChangeListener changeListener)
JSpinner.removeChangeListener(ChangeListener)
through queue
public ChangeListener[] getChangeListeners()
JSpinner.getChangeListeners()
through queue
public Object getPreviousValue()
JSpinner.getPreviousValue()
through queue
public void setEditor(JComponent jComponent)
JSpinner.setEditor(JComponent)
through queue
public JComponent getEditor()
JSpinner.getEditor()
through queue
public void commitEdit()
JSpinner.commitEdit()
through queue
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |