com.appperfect.devcommon.script.javaelement
Interface SwingTree

All Superinterfaces:
AwtComponent, AwtContainer, IScript, JavaComponent, SwingComponent

public interface SwingTree
extends SwingComponent

SwingTree is created to represent javax.swing.JTree component

The following code fragment illustrates how to create an SwingTree element.

 var element = engine.createSwingTree(1, 5);
 
where engine is object of IScriptEngine


Method Summary
 boolean collapse(java.lang.String nodePath)
 To collapse the specified node in TreeView control
 boolean expand(java.lang.String nodePath)
 To expand the specified node in TreeView control
 boolean expandAll(java.lang.String nodePath)
 To expand the specified node in TreeView control and all the nodes below it
 java.lang.String[] getItems()
 To get items in tree control
 int getItemsCount()
 To get items count in tree control
 java.lang.String[] getSelectedItems()
 To get selected items in tree control
 boolean isEditable()
 Checks if the tree is editable.
 boolean isRootVisible()
 Checks if the tree root is visible.
 boolean selectItem(java.lang.String nodePath)
 To select specified item in TreeView control
 
Methods inherited from interface com.appperfect.devcommon.script.javaelement.AwtContainer
getComponentCount
 
Methods inherited from interface com.appperfect.devcommon.script.javaelement.JavaComponent
activate, addAttribute, captureImage, click, close, dblClick, drag, drop, getName, getText, getToolTipText, maximize, minimize, mouseMove, restore, rightClick, set, setBreakPoint, setIgnored, setImagePath, setName, setThinkTime, setTitle, type
 
Methods inherited from interface com.appperfect.devcommon.script.IScript
getReasonForFailure, isIgnored, isTaskSuccessful, isTaskTimedOut, setReasonForFailure, setTaskSuccessful, setTaskTimedout, setTimeout
 

Method Detail

collapse

boolean collapse(java.lang.String nodePath)
To collapse the specified node in TreeView control

Parameters:
nodePath - is the text representing the complete path of tree item to be collapsed. Each item is separated by a semicolon (;)
Returns:
true if event was executed successfully, returns false if there is any failure during execution

expand

boolean expand(java.lang.String nodePath)
To expand the specified node in TreeView control

Parameters:
nodePath - is the text representing the complete path of tree item to be expanded. Each item is separated by a semicolon (;)
Returns:
true if event was executed successfully, returns false if there is any failure during execution

expandAll

boolean expandAll(java.lang.String nodePath)
To expand the specified node in TreeView control and all the nodes below it

Parameters:
nodePath - is the text representing the complete path of tree item to be expanded. Each item is separated by a semicolon (;)
Returns:
true if event was executed successfully, returns false if there is any failure during execution

getItems

java.lang.String[] getItems()
To get items in tree control

Returns:
items in tree control

getItemsCount

int getItemsCount()
To get items count in tree control

Returns:
items count in tree control

getSelectedItems

java.lang.String[] getSelectedItems()
To get selected items in tree control

Returns:
selected items in tree control

isEditable

boolean isEditable()
Checks if the tree is editable.

Returns:
true if editable, false otherwise

isRootVisible

boolean isRootVisible()
Checks if the tree root is visible.

Returns:
true if visible, false otherwise

selectItem

boolean selectItem(java.lang.String nodePath)
To select specified item in TreeView control

Parameters:
nodePath - is the text representing the complete path of tree item to be selected. Each item is separated by a semicolon (;)
Returns:
true if event was executed successfully, returns false if there is any failure during execution


Copyright © 2003-2011 AppPerfect Corporation. All Rights Reserved.