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 classChecks component type.Nested classes/interfaces inherited from class JComponentOperator
JComponentOperator.JComponentByTipFinder, JComponentOperator.JComponentFinderNested classes/interfaces inherited from class ContainerOperator
ContainerOperator.ContainerFinderNested classes/interfaces inherited from class 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 intDeprecated.static final StringIdentifier for a "HORIZONTAL" value of "orientation" property.static final StringIdentifier for a "inverted" property.static final StringIdentifier for a "maximum" property.static final StringIdentifier for a "minimum" property.static final StringIdentifier for a "orientation" property.static final intDeprecated.All actions are prformed throw aScrollDriverregistered for this component, So this field is useless.static final StringIdentifier for a "value" property.static final StringIdentifier for a "VERTICAL" value of "orientation" property.Fields inherited from class JComponentOperator
A11Y_DATA, A11Y_DESCRIPTION_DPROP, A11Y_NAME_DPROP, TOOLTIP_TEXT_DPROPFields inherited from class ComponentOperator
HEIGHT_DPROP, IS_SHOWING_DPROP, IS_VISIBLE_DPROP, NAME_DPROP, WIDTH_DPROP, X_DPROP, Y_DPROPFields inherited from class 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 TypeMethodDescriptionvoidaddChangeListener(ChangeListener changeListener) MapsJSlider.addChangeListener(ChangeListener)through queuecreateStandardLabels(int i) MapsJSlider.createStandardLabels(int)through queuecreateStandardLabels(int i, int i1) MapsJSlider.createStandardLabels(int, int)through queuestatic JSliderfindJSlider(Container cont) Searches 0'th JSlider in container.static JSliderfindJSlider(Container cont, int index) Searches JSlider in container.static JSliderfindJSlider(Container cont, ComponentChooser chooser) Searches 0'th JSlider in container.static JSliderfindJSlider(Container cont, ComponentChooser chooser, int index) Searches JSlider in container.getDump()Returns information about component.intMapsJSlider.getExtent()through queuebooleanMapsJSlider.getInverted()through queueMapsJSlider.getLabelTable()through queueintMapsJSlider.getMajorTickSpacing()through queueintMapsJSlider.getMaximum()through queueintMapsJSlider.getMinimum()through queueintMapsJSlider.getMinorTickSpacing()through queuegetModel()MapsJSlider.getModel()through queueintMapsJSlider.getOrientation()through queueReturns print output streams or writers.booleanMapsJSlider.getPaintLabels()through queuebooleanMapsJSlider.getPaintTicks()through queuebooleanMapsJSlider.getPaintTrack()through queueintDeprecated.All actions are prformed throw aScrollDriverregistered for this component, so value returned by this method is ignored.booleanMapsJSlider.getSnapToTicks()through queueReturn current timeouts.getUI()MapsJSlider.getUI()through queueintgetValue()MapsJSlider.getValue()through queuebooleanMapsJSlider.getValueIsAdjusting()through queuevoidremoveChangeListener(ChangeListener changeListener) MapsJSlider.removeChangeListener(ChangeListener)through queuevoidscrollTo(ScrollAdjuster adj) Scrolls slider to the position defined by a ScrollAdjuster implementation.voidMoves slider to the maximal value.voidMoves slider to the minimal value.voidscrollToValue(int value) Moves slider to the necessary value.voidsetExtent(int i) MapsJSlider.setExtent(int)through queuevoidsetInverted(boolean b) MapsJSlider.setInverted(boolean)through queuevoidsetLabelTable(Dictionary dictionary) MapsJSlider.setLabelTable(Dictionary)through queuevoidsetMajorTickSpacing(int i) MapsJSlider.setMajorTickSpacing(int)through queuevoidsetMaximum(int i) MapsJSlider.setMaximum(int)through queuevoidsetMinimum(int i) MapsJSlider.setMinimum(int)through queuevoidsetMinorTickSpacing(int i) MapsJSlider.setMinorTickSpacing(int)through queuevoidsetModel(BoundedRangeModel boundedRangeModel) MapsJSlider.setModel(BoundedRangeModel)through queuevoidsetOrientation(int i) MapsJSlider.setOrientation(int)through queuevoid/////////////////////////////////////////////////////voidsetPaintLabels(boolean b) MapsJSlider.setPaintLabels(boolean)through queuevoidsetPaintTicks(boolean b) MapsJSlider.setPaintTicks(boolean)through queuevoidsetPaintTrack(boolean b) MapsJSlider.setPaintTrack(boolean)through queuevoidsetScrollModel(int model) Deprecated.All actions are prformed throw aScrollDriverregistered for this component, so value set by this method is ignored.voidsetSnapToTicks(boolean b) MapsJSlider.setSnapToTicks(boolean)through queuevoidsetTimeouts(Timeouts timeouts) Defines current timeouts.voidMapsJSlider.setUI(SliderUI)through queuevoidsetValue(int i) MapsJSlider.setValue(int)through queuevoidsetValueIsAdjusting(boolean b) MapsJSlider.setValueIsAdjusting(boolean)through queuestatic JSliderwaitJSlider(Container cont) Waits 0'th JSlider in container.static JSliderwaitJSlider(Container cont, int index) Waits JSlider in container.static JSliderwaitJSlider(Container cont, ComponentChooser chooser) Waits 0'th JSlider in container.static JSliderwaitJSlider(Container cont, ComponentChooser chooser, int index) Waits JSlider in container.Methods inherited from class 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, waitToolTipMethods inherited from class 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, waitSubComponentMethods inherited from class 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, wtComponentEnabledMethods inherited from class 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
-
MAXIMUM_DPROP
-
VALUE_DPROP
-
ORIENTATION_DPROP
-
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
-
CLICK_SCROLL_MODEL
public static final int CLICK_SCROLL_MODELDeprecated.All actions are prformed throw aScrollDriverregistered 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 aScrollDriverregistered 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
-
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
-
findJSlider
-
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 aScrollDriverregistered 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 aScrollDriverregistered 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 class:ComponentOperator/////////////////////////////////////////////////////- Specified by:
setOutputin interfaceOutputable- Overrides:
setOutputin classJComponentOperator- Parameters:
out- Identify the streams or writers used for print output.- See Also:
-
getOutput
Description copied from interface:OutputableReturns print output streams or writers.- Specified by:
getOutputin interfaceOutputable- Overrides:
getOutputin classJComponentOperator- Returns:
- an object that contains references to objects for printing to output and err streams.
- See Also:
-
setTimeouts
Description copied from interface:TimeoutableDefines current timeouts.- Specified by:
setTimeoutsin interfaceTimeoutable- Overrides:
setTimeoutsin classJComponentOperator- Parameters:
timeouts- A collection of timeout assignments.- See Also:
-
getTimeouts
Description copied from interface:TimeoutableReturn current timeouts.- Specified by:
getTimeoutsin interfaceTimeoutable- Overrides:
getTimeoutsin 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
-
scrollToMinimum
-
getDump
Description copied from class:ComponentOperatorReturns information about component.- Overrides:
getDumpin 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
-
ScrollDriverregistered for this component, So this field is useless.