public class JTree extends JComponent
Modifier | Constructor and Description |
---|---|
protected |
JTree(JtfObjectHandle handle,
Desktop desktop)
使用 JtfObjectHandle 创建新 JTree。
|
Modifier and Type | Method and Description |
---|---|
void |
cancelEditing()
取消当前编辑会话。
|
void |
clearSelection()
清除选定内容。
|
void |
clickNode(ItemPath item)
单击由项目路径指定的树节点。
|
void |
clickNode(ItemPath item,
int button)
单击由项目路径指定的树节点。
|
void |
clickNode(ItemPath item,
int button,
Point position)
单击由项目路径指定的树节点。
|
void |
clickNode(ItemPath item,
int button,
Point position,
ModifierKey modifiers)
单击由项目路径指定的树节点。
|
void |
clickNode(String item)
单击由项目路径指定的树节点。
|
void |
clickNode(String item,
int button)
单击由项目路径指定的树节点。
|
void |
clickNode(String item,
int button,
Point position)
单击由项目路径指定的树节点。
|
void |
clickNode(String item,
int button,
Point position,
ModifierKey modifiers)
单击由项目路径指定的树节点。
|
void |
collapse(ItemPath item)
折叠由指定的项目路径确定的树节点。
|
void |
collapse(String item)
折叠由指定的项目路径确定的树节点。
|
void |
collapseAll()
折叠所有树节点。
|
void |
doubleClickNode(ItemPath item)
双击由项目路径指定的树节点。
|
void |
doubleClickNode(ItemPath item,
int button)
双击由项目路径指定的树节点。
|
void |
doubleClickNode(ItemPath item,
int button,
Point position)
双击由项目路径指定的树节点。
|
void |
doubleClickNode(ItemPath item,
int button,
Point position,
ModifierKey modifiers)
双击由项目路径指定的树节点。
|
void |
doubleClickNode(String item)
双击由项目路径指定的树节点。
|
void |
doubleClickNode(String item,
int button)
双击由项目路径指定的树节点。
|
void |
doubleClickNode(String item,
int button,
Point position)
双击由项目路径指定的树节点。
|
void |
doubleClickNode(String item,
int button,
Point position,
ModifierKey modifiers)
双击由项目路径指定的树节点。
|
void |
expand(ItemPath item)
展开由指定的项目路径确定的树节点。
|
void |
expand(String item)
展开由指定的项目路径确定的树节点。
|
void |
expandAll()
展开所有树节点。
|
Rect |
getItemRect(ItemPath item)
返回相对于树的项目的大小和位置。
|
Rect |
getItemRect(String item)
返回相对于树的项目的大小和位置。
|
ItemPath |
getSelectedItemPath()
获取 所选项目路径。
|
List<ItemPath> |
getSelectedItemPaths()
获取 所选项目路径的列表。
|
String |
getSelectedItemText()
获取 所选项目文本。
|
int |
getSelectionCount()
获取 所选树节点的数量。
|
List<ItemPath> |
getVisibleItemPaths()
获取 作为项目路径的树中的可见项目。
|
boolean |
isEditable()
获取 树是否可编辑。
|
boolean |
isEditing()
获取 树是否正在编辑。
|
boolean |
isExpanded(ItemPath item)
如果展开指定的项目路径,则返回“ture”。
|
boolean |
isExpanded(String item)
如果展开指定的项目路径,则返回“ture”。
|
boolean |
isPathEditable(ItemPath item)
项目路径是否可编辑。
|
boolean |
isPathEditable(String item)
项目路径是否可编辑。
|
void |
scrollPathIntoView(ItemPath item)
滚动指定项目路径至可见位置。
|
void |
scrollPathIntoView(String item)
滚动指定项目路径至可见位置。
|
void |
select(ItemPath item)
选择由指定的项目路径确定的树节点。
|
void |
select(String item)
选择由指定的项目路径确定的树节点。
|
void |
startEditing()
在指定项目路径或当前选定内容上开始编辑。
|
void |
startEditing(ItemPath item)
在指定项目路径或当前选定内容上开始编辑。
|
void |
startEditing(String item)
在指定项目路径或当前选定内容上开始编辑。
|
void |
stopEditing()
停止当前编辑会话。
|
getToolTipText
click, 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, typePasswordKeys
captureBitmap, 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, waitForProperty
equals, 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, toString
protected JTree(JtfObjectHandle handle, Desktop desktop)
handle
- 可确定 JTree 的句柄desktop
- 此对象所在的桌面public void cancelEditing()
public void clearSelection()
public void clickNode(ItemPath item)
item
- 可单击的项目路径public void clickNode(ItemPath item, int button)
item
- 可单击的项目路径button
- 用于单击的按钮。有效值为:左键(=1,默认值),右键 (=2),中键 (=3)。public void clickNode(ItemPath item, int button, Point position)
item
- 可单击的项目路径button
- 用于单击的按钮。有效值为:左键(=1,默认值),右键 (=2),中键 (=3)。position
- 可单击的位置。如果省略位置,则单击树节点中心。public void clickNode(ItemPath item, int button, Point position, ModifierKey modifiers)
item
- 可单击的项目路径button
- 用于单击的按钮。有效值为:左键(=1,默认值),右键 (=2),中键 (=3)。position
- 可单击的位置。如果省略位置,则单击树节点中心。modifiers
- 单击树节点时可按的修饰键(Alt、Shift 和 Ctrl)。默认:不使用修饰键。public void clickNode(String item)
item
- 可单击的项目路径. E.g: /Games/Applications[2]/[0]有关详细信息,请参见 ItemPath.ItemPath(String)
。
public void clickNode(String item, int button)
item
- 可单击的项目路径. E.g: /Games/Applications[2]/[0]有关详细信息,请参见 ItemPath.ItemPath(String)
。
button
- 用于单击的按钮。有效值为:左键(=1,默认值),右键 (=2),中键 (=3)。public void clickNode(String item, int button, Point position)
item
- 可单击的项目路径. E.g: /Games/Applications[2]/[0]有关详细信息,请参见 ItemPath.ItemPath(String)
。
button
- 用于单击的按钮。有效值为:左键(=1,默认值),右键 (=2),中键 (=3)。position
- 可单击的位置。如果省略位置,则单击树节点中心。public void clickNode(String item, int button, Point position, ModifierKey modifiers)
item
- 可单击的项目路径. E.g: /Games/Applications[2]/[0]有关详细信息,请参见 ItemPath.ItemPath(String)
。
button
- 用于单击的按钮。有效值为:左键(=1,默认值),右键 (=2),中键 (=3)。position
- 可单击的位置。如果省略位置,则单击树节点中心。modifiers
- 单击树节点时可按的修饰键(Alt、Shift 和 Ctrl)。默认:不使用修饰键。public void collapse(ItemPath item)
item
- 项目路径public void collapse(String item)
item
- 项目路径. E.g: /Games/Applications[2]/[0]有关详细信息,请参见 ItemPath.ItemPath(String)
。
public void collapseAll()
public void doubleClickNode(ItemPath item)
item
- 可双击的项目路径public void doubleClickNode(ItemPath item, int button)
item
- 可双击的项目路径button
- 用于双击的按钮。有效值为:左键(=1,默认值),右键 (=2),中键 (=3)。public void doubleClickNode(ItemPath item, int button, Point position)
item
- 可双击的项目路径button
- 用于双击的按钮。有效值为:左键(=1,默认值),右键 (=2),中键 (=3)。position
- 可双击的位置。如果省略位置,则双击树节点中心。public void doubleClickNode(ItemPath item, int button, Point position, ModifierKey modifiers)
item
- 可双击的项目路径button
- 用于双击的按钮。有效值为:左键(=1,默认值),右键 (=2),中键 (=3)。position
- 可双击的位置。如果省略位置,则双击树节点中心。modifiers
- 双击树节点时可按的修饰键(Alt、Shift 和 Ctrl)。默认:不使用修饰键。public void doubleClickNode(String item)
item
- 可双击的项目路径. E.g: /Games/Applications[2]/[0]有关详细信息,请参见 ItemPath.ItemPath(String)
。
public void doubleClickNode(String item, int button)
item
- 可双击的项目路径. E.g: /Games/Applications[2]/[0]有关详细信息,请参见 ItemPath.ItemPath(String)
。
button
- 用于双击的按钮。有效值为:左键(=1,默认值),右键 (=2),中键 (=3)。public void doubleClickNode(String item, int button, Point position)
item
- 可双击的项目路径. E.g: /Games/Applications[2]/[0]有关详细信息,请参见 ItemPath.ItemPath(String)
。
button
- 用于双击的按钮。有效值为:左键(=1,默认值),右键 (=2),中键 (=3)。position
- 可双击的位置。如果省略位置,则双击树节点中心。public void doubleClickNode(String item, int button, Point position, ModifierKey modifiers)
item
- 可双击的项目路径. E.g: /Games/Applications[2]/[0]有关详细信息,请参见 ItemPath.ItemPath(String)
。
button
- 用于双击的按钮。有效值为:左键(=1,默认值),右键 (=2),中键 (=3)。position
- 可双击的位置。如果省略位置,则双击树节点中心。modifiers
- 双击树节点时可按的修饰键(Alt、Shift 和 Ctrl)。默认:不使用修饰键。public void expand(ItemPath item)
item
- 项目路径public void expand(String item)
item
- 项目路径. E.g: /Games/Applications[2]/[0]有关详细信息,请参见 ItemPath.ItemPath(String)
。
public void expandAll()
public Rect getItemRect(ItemPath item)
item
- 项目路径public Rect getItemRect(String item)
item
- 项目路径. E.g: /Games/Applications[2]/[0]有关详细信息,请参见 ItemPath.ItemPath(String)
。
public boolean isExpanded(ItemPath item)
item
- 项目路径public boolean isExpanded(String item)
item
- 项目路径. E.g: /Games/Applications[2]/[0]有关详细信息,请参见 ItemPath.ItemPath(String)
。
public boolean isPathEditable(ItemPath item)
item
- 项目路径public boolean isPathEditable(String item)
item
- 项目路径. E.g: /Games/Applications[2]/[0]有关详细信息,请参见 ItemPath.ItemPath(String)
。
public void scrollPathIntoView(ItemPath item)
item
- 项目路径public void scrollPathIntoView(String item)
item
- 项目路径. E.g: /Games/Applications[2]/[0]有关详细信息,请参见 ItemPath.ItemPath(String)
。
public void select(ItemPath item)
item
- 项目路径public void select(String item)
item
- 项目路径. E.g: /Games/Applications[2]/[0]有关详细信息,请参见 ItemPath.ItemPath(String)
。
public void startEditing()
public void startEditing(ItemPath item)
item
- 项目路径public void startEditing(String item)
item
- 项目路径. E.g: /Games/Applications[2]/[0]有关详细信息,请参见 ItemPath.ItemPath(String)
。
public void stopEditing()
public boolean isEditable()
public boolean isEditing()
public ItemPath getSelectedItemPath()
public String getSelectedItemText()
public int getSelectionCount()
Copyright 2009-2012 Micro Focus. All Rights Reserved.