Class JScrollBarOperator
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.JScrollBarOperator
- All Implemented Interfaces:
Outputable, Timeoutable
Operator is supposed to be used to operate with an instance of
javax.swing.JScrollBar class.
Timeouts used:
JScrollBarOperator.OneScrollClickTimeout - time for one scroll click
JScrollBarOperator.WholeScrollTimeout - time for the whole scrolling
JScrollBarOperator.BeforeDropTimeout - to sleep before drop JScrollBarOperator.DragAndDropScrollingDelta - to sleep before drag steps ComponentOperator.WaitComponentTimeout - time to wait component displayed
.
Timeouts used:
JScrollBarOperator.OneScrollClickTimeout - time for one scroll click
JScrollBarOperator.WholeScrollTimeout - time for the whole scrolling
JScrollBarOperator.BeforeDropTimeout - to sleep before drop JScrollBarOperator.DragAndDropScrollingDelta - to sleep before drag steps ComponentOperator.WaitComponentTimeout - time to wait component displayed
.
- Author:
- Alexandre Iline (alexandre.iline@sun.com)
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classChecks component type.static interfaceInterface can be used to define some kind of complicated scrolling rules.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 StringIdentifier for a "HORIZONTAL" value of "orientation" property.static final StringIdentifier for a "maximum" property.static final StringIdentifier for a "minimum" property.static final StringIdentifier for a "orientation" property.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.JScrollBarOperator(ContainerOperator cont, int index) Constructor.JScrollBarOperator(ContainerOperator cont, ComponentChooser chooser) Constructs a JScrollBarOperator object.JScrollBarOperator(ContainerOperator cont, ComponentChooser chooser, int index) Constructs a JScrollBarOperator object. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAdjustmentListener(AdjustmentListener adjustmentListener) MapsJScrollBar.addAdjustmentListener(AdjustmentListener)through queuevoidcopyEnvironment(Operator anotherOperator) Copies all environment (output, timeouts, visualizer) from another operator.static JScrollBarfindJScrollBar(Container cont) Searches 0'th JScrollBar in container.static JScrollBarfindJScrollBar(Container cont, int index) Searches JScrollBar in container.static JScrollBarfindJScrollBar(Container cont, ComponentChooser chooser) Searches 0'th JScrollBar in container.static JScrollBarfindJScrollBar(Container cont, ComponentChooser chooser, int index) Searches JScrollBar in container.intMapsJScrollBar.getBlockIncrement()through queueintgetBlockIncrement(int i) MapsJScrollBar.getBlockIncrement(int)through queueReturns a button responsible for value decreasing.getDump()Returns information about component.Returns a button responsible for value increasing.intMapsJScrollBar.getMaximum()through queueintMapsJScrollBar.getMinimum()through queuegetModel()MapsJScrollBar.getModel()through queueintMapsJScrollBar.getOrientation()through queueReturns print output streams or writers.Return current timeouts.getUI()MapsJScrollBar.getUI()through queueintMapsJScrollBar.getUnitIncrement()through queueintgetUnitIncrement(int i) MapsJScrollBar.getUnitIncrement(int)through queueintgetValue()MapsJScrollBar.getValue()through queuebooleanMapsJScrollBar.getValueIsAdjusting()through queueintMapsJScrollBar.getVisibleAmount()through queuevoidremoveAdjustmentListener(AdjustmentListener adjustmentListener) MapsJScrollBar.removeAdjustmentListener(AdjustmentListener)through queuevoidscroll(boolean increase) Deprecated.All scrolling is done through a ScrollDriver registered to this operator type.voidscrollTo(ScrollAdjuster adj) Scrolls scrollbar to the position defined by a ScrollAdjuster implementation.voidscrollTo(JScrollBarOperator.ScrollChecker checker) Scrolls scrollbar to the position defined by a ScrollChecker implementation.voidScrolls scrollbar to the position defined by w parameter.voidScrolls to maximum value.voidScrolls to minimum value.voidscrollToValue(double proportionalValue) Scrolls scroll bar to necessary proportional value.voidscrollToValue(int value) Scrolls scroll bar to necessary value.voidsetBlockIncrement(int i) MapsJScrollBar.setBlockIncrement(int)through queuevoidsetMaximum(int i) MapsJScrollBar.setMaximum(int)through queuevoidsetMinimum(int i) MapsJScrollBar.setMinimum(int)through queuevoidsetModel(BoundedRangeModel boundedRangeModel) MapsJScrollBar.setModel(BoundedRangeModel)through queuevoidsetOrientation(int i) MapsJScrollBar.setOrientation(int)through queuevoid/////////////////////////////////////////////////////voidsetTimeouts(Timeouts timeouts) Defines current timeouts.voidsetUnitIncrement(int i) MapsJScrollBar.setUnitIncrement(int)through queuevoidsetValue(int i) MapsJScrollBar.setValue(int)through queuevoidsetValueIsAdjusting(boolean b) MapsJScrollBar.setValueIsAdjusting(boolean)through queuevoidsetValues(int i, int i1, int i2, int i3) MapsJScrollBar.setValues(int, int, int, int)through queuevoidsetVisibleAmount(int i) MapsJScrollBar.setVisibleAmount(int)through queuestatic JScrollBarwaitJScrollBar(Container cont) Waits 0'th JScrollBar in container.static JScrollBarwaitJScrollBar(Container cont, int index) Waits JScrollBar in container.static JScrollBarwaitJScrollBar(Container cont, ComponentChooser chooser) Waits 0'th JScrollBar in container.static JScrollBarwaitJScrollBar(Container cont, ComponentChooser chooser, int index) Waits JScrollBar 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, 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:
-
-
Constructor Details
-
JScrollBarOperator
-
JScrollBarOperator
Constructs a JScrollBarOperator object.- Parameters:
cont- a containerchooser- a component chooser specifying searching criteria.index- an index between appropriate ones.
-
JScrollBarOperator
Constructs a JScrollBarOperator object.- Parameters:
cont- a containerchooser- a component chooser specifying searching criteria.
-
JScrollBarOperator
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
-
JScrollBarOperator
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
-
findJScrollBar
Searches JScrollBar in container.- Parameters:
cont- Container to search component in.chooser- org.netbeans.jemmy.ComponentChooser implementation.index- Ordinal component index.- Returns:
- JScrollBar instance or null if component was not found.
-
findJScrollBar
Searches 0'th JScrollBar in container.- Parameters:
cont- Container to search component in.chooser- org.netbeans.jemmy.ComponentChooser implementation.- Returns:
- JScrollBar instance or null if component was not found.
-
findJScrollBar
Searches JScrollBar in container.- Parameters:
cont- Container to search component in.index- Ordinal component index.- Returns:
- JScrollBar instance or null if component was not found.
-
findJScrollBar
Searches 0'th JScrollBar in container.- Parameters:
cont- Container to search component in.- Returns:
- JScrollBar instance or null if component was not found.
-
waitJScrollBar
Waits JScrollBar in container.- Parameters:
cont- Container to search component in.chooser- org.netbeans.jemmy.ComponentChooser implementation.index- Ordinal component index.- Returns:
- JScrollBar instance or null if component was not displayed.
- Throws:
TimeoutExpiredException
-
waitJScrollBar
Waits 0'th JScrollBar in container.- Parameters:
cont- Container to search component in.chooser- org.netbeans.jemmy.ComponentChooser implementation.- Returns:
- JScrollBar instance or null if component was not displayed.
- Throws:
TimeoutExpiredException
-
waitJScrollBar
Waits JScrollBar in container.- Parameters:
cont- Container to search component in.index- Ordinal component index.- Returns:
- JScrollBar instance or null if component was not displayed.
- Throws:
TimeoutExpiredException
-
waitJScrollBar
Waits 0'th JScrollBar in container.- Parameters:
cont- Container to search component in.- Returns:
- JScrollBar instance or null if component was not displayed.
- Throws:
TimeoutExpiredException
-
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:
-
copyEnvironment
Description copied from class:OperatorCopies all environment (output, timeouts, visualizer) from another operator.- Overrides:
copyEnvironmentin classComponentOperator- Parameters:
anotherOperator- an operator to copy the environment to.
-
scroll
public void scroll(boolean increase) Deprecated.All scrolling is done through a ScrollDriver registered to this operator type.Does simple scroll click.- Parameters:
increase- a scrolling direction.- Throws:
TimeoutExpiredException
-
scrollTo
Scrolls scrollbar to the position defined by w parameter. Uses ScrollDriver registered to this operator type.- Parameters:
w- Scrolling is stopped when w.actionProduced(waiterParam) != nullwaiterParam- a waiting parameter.increase- a scrolling direction.- Throws:
TimeoutExpiredException- See Also:
-
scrollTo
Scrolls scrollbar to the position defined by a ScrollChecker implementation.- Parameters:
checker- ScrollChecker implementation defining scrolling direction, and so on.- Throws:
TimeoutExpiredException- See Also:
-
scrollTo
Scrolls scrollbar to the position defined by a ScrollAdjuster implementation.- Parameters:
adj- defines scrolling direction, and so on.- Throws:
TimeoutExpiredException
-
scrollToValue
public void scrollToValue(int value) Scrolls scroll bar to necessary value.- Parameters:
value- Scroll bar value to scroll to.- Throws:
TimeoutExpiredException
-
scrollToValue
public void scrollToValue(double proportionalValue) Scrolls scroll bar to necessary proportional value.- Parameters:
proportionalValue- Proportional scroll to. Must be >= 0 and invalid input: '<'= 1.- Throws:
TimeoutExpiredException
-
scrollToMinimum
-
scrollToMaximum
-
getDecreaseButton
Returns a button responsible for value decreasing.- Returns:
- an operator for the decrease button.
-
getIncreaseButton
Returns a button responsible for value increasing.- Returns:
- an operator for the increase button.
-
getDump
Description copied from class:ComponentOperatorReturns information about component.- Overrides:
getDumpin classJComponentOperator- Returns:
- a Hashtable containing name-value pairs.
-
addAdjustmentListener
MapsJScrollBar.addAdjustmentListener(AdjustmentListener)through queue -
getBlockIncrement
public int getBlockIncrement()MapsJScrollBar.getBlockIncrement()through queue -
getBlockIncrement
public int getBlockIncrement(int i) MapsJScrollBar.getBlockIncrement(int)through queue -
getMaximum
public int getMaximum()MapsJScrollBar.getMaximum()through queue -
getMinimum
public int getMinimum()MapsJScrollBar.getMinimum()through queue -
getModel
MapsJScrollBar.getModel()through queue -
getOrientation
public int getOrientation()MapsJScrollBar.getOrientation()through queue -
getUI
MapsJScrollBar.getUI()through queue -
getUnitIncrement
public int getUnitIncrement()MapsJScrollBar.getUnitIncrement()through queue -
getUnitIncrement
public int getUnitIncrement(int i) MapsJScrollBar.getUnitIncrement(int)through queue -
getValue
public int getValue()MapsJScrollBar.getValue()through queue -
getValueIsAdjusting
public boolean getValueIsAdjusting()MapsJScrollBar.getValueIsAdjusting()through queue -
getVisibleAmount
public int getVisibleAmount()MapsJScrollBar.getVisibleAmount()through queue -
removeAdjustmentListener
MapsJScrollBar.removeAdjustmentListener(AdjustmentListener)through queue -
setBlockIncrement
public void setBlockIncrement(int i) MapsJScrollBar.setBlockIncrement(int)through queue -
setMaximum
public void setMaximum(int i) MapsJScrollBar.setMaximum(int)through queue -
setMinimum
public void setMinimum(int i) MapsJScrollBar.setMinimum(int)through queue -
setModel
MapsJScrollBar.setModel(BoundedRangeModel)through queue -
setOrientation
public void setOrientation(int i) MapsJScrollBar.setOrientation(int)through queue -
setUnitIncrement
public void setUnitIncrement(int i) MapsJScrollBar.setUnitIncrement(int)through queue -
setValue
public void setValue(int i) MapsJScrollBar.setValue(int)through queue -
setValueIsAdjusting
public void setValueIsAdjusting(boolean b) MapsJScrollBar.setValueIsAdjusting(boolean)through queue -
setValues
public void setValues(int i, int i1, int i2, int i3) MapsJScrollBar.setValues(int, int, int, int)through queue -
setVisibleAmount
public void setVisibleAmount(int i) MapsJScrollBar.setVisibleAmount(int)through queue
-