Package org.netbeans.jemmy.operators
Class JSliderOperator
java.lang.Object
org.netbeans.jemmy.operators.Operator
org.netbeans.jemmy.operators.ComponentOperator
org.netbeans.jemmy.operators.ContainerOperator
org.netbeans.jemmy.operators.JComponentOperator
org.netbeans.jemmy.operators.JSliderOperator
- All Implemented Interfaces:
Outputable
,Timeoutable
Covers
Timeouts used:
JSliderOperator.WholeScrollTimeout - time for the whole scrolling.
JSliderOperator.ScrollingDelta - time delta to verify result durong scrolling.
javax.swing.JSlider
component.
Timeouts used:
JSliderOperator.WholeScrollTimeout - time for the whole scrolling.
JSliderOperator.ScrollingDelta - time delta to verify result durong scrolling.
- Author:
- Alexandre Iline (alexandre.iline@sun.com)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Checks component 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
FieldsModifier and TypeFieldDescriptionstatic final int
Deprecated.static final String
Identifier for a "HORIZONTAL" value of "orientation" property.static final String
Identifier for a "inverted" property.static final String
Identifier for a "maximum" property.static final String
Identifier for a "minimum" property.static final String
Identifier for a "orientation" property.static final int
Deprecated.All actions are prformed throw aScrollDriver
registered for this component, So this field is useless.static final String
Identifier for a "value" property.static final String
Identifier for a "VERTICAL" value of "orientation" 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
ConstructorsConstructorDescriptionConstructor.Constructor.JSliderOperator
(ContainerOperator cont, int index) Constructor.JSliderOperator
(ContainerOperator cont, ComponentChooser chooser) Constructs a JSliderOperator object.JSliderOperator
(ContainerOperator cont, ComponentChooser chooser, int index) Constructs a JSliderOperator object. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addChangeListener
(ChangeListener changeListener) MapsJSlider.addChangeListener(ChangeListener)
through queuecreateStandardLabels
(int i) MapsJSlider.createStandardLabels(int)
through queuecreateStandardLabels
(int i, int i1) MapsJSlider.createStandardLabels(int, int)
through queuestatic JSlider
findJSlider
(Container cont) Searches 0'th JSlider in container.static JSlider
findJSlider
(Container cont, int index) Searches JSlider in container.static JSlider
findJSlider
(Container cont, ComponentChooser chooser) Searches 0'th JSlider in container.static JSlider
findJSlider
(Container cont, ComponentChooser chooser, int index) Searches JSlider in container.getDump()
Returns information about component.int
MapsJSlider.getExtent()
through queueboolean
MapsJSlider.getInverted()
through queueMapsJSlider.getLabelTable()
through queueint
MapsJSlider.getMajorTickSpacing()
through queueint
MapsJSlider.getMaximum()
through queueint
MapsJSlider.getMinimum()
through queueint
MapsJSlider.getMinorTickSpacing()
through queuegetModel()
MapsJSlider.getModel()
through queueint
MapsJSlider.getOrientation()
through queueReturns print output streams or writers.boolean
MapsJSlider.getPaintLabels()
through queueboolean
MapsJSlider.getPaintTicks()
through queueboolean
MapsJSlider.getPaintTrack()
through queueint
Deprecated.All actions are prformed throw aScrollDriver
registered for this component, so value returned by this method is ignored.boolean
MapsJSlider.getSnapToTicks()
through queueReturn current timeouts.getUI()
MapsJSlider.getUI()
through queueint
getValue()
MapsJSlider.getValue()
through queueboolean
MapsJSlider.getValueIsAdjusting()
through queuevoid
removeChangeListener
(ChangeListener changeListener) MapsJSlider.removeChangeListener(ChangeListener)
through queuevoid
scrollTo
(ScrollAdjuster adj) Scrolls slider to the position defined by a ScrollAdjuster implementation.void
Moves slider to the maximal value.void
Moves slider to the minimal value.void
scrollToValue
(int value) Moves slider to the necessary value.void
setExtent
(int i) MapsJSlider.setExtent(int)
through queuevoid
setInverted
(boolean b) MapsJSlider.setInverted(boolean)
through queuevoid
setLabelTable
(Dictionary dictionary) MapsJSlider.setLabelTable(Dictionary)
through queuevoid
setMajorTickSpacing
(int i) MapsJSlider.setMajorTickSpacing(int)
through queuevoid
setMaximum
(int i) MapsJSlider.setMaximum(int)
through queuevoid
setMinimum
(int i) MapsJSlider.setMinimum(int)
through queuevoid
setMinorTickSpacing
(int i) MapsJSlider.setMinorTickSpacing(int)
through queuevoid
setModel
(BoundedRangeModel boundedRangeModel) MapsJSlider.setModel(BoundedRangeModel)
through queuevoid
setOrientation
(int i) MapsJSlider.setOrientation(int)
through queuevoid
Defines print output streams or writers.void
setPaintLabels
(boolean b) MapsJSlider.setPaintLabels(boolean)
through queuevoid
setPaintTicks
(boolean b) MapsJSlider.setPaintTicks(boolean)
through queuevoid
setPaintTrack
(boolean b) MapsJSlider.setPaintTrack(boolean)
through queuevoid
setScrollModel
(int model) Deprecated.All actions are prformed throw aScrollDriver
registered for this component, so value set by this method is ignored.void
setSnapToTicks
(boolean b) MapsJSlider.setSnapToTicks(boolean)
through queuevoid
setTimeouts
(Timeouts timeouts) Defines current timeouts.void
MapsJSlider.setUI(SliderUI)
through queuevoid
setValue
(int i) MapsJSlider.setValue(int)
through queuevoid
setValueIsAdjusting
(boolean b) MapsJSlider.setValueIsAdjusting(boolean)
through queuestatic JSlider
waitJSlider
(Container cont) Waits 0'th JSlider in container.static JSlider
waitJSlider
(Container cont, int index) Waits JSlider in container.static JSlider
waitJSlider
(Container cont, ComponentChooser chooser) Waits 0'th JSlider in container.static JSlider
waitJSlider
(Container cont, ComponentChooser chooser, int index) Waits JSlider in container.Methods inherited from class org.netbeans.jemmy.operators.JComponentOperator
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
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 org.netbeans.jemmy.operators.ComponentOperator
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
Methods inherited from class org.netbeans.jemmy.operators.Operator
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
-
Field Details
-
MINIMUM_DPROP
Identifier for a "minimum" property.- See Also:
-
MAXIMUM_DPROP
Identifier for a "maximum" property.- See Also:
-
VALUE_DPROP
Identifier for a "value" property.- See Also:
-
ORIENTATION_DPROP
Identifier for a "orientation" property.- See Also:
-
HORIZONTAL_ORIENTATION_DPROP_VALUE
Identifier for a "HORIZONTAL" value of "orientation" property.- See Also:
-
VERTICAL_ORIENTATION_DPROP_VALUE
Identifier for a "VERTICAL" value of "orientation" property.- See Also:
-
IS_INVERTED_DPROP
Identifier for a "inverted" property.- See Also:
-
CLICK_SCROLL_MODEL
public static final int CLICK_SCROLL_MODELDeprecated.All actions are prformed throw aScrollDriver
registered for this component, So this field is useless.Scrolling model.- See Also:
-
PUSH_AND_WAIT_SCROLL_MODEL
public static final int PUSH_AND_WAIT_SCROLL_MODELDeprecated.All actions are prformed throw aScrollDriver
registered for this component, So this field is useless.Push and wait scroll model. Mouse is pressed, and released after necessary position reached.- See Also:
-
-
Constructor Details
-
JSliderOperator
Constructor.- Parameters:
b
- JSlider component.
-
JSliderOperator
Constructs a JSliderOperator object.- Parameters:
cont
- a containerchooser
- a component chooser specifying searching criteria.index
- an index between appropriate ones.
-
JSliderOperator
Constructs a JSliderOperator object.- Parameters:
cont
- a containerchooser
- a component chooser specifying searching criteria.
-
JSliderOperator
Constructor. Waits component in container first. Uses cont's timeout and output for waiting and to init operator.- Parameters:
cont
- Operator pointing a container to search component in.index
- Ordinal component index.- Throws:
TimeoutExpiredException
-
JSliderOperator
Constructor. Waits component in container first. Uses cont's timeout and output for waiting and to init operator.- Parameters:
cont
- Operator pointing a container to search component in.- Throws:
TimeoutExpiredException
-
-
Method Details
-
findJSlider
Searches JSlider in container.- Parameters:
cont
- Container to search component in.chooser
- org.netbeans.jemmy.ComponentChooser implementation.index
- Ordinal component index.- Returns:
- JSlider instance or null if component was not found.
-
findJSlider
Searches 0'th JSlider in container.- Parameters:
cont
- Container to search component in.chooser
- org.netbeans.jemmy.ComponentChooser implementation.- Returns:
- JSlider instance or null if component was not found.
-
findJSlider
Searches JSlider in container.- Parameters:
cont
- Container to search component in.index
- Ordinal component index.- Returns:
- JSlider instance or null if component was not found.
-
findJSlider
Searches 0'th JSlider in container.- Parameters:
cont
- Container to search component in.- Returns:
- JSlider instance or null if component was not found.
-
waitJSlider
Waits JSlider in container.- Parameters:
cont
- Container to search component in.chooser
- org.netbeans.jemmy.ComponentChooser implementation.index
- Ordinal component index.- Returns:
- JSlider instance or null if component was not displayed.
- Throws:
TimeoutExpiredException
-
waitJSlider
Waits 0'th JSlider in container.- Parameters:
cont
- Container to search component in.chooser
- org.netbeans.jemmy.ComponentChooser implementation.- Returns:
- JSlider instance or null if component was not displayed.
- Throws:
TimeoutExpiredException
-
waitJSlider
Waits JSlider in container.- Parameters:
cont
- Container to search component in.index
- Ordinal component index.- Returns:
- JSlider instance or null if component was not displayed.
- Throws:
TimeoutExpiredException
-
waitJSlider
Waits 0'th JSlider in container.- Parameters:
cont
- Container to search component in.- Returns:
- JSlider instance or null if component was not displayed.
- Throws:
TimeoutExpiredException
-
setScrollModel
public void setScrollModel(int model) Deprecated.All actions are prformed throw aScrollDriver
registered for this component, so value set by this method is ignored.Defines scroll model. Default model value - CLICK_SCROLL_MODEL.- Parameters:
model
- New scroll model value.- See Also:
-
getScrollModel
public int getScrollModel()Deprecated.All actions are prformed throw aScrollDriver
registered for this component, so value returned by this method is ignored.Specifies the scroll model.- Returns:
- Current scroll model value.
- See Also:
-
setOutput
Description copied from interface:Outputable
Defines print output streams or writers.- Specified by:
setOutput
in interfaceOutputable
- Overrides:
setOutput
in classJComponentOperator
- Parameters:
out
- Identify the streams or writers used for print output.- See Also:
-
getOutput
Description copied from interface:Outputable
Returns print output streams or writers.- Specified by:
getOutput
in interfaceOutputable
- Overrides:
getOutput
in classJComponentOperator
- Returns:
- an object that contains references to objects for printing to output and err streams.
- See Also:
-
setTimeouts
Description copied from interface:Timeoutable
Defines current timeouts.- Specified by:
setTimeouts
in interfaceTimeoutable
- Overrides:
setTimeouts
in classJComponentOperator
- Parameters:
timeouts
- A collection of timeout assignments.- See Also:
-
getTimeouts
Description copied from interface:Timeoutable
Return current timeouts.- Specified by:
getTimeouts
in interfaceTimeoutable
- Overrides:
getTimeouts
in classJComponentOperator
- Returns:
- the collection of current timeout assignments.
- See Also:
-
scrollTo
Scrolls slider to the position defined by a ScrollAdjuster implementation.- Parameters:
adj
- defines scrolling direction, and so on.- Throws:
TimeoutExpiredException
-
scrollToValue
public void scrollToValue(int value) Moves slider to the necessary value.- Parameters:
value
- Value to move slider to.- Throws:
TimeoutExpiredException
-
scrollToMaximum
public void scrollToMaximum()Moves slider to the maximal value.- Throws:
TimeoutExpiredException
-
scrollToMinimum
public void scrollToMinimum()Moves slider to the minimal value.- Throws:
TimeoutExpiredException
-
getDump
Description copied from class:ComponentOperator
Returns information about component.- Overrides:
getDump
in classJComponentOperator
- Returns:
- a Hashtable containing name-value pairs.
-
addChangeListener
MapsJSlider.addChangeListener(ChangeListener)
through queue -
createStandardLabels
MapsJSlider.createStandardLabels(int)
through queue -
createStandardLabels
MapsJSlider.createStandardLabels(int, int)
through queue -
getExtent
public int getExtent()MapsJSlider.getExtent()
through queue -
getInverted
public boolean getInverted()MapsJSlider.getInverted()
through queue -
getLabelTable
MapsJSlider.getLabelTable()
through queue -
getMajorTickSpacing
public int getMajorTickSpacing()MapsJSlider.getMajorTickSpacing()
through queue -
getMaximum
public int getMaximum()MapsJSlider.getMaximum()
through queue -
getMinimum
public int getMinimum()MapsJSlider.getMinimum()
through queue -
getMinorTickSpacing
public int getMinorTickSpacing()MapsJSlider.getMinorTickSpacing()
through queue -
getModel
MapsJSlider.getModel()
through queue -
getOrientation
public int getOrientation()MapsJSlider.getOrientation()
through queue -
getPaintLabels
public boolean getPaintLabels()MapsJSlider.getPaintLabels()
through queue -
getPaintTicks
public boolean getPaintTicks()MapsJSlider.getPaintTicks()
through queue -
getPaintTrack
public boolean getPaintTrack()MapsJSlider.getPaintTrack()
through queue -
getSnapToTicks
public boolean getSnapToTicks()MapsJSlider.getSnapToTicks()
through queue -
getUI
MapsJSlider.getUI()
through queue -
getValue
public int getValue()MapsJSlider.getValue()
through queue -
getValueIsAdjusting
public boolean getValueIsAdjusting()MapsJSlider.getValueIsAdjusting()
through queue -
removeChangeListener
MapsJSlider.removeChangeListener(ChangeListener)
through queue -
setExtent
public void setExtent(int i) MapsJSlider.setExtent(int)
through queue -
setInverted
public void setInverted(boolean b) MapsJSlider.setInverted(boolean)
through queue -
setLabelTable
MapsJSlider.setLabelTable(Dictionary)
through queue -
setMajorTickSpacing
public void setMajorTickSpacing(int i) MapsJSlider.setMajorTickSpacing(int)
through queue -
setMaximum
public void setMaximum(int i) MapsJSlider.setMaximum(int)
through queue -
setMinimum
public void setMinimum(int i) MapsJSlider.setMinimum(int)
through queue -
setMinorTickSpacing
public void setMinorTickSpacing(int i) MapsJSlider.setMinorTickSpacing(int)
through queue -
setModel
MapsJSlider.setModel(BoundedRangeModel)
through queue -
setOrientation
public void setOrientation(int i) MapsJSlider.setOrientation(int)
through queue -
setPaintLabels
public void setPaintLabels(boolean b) MapsJSlider.setPaintLabels(boolean)
through queue -
setPaintTicks
public void setPaintTicks(boolean b) MapsJSlider.setPaintTicks(boolean)
through queue -
setPaintTrack
public void setPaintTrack(boolean b) MapsJSlider.setPaintTrack(boolean)
through queue -
setSnapToTicks
public void setSnapToTicks(boolean b) MapsJSlider.setSnapToTicks(boolean)
through queue -
setUI
MapsJSlider.setUI(SliderUI)
through queue -
setValue
public void setValue(int i) MapsJSlider.setValue(int)
through queue -
setValueIsAdjusting
public void setValueIsAdjusting(boolean b) MapsJSlider.setValueIsAdjusting(boolean)
through queue
-
ScrollDriver
registered for this component, So this field is useless.