public class ComponentTreeModel
extends java.lang.Object
implements javax.swing.tree.TreeModel
构造器和说明 |
---|
ComponentTreeModel(FormDesigner designer,
java.awt.Component root) |
限定符和类型 | 方法和说明 |
---|---|
void |
addTreeModelListener(javax.swing.event.TreeModelListener l)
添加树事件
|
protected void |
fireEvent(java.lang.String eventName,
javax.swing.event.TreeModelEvent evt) |
java.lang.Object |
getChild(java.lang.Object parent,
int index) |
int |
getChildCount(java.lang.Object parent) |
int |
getIndexOfChild(java.lang.Object parent,
java.lang.Object child) |
java.lang.Object |
getRoot() |
boolean |
isLeaf(java.lang.Object node)
是否为叶子节点
|
void |
removeTreeModelListener(javax.swing.event.TreeModelListener l)
删除树事件
|
void |
setRoot(java.awt.Component root)
设置根节点
|
void |
valueForPathChanged(javax.swing.tree.TreePath path,
java.lang.Object newValue)
树节点值改变
|
public ComponentTreeModel(FormDesigner designer, java.awt.Component root)
public java.lang.Object getRoot()
getRoot
在接口中 javax.swing.tree.TreeModel
public java.lang.Object getChild(java.lang.Object parent, int index)
getChild
在接口中 javax.swing.tree.TreeModel
public void setRoot(java.awt.Component root)
root
- 根节点public int getChildCount(java.lang.Object parent)
getChildCount
在接口中 javax.swing.tree.TreeModel
public boolean isLeaf(java.lang.Object node)
isLeaf
在接口中 javax.swing.tree.TreeModel
node
- 对象public void valueForPathChanged(javax.swing.tree.TreePath path, java.lang.Object newValue)
valueForPathChanged
在接口中 javax.swing.tree.TreeModel
path
- 树结构路径newValue
- 新值public int getIndexOfChild(java.lang.Object parent, java.lang.Object child)
getIndexOfChild
在接口中 javax.swing.tree.TreeModel
public void addTreeModelListener(javax.swing.event.TreeModelListener l)
addTreeModelListener
在接口中 javax.swing.tree.TreeModel
l
- 事件public void removeTreeModelListener(javax.swing.event.TreeModelListener l)
removeTreeModelListener
在接口中 javax.swing.tree.TreeModel
l
- 事件protected void fireEvent(java.lang.String eventName, javax.swing.event.TreeModelEvent evt)