Class JScrollPaneOperator
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.JScrollPaneOperator
- All Implemented Interfaces:
Outputable, Timeoutable
Timeouts used:
JScrollBarOperator.OneScrollClickTimeout - time for one scroll click
JScrollBarOperator.WholeScrollTimeout - time for the whole scrolling
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.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
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.JScrollPaneOperator(ContainerOperator cont, int index) Constructor.JScrollPaneOperator(ContainerOperator cont, ComponentChooser chooser) Constructs a JScrollPaneOperator object.JScrollPaneOperator(ContainerOperator cont, ComponentChooser chooser, int index) Constructs a JScrollPaneOperator object. -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckInside(Component comp) Checks if component is inside view port (no scrolling necessary).booleancheckInside(Component comp, int x, int y, int width, int height) Checks if component's rectangle is inside view port (no scrolling necessary).MapsJScrollPane.createHorizontalScrollBar()through queueMapsJScrollPane.createVerticalScrollBar()through queuestatic JScrollPanefindJScrollPane(Container cont) Searches 0'th JScrollPane in container.static JScrollPanefindJScrollPane(Container cont, int index) Searches JScrollPane in container.static JScrollPanefindJScrollPane(Container cont, ComponentChooser chooser) Searches 0'th JScrollPane in container.static JScrollPanefindJScrollPane(Container cont, ComponentChooser chooser, int index) Searches JScrollPane in container.static JScrollPaneSearches JScrollPane object which component lies on.static JScrollPanefindJScrollPaneUnder(Component comp, ComponentChooser chooser) Searches JScrollPane object which component lies on.MapsJScrollPane.getColumnHeader()through queueMapsJScrollPane.getCorner(String)through queueMapsJScrollPane.getHorizontalScrollBar()through queueintMapsJScrollPane.getHorizontalScrollBarPolicy()through queueReturns operator used for horizontal scrollbar.Returns print output streams or writers.MapsJScrollPane.getRowHeader()through queueReturn current timeouts.getUI()MapsJScrollPane.getUI()through queueMapsJScrollPane.getVerticalScrollBar()through queueintMapsJScrollPane.getVerticalScrollBarPolicy()through queueMapsJScrollPane.getViewport()through queueMapsJScrollPane.getViewportBorder()through queueMapsJScrollPane.getViewportBorderBounds()through queueReturns operator used for vertical scrollbar.voidScrolls pane to bottom.voidscrollToComponent(Component comp) Scrolls pane to component on this pane.voidscrollToComponentPoint(Component comp, int x, int y) Scrolls pane to point.voidscrollToComponentRectangle(Component comp, int x, int y, int width, int height) Scrolls pane to rectangle of a component.voidscrollToHorizontalValue(double proportionalValue) Scrolls horizontal scroll bar.voidscrollToHorizontalValue(int value) Scrolls horizontal scroll bar.voidScrolls pane to left.voidScrolls pane to right.voidScrolls pane to top.voidscrollToValues(double proportionalValueX, double proportionalValueY) Scrolls both scroll bars.voidscrollToValues(int valueX, int valueY) Scrolls both scroll bars.voidscrollToVerticalValue(double proportionalValue) Scrolls vertical scroll bar.voidscrollToVerticalValue(int value) Scrolls vertical scroll bar.voidsetColumnHeader(JViewport jViewport) MapsJScrollPane.setColumnHeader(JViewport)through queuevoidsetColumnHeaderView(Component component) MapsJScrollPane.setColumnHeaderView(Component)through queuevoidMapsJScrollPane.setCorner(String, Component)through queuevoidsetHorizontalScrollBar(JScrollBar jScrollBar) MapsJScrollPane.setHorizontalScrollBar(JScrollBar)through queuevoidsetHorizontalScrollBarPolicy(int i) MapsJScrollPane.setHorizontalScrollBarPolicy(int)through queuevoid/////////////////////////////////////////////////////voidsetRowHeader(JViewport jViewport) MapsJScrollPane.setRowHeader(JViewport)through queuevoidsetRowHeaderView(Component component) MapsJScrollPane.setRowHeaderView(Component)through queuevoidsetTimeouts(Timeouts timeouts) Defines current timeouts.voidsetUI(ScrollPaneUI scrollPaneUI) MapsJScrollPane.setUI(ScrollPaneUI)through queuevoidsetValues(int hValue, int vValue) Sets values for both JScrollBars.voidsetVerticalScrollBar(JScrollBar jScrollBar) MapsJScrollPane.setVerticalScrollBar(JScrollBar)through queuevoidsetVerticalScrollBarPolicy(int i) MapsJScrollPane.setVerticalScrollBarPolicy(int)through queuevoidsetViewport(JViewport jViewport) MapsJScrollPane.setViewport(JViewport)through queuevoidsetViewportBorder(Border border) MapsJScrollPane.setViewportBorder(Border)through queuevoidsetViewportView(Component component) MapsJScrollPane.setViewportView(Component)through queuestatic JScrollPanewaitJScrollPane(Container cont) Waits 0'th JScrollPane in container.static JScrollPanewaitJScrollPane(Container cont, int index) Waits JScrollPane in container.static JScrollPanewaitJScrollPane(Container cont, ComponentChooser chooser) Waits 0'th JScrollPane in container.static JScrollPanewaitJScrollPane(Container cont, ComponentChooser chooser, int index) Waits JScrollPane 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, getDump, 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
-
Constructor Details
-
JScrollPaneOperator
-
JScrollPaneOperator
Constructs a JScrollPaneOperator object.- Parameters:
cont- a containerchooser- a component chooser specifying searching criteria.index- an index between appropriate ones.
-
JScrollPaneOperator
Constructs a JScrollPaneOperator object.- Parameters:
cont- a containerchooser- a component chooser specifying searching criteria.
-
JScrollPaneOperator
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
-
JScrollPaneOperator
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
-
findJScrollPane
Searches JScrollPane in container.- Parameters:
cont- Container to search component in.chooser- org.netbeans.jemmy.ComponentChooser implementation.index- Ordinal component index.- Returns:
- JScrollPane instance or null if component was not found.
-
findJScrollPane
Searches 0'th JScrollPane in container.- Parameters:
cont- Container to search component in.chooser- org.netbeans.jemmy.ComponentChooser implementation.- Returns:
- JScrollPane instance or null if component was not found.
-
findJScrollPane
Searches JScrollPane in container.- Parameters:
cont- Container to search component in.index- Ordinal component index.- Returns:
- JScrollPane instance or null if component was not found.
-
findJScrollPane
Searches 0'th JScrollPane in container.- Parameters:
cont- Container to search component in.- Returns:
- JScrollPane instance or null if component was not found.
-
findJScrollPaneUnder
Searches JScrollPane object which component lies on.- Parameters:
comp- Component to find JScrollPane under.chooser- org.netbeans.jemmy.ComponentChooser implementation.- Returns:
- JScrollPane instance or null if component was not found.
-
findJScrollPaneUnder
Searches JScrollPane object which component lies on.- Parameters:
comp- Component to find JScrollPane under.- Returns:
- JScrollPane instance or null if component was not found.
-
waitJScrollPane
Waits JScrollPane in container.- Parameters:
cont- Container to search component in.chooser- org.netbeans.jemmy.ComponentChooser implementation.index- Ordinal component index.- Returns:
- JScrollPane instance or null if component was not displayed.
- Throws:
TimeoutExpiredException
-
waitJScrollPane
Waits 0'th JScrollPane in container.- Parameters:
cont- Container to search component in.chooser- org.netbeans.jemmy.ComponentChooser implementation.- Returns:
- JScrollPane instance or null if component was not displayed.
- Throws:
TimeoutExpiredException
-
waitJScrollPane
Waits JScrollPane in container.- Parameters:
cont- Container to search component in.index- Ordinal component index.- Returns:
- JScrollPane instance or null if component was not displayed.
- Throws:
TimeoutExpiredException
-
waitJScrollPane
Waits 0'th JScrollPane in container.- Parameters:
cont- Container to search component in.- Returns:
- JScrollPane instance or null if component was not displayed.
- Throws:
TimeoutExpiredException
-
setValues
public void setValues(int hValue, int vValue) Sets values for both JScrollBars.- Parameters:
hValue- a value for the horizontal scrollbar.vValue- a value for the vertical scrollbar.
-
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:
-
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:
-
scrollToHorizontalValue
public void scrollToHorizontalValue(int value) Scrolls horizontal scroll bar.- Parameters:
value- Value to scroll horizontal scroll bar to.- Throws:
TimeoutExpiredException
-
scrollToHorizontalValue
public void scrollToHorizontalValue(double proportionalValue) Scrolls horizontal scroll bar.- Parameters:
proportionalValue- Proportional value to scroll horizontal scroll bar to.- Throws:
TimeoutExpiredException
-
scrollToVerticalValue
public void scrollToVerticalValue(int value) Scrolls vertical scroll bar.- Parameters:
value- Value to scroll vertical scroll bar to.- Throws:
TimeoutExpiredException
-
scrollToVerticalValue
public void scrollToVerticalValue(double proportionalValue) Scrolls vertical scroll bar.- Parameters:
proportionalValue- Value to scroll vertical scroll bar to.- Throws:
TimeoutExpiredException
-
scrollToValues
public void scrollToValues(int valueX, int valueY) Scrolls both scroll bars.- Parameters:
valueX- Value to scroll horizontal scroll bar to.valueY- Value to scroll vertical scroll bar to.- Throws:
TimeoutExpiredException
-
scrollToValues
public void scrollToValues(double proportionalValueX, double proportionalValueY) Scrolls both scroll bars.- Parameters:
proportionalValueX- Value to scroll horizontal scroll bar to.proportionalValueY- Value to scroll vertical scroll bar to.- Throws:
TimeoutExpiredException
-
scrollToTop
-
scrollToBottom
-
scrollToLeft
-
scrollToRight
-
scrollToComponentRectangle
Scrolls pane to rectangle of a component.- Parameters:
comp- a subcomponent defining coordinate system.x- coordinatey- coordinatewidth- rectangle widthheight- rectangle height- Throws:
TimeoutExpiredException
-
scrollToComponentPoint
Scrolls pane to point.- Parameters:
comp- a subcomponent defining coordinate system.x- coordinatey- coordinate- Throws:
TimeoutExpiredException
-
scrollToComponent
Scrolls pane to component on this pane. Component should lay on the JScrollPane view.- Parameters:
comp- Component to scroll to.- Throws:
TimeoutExpiredException
-
getHScrollBarOperator
Returns operator used for horizontal scrollbar.- Returns:
- an operator for the horizontal scrollbar.
-
getVScrollBarOperator
Returns operator used for vertical scrollbar.- Returns:
- an operator for the vertical scrollbar.
-
checkInside
Checks if component's rectangle is inside view port (no scrolling necessary).- Parameters:
comp- a subcomponent defining coordinate system.x- coordinatey- coordinatewidth- rectangle widthheight- rectangle height- Returns:
- true if pointed subcomponent rectangle is inside the scrolling area.
-
checkInside
Checks if component is inside view port (no scrolling necessary).- Parameters:
comp- a subcomponent- Returns:
- true if pointed subcomponent is inside the scrolling area.
-
createHorizontalScrollBar
MapsJScrollPane.createHorizontalScrollBar()through queue -
createVerticalScrollBar
MapsJScrollPane.createVerticalScrollBar()through queue -
getColumnHeader
MapsJScrollPane.getColumnHeader()through queue -
getCorner
-
getHorizontalScrollBar
MapsJScrollPane.getHorizontalScrollBar()through queue -
getHorizontalScrollBarPolicy
public int getHorizontalScrollBarPolicy()MapsJScrollPane.getHorizontalScrollBarPolicy()through queue -
getRowHeader
MapsJScrollPane.getRowHeader()through queue -
getUI
MapsJScrollPane.getUI()through queue -
getVerticalScrollBar
MapsJScrollPane.getVerticalScrollBar()through queue -
getVerticalScrollBarPolicy
public int getVerticalScrollBarPolicy()MapsJScrollPane.getVerticalScrollBarPolicy()through queue -
getViewport
MapsJScrollPane.getViewport()through queue -
getViewportBorder
MapsJScrollPane.getViewportBorder()through queue -
getViewportBorderBounds
MapsJScrollPane.getViewportBorderBounds()through queue -
setColumnHeader
MapsJScrollPane.setColumnHeader(JViewport)through queue -
setColumnHeaderView
MapsJScrollPane.setColumnHeaderView(Component)through queue -
setCorner
-
setHorizontalScrollBar
MapsJScrollPane.setHorizontalScrollBar(JScrollBar)through queue -
setHorizontalScrollBarPolicy
public void setHorizontalScrollBarPolicy(int i) MapsJScrollPane.setHorizontalScrollBarPolicy(int)through queue -
setRowHeader
MapsJScrollPane.setRowHeader(JViewport)through queue -
setRowHeaderView
MapsJScrollPane.setRowHeaderView(Component)through queue -
setUI
MapsJScrollPane.setUI(ScrollPaneUI)through queue -
setVerticalScrollBar
MapsJScrollPane.setVerticalScrollBar(JScrollBar)through queue -
setVerticalScrollBarPolicy
public void setVerticalScrollBarPolicy(int i) MapsJScrollPane.setVerticalScrollBarPolicy(int)through queue -
setViewport
MapsJScrollPane.setViewport(JViewport)through queue -
setViewportBorder
MapsJScrollPane.setViewportBorder(Border)through queue -
setViewportView
MapsJScrollPane.setViewportView(Component)through queue
-