Class JTreeOperator
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.JTreeOperator
- All Implemented Interfaces:
Outputable, Timeoutable
Timeouts used:
JTreeOperator.WaitNodeExpandedTimeout - time to wait node expanded
JTreeOperator.WaitNodeCollapsedTimeout - time to wait node collapsed
JTreeOperator.WaitAfterNodeExpandedTimeout - time to to sleep after node expanded
JTreeOperator.WaitNextNodeTimeout - time to wait next node displayed
JTreeOperator.WaitNodeVisibleTimeout - time to wait node visible
JTreeOperator.BeforeEditTimeout - time to sleep before edit click
JTreeOperator.WaitEditingTimeout - time to wait node editing
ComponentOperator.WaitComponentTimeout - time to wait component displayed
ComponentOperator.WaitStateTimeout - time to wait for path to be expanded, collapsed, selected, time to wait for a text in a row
WindowWaiter.WaitWindowTimeout - time to wait popup window displayed
JScrollBarOperator.WholeScrollTimeout - time for the whole scrolling
.
- Author:
- Alexandre Iline (alexandre.iline@sun.com)
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAllows to find component by node text.static classChecks component type.classCan be throught during item selecting if list does not have item requested.static interfaceSpecifies criteria for path searching.static interfaceIterface to choose tree row.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 "node" properties.static final StringIdentifier for a "root" property.static final StringIdentifier for a "first selected" property.static final StringIdentifier for a "last selected" 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.JTreeOperator(ContainerOperator cont, int index) Constructor.JTreeOperator(ContainerOperator cont, String text) Constructor.JTreeOperator(ContainerOperator cont, String text, int index) Constructor.JTreeOperator(ContainerOperator cont, String text, int row, int index) Constructor.JTreeOperator(ContainerOperator cont, ComponentChooser chooser) Constructs a JTreeOperator object.JTreeOperator(ContainerOperator cont, ComponentChooser chooser, int index) Constructs a JTreeOperator object. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSelectionInterval(int i, int i1) MapsJTree.addSelectionInterval(int, int)through queuevoidaddSelectionPath(TreePath treePath) MapsJTree.addSelectionPath(TreePath)through queuevoidaddSelectionPaths(TreePath[] treePath) MapsJTree.addSelectionPaths(TreePath[])through queuevoidaddSelectionRow(int i) MapsJTree.addSelectionRow(int)through queuevoidaddSelectionRows(int[] i) MapsJTree.addSelectionRows(int[])through queuevoidaddTreeExpansionListener(TreeExpansionListener treeExpansionListener) MapsJTree.addTreeExpansionListener(TreeExpansionListener)through queuevoidaddTreeSelectionListener(TreeSelectionListener treeSelectionListener) MapsJTree.addTreeSelectionListener(TreeSelectionListener)through queuevoidaddTreeWillExpandListener(TreeWillExpandListener treeWillExpandListener) MapsJTree.addTreeWillExpandListener(TreeWillExpandListener)through queuecallPopupOnPath(TreePath path) Calls popup on the specified path.callPopupOnPath(TreePath path, int mouseButton) Calls popup on the specified path.callPopupOnPaths(TreePath[] paths) Calls popup on the specified pathes.callPopupOnPaths(TreePath[] paths, int mouseButton) Calls popup on the specified pathes.voidMapsJTree.cancelEditing()through queuevoidchangePathObject(TreePath path, Object newValue) Changes last path component using getCellEditor() editor.voidchangePathText(TreePath path, String newNodeText) Deprecated.Use changePathObject(TreePath, Object) instead.chooseSubnode(Object parent, String text) chooseSubnode(Object parent, String text, int index) chooseSubnode(Object parent, String text, int index, Operator.StringComparator comparator) chooseSubnode(Object parent, String text, Operator.StringComparator comparator) voidMapsJTree.clearSelection()through queuevoidclickForEdit(TreePath path) Turns path to the editing mode.voidclickOnPath(TreePath path) Clicks on the node.voidclickOnPath(TreePath path, int clickCount) Clicks on the node.voidclickOnPath(TreePath path, int clickCount, int mouseButton) Clicks on the node.voidclickOnPath(TreePath path, int clickCount, int mouseButton, int modifiers) Clicks on the node.voidcollapsePath(TreePath treePath) MapsJTree.collapsePath(TreePath)through queuevoidcollapseRow(int i) MapsJTree.collapseRow(int)through queueconvertValueToText(Object object, boolean b, boolean b1, boolean b2, int i, boolean b3) MapsJTree.convertValueToText(Object, boolean, boolean, boolean, int, boolean)through queuevoidcopyEnvironment(Operator anotherOperator) Copies all environment (output, timeouts, visualizer) from another operator.voiddoCollapsePath(TreePath path) Ensures that the node identified by the specified path is collapsed and viewable.voiddoCollapseRow(int row) Ensures that the node in the specified row is collapsed.voiddoExpandPath(TreePath path) Expands path.voiddoExpandRow(int row) Expands path on row.voiddoMakeVisible(TreePath path) Ensures that the node identified by path is currently viewable.voidexpandPath(TreePath treePath) MapsJTree.expandPath(TreePath)through queuevoidexpandRow(int i) MapsJTree.expandRow(int)through queuestatic JTreeSearches JTree by item.static JTreeSearches JTree by item.static JTreefindJTree(Container cont, ComponentChooser chooser) Searches 0'th JTree in container.static JTreefindJTree(Container cont, ComponentChooser chooser, int index) Searches JTree in container.Searches path in tree.Searches path in tree.Deprecated.Use findPath(String[]) or findCellRow(String[], StringComparator)Searches path in tree.Deprecated.Use findPath(String[], int[]) or findCellRow(String[], int[], StringComparator)findPath(String[] names, int[] indexes, Operator.StringComparator comparator) Searches path in tree.findPath(String[] names, Operator.StringComparator comparator) Searches path in tree.Searches path in tree.Deprecated.Use findPath(String, String) or findCellRow(String, String, StringComparator)Searches path in tree.Deprecated.Use findPath(String, String, String) or findCellRow(String, String, String, StringComparator)findPath(String path, String indexes, String delim, Operator.StringComparator comparator) Searches path in tree.findPath(String path, String delim, Operator.StringComparator comparator) Searches path in tree.findPath(String path, Operator.StringComparator comparator) Searches path in tree.findPath(JTreeOperator.TreePathChooser chooser) Searches path in tree.intSearches a row by substring.intDeprecated.Use findRow(String) or findRow(String, StringComparator)intDeprecated.Use findRow(String, int) or findRow(String, StringComparator, int)intSearches index'th row by substring.intfindRow(String item, Operator.StringComparator comparator) Searches a row by substring.intfindRow(String item, Operator.StringComparator comparator, int index) Searches index'th row by substring.intfindRow(ComponentChooser chooser) Searches a row by rendered component.intfindRow(ComponentChooser chooser, int index) Searches index'th row by rendered component.intfindRow(JTreeOperator.TreeRowChooser chooser) Searches a row by row chooser.intfindRow(JTreeOperator.TreeRowChooser chooser, int index) Searches index'th row by row chooser.voidfireTreeCollapsed(TreePath treePath) MapsJTree.fireTreeCollapsed(TreePath)through queuevoidfireTreeExpanded(TreePath treePath) MapsJTree.fireTreeExpanded(TreePath)through queuevoidfireTreeWillCollapse(TreePath treePath) MapsJTree.fireTreeWillCollapse(TreePath)through queuevoidfireTreeWillExpand(TreePath treePath) MapsJTree.fireTreeWillExpand(TreePath)through queueMapsJTree.getCellEditor()through queueMapsJTree.getCellRenderer()through queueReturns node child.intgetChildCount(Object node) Returns number of child.intgetChildCount(TreePath path) Returns number of child.getChildPath(TreePath path, int index) Constructs new path from a path and index's subnode of it last node.TreePath[]getChildPaths(TreePath path) Constructs new paths from a path and all subnodes of it last node.Object[]getChildren(Object node) Returns node children.getClosestPathForLocation(int i, int i1) MapsJTree.getClosestPathForLocation(int, int)through queueintgetClosestRowForLocation(int i, int i1) MapsJTree.getClosestRowForLocation(int, int)through queuegetDump()Returns information about component.MapsJTree.getEditingPath()through queuegetExpandedDescendants(TreePath treePath) MapsJTree.getExpandedDescendants(TreePath)through queuebooleanMapsJTree.getInvokesStopCellEditing()through queueMapsJTree.getLastSelectedPathComponent()through queueMapsJTree.getLeadSelectionPath()through queueintMapsJTree.getLeadSelectionRow()through queueintMapsJTree.getMaxSelectionRow()through queueintMapsJTree.getMinSelectionRow()through queuegetModel()MapsJTree.getModel()through queueReturns print output streams or writers.getPathBounds(TreePath treePath) MapsJTree.getPathBounds(TreePath)through queuegetPathForLocation(int i, int i1) MapsJTree.getPathForLocation(int, int)through queuegetPathForRow(int i) MapsJTree.getPathForRow(int)through queuegetPointToClick(int row) Retuns points which can be used to click on path.getPointToClick(TreePath path) Retuns points which can be used to click on path.MapsJTree.getPreferredScrollableViewportSize()through queuegetRenderedComponent(TreePath path) Ask renderer for component to be displayed.getRenderedComponent(TreePath path, boolean isSelected, boolean isExpanded, boolean cellHasFocus) Ask renderer for component to be displayed.getRoot()Returns the root of the tree.getRowBounds(int i) MapsJTree.getRowBounds(int)through queueintMapsJTree.getRowCount()through queueintgetRowForLocation(int i, int i1) MapsJTree.getRowForLocation(int, int)through queueintgetRowForPath(TreePath treePath) MapsJTree.getRowForPath(TreePath)through queueintMapsJTree.getRowHeight()through queueintgetScrollableBlockIncrement(Rectangle rectangle, int i, int i1) MapsJTree.getScrollableBlockIncrement(Rectangle, int, int)through queuebooleanMapsJTree.getScrollableTracksViewportHeight()through queuebooleanMapsJTree.getScrollableTracksViewportWidth()through queueintgetScrollableUnitIncrement(Rectangle rectangle, int i, int i1) MapsJTree.getScrollableUnitIncrement(Rectangle, int, int)through queuebooleanMapsJTree.getScrollsOnExpand()through queueintMapsJTree.getSelectionCount()through queueMapsJTree.getSelectionModel()through queueMapsJTree.getSelectionPath()through queueTreePath[]MapsJTree.getSelectionPaths()through queueint[]MapsJTree.getSelectionRows()through queuebooleanMapsJTree.getShowsRootHandles()through queueReturn current timeouts.getUI()MapsJTree.getUI()through queueintMapsJTree.getVisibleRowCount()through queuebooleanhasBeenExpanded(TreePath treePath) MapsJTree.hasBeenExpanded(TreePath)through queuebooleanisCollapsed(int i) MapsJTree.isCollapsed(int)through queuebooleanisCollapsed(TreePath treePath) MapsJTree.isCollapsed(TreePath)through queuebooleanMapsJTree.isEditable()through queuebooleanMapsJTree.isEditing()through queuebooleanisExpanded(int i) MapsJTree.isExpanded(int)through queuebooleanisExpanded(TreePath treePath) MapsJTree.isExpanded(TreePath)through queuebooleanMapsJTree.isFixedRowHeight()through queuebooleanMapsJTree.isLargeModel()through queuebooleanisPathEditable(TreePath treePath) MapsJTree.isPathEditable(TreePath)through queuebooleanisPathSelected(TreePath treePath) MapsJTree.isPathSelected(TreePath)through queuebooleanMapsJTree.isRootVisible()through queuebooleanisRowSelected(int i) MapsJTree.isRowSelected(int)through queuebooleanMapsJTree.isSelectionEmpty()through queuebooleanMapsJTree.isVisible(TreePath)through queuevoidmakeVisible(TreePath treePath) MapsJTree.makeVisible(TreePath)through queuevoidremoveSelectionInterval(int i, int i1) MapsJTree.removeSelectionInterval(int, int)through queuevoidremoveSelectionPath(TreePath treePath) MapsJTree.removeSelectionPath(TreePath)through queuevoidremoveSelectionPaths(TreePath[] treePath) MapsJTree.removeSelectionPaths(TreePath[])through queuevoidremoveSelectionRow(int i) MapsJTree.removeSelectionRow(int)through queuevoidremoveSelectionRows(int[] i) MapsJTree.removeSelectionRows(int[])through queuevoidremoveTreeExpansionListener(TreeExpansionListener treeExpansionListener) MapsJTree.removeTreeExpansionListener(TreeExpansionListener)through queuevoidremoveTreeSelectionListener(TreeSelectionListener treeSelectionListener) MapsJTree.removeTreeSelectionListener(TreeSelectionListener)through queuevoidremoveTreeWillExpandListener(TreeWillExpandListener treeWillExpandListener) MapsJTree.removeTreeWillExpandListener(TreeWillExpandListener)through queuevoidscrollPathToVisible(TreePath treePath) MapsJTree.scrollPathToVisible(TreePath)through queuevoidscrollRowToVisible(int i) MapsJTree.scrollRowToVisible(int)through queuevoidscrollToPath(TreePath path) Scrolls to a path if the tree is on a JScrollPane component.voidscrollToRow(int row) Scrolls to a row if the tree is on a JScrollPane component.voidselectPath(TreePath path) Selects the path.voidselectPaths(TreePath[] paths) Selects some pathes.voidselectRow(int row) Selects the node in the specified row.voidsetCellEditor(TreeCellEditor treeCellEditor) MapsJTree.setCellEditor(TreeCellEditor)through queuevoidsetCellRenderer(TreeCellRenderer treeCellRenderer) MapsJTree.setCellRenderer(TreeCellRenderer)through queuevoidsetEditable(boolean b) MapsJTree.setEditable(boolean)through queuevoidsetInvokesStopCellEditing(boolean b) MapsJTree.setInvokesStopCellEditing(boolean)through queuevoidsetLargeModel(boolean b) MapsJTree.setLargeModel(boolean)through queuevoidMapsJTree.setModel(TreeModel)through queuevoid/////////////////////////////////////////////////////voidsetRootVisible(boolean b) MapsJTree.setRootVisible(boolean)through queuevoidsetRowHeight(int i) MapsJTree.setRowHeight(int)through queuevoidsetScrollsOnExpand(boolean b) MapsJTree.setScrollsOnExpand(boolean)through queuevoidsetSelectionInterval(int i, int i1) MapsJTree.setSelectionInterval(int, int)through queuevoidsetSelectionModel(TreeSelectionModel treeSelectionModel) MapsJTree.setSelectionModel(TreeSelectionModel)through queuevoidsetSelectionPath(TreePath treePath) MapsJTree.setSelectionPath(TreePath)through queuevoidsetSelectionPaths(TreePath[] treePath) MapsJTree.setSelectionPaths(TreePath[])through queuevoidsetSelectionRow(int i) MapsJTree.setSelectionRow(int)through queuevoidsetSelectionRows(int[] i) MapsJTree.setSelectionRows(int[])through queuevoidsetShowsRootHandles(boolean b) MapsJTree.setShowsRootHandles(boolean)through queuevoidsetTimeouts(Timeouts times) Defines current timeouts.voidMapsJTree.setUI(TreeUI)through queuevoidsetVisibleRowCount(int i) MapsJTree.setVisibleRowCount(int)through queuevoidstartEditingAtPath(TreePath treePath) MapsJTree.startEditingAtPath(TreePath)through queuebooleanMapsJTree.stopEditing()through queuevoidMapsJTree.treeDidChange()through queuevoidwaitCollapsed(int row) Waits row to be collapsed.voidwaitCollapsed(TreePath path) Waits path to be collapsed.voidwaitExpanded(int row) Waits row to be expanded.voidwaitExpanded(TreePath path) Waits path to be expanded.static JTreeWaits JTree by item.static JTreeWaits JTree by item.static JTreewaitJTree(Container cont, ComponentChooser chooser) Waits 0'th JTree in container.static JTreewaitJTree(Container cont, ComponentChooser chooser, int index) Waits JTree in container.voidWat for text in certain row.voidwaitSelected(int row) Waits row to be selected.voidwaitSelected(int[] rows) Waits rows to be selected.voidwaitSelected(TreePath path) Waits path to be selected.voidwaitSelected(TreePath[] paths) Waits some paths to be selected.voidwaitVisible(TreePath path) Waits path to be visible.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
-
ROOT_DPROP
-
NODE_PREFIX_DPROP
-
SELECTION_FIRST_DPROP
Identifier for a "first selected" property.- See Also:
-
SELECTION_LAST_DPROP
Identifier for a "last selected" property.- See Also:
-
-
Constructor Details
-
JTreeOperator
-
JTreeOperator
Constructs a JTreeOperator object.- Parameters:
cont- a containerchooser- a component chooser specifying searching criteria.index- an index between appropriate ones.
-
JTreeOperator
Constructs a JTreeOperator object.- Parameters:
cont- a containerchooser- a component chooser specifying searching criteria.
-
JTreeOperator
Constructor. Waits component in container first. Uses cont's timeout and output for waiting and to init operator.- Parameters:
cont- a containertext- Text of a row which is currently selected.row- a row index to check text in. If equals to -1, selected row is checked.index- Ordinal component index.- See Also:
-
JTreeOperator
Constructor. Waits component in container first. Uses cont's timeout and output for waiting and to init operator.- Parameters:
cont- a containertext- Text of a row which is currently selected.index- Ordinal component index.- See Also:
-
JTreeOperator
Constructor. Waits component in container first. Uses cont's timeout and output for waiting and to init operator.- Parameters:
cont- a containertext- Text of a row which is currently selected.- See Also:
-
JTreeOperator
Constructor. Waits component in container first. Uses cont's timeout and output for waiting and to init operator.- Parameters:
cont- a containerindex- Ordinal component index.
-
JTreeOperator
Constructor. Waits component in container first. Uses cont's timeout and output for waiting and to init operator.- Parameters:
cont- a container
-
-
Method Details
-
findJTree
Searches JTree in container.- Parameters:
cont- Container to search component in.chooser- org.netbeans.jemmy.ComponentChooser implementation.index- Ordinal component index.- Returns:
- JTree instance or null if component was not found.
-
findJTree
Searches 0'th JTree in container.- Parameters:
cont- Container to search component in.chooser- org.netbeans.jemmy.ComponentChooser implementation.- Returns:
- JTree instance or null if component was not found.
-
findJTree
public static JTree findJTree(Container cont, String text, boolean ce, boolean ccs, int rowIndex, int index) Searches JTree by item.- Parameters:
cont- Container to search component in.text- Item text. If null, contents is not checked.ce- Compare text exactly.ccs- Compare text case sensitively.rowIndex- Index of row to compare text. If -1, selected row is checked.index- Ordinal component index.- Returns:
- JTree instance or null if component was not found.
- See Also:
-
findJTree
Searches JTree by item.- Parameters:
cont- Container to search component in.text- Item text. If null, contents is not checked.ce- Compare text exactly.ccs- Compare text case sensitively.rowIndex- Index of row to compare text. If -1, selected row is checked.- Returns:
- JTree instance or null if component was not found.
- See Also:
-
waitJTree
Waits JTree in container.- Parameters:
cont- Container to search component in.chooser- org.netbeans.jemmy.ComponentChooser implementation.index- Ordinal component index.- Returns:
- JTree instance or null if component was not found.
-
waitJTree
Waits 0'th JTree in container.- Parameters:
cont- Container to search component in.chooser- org.netbeans.jemmy.ComponentChooser implementation.- Returns:
- JTree instance or null if component was not found.
-
waitJTree
public static JTree waitJTree(Container cont, String text, boolean ce, boolean ccs, int rowIndex, int index) Waits JTree by item.- Parameters:
cont- Container to search component in.text- Item text. If null, contents is not checked.ce- Compare text exactly.ccs- Compare text case sensitively.rowIndex- Index of row to compare text. If -1, selected row is checked.index- Ordinal component index.- Returns:
- JTree instance or null if component was not found.
- See Also:
-
waitJTree
Waits JTree by item.- Parameters:
cont- Container to search component in.text- Item text. If null, contents is not checked.ce- Compare text exactly.ccs- Compare text case sensitively.rowIndex- Index of row to compare text. If -1, selected row is checked.- Returns:
- JTree instance or null if component was not found.
- See Also:
-
setTimeouts
Description copied from interface:TimeoutableDefines current timeouts.- Specified by:
setTimeoutsin interfaceTimeoutable- Overrides:
setTimeoutsin classJComponentOperator- Parameters:
times- 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:
-
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.
-
doExpandPath
-
doExpandRow
public void doExpandRow(int row) Expands path on row.- Parameters:
row- a row index to be expanded.
-
doMakeVisible
Ensures that the node identified by path is currently viewable.- Parameters:
path- a path to be made visible.
-
getChildCount
Returns number of child.- Parameters:
node- a node to count children of.- Returns:
- a number of children.
-
getChildren
-
getChild
-
getChildCount
Returns number of child.- Parameters:
path- a path indicating a node to count children of.- Returns:
- a number of children.
-
getChildPath
-
getChildPaths
-
getRoot
-
findPath
Searches path in tree.- Parameters:
chooser- TreePathChooser implementation.- Returns:
- a path fitting the criteria.
- See Also:
-
findRow
Searches index'th row by row chooser.- Parameters:
chooser- a path searching criteria.index- a child index.- Returns:
- Row index or -1 if search was insuccessful.
- See Also:
-
findRow
Searches a row by row chooser.- Parameters:
chooser- a path searching criteria.- Returns:
- Row index or -1 if search was insuccessful.
- See Also:
-
findRow
Searches index'th row by substring.- Parameters:
item- Substring.comparator- a string comparision algorithmindex- an ordinal row index between ones matching the criteria- Returns:
- Row index or -1 if search was insuccessful.
-
findRow
Deprecated.Use findRow(String, int) or findRow(String, StringComparator, int)Searches index'th row by substring.- Parameters:
item- Substring.ce- Compare exactlycc- Compare case sensitivelly.index- an ordinal row index between ones matching the criteria- Returns:
- Row index or -1 if search was insuccessful.
-
findRow
Searches index'th row by substring. Uses StringComparator assigned to this object.- Parameters:
item- Substring.index- an ordinal row index between ones matching the criteria- Returns:
- Row index or -1 if search was insuccessful.
-
findRow
Searches a row by substring.- Parameters:
item- Substring.comparator- a string comparision algorithm- Returns:
- Row index or -1 if search was insuccessful.
-
findRow
Deprecated.Use findRow(String) or findRow(String, StringComparator)Searches a row by substring.- Parameters:
item- Substring.ce- Compare exactlycc- Compare case sensitivelly.- Returns:
- Row index or -1 if search was insuccessful.
-
findRow
Searches a row by substring. Uses StringComparator assigned to this object.- Parameters:
item- Substring.- Returns:
- Row index or -1 if search was insuccessful.
-
findRow
Searches index'th row by rendered component.- Parameters:
chooser- Component checking object.index- an ordinal row index between ones matching the criteria- Returns:
- Row index or -1 if search was insuccessful.
-
findRow
Searches a row by rendered component.- Parameters:
chooser- Component checking object.- Returns:
- Row index or -1 if search was insuccessful.
-
findPath
Searches path in tree. Can be used to find one of the nodes with the same text. Example:
root +-+node | +--subnode +-+node | +--subnode | +--subnode ... String[] names = {"node", "subnode"};TreePath path = findPath(names, indexes, true, true);
int[] indexes = {1, 0};
"path" will points to the second (from the top) "subnode" node.- Parameters:
names- Node texts array.indexes- Nodes indexes.comparator- a string comparision algorithm- Returns:
- a tree path matching the criteria
- See Also:
-
findPath
Deprecated.Use findPath(String[], int[]) or findCellRow(String[], int[], StringComparator)Searches path in tree. Can be used to find one of the nodes with the same text. Example:
root +-+node | +--subnode +-+node | +--subnode | +--subnode ... String[] names = {"node", "subnode"};TreePath path = findPath(names, indexes, true, true);
int[] indexes = {1, 0};
"path" will points to the second (from the top) "subnode" node.- Parameters:
names- Node texts array.indexes- Nodes indexes.ce- Compare exactly.ccs- Compare case sensitively.- Returns:
- a tree path matching the criteria
- See Also:
-
findPath
-
findPath
Searches path in tree.- Parameters:
names- Node texts array.comparator- a string comparision algorithm- Returns:
- a tree path matching the criteria
- See Also:
-
findPath
Deprecated.Use findPath(String[]) or findCellRow(String[], StringComparator)Searches path in tree.- Parameters:
names- Node texts array.ce- Compare exactly.ccs- Compare case sensitively.- Returns:
- a tree path matching the criteria
- See Also:
-
findPath
-
findPath
public TreePath findPath(String path, String indexes, String delim, Operator.StringComparator comparator) Searches path in tree.- Parameters:
path- String representing tree path. Path components should be devided by "delim" parameter.indexes- String representing indexes to search path components. Indexes should be devided by "delim" parameter.delim- Path components delimiter.comparator- a string comparision algorithm- Returns:
- a tree path matching the criteria
- See Also:
-
findPath
Deprecated.Use findPath(String, String, String) or findCellRow(String, String, String, StringComparator)Searches path in tree.- Parameters:
path- String representing tree path. Path components should be devided by "delim" parameter.indexes- String representing indexes to search path components. Indexes should be devided by "delim" parameter.delim- Path components delimiter.ce- Compare exactly.ccs- Compare case sensitively.- Returns:
- a tree path matching the criteria
- See Also:
-
findPath
Searches path in tree. Uses StringComparator assigned to this object.- Parameters:
path- String representing tree path. Path components should be devided by "delim" parameter.indexes- String representing indexes to search path components. Indexes should be devided by "delim" parameter.delim- Path components delimiter.- Returns:
- a tree path matching the criteria
- See Also:
-
findPath
Searches path in tree.- Parameters:
path- String representing tree path. Path components should be devided by "delim" parameter.delim- Path components delimiter.comparator- a string comparision algorithm- Returns:
- a tree path matching the criteria
- See Also:
-
findPath
Searches path in tree.- Parameters:
path- String representing tree path.comparator- a string comparision algorithm- Returns:
- a tree path matching the criteria
- See Also:
-
findPath
Deprecated.Use findPath(String, String) or findCellRow(String, String, StringComparator)Searches path in tree.- Parameters:
path- String representing tree path. Path components should be devided by "delim" parameter.delim- Path components delimiter.ce- Compare exactly.ccs- Compare case sensitively.- Returns:
- a tree path matching the criteria
- See Also:
-
findPath
Searches path in tree. Uses StringComparator assigned to this object.- Parameters:
path- String representing tree path. Path components should be devided by "delim" parameter.delim- Path components delimiter.- Returns:
- a tree path matching the criteria
- See Also:
-
findPath
-
doCollapsePath
Ensures that the node identified by the specified path is collapsed and viewable.- Parameters:
path- a path to collapse.
-
doCollapseRow
public void doCollapseRow(int row) Ensures that the node in the specified row is collapsed.- Parameters:
row- a row index to collapse.
-
selectPath
-
selectRow
public void selectRow(int row) Selects the node in the specified row.- Parameters:
row- an index of row to select.
-
selectPaths
Selects some pathes. If verification mode is on, checks that right paths have been selected.- Parameters:
paths- a paths to select.
-
getPointToClick
-
getPointToClick
Retuns points which can be used to click on path.- Parameters:
row- a row index to click on.- Returns:
- a Point in component's coordinate system.
-
clickOnPath
Clicks on the node.- Parameters:
path- a path to click on.clickCount- a number of clicksmouseButton- InputEvent.BUTTON1/2/3_MASK valuemodifiers- Combination of InputEvent.*_MASK values
-
clickOnPath
Clicks on the node.- Parameters:
path- a path to click on.clickCount- a number of clicksmouseButton- InputEvent.BUTTON1/2/3_MASK value
-
clickOnPath
Clicks on the node.- Parameters:
path- a path to click on.clickCount- a number of clicks
-
clickOnPath
-
callPopupOnPaths
Calls popup on the specified pathes.- Parameters:
paths- an array of paths to select before invoking popup on one of themmouseButton- a mouse button tused to call popup.- Returns:
- an opened popup menu.
-
callPopupOnPaths
Calls popup on the specified pathes.- Parameters:
paths- an array of paths to select before invoking popup on one of them- Returns:
- an opened popup menu.
-
callPopupOnPath
Calls popup on the specified path.- Parameters:
path- a path to invoking popup on.mouseButton- a mouse button tused to call popup.- Returns:
- an opened popup menu.
-
callPopupOnPath
Calls popup on the specified path.- Parameters:
path- a path to invoking popup on.- Returns:
- an opened popup menu.
-
scrollToPath
Scrolls to a path if the tree is on a JScrollPane component.- Parameters:
path- a tree path to scroll to.
-
scrollToRow
public void scrollToRow(int row) Scrolls to a row if the tree is on a JScrollPane component.- Parameters:
row- a row index to scroll to.
-
clickForEdit
Turns path to the editing mode.- Parameters:
path- a tree path to click on.
-
getRenderedComponent
public Component getRenderedComponent(TreePath path, boolean isSelected, boolean isExpanded, boolean cellHasFocus) Ask renderer for component to be displayed.- Parameters:
path- a path indicating the rendered node.isSelected- True if the specified cell is selected.isExpanded- True if the specified cell is expanded.cellHasFocus- True if the specified cell has the focus.- Returns:
- Component to be displayed.
-
getRenderedComponent
Ask renderer for component to be displayed. Uses isPathSelected(TreePath) to determine whether path is selected. Uses isExpanded(TreePath) to determine whether path is expanded.- Parameters:
path- a path indicating the rendered node.- Returns:
- Component to be displayed.
-
changePathText
-
changePathObject
-
waitExpanded
Waits path to be expanded.- Parameters:
path- a path to wait expanded.
-
waitExpanded
public void waitExpanded(int row) Waits row to be expanded.- Parameters:
row- a row index to wait expanded.
-
waitCollapsed
Waits path to be collapsed.- Parameters:
path- a path to wait collapsed.
-
waitCollapsed
public void waitCollapsed(int row) Waits row to be collapsed.- Parameters:
row- a row index to wait collapsed.
-
waitVisible
Waits path to be visible.- Parameters:
path- a path to wait visible.
-
waitSelected
Waits some paths to be selected.- Parameters:
paths- an array of paths to be selected.
-
waitSelected
Waits path to be selected.- Parameters:
path- a tree path to be selected.
-
waitSelected
public void waitSelected(int[] rows) Waits rows to be selected.- Parameters:
rows- an indices of rows to be selected.
-
waitSelected
public void waitSelected(int row) Waits row to be selected.- Parameters:
row- an index of a row to be selected.
-
waitRow
Wat for text in certain row.- Parameters:
rowText- Text to be compared with row text begetComparator()comparator.row- Row index. If -1, selected one is checked.
-
chooseSubnode
public Object chooseSubnode(Object parent, String text, int index, Operator.StringComparator comparator) -
chooseSubnode
-
chooseSubnode
-
chooseSubnode
-
getDump
Returns information about component.- Overrides:
getDumpin classJComponentOperator- Returns:
- a Hashtable containing name-value pairs.
-
addSelectionInterval
public void addSelectionInterval(int i, int i1) MapsJTree.addSelectionInterval(int, int)through queue -
addSelectionPath
MapsJTree.addSelectionPath(TreePath)through queue -
addSelectionPaths
MapsJTree.addSelectionPaths(TreePath[])through queue -
addSelectionRow
public void addSelectionRow(int i) MapsJTree.addSelectionRow(int)through queue -
addSelectionRows
public void addSelectionRows(int[] i) MapsJTree.addSelectionRows(int[])through queue -
addTreeExpansionListener
MapsJTree.addTreeExpansionListener(TreeExpansionListener)through queue -
addTreeSelectionListener
MapsJTree.addTreeSelectionListener(TreeSelectionListener)through queue -
addTreeWillExpandListener
MapsJTree.addTreeWillExpandListener(TreeWillExpandListener)through queue -
cancelEditing
public void cancelEditing()MapsJTree.cancelEditing()through queue -
clearSelection
public void clearSelection()MapsJTree.clearSelection()through queue -
collapsePath
MapsJTree.collapsePath(TreePath)through queue -
collapseRow
public void collapseRow(int i) MapsJTree.collapseRow(int)through queue -
convertValueToText
-
expandPath
MapsJTree.expandPath(TreePath)through queue -
expandRow
public void expandRow(int i) MapsJTree.expandRow(int)through queue -
fireTreeCollapsed
MapsJTree.fireTreeCollapsed(TreePath)through queue -
fireTreeExpanded
MapsJTree.fireTreeExpanded(TreePath)through queue -
fireTreeWillCollapse
MapsJTree.fireTreeWillCollapse(TreePath)through queue -
fireTreeWillExpand
MapsJTree.fireTreeWillExpand(TreePath)through queue -
getCellEditor
MapsJTree.getCellEditor()through queue -
getCellRenderer
MapsJTree.getCellRenderer()through queue -
getClosestPathForLocation
MapsJTree.getClosestPathForLocation(int, int)through queue -
getClosestRowForLocation
public int getClosestRowForLocation(int i, int i1) MapsJTree.getClosestRowForLocation(int, int)through queue -
getEditingPath
MapsJTree.getEditingPath()through queue -
getExpandedDescendants
MapsJTree.getExpandedDescendants(TreePath)through queue -
getInvokesStopCellEditing
public boolean getInvokesStopCellEditing()MapsJTree.getInvokesStopCellEditing()through queue -
getLastSelectedPathComponent
MapsJTree.getLastSelectedPathComponent()through queue -
getLeadSelectionPath
MapsJTree.getLeadSelectionPath()through queue -
getLeadSelectionRow
public int getLeadSelectionRow()MapsJTree.getLeadSelectionRow()through queue -
getMaxSelectionRow
public int getMaxSelectionRow()MapsJTree.getMaxSelectionRow()through queue -
getMinSelectionRow
public int getMinSelectionRow()MapsJTree.getMinSelectionRow()through queue -
getModel
MapsJTree.getModel()through queue -
getPathBounds
-
getPathForLocation
MapsJTree.getPathForLocation(int, int)through queue -
getPathForRow
MapsJTree.getPathForRow(int)through queue -
getPreferredScrollableViewportSize
MapsJTree.getPreferredScrollableViewportSize()through queue -
getRowBounds
MapsJTree.getRowBounds(int)through queue -
getRowCount
public int getRowCount()MapsJTree.getRowCount()through queue -
getRowForLocation
public int getRowForLocation(int i, int i1) MapsJTree.getRowForLocation(int, int)through queue -
getRowForPath
MapsJTree.getRowForPath(TreePath)through queue -
getRowHeight
public int getRowHeight()MapsJTree.getRowHeight()through queue -
getScrollableBlockIncrement
MapsJTree.getScrollableBlockIncrement(Rectangle, int, int)through queue -
getScrollableTracksViewportHeight
public boolean getScrollableTracksViewportHeight()MapsJTree.getScrollableTracksViewportHeight()through queue -
getScrollableTracksViewportWidth
public boolean getScrollableTracksViewportWidth()MapsJTree.getScrollableTracksViewportWidth()through queue -
getScrollableUnitIncrement
MapsJTree.getScrollableUnitIncrement(Rectangle, int, int)through queue -
getScrollsOnExpand
public boolean getScrollsOnExpand()MapsJTree.getScrollsOnExpand()through queue -
getSelectionCount
public int getSelectionCount()MapsJTree.getSelectionCount()through queue -
getSelectionModel
MapsJTree.getSelectionModel()through queue -
getSelectionPath
MapsJTree.getSelectionPath()through queue -
getSelectionPaths
MapsJTree.getSelectionPaths()through queue -
getSelectionRows
public int[] getSelectionRows()MapsJTree.getSelectionRows()through queue -
getShowsRootHandles
public boolean getShowsRootHandles()MapsJTree.getShowsRootHandles()through queue -
getUI
MapsJTree.getUI()through queue -
getVisibleRowCount
public int getVisibleRowCount()MapsJTree.getVisibleRowCount()through queue -
hasBeenExpanded
MapsJTree.hasBeenExpanded(TreePath)through queue -
isCollapsed
public boolean isCollapsed(int i) MapsJTree.isCollapsed(int)through queue -
isCollapsed
MapsJTree.isCollapsed(TreePath)through queue -
isEditable
public boolean isEditable()MapsJTree.isEditable()through queue -
isEditing
public boolean isEditing()MapsJTree.isEditing()through queue -
isExpanded
public boolean isExpanded(int i) MapsJTree.isExpanded(int)through queue -
isExpanded
MapsJTree.isExpanded(TreePath)through queue -
isFixedRowHeight
public boolean isFixedRowHeight()MapsJTree.isFixedRowHeight()through queue -
isLargeModel
public boolean isLargeModel()MapsJTree.isLargeModel()through queue -
isPathEditable
MapsJTree.isPathEditable(TreePath)through queue -
isPathSelected
MapsJTree.isPathSelected(TreePath)through queue -
isRootVisible
public boolean isRootVisible()MapsJTree.isRootVisible()through queue -
isRowSelected
public boolean isRowSelected(int i) MapsJTree.isRowSelected(int)through queue -
isSelectionEmpty
public boolean isSelectionEmpty()MapsJTree.isSelectionEmpty()through queue -
isVisible
MapsJTree.isVisible(TreePath)through queue -
makeVisible
MapsJTree.makeVisible(TreePath)through queue -
removeSelectionInterval
public void removeSelectionInterval(int i, int i1) MapsJTree.removeSelectionInterval(int, int)through queue -
removeSelectionPath
MapsJTree.removeSelectionPath(TreePath)through queue -
removeSelectionPaths
MapsJTree.removeSelectionPaths(TreePath[])through queue -
removeSelectionRow
public void removeSelectionRow(int i) MapsJTree.removeSelectionRow(int)through queue -
removeSelectionRows
public void removeSelectionRows(int[] i) MapsJTree.removeSelectionRows(int[])through queue -
removeTreeExpansionListener
MapsJTree.removeTreeExpansionListener(TreeExpansionListener)through queue -
removeTreeSelectionListener
MapsJTree.removeTreeSelectionListener(TreeSelectionListener)through queue -
removeTreeWillExpandListener
MapsJTree.removeTreeWillExpandListener(TreeWillExpandListener)through queue -
scrollPathToVisible
MapsJTree.scrollPathToVisible(TreePath)through queue -
scrollRowToVisible
public void scrollRowToVisible(int i) MapsJTree.scrollRowToVisible(int)through queue -
setCellEditor
MapsJTree.setCellEditor(TreeCellEditor)through queue -
setCellRenderer
MapsJTree.setCellRenderer(TreeCellRenderer)through queue -
setEditable
public void setEditable(boolean b) MapsJTree.setEditable(boolean)through queue -
setInvokesStopCellEditing
public void setInvokesStopCellEditing(boolean b) MapsJTree.setInvokesStopCellEditing(boolean)through queue -
setLargeModel
public void setLargeModel(boolean b) MapsJTree.setLargeModel(boolean)through queue -
setModel
MapsJTree.setModel(TreeModel)through queue -
setRootVisible
public void setRootVisible(boolean b) MapsJTree.setRootVisible(boolean)through queue -
setRowHeight
public void setRowHeight(int i) MapsJTree.setRowHeight(int)through queue -
setScrollsOnExpand
public void setScrollsOnExpand(boolean b) MapsJTree.setScrollsOnExpand(boolean)through queue -
setSelectionInterval
public void setSelectionInterval(int i, int i1) MapsJTree.setSelectionInterval(int, int)through queue -
setSelectionModel
MapsJTree.setSelectionModel(TreeSelectionModel)through queue -
setSelectionPath
MapsJTree.setSelectionPath(TreePath)through queue -
setSelectionPaths
MapsJTree.setSelectionPaths(TreePath[])through queue -
setSelectionRow
public void setSelectionRow(int i) MapsJTree.setSelectionRow(int)through queue -
setSelectionRows
public void setSelectionRows(int[] i) MapsJTree.setSelectionRows(int[])through queue -
setShowsRootHandles
public void setShowsRootHandles(boolean b) MapsJTree.setShowsRootHandles(boolean)through queue -
setUI
MapsJTree.setUI(TreeUI)through queue -
setVisibleRowCount
public void setVisibleRowCount(int i) MapsJTree.setVisibleRowCount(int)through queue -
startEditingAtPath
MapsJTree.startEditingAtPath(TreePath)through queue -
stopEditing
public boolean stopEditing()MapsJTree.stopEditing()through queue -
treeDidChange
public void treeDidChange()MapsJTree.treeDidChange()through queue
-