ludc
2024-09-14 36c2449aec5b51e5ed4e5c6841154b746060e09a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package com.vci.client.ui.tree;
 
import javax.swing.tree.DefaultMutableTreeNode;
 
public class VCIBaseTreeNode extends DefaultMutableTreeNode{
 
    /**
     * 
     */
    private static final long serialVersionUID = -7558494492422856368L;
 
    private Object obj = null; //the related obj of current tree node
    private boolean isLeaf = false; // node is leaf or not
    private boolean isExpand=false; // node has expanded or not
 
    /**
     * constructor 
     * 
     * @param nodeName, the display name
     * @param obj, the related obj
     */
    public VCIBaseTreeNode(String nodeName, Object obj) {
        this.setUserObject(nodeName);
        this.obj = obj;
    }
 
    public boolean isExpand() {
        return isExpand;
    }
 
    public void setExpand(boolean isExpand) {
        this.isExpand = isExpand;
    }
 
    public boolean isLeaf() {
        return isLeaf;
    }
 
    public void setLeaf(boolean isLeaf) {
        this.isLeaf = isLeaf;
    }
 
    public Object getObj() {
        return obj;
    }
 
    public void setObj(Object obj) {
        this.obj = obj;
    }
}