public class JSpinnerOperator extends JComponentOperator implements Timeoutable, Outputable
javax.swing.JSpinner
component JSpinnerOperator.NumberSpinnerOperator
,
JSpinnerOperator.ListSpinnerOperator
,
JSpinnerOperator.DateSpinnerOperator
Modifier and Type | Class and Description |
---|---|
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.
|
JComponentOperator.JComponentByTipFinder, JComponentOperator.JComponentFinder
ContainerOperator.ContainerFinder
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
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
VALUE_DPROP
Identifier for a "value" property.
|
A11Y_DATA, A11Y_DESCRIPTION_DPROP, A11Y_NAME_DPROP, TOOLTIP_TEXT_DPROP
HEIGHT_DPROP, IS_SHOWING_DPROP, IS_VISIBLE_DPROP, NAME_DPROP, WIDTH_DPROP, X_DPROP, Y_DPROP
CLASS_DPROP, TO_STRING_DPROP
Constructor and Description |
---|
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,
java.lang.String text)
Constructs a JSpinnerOperator object.
|
JSpinnerOperator(ContainerOperator cont,
java.lang.String text,
int index)
Constructs a JSpinnerOperator object.
|
JSpinnerOperator(javax.swing.JSpinner b)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addChangeListener(javax.swing.event.ChangeListener changeListener)
Maps
JSpinner.addChangeListener(ChangeListener) through queue |
static void |
checkModel(JSpinnerOperator oper,
java.lang.Class modelClass)
Checks operator's model type.
|
void |
commitEdit()
Maps
JSpinner.commitEdit() through queue |
static javax.swing.JSpinner |
findJSpinner(java.awt.Container cont)
Searches 0'th JSpinner in container.
|
static javax.swing.JSpinner |
findJSpinner(java.awt.Container cont,
ComponentChooser chooser)
Searches 0'th JSpinner in container.
|
static javax.swing.JSpinner |
findJSpinner(java.awt.Container cont,
ComponentChooser chooser,
int index)
Searches JSpinner in container.
|
static javax.swing.JSpinner |
findJSpinner(java.awt.Container cont,
int index)
Searches JSpinner in container.
|
javax.swing.event.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.
|
java.util.Hashtable |
getDump()
Returns information about component.
|
javax.swing.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. |
java.lang.Object |
getMaximum()
Returns a maximal value.
|
java.lang.Object |
getMinimum()
Returns a minimal value.
|
javax.swing.SpinnerModel |
getModel()
Maps
JSpinner.getModel() through queue |
java.lang.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.
|
java.lang.Object |
getPreviousValue()
Maps
JSpinner.getPreviousValue() through queue |
Timeouts |
getTimeouts()
Return current timeouts.
|
javax.swing.plaf.SpinnerUI |
getUI()
Maps
JSpinner.getUI() through queue |
java.lang.Object |
getValue()
Maps
JSpinner.getValue() through queue |
void |
removeChangeListener(javax.swing.event.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(java.lang.Object value,
int direction)
Scrolls to exact match of a spinner value to the specified value.
|
void |
scrollToString(java.lang.String pattern,
int direction)
Scrolls to matching of
getValue().toString() with the pattern. |
void |
scrollToString(java.lang.String pattern,
Operator.StringComparator comparator,
int direction)
Scrolls to matching of
getValue().toString() with the pattern. |
void |
setEditor(javax.swing.JComponent jComponent)
Maps
JSpinner.setEditor(JComponent) through queue |
void |
setModel(javax.swing.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(javax.swing.plaf.SpinnerUI spinnerUI)
Maps
JSpinner.setUI(SpinnerUI) through queue |
void |
setValue(java.lang.Object object)
Maps
JSpinner.setValue(Object) through queue |
static javax.swing.JSpinner |
waitJSpinner(java.awt.Container cont)
Waits 0'th JSpinner in container.
|
static javax.swing.JSpinner |
waitJSpinner(java.awt.Container cont,
ComponentChooser chooser)
Waits 0'th JSpinner in container.
|
static javax.swing.JSpinner |
waitJSpinner(java.awt.Container cont,
ComponentChooser chooser,
int index)
Waits JSpinner in container.
|
static javax.swing.JSpinner |
waitJSpinner(java.awt.Container cont,
int index)
Waits JSpinner in container.
|
addAncestorListener, addVetoableChangeListener, computeVisibleRect, createToolTip, findJComponent, findJComponent, findJComponent, findJComponent, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getActionForKeyStroke, getAutoscrolls, getBorder, getCenterXForClick, getCenterYForClick, getClientProperty, getConditionForKeyStroke, getDebugGraphicsOptions, getInsets, getNextFocusableComponent, getRegisteredKeyStrokes, getRootPane, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getUIClassID, getVisibleRect, getWindowContainerOperator, grabFocus, isFocusCycleRoot, isManagingFocus, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintImmediately, paintImmediately, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, requestDefaultFocus, resetKeyboardActions, revalidate, scrollRectToVisible, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, showToolTip, unregisterKeyboardAction, updateUI, waitJComponent, waitJComponent, waitJComponent, waitJComponent, waitToolTip
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
activateWindow, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, checkImage, checkImage, clickForPopup, clickForPopup, clickForPopup, clickForPopup, clickMouse, clickMouse, clickMouse, clickMouse, clickMouse, clickMouse, clickMouse, contains, contains, copyEnvironment, createImage, createImage, dispatchEvent, doLayout, dragMouse, dragMouse, dragMouse, dragNDrop, dragNDrop, dragNDrop, enableInputMethods, enterMouse, exitMouse, findComponent, findComponent, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getCenterX, getCenterY, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getContainer, getContainers, getCursor, getDropTarget, getEventDispatcher, getFocus, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, getSize, getSize, getSource, getToolkit, getTreeLock, getWidth, getWindow, getX, getY, hasFocus, imageUpdate, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, list, list, list, list, list, makeComponentVisible, moveMouse, paint, paintAll, prepareImage, prepareImage, pressKey, pressKey, pressMouse, pressMouse, print, printAll, pushKey, pushKey, releaseKey, releaseKey, releaseMouse, releaseMouse, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, transferFocus, typeKey, typeKey, typeKey, update, validate, waitComponent, waitComponent, waitComponent, waitComponent, waitComponentEnabled, waitComponentShowing, waitComponentVisible, waitHasFocus, wtComponentEnabled
addOperatorPackage, addToDump, addToDump, createOperator, getCharBindingMap, getCharKey, getCharModifiers, getCharsKeys, getCharsKeys, getCharsModifiers, getCharsModifiers, getComparator, getDefaultComponentVisualizer, getDefaultMouseButton, getDefaultPathParser, getDefaultStringComparator, getDefaultVerification, getEnvironmentOperator, getParentPath, getParentPath, getPathParser, getPopupMouseButton, getProperties, getQueueTool, getVerification, getVisualizer, isCaptionEqual, isCaptionEqual, isCaptionEqual, lockQueue, parseString, parseString, printDump, produceNoBlocking, produceNoBlocking, produceTimeRestricted, produceTimeRestricted, runMapping, runMapping, runMapping, runMapping, runMapping, runMapping, runMapping, runMapping, runMapping, setCharBindingMap, setComparator, setDefaultComponentVisualizer, setDefaultPathParser, setDefaultStringComparator, setDefaultVerification, setPathParser, setProperties, setVerification, setVisualizer, toStringSource, unlockAndThrow, unlockQueue, waitState
public static final java.lang.String VALUE_DPROP
getDump()
,
Constant Field Valuespublic JSpinnerOperator(javax.swing.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, java.lang.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, java.lang.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
public static javax.swing.JSpinner findJSpinner(java.awt.Container cont, ComponentChooser chooser, int index)
cont
- Container to search component in.chooser
- org.netbeans.jemmy.ComponentChooser implementation.index
- Ordinal component index.public static javax.swing.JSpinner findJSpinner(java.awt.Container cont, ComponentChooser chooser)
cont
- Container to search component in.chooser
- org.netbeans.jemmy.ComponentChooser implementation.public static javax.swing.JSpinner findJSpinner(java.awt.Container cont, int index)
cont
- Container to search component in.index
- Ordinal component index.public static javax.swing.JSpinner findJSpinner(java.awt.Container cont)
cont
- Container to search component in.public static javax.swing.JSpinner waitJSpinner(java.awt.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 javax.swing.JSpinner waitJSpinner(java.awt.Container cont, ComponentChooser chooser)
cont
- Container to search component in.chooser
- org.netbeans.jemmy.ComponentChooser implementation.TimeoutExpiredException
public static javax.swing.JSpinner waitJSpinner(java.awt.Container cont, int index)
cont
- Container to search component in.index
- Ordinal component index.TimeoutExpiredException
public static javax.swing.JSpinner waitJSpinner(java.awt.Container cont)
cont
- Container to search component in.TimeoutExpiredException
public static void checkModel(JSpinnerOperator oper, java.lang.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(java.lang.Object value, int direction)
value
- an value to scroll to.direction
- a scrolling direction - one of ScrollAdjuster.*_SCROLL_DIRECTION
fields.public void scrollToString(java.lang.String pattern, Operator.StringComparator comparator, int direction)
getValue().toString() with the pattern.
pattern
- a pattern to compare withcomparator
- a string comparision criteriadirection
- a scrolling direction - one of ScrollAdjuster.*_SCROLL_DIRECTION
fields.public void scrollToString(java.lang.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 java.lang.Object getMinimum()
javax.swing.SpinnerDateModel
,
javax.swing.SpinnerListModel
,
javax.swing.SpinnerNumberModel
.
Also, returns null if the model does not have a minimal value.public java.lang.Object getMaximum()
javax.swing.SpinnerDateModel
,
javax.swing.SpinnerListModel
,
javax.swing.SpinnerNumberModel
.
Also, returns null if the model does not have a maximal value.public java.util.Hashtable getDump()
ComponentOperator
getDump
in class JComponentOperator
public java.lang.Object getValue()
JSpinner.getValue()
through queuepublic void setValue(java.lang.Object object)
JSpinner.setValue(Object)
through queuepublic javax.swing.plaf.SpinnerUI getUI()
JSpinner.getUI()
through queuepublic void setUI(javax.swing.plaf.SpinnerUI spinnerUI)
JSpinner.setUI(SpinnerUI)
through queuepublic void setModel(javax.swing.SpinnerModel spinnerModel)
JSpinner.setModel(SpinnerModel)
through queuepublic javax.swing.SpinnerModel getModel()
JSpinner.getModel()
through queuepublic java.lang.Object getNextValue()
JSpinner.getNextValue()
through queuepublic void addChangeListener(javax.swing.event.ChangeListener changeListener)
JSpinner.addChangeListener(ChangeListener)
through queuepublic void removeChangeListener(javax.swing.event.ChangeListener changeListener)
JSpinner.removeChangeListener(ChangeListener)
through queuepublic javax.swing.event.ChangeListener[] getChangeListeners()
JSpinner.getChangeListeners()
through queuepublic java.lang.Object getPreviousValue()
JSpinner.getPreviousValue()
through queuepublic void setEditor(javax.swing.JComponent jComponent)
JSpinner.setEditor(JComponent)
through queuepublic javax.swing.JComponent getEditor()
JSpinner.getEditor()
through queuepublic void commitEdit()
JSpinner.commitEdit()
through queue