public class JTree extends JComponent
| Modifier | Constructor and Description |
|---|---|
protected |
JTree(JtfObjectHandle handle,
Desktop desktop)
Creates a new JTree with a JtfObjectHandle.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cancelEditing()
Cancels the current editing session.
|
void |
clearSelection()
Clears the selection.
|
void |
clickNode(ItemPath item)
Clicks on a tree node specified by the item path.
|
void |
clickNode(ItemPath item,
int button)
Clicks on a tree node specified by the item path.
|
void |
clickNode(ItemPath item,
int button,
Point position)
Clicks on a tree node specified by the item path.
|
void |
clickNode(ItemPath item,
int button,
Point position,
ModifierKey modifiers)
Clicks on a tree node specified by the item path.
|
void |
clickNode(String item)
Clicks on a tree node specified by the item path.
|
void |
clickNode(String item,
int button)
Clicks on a tree node specified by the item path.
|
void |
clickNode(String item,
int button,
Point position)
Clicks on a tree node specified by the item path.
|
void |
clickNode(String item,
int button,
Point position,
ModifierKey modifiers)
Clicks on a tree node specified by the item path.
|
void |
collapse(ItemPath item)
Collapses the tree node identified by the specified item path.
|
void |
collapse(String item)
Collapses the tree node identified by the specified item path.
|
void |
collapseAll()
Collapses all tree nodes.
|
void |
doubleClickNode(ItemPath item)
Double-clicks on a tree node specified by the item path.
|
void |
doubleClickNode(ItemPath item,
int button)
Double-clicks on a tree node specified by the item path.
|
void |
doubleClickNode(ItemPath item,
int button,
Point position)
Double-clicks on a tree node specified by the item path.
|
void |
doubleClickNode(ItemPath item,
int button,
Point position,
ModifierKey modifiers)
Double-clicks on a tree node specified by the item path.
|
void |
doubleClickNode(String item)
Double-clicks on a tree node specified by the item path.
|
void |
doubleClickNode(String item,
int button)
Double-clicks on a tree node specified by the item path.
|
void |
doubleClickNode(String item,
int button,
Point position)
Double-clicks on a tree node specified by the item path.
|
void |
doubleClickNode(String item,
int button,
Point position,
ModifierKey modifiers)
Double-clicks on a tree node specified by the item path.
|
void |
expand(ItemPath item)
Expands the tree node identified by the specified item path.
|
void |
expand(String item)
Expands the tree node identified by the specified item path.
|
void |
expandAll()
Expands all tree nodes.
|
Rect |
getItemRect(ItemPath item)
Returns the size and position of the item relative to the tree.
|
Rect |
getItemRect(String item)
Returns the size and position of the item relative to the tree.
|
ItemPath |
getSelectedItemPath()
Gets the selected item path.
|
List<ItemPath> |
getSelectedItemPaths()
Gets the list of selected item paths.
|
String |
getSelectedItemText()
Gets the selected item text.
|
int |
getSelectionCount()
Gets the number of tree nodes selected.
|
List<ItemPath> |
getVisibleItemPaths()
Gets the visible items in the tree as item paths.
|
boolean |
isEditable()
Gets whether the tree is editable.
|
boolean |
isEditing()
Gets whether the tree is being edited.
|
boolean |
isExpanded(ItemPath item)
Returns 'true' if the specified item path is expanded.
|
boolean |
isExpanded(String item)
Returns 'true' if the specified item path is expanded.
|
boolean |
isPathEditable(ItemPath item)
whether an item path is editable.
|
boolean |
isPathEditable(String item)
whether an item path is editable.
|
void |
scrollPathIntoView(ItemPath item)
Scrolls the given item path to a visible position.
|
void |
scrollPathIntoView(String item)
Scrolls the given item path to a visible position.
|
void |
select(ItemPath item)
Selects a tree node identified by the specified item path.
|
void |
select(String item)
Selects a tree node identified by the specified item path.
|
void |
startEditing()
Starts editing at given item path or current selection.
|
void |
startEditing(ItemPath item)
Starts editing at given item path or current selection.
|
void |
startEditing(String item)
Starts editing at given item path or current selection.
|
void |
stopEditing()
Stops the current editing session.
|
getToolTipTextclick, click, click, click, doubleClick, doubleClick, doubleClick, doubleClick, getAccessibleName, getAccessibleRole, getBackground, getCursor, getFont, getForeground, getHeight, getName, getNativeHandle, getWidth, isEnabled, isFocusable, isFocused, mouseMove, mouseMove, openContextMenu, openContextMenu, pressKeys, pressKeys, pressMouse, pressMouse, pressMouse, pressMouse, releaseKeys, releaseKeys, releaseMouse, releaseMouse, releaseMouse, releaseMouse, scrollIntoView, setFocus, typeKeys, typeKeys, typeKeys, typePasswordKeys, typePasswordKeys, typePasswordKeyscaptureBitmap, captureBitmap, exists, exists, generateLocator, getChildren, getDynamicMethodList, getParent, getPropertyList, getRect, getRect, getText, getValue, highlightObject, highlightObject, highlightObject, invokeMethods, textCapture, textCapture, textClick, textClick, textClick, textClick, textClick, textClick, textExists, textExists, textExists, textExists, textExists, textRectangle, textRectangle, textRectangle, textRectangle, textRectangle, waitForChildDisappearance, waitForChildDisappearance, waitForDisappearance, waitForDisappearance, waitForObject, waitForObject, waitForProperty, waitForPropertyequals, exists, find, find, findAll, findAll, getCustomTypeName, getDesktop, getHandle, getLocator, getProperty, getTypeName, hashCode, imageClick, imageClick, imageClick, imageClick, imageClick, imageClick, imageClickFile, imageClickFile, imageClickFile, imageClickFile, imageClickFile, imageClickFile, imageExists, imageExists, imageExists, imageExistsFile, imageExistsFile, imageExistsFile, imageRectangle, imageRectangle, imageRectangle, imageRectangleFile, imageRectangleFile, imageRectangleFile, invoke, preventFinalLocator, setProperty, toStringprotected JTree(JtfObjectHandle handle, Desktop desktop)
handle - the handle that identifies the JTreedesktop - the desktop on which this object livespublic void cancelEditing()
public void clearSelection()
public void clickNode(ItemPath item)
item - the item path to click onpublic void clickNode(ItemPath item, int button)
item - the item path to click onbutton - the button used for clicking. Valid values are: left (=1, the default value), right (=2), middle (=3).public void clickNode(ItemPath item, int button, Point position)
item - the item path to click onbutton - the button used for clicking. Valid values are: left (=1, the default value), right (=2), middle (=3).position - the position to click. If the position is omitted, the click is done in the center of the tree node.public void clickNode(ItemPath item, int button, Point position, ModifierKey modifiers)
item - the item path to click onbutton - the button used for clicking. Valid values are: left (=1, the default value), right (=2), middle (=3).position - the position to click. If the position is omitted, the click is done in the center of the tree node.modifiers - the modifier keys (Alt, Shift and Ctrl) to press while clicking the tree node. Default: Don't use modifier keys.public void clickNode(String item)
item - the item path to click on. E.g: /Games/Applications[2]/[0]For details see ItemPath.ItemPath(String).
public void clickNode(String item, int button)
item - the item path to click on. E.g: /Games/Applications[2]/[0]For details see ItemPath.ItemPath(String).
button - the button used for clicking. Valid values are: left (=1, the default value), right (=2), middle (=3).public void clickNode(String item, int button, Point position)
item - the item path to click on. E.g: /Games/Applications[2]/[0]For details see ItemPath.ItemPath(String).
button - the button used for clicking. Valid values are: left (=1, the default value), right (=2), middle (=3).position - the position to click. If the position is omitted, the click is done in the center of the tree node.public void clickNode(String item, int button, Point position, ModifierKey modifiers)
item - the item path to click on. E.g: /Games/Applications[2]/[0]For details see ItemPath.ItemPath(String).
button - the button used for clicking. Valid values are: left (=1, the default value), right (=2), middle (=3).position - the position to click. If the position is omitted, the click is done in the center of the tree node.modifiers - the modifier keys (Alt, Shift and Ctrl) to press while clicking the tree node. Default: Don't use modifier keys.public void collapse(ItemPath item)
item - the item pathpublic void collapse(String item)
item - the item path. E.g: /Games/Applications[2]/[0]For details see ItemPath.ItemPath(String).
public void collapseAll()
public void doubleClickNode(ItemPath item)
item - the item path to double-click onpublic void doubleClickNode(ItemPath item, int button)
item - the item path to double-click onbutton - the button used for double-clicking. Valid values are: left (=1, the default value), right (=2), middle (=3).public void doubleClickNode(ItemPath item, int button, Point position)
item - the item path to double-click onbutton - the button used for double-clicking. Valid values are: left (=1, the default value), right (=2), middle (=3).position - the position to double-click. If the position is omitted, the double-click is done in the center of the tree node.public void doubleClickNode(ItemPath item, int button, Point position, ModifierKey modifiers)
item - the item path to double-click onbutton - the button used for double-clicking. Valid values are: left (=1, the default value), right (=2), middle (=3).position - the position to double-click. If the position is omitted, the double-click is done in the center of the tree node.modifiers - the modifier keys (Alt, Shift and Ctrl) to press while double-clicking the tree node. Default: Don't use modifier keys.public void doubleClickNode(String item)
item - the item path to double-click on. E.g: /Games/Applications[2]/[0]For details see ItemPath.ItemPath(String).
public void doubleClickNode(String item, int button)
item - the item path to double-click on. E.g: /Games/Applications[2]/[0]For details see ItemPath.ItemPath(String).
button - the button used for double-clicking. Valid values are: left (=1, the default value), right (=2), middle (=3).public void doubleClickNode(String item, int button, Point position)
item - the item path to double-click on. E.g: /Games/Applications[2]/[0]For details see ItemPath.ItemPath(String).
button - the button used for double-clicking. Valid values are: left (=1, the default value), right (=2), middle (=3).position - the position to double-click. If the position is omitted, the double-click is done in the center of the tree node.public void doubleClickNode(String item, int button, Point position, ModifierKey modifiers)
item - the item path to double-click on. E.g: /Games/Applications[2]/[0]For details see ItemPath.ItemPath(String).
button - the button used for double-clicking. Valid values are: left (=1, the default value), right (=2), middle (=3).position - the position to double-click. If the position is omitted, the double-click is done in the center of the tree node.modifiers - the modifier keys (Alt, Shift and Ctrl) to press while double-clicking the tree node. Default: Don't use modifier keys.public void expand(ItemPath item)
item - the item pathpublic void expand(String item)
item - the item path. E.g: /Games/Applications[2]/[0]For details see ItemPath.ItemPath(String).
public void expandAll()
public Rect getItemRect(ItemPath item)
item - the item pathpublic Rect getItemRect(String item)
item - the item path. E.g: /Games/Applications[2]/[0]For details see ItemPath.ItemPath(String).
public boolean isExpanded(ItemPath item)
item - the item pathpublic boolean isExpanded(String item)
item - the item path. E.g: /Games/Applications[2]/[0]For details see ItemPath.ItemPath(String).
public boolean isPathEditable(ItemPath item)
item - the item pathpublic boolean isPathEditable(String item)
item - the item path. E.g: /Games/Applications[2]/[0]For details see ItemPath.ItemPath(String).
public void scrollPathIntoView(ItemPath item)
item - the item pathpublic void scrollPathIntoView(String item)
item - the item path. E.g: /Games/Applications[2]/[0]For details see ItemPath.ItemPath(String).
public void select(ItemPath item)
item - the item pathpublic void select(String item)
item - the item path. E.g: /Games/Applications[2]/[0]For details see ItemPath.ItemPath(String).
public void startEditing()
public void startEditing(ItemPath item)
item - the item pathpublic void startEditing(String item)
item - the item path. E.g: /Games/Applications[2]/[0]For details see ItemPath.ItemPath(String).
public void stopEditing()
public boolean isEditable()
public boolean isEditing()
public ItemPath getSelectedItemPath()
public List<ItemPath> getSelectedItemPaths()
public String getSelectedItemText()
public int getSelectionCount()
Copyright 2009-2012 Micro Focus. All Rights Reserved.