org.netbeans.jemmy.operators
Class JTreeOperator

java.lang.Object
  extended by org.netbeans.jemmy.operators.Operator
      extended by org.netbeans.jemmy.operators.ComponentOperator
          extended by org.netbeans.jemmy.operators.ContainerOperator
              extended by org.netbeans.jemmy.operators.JComponentOperator
                  extended by org.netbeans.jemmy.operators.JTreeOperator
All Implemented Interfaces:
Outputable, Timeoutable

public class JTreeOperator
extends JComponentOperator
implements Timeoutable, Outputable



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:
Timeouts

Nested Class Summary
static class JTreeOperator.JTreeByItemFinder
          Allows to find component by node text.
static class JTreeOperator.JTreeFinder
          Checks component type.
 class JTreeOperator.NoSuchPathException
          Can be throught during item selecting if list does not have item requested.
static interface JTreeOperator.TreePathChooser
          Specifies criteria for path searching.
static interface JTreeOperator.TreeRowChooser
          Iterface to choose tree row.
 
Nested classes/interfaces inherited from class org.netbeans.jemmy.operators.JComponentOperator
JComponentOperator.JComponentByTipFinder, JComponentOperator.JComponentFinder
 
Nested classes/interfaces inherited from class org.netbeans.jemmy.operators.ContainerOperator
ContainerOperator.ContainerFinder
 
Nested classes/interfaces inherited from class org.netbeans.jemmy.operators.Operator
Operator.ComponentVisualizer, Operator.DefaultPathParser, Operator.DefaultStringComparator, Operator.Finder, Operator.MapAction, Operator.MapBooleanAction, Operator.MapByteAction, Operator.MapDoubleAction, Operator.MapFloatAction, Operator.MapCharacterAction, Operator.MapIntegerAction, Operator.MapLongAction, Operator.MapVoidAction, Operator.NoBlockingAction, Operator.PathParser, Operator.StringComparator
 
Field Summary
static java.lang.String NODE_PREFIX_DPROP
          Identifier for a "node" properties.
static java.lang.String ROOT_DPROP
          Identifier for a "root" property.
static java.lang.String SELECTION_FIRST_DPROP
          Identifier for a "first selected" property.
static java.lang.String SELECTION_LAST_DPROP
          Identifier for a "last selected" property.
 
Fields inherited from class org.netbeans.jemmy.operators.JComponentOperator
A11Y_DATA, A11Y_DESCRIPTION_DPROP, A11Y_NAME_DPROP, TOOLTIP_TEXT_DPROP
 
Fields inherited from class org.netbeans.jemmy.operators.ComponentOperator
HEIGHT_DPROP, IS_SHOWING_DPROP, IS_VISIBLE_DPROP, NAME_DPROP, WIDTH_DPROP, X_DPROP, Y_DPROP
 
Fields inherited from class org.netbeans.jemmy.operators.Operator
CLASS_DPROP, TO_STRING_DPROP
 
Constructor Summary
JTreeOperator(ContainerOperator cont)
          Constructor.
JTreeOperator(ContainerOperator cont, ComponentChooser chooser)
          Constructs a JTreeOperator object.
JTreeOperator(ContainerOperator cont, ComponentChooser chooser, int index)
          Constructs a JTreeOperator object.
JTreeOperator(ContainerOperator cont, int index)
          Constructor.
JTreeOperator(ContainerOperator cont, java.lang.String text)
          Constructor.
JTreeOperator(ContainerOperator cont, java.lang.String text, int index)
          Constructor.
JTreeOperator(ContainerOperator cont, java.lang.String text, int row, int index)
          Constructor.
JTreeOperator(javax.swing.JTree b)
          Constructor.
 
Method Summary
 void addSelectionInterval(int i, int i1)
          Maps JTree.addSelectionInterval(int, int) through queue
 void addSelectionPath(javax.swing.tree.TreePath treePath)
          Maps JTree.addSelectionPath(TreePath) through queue
 void addSelectionPaths(javax.swing.tree.TreePath[] treePath)
          Maps JTree.addSelectionPaths(TreePath[]) through queue
 void addSelectionRow(int i)
          Maps JTree.addSelectionRow(int) through queue
 void addSelectionRows(int[] i)
          Maps JTree.addSelectionRows(int[]) through queue
 void addTreeExpansionListener(javax.swing.event.TreeExpansionListener treeExpansionListener)
          Maps JTree.addTreeExpansionListener(TreeExpansionListener) through queue
 void addTreeSelectionListener(javax.swing.event.TreeSelectionListener treeSelectionListener)
          Maps JTree.addTreeSelectionListener(TreeSelectionListener) through queue
 void addTreeWillExpandListener(javax.swing.event.TreeWillExpandListener treeWillExpandListener)
          Maps JTree.addTreeWillExpandListener(TreeWillExpandListener) through queue
 javax.swing.JPopupMenu callPopupOnPath(javax.swing.tree.TreePath path)
          Calls popup on the specified path.
 javax.swing.JPopupMenu callPopupOnPath(javax.swing.tree.TreePath path, int mouseButton)
          Calls popup on the specified path.
 javax.swing.JPopupMenu callPopupOnPaths(javax.swing.tree.TreePath[] paths)
          Calls popup on the specified pathes.
 javax.swing.JPopupMenu callPopupOnPaths(javax.swing.tree.TreePath[] paths, int mouseButton)
          Calls popup on the specified pathes.
 void cancelEditing()
          Maps JTree.cancelEditing() through queue
 void clearSelection()
          Maps JTree.clearSelection() through queue
 void clickForEdit(javax.swing.tree.TreePath path)
          Turns path to the editing mode.
 void clickOnPath(javax.swing.tree.TreePath path)
          Clicks on the node.
 void clickOnPath(javax.swing.tree.TreePath path, int clickCount)
          Clicks on the node.
 void clickOnPath(javax.swing.tree.TreePath path, int clickCount, int mouseButton)
          Clicks on the node.
 void clickOnPath(javax.swing.tree.TreePath path, int clickCount, int mouseButton, int modifiers)
          Clicks on the node.
 void collapsePath(javax.swing.tree.TreePath treePath)
          Maps JTree.collapsePath(TreePath) through queue
 void collapseRow(int i)
          Maps JTree.collapseRow(int) through queue
 java.lang.String convertValueToText(java.lang.Object object, boolean b, boolean b1, boolean b2, int i, boolean b3)
          Maps JTree.convertValueToText(Object, boolean, boolean, boolean, int, boolean) through queue
 void copyEnvironment(Operator anotherOperator)
          Copies all environment (output, timeouts, visualizer) from another operator.
 void doCollapsePath(javax.swing.tree.TreePath path)
          Ensures that the node identified by the specified path is collapsed and viewable.
 void doCollapseRow(int row)
          Ensures that the node in the specified row is collapsed.
 void doExpandPath(javax.swing.tree.TreePath path)
          Expands path.
 void doExpandRow(int row)
          Expands path on row.
 void doMakeVisible(javax.swing.tree.TreePath path)
          Ensures that the node identified by path is currently viewable.
 void expandPath(javax.swing.tree.TreePath treePath)
          Maps JTree.expandPath(TreePath) through queue
 void expandRow(int i)
          Maps JTree.expandRow(int) through queue
static javax.swing.JTree findJTree(java.awt.Container cont, ComponentChooser chooser)
          Searches 0'th JTree in container.
static javax.swing.JTree findJTree(java.awt.Container cont, ComponentChooser chooser, int index)
          Searches JTree in container.
static javax.swing.JTree findJTree(java.awt.Container cont, java.lang.String text, boolean ce, boolean ccs, int rowIndex)
          Searches JTree by item.
static javax.swing.JTree findJTree(java.awt.Container cont, java.lang.String text, boolean ce, boolean ccs, int rowIndex, int index)
          Searches JTree by item.
 javax.swing.tree.TreePath findPath(JTreeOperator.TreePathChooser chooser)
          Searches path in tree.
 javax.swing.tree.TreePath findPath(java.lang.String path)
          Searches path in tree.
 javax.swing.tree.TreePath findPath(java.lang.String[] names)
          Searches path in tree.
 javax.swing.tree.TreePath findPath(java.lang.String[] names, boolean ce, boolean ccs)
          Deprecated. Use findPath(String[]) or findCellRow(String[], StringComparator)
 javax.swing.tree.TreePath findPath(java.lang.String[] names, int[] indexes)
          Searches path in tree.
 javax.swing.tree.TreePath findPath(java.lang.String[] names, int[] indexes, boolean ce, boolean ccs)
          Deprecated. Use findPath(String[], int[]) or findCellRow(String[], int[], StringComparator)
 javax.swing.tree.TreePath findPath(java.lang.String[] names, int[] indexes, Operator.StringComparator comparator)
          Searches path in tree.
 javax.swing.tree.TreePath findPath(java.lang.String[] names, Operator.StringComparator comparator)
          Searches path in tree.
 javax.swing.tree.TreePath findPath(java.lang.String path, Operator.StringComparator comparator)
          Searches path in tree.
 javax.swing.tree.TreePath findPath(java.lang.String path, java.lang.String delim)
          Searches path in tree.
 javax.swing.tree.TreePath findPath(java.lang.String path, java.lang.String delim, boolean ce, boolean ccs)
          Deprecated. Use findPath(String, String) or findCellRow(String, String, StringComparator)
 javax.swing.tree.TreePath findPath(java.lang.String path, java.lang.String delim, Operator.StringComparator comparator)
          Searches path in tree.
 javax.swing.tree.TreePath findPath(java.lang.String path, java.lang.String indexes, java.lang.String delim)
          Searches path in tree.
 javax.swing.tree.TreePath findPath(java.lang.String path, java.lang.String indexes, java.lang.String delim, boolean ce, boolean ccs)
          Deprecated. Use findPath(String, String, String) or findCellRow(String, String, String, StringComparator)
 javax.swing.tree.TreePath findPath(java.lang.String path, java.lang.String indexes, java.lang.String delim, Operator.StringComparator comparator)
          Searches path in tree.
 int findRow(ComponentChooser chooser)
          Searches a row by rendered component.
 int findRow(ComponentChooser chooser, int index)
          Searches index'th row by rendered component.
 int findRow(JTreeOperator.TreeRowChooser chooser)
          Searches a row by row chooser.
 int findRow(JTreeOperator.TreeRowChooser chooser, int index)
          Searches index'th row by row chooser.
 int findRow(java.lang.String item)
          Searches a row by substring.
 int findRow(java.lang.String item, boolean ce, boolean cc)
          Deprecated. Use findRow(String) or findRow(String, StringComparator)
 int findRow(java.lang.String item, boolean ce, boolean cc, int index)
          Deprecated. Use findRow(String, int) or findRow(String, StringComparator, int)
 int findRow(java.lang.String item, int index)
          Searches index'th row by substring.
 int findRow(java.lang.String item, Operator.StringComparator comparator)
          Searches a row by substring.
 int findRow(java.lang.String item, Operator.StringComparator comparator, int index)
          Searches index'th row by substring.
 void fireTreeCollapsed(javax.swing.tree.TreePath treePath)
          Maps JTree.fireTreeCollapsed(TreePath) through queue
 void fireTreeExpanded(javax.swing.tree.TreePath treePath)
          Maps JTree.fireTreeExpanded(TreePath) through queue
 void fireTreeWillCollapse(javax.swing.tree.TreePath treePath)
          Maps JTree.fireTreeWillCollapse(TreePath) through queue
 void fireTreeWillExpand(javax.swing.tree.TreePath treePath)
          Maps JTree.fireTreeWillExpand(TreePath) through queue
 javax.swing.tree.TreeCellEditor getCellEditor()
          Maps JTree.getCellEditor() through queue
 javax.swing.tree.TreeCellRenderer getCellRenderer()
          Maps JTree.getCellRenderer() through queue
 javax.swing.tree.TreePath getClosestPathForLocation(int i, int i1)
          Maps JTree.getClosestPathForLocation(int, int) through queue
 int getClosestRowForLocation(int i, int i1)
          Maps JTree.getClosestRowForLocation(int, int) through queue
 java.util.Hashtable getDump()
          Returns information about component.
 javax.swing.tree.TreePath getEditingPath()
          Maps JTree.getEditingPath() through queue
 java.util.Enumeration getExpandedDescendants(javax.swing.tree.TreePath treePath)
          Maps JTree.getExpandedDescendants(TreePath) through queue
 java.lang.Object getChild(java.lang.Object node, int index)
          Returns node child.
 int getChildCount(java.lang.Object node)
          Returns number of child.
 int getChildCount(javax.swing.tree.TreePath path)
          Returns number of child.
 javax.swing.tree.TreePath getChildPath(javax.swing.tree.TreePath path, int index)
          Constructs new path from a path and index's subnode of it last node.
 javax.swing.tree.TreePath[] getChildPaths(javax.swing.tree.TreePath path)
          Constructs new paths from a path and all subnodes of it last node.
 java.lang.Object[] getChildren(java.lang.Object node)
          Returns node children.
 boolean getInvokesStopCellEditing()
          Maps JTree.getInvokesStopCellEditing() through queue
 java.lang.Object getLastSelectedPathComponent()
          Maps JTree.getLastSelectedPathComponent() through queue
 javax.swing.tree.TreePath getLeadSelectionPath()
          Maps JTree.getLeadSelectionPath() through queue
 int getLeadSelectionRow()
          Maps JTree.getLeadSelectionRow() through queue
 int getMaxSelectionRow()
          Maps JTree.getMaxSelectionRow() through queue
 int getMinSelectionRow()
          Maps JTree.getMinSelectionRow() through queue
 javax.swing.tree.TreeModel getModel()
          Maps JTree.getModel() through queue
 TestOut getOutput()
          Returns print output streams or writers.
 java.awt.Rectangle getPathBounds(javax.swing.tree.TreePath treePath)
          Maps JTree.getPathBounds(TreePath) through queue
 javax.swing.tree.TreePath getPathForLocation(int i, int i1)
          Maps JTree.getPathForLocation(int, int) through queue
 javax.swing.tree.TreePath getPathForRow(int i)
          Maps JTree.getPathForRow(int) through queue
 java.awt.Point getPointToClick(int row)
          Retuns points which can be used to click on path.
 java.awt.Point getPointToClick(javax.swing.tree.TreePath path)
          Retuns points which can be used to click on path.
 java.awt.Dimension getPreferredScrollableViewportSize()
          Maps JTree.getPreferredScrollableViewportSize() through queue
 java.awt.Component getRenderedComponent(javax.swing.tree.TreePath path)
          Ask renderer for component to be displayed.
 java.awt.Component getRenderedComponent(javax.swing.tree.TreePath path, boolean isSelected, boolean isExpanded, boolean cellHasFocus)
          Ask renderer for component to be displayed.
 java.lang.Object getRoot()
          Returns the root of the tree.
 java.awt.Rectangle getRowBounds(int i)
          Maps JTree.getRowBounds(int) through queue
 int getRowCount()
          Maps JTree.getRowCount() through queue
 int getRowForLocation(int i, int i1)
          Maps JTree.getRowForLocation(int, int) through queue
 int getRowForPath(javax.swing.tree.TreePath treePath)
          Maps JTree.getRowForPath(TreePath) through queue
 int getRowHeight()
          Maps JTree.getRowHeight() through queue
 int getScrollableBlockIncrement(java.awt.Rectangle rectangle, int i, int i1)
          Maps JTree.getScrollableBlockIncrement(Rectangle, int, int) through queue
 boolean getScrollableTracksViewportHeight()
          Maps JTree.getScrollableTracksViewportHeight() through queue
 boolean getScrollableTracksViewportWidth()
          Maps JTree.getScrollableTracksViewportWidth() through queue
 int getScrollableUnitIncrement(java.awt.Rectangle rectangle, int i, int i1)
          Maps JTree.getScrollableUnitIncrement(Rectangle, int, int) through queue
 boolean getScrollsOnExpand()
          Maps JTree.getScrollsOnExpand() through queue
 int getSelectionCount()
          Maps JTree.getSelectionCount() through queue
 javax.swing.tree.TreeSelectionModel getSelectionModel()
          Maps JTree.getSelectionModel() through queue
 javax.swing.tree.TreePath getSelectionPath()
          Maps JTree.getSelectionPath() through queue
 javax.swing.tree.TreePath[] getSelectionPaths()
          Maps JTree.getSelectionPaths() through queue
 int[] getSelectionRows()
          Maps JTree.getSelectionRows() through queue
 boolean getShowsRootHandles()
          Maps JTree.getShowsRootHandles() through queue
 Timeouts getTimeouts()
          Return current timeouts.
 javax.swing.plaf.TreeUI getUI()
          Maps JTree.getUI() through queue
 int getVisibleRowCount()
          Maps JTree.getVisibleRowCount() through queue
 boolean hasBeenExpanded(javax.swing.tree.TreePath treePath)
          Maps JTree.hasBeenExpanded(TreePath) through queue
 void changePathObject(javax.swing.tree.TreePath path, java.lang.Object newValue)
          Changes last path component using getCellEditor() editor.
 void changePathText(javax.swing.tree.TreePath path, java.lang.String newNodeText)
          Deprecated. Use changePathObject(TreePath, Object) instead.
 java.lang.Object chooseSubnode(java.lang.Object parent, java.lang.String text)
           
 java.lang.Object chooseSubnode(java.lang.Object parent, java.lang.String text, int index)
           
 java.lang.Object chooseSubnode(java.lang.Object parent, java.lang.String text, int index, Operator.StringComparator comparator)
           
 java.lang.Object chooseSubnode(java.lang.Object parent, java.lang.String text, Operator.StringComparator comparator)
           
 boolean isCollapsed(int i)
          Maps JTree.isCollapsed(int) through queue
 boolean isCollapsed(javax.swing.tree.TreePath treePath)
          Maps JTree.isCollapsed(TreePath) through queue
 boolean isEditable()
          Maps JTree.isEditable() through queue
 boolean isEditing()
          Maps JTree.isEditing() through queue
 boolean isExpanded(int i)
          Maps JTree.isExpanded(int) through queue
 boolean isExpanded(javax.swing.tree.TreePath treePath)
          Maps JTree.isExpanded(TreePath) through queue
 boolean isFixedRowHeight()
          Maps JTree.isFixedRowHeight() through queue
 boolean isLargeModel()
          Maps JTree.isLargeModel() through queue
 boolean isPathEditable(javax.swing.tree.TreePath treePath)
          Maps JTree.isPathEditable(TreePath) through queue
 boolean isPathSelected(javax.swing.tree.TreePath treePath)
          Maps JTree.isPathSelected(TreePath) through queue
 boolean isRootVisible()
          Maps JTree.isRootVisible() through queue
 boolean isRowSelected(int i)
          Maps JTree.isRowSelected(int) through queue
 boolean isSelectionEmpty()
          Maps JTree.isSelectionEmpty() through queue
 boolean isVisible(javax.swing.tree.TreePath treePath)
          Maps JTree.isVisible(TreePath) through queue
 void makeVisible(javax.swing.tree.TreePath treePath)
          Maps JTree.makeVisible(TreePath) through queue
 void removeSelectionInterval(int i, int i1)
          Maps JTree.removeSelectionInterval(int, int) through queue
 void removeSelectionPath(javax.swing.tree.TreePath treePath)
          Maps JTree.removeSelectionPath(TreePath) through queue
 void removeSelectionPaths(javax.swing.tree.TreePath[] treePath)
          Maps JTree.removeSelectionPaths(TreePath[]) through queue
 void removeSelectionRow(int i)
          Maps JTree.removeSelectionRow(int) through queue
 void removeSelectionRows(int[] i)
          Maps JTree.removeSelectionRows(int[]) through queue
 void removeTreeExpansionListener(javax.swing.event.TreeExpansionListener treeExpansionListener)
          Maps JTree.removeTreeExpansionListener(TreeExpansionListener) through queue
 void removeTreeSelectionListener(javax.swing.event.TreeSelectionListener treeSelectionListener)
          Maps JTree.removeTreeSelectionListener(TreeSelectionListener) through queue
 void removeTreeWillExpandListener(javax.swing.event.TreeWillExpandListener treeWillExpandListener)
          Maps JTree.removeTreeWillExpandListener(TreeWillExpandListener) through queue
 void scrollPathToVisible(javax.swing.tree.TreePath treePath)
          Maps JTree.scrollPathToVisible(TreePath) through queue
 void scrollRowToVisible(int i)
          Maps JTree.scrollRowToVisible(int) through queue
 void scrollToPath(javax.swing.tree.TreePath path)
          Scrolls to a path if the tree is on a JScrollPane component.
 void scrollToRow(int row)
          Scrolls to a row if the tree is on a JScrollPane component.
 void selectPath(javax.swing.tree.TreePath path)
          Selects the path.
 void selectPaths(javax.swing.tree.TreePath[] paths)
          Selects some pathes.
 void selectRow(int row)
          Selects the node in the specified row.
 void setCellEditor(javax.swing.tree.TreeCellEditor treeCellEditor)
          Maps JTree.setCellEditor(TreeCellEditor) through queue
 void setCellRenderer(javax.swing.tree.TreeCellRenderer treeCellRenderer)
          Maps JTree.setCellRenderer(TreeCellRenderer) through queue
 void setEditable(boolean b)
          Maps JTree.setEditable(boolean) through queue
 void setInvokesStopCellEditing(boolean b)
          Maps JTree.setInvokesStopCellEditing(boolean) through queue
 void setLargeModel(boolean b)
          Maps JTree.setLargeModel(boolean) through queue
 void setModel(javax.swing.tree.TreeModel treeModel)
          Maps JTree.setModel(TreeModel) through queue
 void setOutput(TestOut out)
          Defines print output streams or writers.
 void setRootVisible(boolean b)
          Maps JTree.setRootVisible(boolean) through queue
 void setRowHeight(int i)
          Maps JTree.setRowHeight(int) through queue
 void setScrollsOnExpand(boolean b)
          Maps JTree.setScrollsOnExpand(boolean) through queue
 void setSelectionInterval(int i, int i1)
          Maps JTree.setSelectionInterval(int, int) through queue
 void setSelectionModel(javax.swing.tree.TreeSelectionModel treeSelectionModel)
          Maps JTree.setSelectionModel(TreeSelectionModel) through queue
 void setSelectionPath(javax.swing.tree.TreePath treePath)
          Maps JTree.setSelectionPath(TreePath) through queue
 void setSelectionPaths(javax.swing.tree.TreePath[] treePath)
          Maps JTree.setSelectionPaths(TreePath[]) through queue
 void setSelectionRow(int i)
          Maps JTree.setSelectionRow(int) through queue
 void setSelectionRows(int[] i)
          Maps JTree.setSelectionRows(int[]) through queue
 void setShowsRootHandles(boolean b)
          Maps JTree.setShowsRootHandles(boolean) through queue
 void setTimeouts(Timeouts times)
          Defines current timeouts.
 void setUI(javax.swing.plaf.TreeUI treeUI)
          Maps JTree.setUI(TreeUI) through queue
 void setVisibleRowCount(int i)
          Maps JTree.setVisibleRowCount(int) through queue
 void startEditingAtPath(javax.swing.tree.TreePath treePath)
          Maps JTree.startEditingAtPath(TreePath) through queue
 boolean stopEditing()
          Maps JTree.stopEditing() through queue
 void treeDidChange()
          Maps JTree.treeDidChange() through queue
 void waitCollapsed(int row)
          Waits row to be collapsed.
 void waitCollapsed(javax.swing.tree.TreePath path)
          Waits path to be collapsed.
 void waitExpanded(int row)
          Waits row to be expanded.
 void waitExpanded(javax.swing.tree.TreePath path)
          Waits path to be expanded.
static javax.swing.JTree waitJTree(java.awt.Container cont, ComponentChooser chooser)
          Waits 0'th JTree in container.
static javax.swing.JTree waitJTree(java.awt.Container cont, ComponentChooser chooser, int index)
          Waits JTree in container.
static javax.swing.JTree waitJTree(java.awt.Container cont, java.lang.String text, boolean ce, boolean ccs, int rowIndex)
          Waits JTree by item.
static javax.swing.JTree waitJTree(java.awt.Container cont, java.lang.String text, boolean ce, boolean ccs, int rowIndex, int index)
          Waits JTree by item.
 void waitRow(java.lang.String rowText, int row)
          Wat for text in certain row.
 void waitSelected(int row)
          Waits row to be selected.
 void waitSelected(int[] rows)
          Waits rows to be selected.
 void waitSelected(javax.swing.tree.TreePath path)
          Waits path to be selected.
 void waitSelected(javax.swing.tree.TreePath[] paths)
          Waits some paths to be selected.
 void waitVisible(javax.swing.tree.TreePath path)
          Waits path to be visible.
 
Methods inherited from class org.netbeans.jemmy.operators.JComponentOperator
addAncestorListener, addVetoableChangeListener, computeVisibleRect, createToolTip, findJComponent, findJComponent, findJComponent, findJComponent, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getActionForKeyStroke, getAutoscrolls, getBorder, getCenterXForClick, getCenterYForClick, getClientProperty, getConditionForKeyStroke, getDebugGraphicsOptions, getInsets, getNextFocusableComponent, getRegisteredKeyStrokes, getRootPane, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getUIClassID, getVisibleRect, getWindowContainerOperator, grabFocus, isFocusCycleRoot, isManagingFocus, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintImmediately, paintImmediately, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, requestDefaultFocus, resetKeyboardActions, revalidate, scrollRectToVisible, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, showToolTip, unregisterKeyboardAction, updateUI, waitJComponent, waitJComponent, waitJComponent, waitJComponent, waitToolTip
 
Methods inherited from class org.netbeans.jemmy.operators.ContainerOperator
add, add, add, add, add, addContainerListener, createSubOperator, createSubOperator, findComponentAt, findComponentAt, findContainer, findContainer, findContainer, findContainer, findContainerUnder, findContainerUnder, findSubComponent, findSubComponent, getComponent, getComponentCount, getComponents, getInsets, getLayout, isAncestorOf, paintComponents, printComponents, remove, remove, removeAll, removeContainerListener, setLayout, waitContainer, waitContainer, waitContainer, waitContainer, waitSubComponent, waitSubComponent
 
Methods inherited from class org.netbeans.jemmy.operators.ComponentOperator
activateWindow, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, 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, checkImage, checkImage, imageUpdate, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, list, list, list, list, list, makeComponentVisible, moveMouse, paint, paintAll, prepareImage, prepareImage, pressKey, pressKey, pressMouse, pressMouse, print, printAll, pushKey, pushKey, releaseKey, releaseKey, releaseMouse, releaseMouse, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, transferFocus, typeKey, typeKey, typeKey, update, validate, waitComponent, waitComponent, waitComponent, waitComponent, waitComponentEnabled, waitComponentShowing, waitComponentVisible, waitHasFocus, wtComponentEnabled
 
Methods inherited from class org.netbeans.jemmy.operators.Operator
addOperatorPackage, addToDump, addToDump, createOperator, getComparator, getDefaultComponentVisualizer, getDefaultMouseButton, getDefaultPathParser, getDefaultStringComparator, getDefaultVerification, getEnvironmentOperator, getCharBindingMap, getCharKey, getCharModifiers, getCharsKeys, getCharsKeys, getCharsModifiers, getCharsModifiers, 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, setComparator, setDefaultComponentVisualizer, setDefaultPathParser, setDefaultStringComparator, setDefaultVerification, setCharBindingMap, setPathParser, setProperties, setVerification, setVisualizer, toStringSource, unlockAndThrow, unlockQueue, waitState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ROOT_DPROP

public static final java.lang.String ROOT_DPROP
Identifier for a "root" property.

See Also:
getDump(), Constant Field Values

NODE_PREFIX_DPROP

public static final java.lang.String NODE_PREFIX_DPROP
Identifier for a "node" properties.

See Also:
getDump(), Constant Field Values

SELECTION_FIRST_DPROP

public static final java.lang.String SELECTION_FIRST_DPROP
Identifier for a "first selected" property.

See Also:
getDump(), Constant Field Values

SELECTION_LAST_DPROP

public static final java.lang.String SELECTION_LAST_DPROP
Identifier for a "last selected" property.

See Also:
getDump(), Constant Field Values
Constructor Detail

JTreeOperator

public JTreeOperator(javax.swing.JTree b)
Constructor.

Parameters:
b - a component

JTreeOperator

public JTreeOperator(ContainerOperator cont,
                     ComponentChooser chooser,
                     int index)
Constructs a JTreeOperator object.

Parameters:
cont - a container
chooser - a component chooser specifying searching criteria.
index - an index between appropriate ones.

JTreeOperator

public JTreeOperator(ContainerOperator cont,
                     ComponentChooser chooser)
Constructs a JTreeOperator object.

Parameters:
cont - a container
chooser - a component chooser specifying searching criteria.

JTreeOperator

public JTreeOperator(ContainerOperator cont,
                     java.lang.String text,
                     int row,
                     int index)
Constructor. Waits component in container first. Uses cont's timeout and output for waiting and to init operator.

Parameters:
cont - a container
text - 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.
Throws:
TimeoutExpiredException
See Also:
Operator.isCaptionEqual(String, String, boolean, boolean)

JTreeOperator

public JTreeOperator(ContainerOperator cont,
                     java.lang.String text,
                     int index)
Constructor. Waits component in container first. Uses cont's timeout and output for waiting and to init operator.

Parameters:
cont - a container
text - Text of a row which is currently selected.
index - Ordinal component index.
Throws:
TimeoutExpiredException
See Also:
Operator.isCaptionEqual(String, String, boolean, boolean)

JTreeOperator

public JTreeOperator(ContainerOperator cont,
                     java.lang.String text)
Constructor. Waits component in container first. Uses cont's timeout and output for waiting and to init operator.

Parameters:
cont - a container
text - Text of a row which is currently selected.
Throws:
TimeoutExpiredException
See Also:
Operator.isCaptionEqual(String, String, boolean, boolean)

JTreeOperator

public JTreeOperator(ContainerOperator cont,
                     int index)
Constructor. Waits component in container first. Uses cont's timeout and output for waiting and to init operator.

Parameters:
cont - a container
index - Ordinal component index.
Throws:
TimeoutExpiredException

JTreeOperator

public JTreeOperator(ContainerOperator cont)
Constructor. Waits component in container first. Uses cont's timeout and output for waiting and to init operator.

Parameters:
cont - a container
Throws:
TimeoutExpiredException
Method Detail

findJTree

public static javax.swing.JTree findJTree(java.awt.Container cont,
                                          ComponentChooser chooser,
                                          int index)
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

public static javax.swing.JTree findJTree(java.awt.Container cont,
                                          ComponentChooser chooser)
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 javax.swing.JTree findJTree(java.awt.Container cont,
                                          java.lang.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:
Operator.isCaptionEqual(String, String, boolean, boolean)

findJTree

public static javax.swing.JTree findJTree(java.awt.Container cont,
                                          java.lang.String text,
                                          boolean ce,
                                          boolean ccs,
                                          int rowIndex)
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:
Operator.isCaptionEqual(String, String, boolean, boolean)

waitJTree

public static javax.swing.JTree waitJTree(java.awt.Container cont,
                                          ComponentChooser chooser,
                                          int index)
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.
Throws:
TimeoutExpiredException

waitJTree

public static javax.swing.JTree waitJTree(java.awt.Container cont,
                                          ComponentChooser chooser)
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.
Throws:
TimeoutExpiredException

waitJTree

public static javax.swing.JTree waitJTree(java.awt.Container cont,
                                          java.lang.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.
Throws:
TimeoutExpiredException
See Also:
Operator.isCaptionEqual(String, String, boolean, boolean)

waitJTree

public static javax.swing.JTree waitJTree(java.awt.Container cont,
                                          java.lang.String text,
                                          boolean ce,
                                          boolean ccs,
                                          int rowIndex)
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.
Throws:
TimeoutExpiredException
See Also:
Operator.isCaptionEqual(String, String, boolean, boolean)

setTimeouts

public void setTimeouts(Timeouts times)
Description copied from interface: Timeoutable
Defines current timeouts.

Specified by:
setTimeouts in interface Timeoutable
Overrides:
setTimeouts in class JComponentOperator
Parameters:
times - A collection of timeout assignments.
See Also:
Timeoutable.getTimeouts()

getTimeouts

public Timeouts getTimeouts()
Description copied from interface: Timeoutable
Return current timeouts.

Specified by:
getTimeouts in interface Timeoutable
Overrides:
getTimeouts in class JComponentOperator
Returns:
the collection of current timeout assignments.
See Also:
Timeoutable.setTimeouts(org.netbeans.jemmy.Timeouts)

setOutput

public void setOutput(TestOut out)
Description copied from interface: Outputable
Defines print output streams or writers.

Specified by:
setOutput in interface Outputable
Overrides:
setOutput in class JComponentOperator
Parameters:
out - Identify the streams or writers used for print output.
See Also:
Outputable.getOutput()

getOutput

public TestOut getOutput()
Description copied from interface: Outputable
Returns print output streams or writers.

Specified by:
getOutput in interface Outputable
Overrides:
getOutput in class JComponentOperator
Returns:
an object that contains references to objects for printing to output and err streams.
See Also:
Outputable.setOutput(org.netbeans.jemmy.TestOut)

copyEnvironment

public void copyEnvironment(Operator anotherOperator)
Description copied from class: Operator
Copies all environment (output, timeouts, visualizer) from another operator.

Overrides:
copyEnvironment in class ComponentOperator
Parameters:
anotherOperator - an operator to copy the environment to.

doExpandPath

public void doExpandPath(javax.swing.tree.TreePath path)
Expands path.

Parameters:
path - a path to be expanded.
Throws:
TimeoutExpiredException

doExpandRow

public void doExpandRow(int row)
Expands path on row.

Parameters:
row - a row index to be expanded.
Throws:
TimeoutExpiredException

doMakeVisible

public void doMakeVisible(javax.swing.tree.TreePath path)
Ensures that the node identified by path is currently viewable.

Parameters:
path - a path to be made visible.
Throws:
TimeoutExpiredException

getChildCount

public int getChildCount(java.lang.Object node)
Returns number of child.

Parameters:
node - a node to count children of.
Returns:
a number of children.

getChildren

public java.lang.Object[] getChildren(java.lang.Object node)
Returns node children.

Parameters:
node - a node to get children of.
Returns:
an array of node children.

getChild

public java.lang.Object getChild(java.lang.Object node,
                                 int index)
Returns node child.

Parameters:
node - a node to get a child of.
index - a child index.
Returns:
a node child.

getChildCount

public int getChildCount(javax.swing.tree.TreePath path)
Returns number of child.

Parameters:
path - a path indicating a node to count children of.
Returns:
a number of children.

getChildPath

public javax.swing.tree.TreePath getChildPath(javax.swing.tree.TreePath path,
                                              int index)
Constructs new path from a path and index's subnode of it last node.

Parameters:
path - a path indicating a node to get a child of.
index - a child node index.
Returns:
a number of children.

getChildPaths

public javax.swing.tree.TreePath[] getChildPaths(javax.swing.tree.TreePath path)
Constructs new paths from a path and all subnodes of it last node.

Parameters:
path - a path indicating a node to get children of.
Returns:
a number of children.

getRoot

public java.lang.Object getRoot()
Returns the root of the tree.

Returns:
tree root.
Throws:
TimeoutExpiredException

findPath

public javax.swing.tree.TreePath findPath(JTreeOperator.TreePathChooser chooser)
Searches path in tree.

Parameters:
chooser - TreePathChooser implementation.
Returns:
a path fitting the criteria.
Throws:
TimeoutExpiredException
See Also:
JTreeOperator.TreePathChooser, findPath(org.netbeans.jemmy.operators.JTreeOperator.TreePathChooser)

findRow

public int findRow(JTreeOperator.TreeRowChooser chooser,
                   int index)
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:
JTreeOperator.TreeRowChooser

findRow

public int findRow(JTreeOperator.TreeRowChooser chooser)
Searches a row by row chooser.

Parameters:
chooser - a path searching criteria.
Returns:
Row index or -1 if search was insuccessful.
See Also:
JTreeOperator.TreeRowChooser

findRow

public int findRow(java.lang.String item,
                   Operator.StringComparator comparator,
                   int index)
Searches index'th row by substring.

Parameters:
item - Substring.
comparator - a string comparision algorithm
index - an ordinal row index between ones matching the criteria
Returns:
Row index or -1 if search was insuccessful.

findRow

public int findRow(java.lang.String item,
                   boolean ce,
                   boolean cc,
                   int index)
Deprecated. Use findRow(String, int) or findRow(String, StringComparator, int)

Searches index'th row by substring.

Parameters:
item - Substring.
ce - Compare exactly
cc - Compare case sensitivelly.
index - an ordinal row index between ones matching the criteria
Returns:
Row index or -1 if search was insuccessful.

findRow

public int findRow(java.lang.String item,
                   int index)
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

public int findRow(java.lang.String item,
                   Operator.StringComparator comparator)
Searches a row by substring.

Parameters:
item - Substring.
comparator - a string comparision algorithm
Returns:
Row index or -1 if search was insuccessful.

findRow

public int findRow(java.lang.String item,
                   boolean ce,
                   boolean cc)
Deprecated. Use findRow(String) or findRow(String, StringComparator)

Searches a row by substring.

Parameters:
item - Substring.
ce - Compare exactly
cc - Compare case sensitivelly.
Returns:
Row index or -1 if search was insuccessful.

findRow

public int findRow(java.lang.String item)
Searches a row by substring. Uses StringComparator assigned to this object.

Parameters:
item - Substring.
Returns:
Row index or -1 if search was insuccessful.

findRow

public int findRow(ComponentChooser chooser,
                   int index)
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

public int findRow(ComponentChooser chooser)
Searches a row by rendered component.

Parameters:
chooser - Component checking object.
Returns:
Row index or -1 if search was insuccessful.

findPath

public javax.swing.tree.TreePath findPath(java.lang.String[] names,
                                          int[] indexes,
                                          Operator.StringComparator comparator)
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"};
int[] indexes = {1, 0};
TreePath path = findPath(names, indexes, true, true);
"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
Throws:
TimeoutExpiredException
See Also:
Operator.isCaptionEqual(String, String, boolean, boolean), findPath(org.netbeans.jemmy.operators.JTreeOperator.TreePathChooser)

findPath

public javax.swing.tree.TreePath findPath(java.lang.String[] names,
                                          int[] indexes,
                                          boolean ce,
                                          boolean ccs)
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"};
int[] indexes = {1, 0};
TreePath path = findPath(names, indexes, true, true);
"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
Throws:
TimeoutExpiredException
See Also:
Operator.isCaptionEqual(String, String, boolean, boolean), findPath(org.netbeans.jemmy.operators.JTreeOperator.TreePathChooser)

findPath

public javax.swing.tree.TreePath findPath(java.lang.String[] names,
                                          int[] indexes)
Searches path in tree. Uses StringComparator assigned to this object.

Parameters:
names - Node texts array.
indexes - Nodes indexes.
Returns:
a tree path matching the criteria
Throws:
TimeoutExpiredException
See Also:
findPath(org.netbeans.jemmy.operators.JTreeOperator.TreePathChooser)

findPath

public javax.swing.tree.TreePath findPath(java.lang.String[] names,
                                          Operator.StringComparator comparator)
Searches path in tree.

Parameters:
names - Node texts array.
comparator - a string comparision algorithm
Returns:
a tree path matching the criteria
Throws:
TimeoutExpiredException
See Also:
Operator.isCaptionEqual(String, String, boolean, boolean), findPath(org.netbeans.jemmy.operators.JTreeOperator.TreePathChooser)

findPath

public javax.swing.tree.TreePath findPath(java.lang.String[] names,
                                          boolean ce,
                                          boolean ccs)
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
Throws:
TimeoutExpiredException
See Also:
Operator.isCaptionEqual(String, String, boolean, boolean), findPath(org.netbeans.jemmy.operators.JTreeOperator.TreePathChooser)

findPath

public javax.swing.tree.TreePath findPath(java.lang.String[] names)
Searches path in tree. Uses StringComparator assigned to this object.

Parameters:
names - Node texts array.
Returns:
a tree path matching the criteria
Throws:
TimeoutExpiredException
See Also:
Operator.isCaptionEqual(String, String, boolean, boolean), findPath(org.netbeans.jemmy.operators.JTreeOperator.TreePathChooser)

findPath

public javax.swing.tree.TreePath findPath(java.lang.String path,
                                          java.lang.String indexes,
                                          java.lang.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
Throws:
TimeoutExpiredException
See Also:
Operator.isCaptionEqual(String, String, boolean, boolean), findPath(org.netbeans.jemmy.operators.JTreeOperator.TreePathChooser)

findPath

public javax.swing.tree.TreePath findPath(java.lang.String path,
                                          java.lang.String indexes,
                                          java.lang.String delim,
                                          boolean ce,
                                          boolean ccs)
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
Throws:
TimeoutExpiredException
See Also:
Operator.isCaptionEqual(String, String, boolean, boolean), findPath(org.netbeans.jemmy.operators.JTreeOperator.TreePathChooser)

findPath

public javax.swing.tree.TreePath findPath(java.lang.String path,
                                          java.lang.String indexes,
                                          java.lang.String delim)
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
Throws:
TimeoutExpiredException
See Also:
findPath(org.netbeans.jemmy.operators.JTreeOperator.TreePathChooser)

findPath

public javax.swing.tree.TreePath findPath(java.lang.String path,
                                          java.lang.String delim,
                                          Operator.StringComparator comparator)
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
Throws:
TimeoutExpiredException
See Also:
Operator.isCaptionEqual(String, String, boolean, boolean), findPath(org.netbeans.jemmy.operators.JTreeOperator.TreePathChooser)

findPath

public javax.swing.tree.TreePath findPath(java.lang.String path,
                                          Operator.StringComparator comparator)
Searches path in tree.

Parameters:
path - String representing tree path.
comparator - a string comparision algorithm
Returns:
a tree path matching the criteria
Throws:
TimeoutExpiredException
See Also:
Operator.isCaptionEqual(String, String, boolean, boolean), findPath(org.netbeans.jemmy.operators.JTreeOperator.TreePathChooser)

findPath

public javax.swing.tree.TreePath findPath(java.lang.String path,
                                          java.lang.String delim,
                                          boolean ce,
                                          boolean ccs)
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
Throws:
TimeoutExpiredException
See Also:
Operator.isCaptionEqual(String, String, boolean, boolean), findPath(org.netbeans.jemmy.operators.JTreeOperator.TreePathChooser)

findPath

public javax.swing.tree.TreePath findPath(java.lang.String path,
                                          java.lang.String delim)
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
Throws:
TimeoutExpiredException
See Also:
findPath(org.netbeans.jemmy.operators.JTreeOperator.TreePathChooser)

findPath

public javax.swing.tree.TreePath findPath(java.lang.String path)
Searches path in tree. Uses StringComparator assigned to this object. Uses PathParser assigned to this object.

Parameters:
path - String representing tree path.
Returns:
a tree path matching the criteria
Throws:
TimeoutExpiredException
See Also:
findPath(org.netbeans.jemmy.operators.JTreeOperator.TreePathChooser)

doCollapsePath

public void doCollapsePath(javax.swing.tree.TreePath path)
Ensures that the node identified by the specified path is collapsed and viewable.

Parameters:
path - a path to collapse.
Throws:
TimeoutExpiredException

doCollapseRow

public void doCollapseRow(int row)
Ensures that the node in the specified row is collapsed.

Parameters:
row - a row index to collapse.
Throws:
TimeoutExpiredException

selectPath

public void selectPath(javax.swing.tree.TreePath path)
Selects the path.

Parameters:
path - a path to select.

selectRow

public void selectRow(int row)
Selects the node in the specified row.

Parameters:
row - an index of row to select.

selectPaths

public void selectPaths(javax.swing.tree.TreePath[] paths)
Selects some pathes. If verification mode is on, checks that right paths have been selected.

Parameters:
paths - a paths to select.

getPointToClick

public java.awt.Point getPointToClick(javax.swing.tree.TreePath path)
Retuns points which can be used to click on path.

Parameters:
path - a tree path to click on.
Returns:
a Point in component's coordinate system.

getPointToClick

public java.awt.Point getPointToClick(int row)
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

public void clickOnPath(javax.swing.tree.TreePath path,
                        int clickCount,
                        int mouseButton,
                        int modifiers)
Clicks on the node.

Parameters:
path - a path to click on.
clickCount - a number of clicks
mouseButton - InputEvent.BUTTON1/2/3_MASK value
modifiers - Combination of InputEvent.*_MASK values
Throws:
TimeoutExpiredException

clickOnPath

public void clickOnPath(javax.swing.tree.TreePath path,
                        int clickCount,
                        int mouseButton)
Clicks on the node.

Parameters:
path - a path to click on.
clickCount - a number of clicks
mouseButton - InputEvent.BUTTON1/2/3_MASK value
Throws:
TimeoutExpiredException

clickOnPath

public void clickOnPath(javax.swing.tree.TreePath path,
                        int clickCount)
Clicks on the node.

Parameters:
path - a path to click on.
clickCount - a number of clicks
Throws:
TimeoutExpiredException

clickOnPath

public void clickOnPath(javax.swing.tree.TreePath path)
Clicks on the node.

Parameters:
path - a path to click on.
Throws:
TimeoutExpiredException

callPopupOnPaths

public javax.swing.JPopupMenu callPopupOnPaths(javax.swing.tree.TreePath[] paths,
                                               int mouseButton)
Calls popup on the specified pathes.

Parameters:
paths - an array of paths to select before invoking popup on one of them
mouseButton - a mouse button tused to call popup.
Returns:
an opened popup menu.
Throws:
TimeoutExpiredException

callPopupOnPaths

public javax.swing.JPopupMenu callPopupOnPaths(javax.swing.tree.TreePath[] paths)
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.
Throws:
TimeoutExpiredException

callPopupOnPath

public javax.swing.JPopupMenu callPopupOnPath(javax.swing.tree.TreePath path,
                                              int mouseButton)
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.
Throws:
TimeoutExpiredException

callPopupOnPath

public javax.swing.JPopupMenu callPopupOnPath(javax.swing.tree.TreePath path)
Calls popup on the specified path.

Parameters:
path - a path to invoking popup on.
Returns:
an opened popup menu.
Throws:
TimeoutExpiredException

scrollToPath

public void scrollToPath(javax.swing.tree.TreePath path)
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

public void clickForEdit(javax.swing.tree.TreePath path)
Turns path to the editing mode.

Parameters:
path - a tree path to click on.
Throws:
TimeoutExpiredException

getRenderedComponent

public java.awt.Component getRenderedComponent(javax.swing.tree.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

public java.awt.Component getRenderedComponent(javax.swing.tree.TreePath path)
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

public void changePathText(javax.swing.tree.TreePath path,
                           java.lang.String newNodeText)
Deprecated. Use changePathObject(TreePath, Object) instead.

Changes text of last path component.

Parameters:
path - a path indicating the node to change value for.
newNodeText - a new node value
Throws:
TimeoutExpiredException
See Also:
changePathObject(TreePath, Object)

changePathObject

public void changePathObject(javax.swing.tree.TreePath path,
                             java.lang.Object newValue)
Changes last path component using getCellEditor() editor.

Parameters:
path - a path indicating the node to change value for.
newValue - a new node value
Throws:
TimeoutExpiredException

waitExpanded

public void waitExpanded(javax.swing.tree.TreePath path)
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

public void waitCollapsed(javax.swing.tree.TreePath path)
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

public void waitVisible(javax.swing.tree.TreePath path)
Waits path to be visible.

Parameters:
path - a path to wait visible.

waitSelected

public void waitSelected(javax.swing.tree.TreePath[] paths)
Waits some paths to be selected.

Parameters:
paths - an array of paths to be selected.

waitSelected

public void waitSelected(javax.swing.tree.TreePath path)
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

public void waitRow(java.lang.String rowText,
                    int row)
Wat for text in certain row.

Parameters:
rowText - Text to be compared with row text be getComparator() comparator.
row - Row index. If -1, selected one is checked.

chooseSubnode

public java.lang.Object chooseSubnode(java.lang.Object parent,
                                      java.lang.String text,
                                      int index,
                                      Operator.StringComparator comparator)

chooseSubnode

public java.lang.Object chooseSubnode(java.lang.Object parent,
                                      java.lang.String text,
                                      Operator.StringComparator comparator)

chooseSubnode

public java.lang.Object chooseSubnode(java.lang.Object parent,
                                      java.lang.String text,
                                      int index)

chooseSubnode

public java.lang.Object chooseSubnode(java.lang.Object parent,
                                      java.lang.String text)

getDump

public java.util.Hashtable getDump()
Returns information about component.

Overrides:
getDump in class JComponentOperator
Returns:
a Hashtable containing name-value pairs.

addSelectionInterval

public void addSelectionInterval(int i,
                                 int i1)
Maps JTree.addSelectionInterval(int, int) through queue


addSelectionPath

public void addSelectionPath(javax.swing.tree.TreePath treePath)
Maps JTree.addSelectionPath(TreePath) through queue


addSelectionPaths

public void addSelectionPaths(javax.swing.tree.TreePath[] treePath)
Maps JTree.addSelectionPaths(TreePath[]) through queue


addSelectionRow

public void addSelectionRow(int i)
Maps JTree.addSelectionRow(int) through queue


addSelectionRows

public void addSelectionRows(int[] i)
Maps JTree.addSelectionRows(int[]) through queue


addTreeExpansionListener

public void addTreeExpansionListener(javax.swing.event.TreeExpansionListener treeExpansionListener)
Maps JTree.addTreeExpansionListener(TreeExpansionListener) through queue


addTreeSelectionListener

public void addTreeSelectionListener(javax.swing.event.TreeSelectionListener treeSelectionListener)
Maps JTree.addTreeSelectionListener(TreeSelectionListener) through queue


addTreeWillExpandListener

public void addTreeWillExpandListener(javax.swing.event.TreeWillExpandListener treeWillExpandListener)
Maps JTree.addTreeWillExpandListener(TreeWillExpandListener) through queue


cancelEditing

public void cancelEditing()
Maps JTree.cancelEditing() through queue


clearSelection

public void clearSelection()
Maps JTree.clearSelection() through queue


collapsePath

public void collapsePath(javax.swing.tree.TreePath treePath)
Maps JTree.collapsePath(TreePath) through queue


collapseRow

public void collapseRow(int i)
Maps JTree.collapseRow(int) through queue


convertValueToText

public java.lang.String convertValueToText(java.lang.Object object,
                                           boolean b,
                                           boolean b1,
                                           boolean b2,
                                           int i,
                                           boolean b3)
Maps JTree.convertValueToText(Object, boolean, boolean, boolean, int, boolean) through queue


expandPath

public void expandPath(javax.swing.tree.TreePath treePath)
Maps JTree.expandPath(TreePath) through queue


expandRow

public void expandRow(int i)
Maps JTree.expandRow(int) through queue


fireTreeCollapsed

public void fireTreeCollapsed(javax.swing.tree.TreePath treePath)
Maps JTree.fireTreeCollapsed(TreePath) through queue


fireTreeExpanded

public void fireTreeExpanded(javax.swing.tree.TreePath treePath)
Maps JTree.fireTreeExpanded(TreePath) through queue


fireTreeWillCollapse

public void fireTreeWillCollapse(javax.swing.tree.TreePath treePath)
Maps JTree.fireTreeWillCollapse(TreePath) through queue


fireTreeWillExpand

public void fireTreeWillExpand(javax.swing.tree.TreePath treePath)
Maps JTree.fireTreeWillExpand(TreePath) through queue


getCellEditor

public javax.swing.tree.TreeCellEditor getCellEditor()
Maps JTree.getCellEditor() through queue


getCellRenderer

public javax.swing.tree.TreeCellRenderer getCellRenderer()
Maps JTree.getCellRenderer() through queue


getClosestPathForLocation

public javax.swing.tree.TreePath getClosestPathForLocation(int i,
                                                           int i1)
Maps JTree.getClosestPathForLocation(int, int) through queue


getClosestRowForLocation

public int getClosestRowForLocation(int i,
                                    int i1)
Maps JTree.getClosestRowForLocation(int, int) through queue


getEditingPath

public javax.swing.tree.TreePath getEditingPath()
Maps JTree.getEditingPath() through queue


getExpandedDescendants

public java.util.Enumeration getExpandedDescendants(javax.swing.tree.TreePath treePath)
Maps JTree.getExpandedDescendants(TreePath) through queue


getInvokesStopCellEditing

public boolean getInvokesStopCellEditing()
Maps JTree.getInvokesStopCellEditing() through queue


getLastSelectedPathComponent

public java.lang.Object getLastSelectedPathComponent()
Maps JTree.getLastSelectedPathComponent() through queue


getLeadSelectionPath

public javax.swing.tree.TreePath getLeadSelectionPath()
Maps JTree.getLeadSelectionPath() through queue


getLeadSelectionRow

public int getLeadSelectionRow()
Maps JTree.getLeadSelectionRow() through queue


getMaxSelectionRow

public int getMaxSelectionRow()
Maps JTree.getMaxSelectionRow() through queue


getMinSelectionRow

public int getMinSelectionRow()
Maps JTree.getMinSelectionRow() through queue


getModel

public javax.swing.tree.TreeModel getModel()
Maps JTree.getModel() through queue


getPathBounds

public java.awt.Rectangle getPathBounds(javax.swing.tree.TreePath treePath)
Maps JTree.getPathBounds(TreePath) through queue


getPathForLocation

public javax.swing.tree.TreePath getPathForLocation(int i,
                                                    int i1)
Maps JTree.getPathForLocation(int, int) through queue


getPathForRow

public javax.swing.tree.TreePath getPathForRow(int i)
Maps JTree.getPathForRow(int) through queue


getPreferredScrollableViewportSize

public java.awt.Dimension getPreferredScrollableViewportSize()
Maps JTree.getPreferredScrollableViewportSize() through queue


getRowBounds

public java.awt.Rectangle getRowBounds(int i)
Maps JTree.getRowBounds(int) through queue


getRowCount

public int getRowCount()
Maps JTree.getRowCount() through queue


getRowForLocation

public int getRowForLocation(int i,
                             int i1)
Maps JTree.getRowForLocation(int, int) through queue


getRowForPath

public int getRowForPath(javax.swing.tree.TreePath treePath)
Maps JTree.getRowForPath(TreePath) through queue


getRowHeight

public int getRowHeight()
Maps JTree.getRowHeight() through queue


getScrollableBlockIncrement

public int getScrollableBlockIncrement(java.awt.Rectangle rectangle,
                                       int i,
                                       int i1)
Maps JTree.getScrollableBlockIncrement(Rectangle, int, int) through queue


getScrollableTracksViewportHeight

public boolean getScrollableTracksViewportHeight()
Maps JTree.getScrollableTracksViewportHeight() through queue


getScrollableTracksViewportWidth

public boolean getScrollableTracksViewportWidth()
Maps JTree.getScrollableTracksViewportWidth() through queue


getScrollableUnitIncrement

public int getScrollableUnitIncrement(java.awt.Rectangle rectangle,
                                      int i,
                                      int i1)
Maps JTree.getScrollableUnitIncrement(Rectangle, int, int) through queue


getScrollsOnExpand

public boolean getScrollsOnExpand()
Maps JTree.getScrollsOnExpand() through queue


getSelectionCount

public int getSelectionCount()
Maps JTree.getSelectionCount() through queue


getSelectionModel

public javax.swing.tree.TreeSelectionModel getSelectionModel()
Maps JTree.getSelectionModel() through queue


getSelectionPath

public javax.swing.tree.TreePath getSelectionPath()
Maps JTree.getSelectionPath() through queue


getSelectionPaths

public javax.swing.tree.TreePath[] getSelectionPaths()
Maps JTree.getSelectionPaths() through queue


getSelectionRows

public int[] getSelectionRows()
Maps JTree.getSelectionRows() through queue


getShowsRootHandles

public boolean getShowsRootHandles()
Maps JTree.getShowsRootHandles() through queue


getUI

public javax.swing.plaf.TreeUI getUI()
Maps JTree.getUI() through queue


getVisibleRowCount

public int getVisibleRowCount()
Maps JTree.getVisibleRowCount() through queue


hasBeenExpanded

public boolean hasBeenExpanded(javax.swing.tree.TreePath treePath)
Maps JTree.hasBeenExpanded(TreePath) through queue


isCollapsed

public boolean isCollapsed(int i)
Maps JTree.isCollapsed(int) through queue


isCollapsed

public boolean isCollapsed(javax.swing.tree.TreePath treePath)
Maps JTree.isCollapsed(TreePath) through queue


isEditable

public boolean isEditable()
Maps JTree.isEditable() through queue


isEditing

public boolean isEditing()
Maps JTree.isEditing() through queue


isExpanded

public boolean isExpanded(int i)
Maps JTree.isExpanded(int) through queue


isExpanded

public boolean isExpanded(javax.swing.tree.TreePath treePath)
Maps JTree.isExpanded(TreePath) through queue


isFixedRowHeight

public boolean isFixedRowHeight()
Maps JTree.isFixedRowHeight() through queue


isLargeModel

public boolean isLargeModel()
Maps JTree.isLargeModel() through queue


isPathEditable

public boolean isPathEditable(javax.swing.tree.TreePath treePath)
Maps JTree.isPathEditable(TreePath) through queue


isPathSelected

public boolean isPathSelected(javax.swing.tree.TreePath treePath)
Maps JTree.isPathSelected(TreePath) through queue


isRootVisible

public boolean isRootVisible()
Maps JTree.isRootVisible() through queue


isRowSelected

public boolean isRowSelected(int i)
Maps JTree.isRowSelected(int) through queue


isSelectionEmpty

public boolean isSelectionEmpty()
Maps JTree.isSelectionEmpty() through queue


isVisible

public boolean isVisible(javax.swing.tree.TreePath treePath)
Maps JTree.isVisible(TreePath) through queue


makeVisible

public void makeVisible(javax.swing.tree.TreePath treePath)
Maps JTree.makeVisible(TreePath) through queue


removeSelectionInterval

public void removeSelectionInterval(int i,
                                    int i1)
Maps JTree.removeSelectionInterval(int, int) through queue


removeSelectionPath

public void removeSelectionPath(javax.swing.tree.TreePath treePath)
Maps JTree.removeSelectionPath(TreePath) through queue


removeSelectionPaths

public void removeSelectionPaths(javax.swing.tree.TreePath[] treePath)
Maps JTree.removeSelectionPaths(TreePath[]) through queue


removeSelectionRow

public void removeSelectionRow(int i)
Maps JTree.removeSelectionRow(int) through queue


removeSelectionRows

public void removeSelectionRows(int[] i)
Maps JTree.removeSelectionRows(int[]) through queue


removeTreeExpansionListener

public void removeTreeExpansionListener(javax.swing.event.TreeExpansionListener treeExpansionListener)
Maps JTree.removeTreeExpansionListener(TreeExpansionListener) through queue


removeTreeSelectionListener

public void removeTreeSelectionListener(javax.swing.event.TreeSelectionListener treeSelectionListener)
Maps JTree.removeTreeSelectionListener(TreeSelectionListener) through queue


removeTreeWillExpandListener

public void removeTreeWillExpandListener(javax.swing.event.TreeWillExpandListener treeWillExpandListener)
Maps JTree.removeTreeWillExpandListener(TreeWillExpandListener) through queue


scrollPathToVisible

public void scrollPathToVisible(javax.swing.tree.TreePath treePath)
Maps JTree.scrollPathToVisible(TreePath) through queue


scrollRowToVisible

public void scrollRowToVisible(int i)
Maps JTree.scrollRowToVisible(int) through queue


setCellEditor

public void setCellEditor(javax.swing.tree.TreeCellEditor treeCellEditor)
Maps JTree.setCellEditor(TreeCellEditor) through queue


setCellRenderer

public void setCellRenderer(javax.swing.tree.TreeCellRenderer treeCellRenderer)
Maps JTree.setCellRenderer(TreeCellRenderer) through queue


setEditable

public void setEditable(boolean b)
Maps JTree.setEditable(boolean) through queue


setInvokesStopCellEditing

public void setInvokesStopCellEditing(boolean b)
Maps JTree.setInvokesStopCellEditing(boolean) through queue


setLargeModel

public void setLargeModel(boolean b)
Maps JTree.setLargeModel(boolean) through queue


setModel

public void setModel(javax.swing.tree.TreeModel treeModel)
Maps JTree.setModel(TreeModel) through queue


setRootVisible

public void setRootVisible(boolean b)
Maps JTree.setRootVisible(boolean) through queue


setRowHeight

public void setRowHeight(int i)
Maps JTree.setRowHeight(int) through queue


setScrollsOnExpand

public void setScrollsOnExpand(boolean b)
Maps JTree.setScrollsOnExpand(boolean) through queue


setSelectionInterval

public void setSelectionInterval(int i,
                                 int i1)
Maps JTree.setSelectionInterval(int, int) through queue


setSelectionModel

public void setSelectionModel(javax.swing.tree.TreeSelectionModel treeSelectionModel)
Maps JTree.setSelectionModel(TreeSelectionModel) through queue


setSelectionPath

public void setSelectionPath(javax.swing.tree.TreePath treePath)
Maps JTree.setSelectionPath(TreePath) through queue


setSelectionPaths

public void setSelectionPaths(javax.swing.tree.TreePath[] treePath)
Maps JTree.setSelectionPaths(TreePath[]) through queue


setSelectionRow

public void setSelectionRow(int i)
Maps JTree.setSelectionRow(int) through queue


setSelectionRows

public void setSelectionRows(int[] i)
Maps JTree.setSelectionRows(int[]) through queue


setShowsRootHandles

public void setShowsRootHandles(boolean b)
Maps JTree.setShowsRootHandles(boolean) through queue


setUI

public void setUI(javax.swing.plaf.TreeUI treeUI)
Maps JTree.setUI(TreeUI) through queue


setVisibleRowCount

public void setVisibleRowCount(int i)
Maps JTree.setVisibleRowCount(int) through queue


startEditingAtPath

public void startEditingAtPath(javax.swing.tree.TreePath treePath)
Maps JTree.startEditingAtPath(TreePath) through queue


stopEditing

public boolean stopEditing()
Maps JTree.stopEditing() through queue


treeDidChange

public void treeDidChange()
Maps JTree.treeDidChange() through queue