package com.hcks.cmfds.commons.lang; import java.util.ArrayList; import java.util.HashMap; import java.util.List; /** * @Author 刘厦(liusha.information@gmail.com) * @Date 创建时间:May 16, 2011 12:04:11 PM * @Version 0.0.0 * 类说明: */ public class TreeNode { private String id; private String icon; private String iconCls; private String cls; private String expanedIcon; private String collapsedIcon; private String value; private String text; private boolean leaf; private boolean init; private boolean expanded; private String operations; private String href; private String attrs; private boolean checkbox; private boolean checked; private boolean canSelect; private List nodes; private HashMap extendAttr; private Integer state; private String reasonId; public String getReasonName() { return reasonName; } public void setReasonName(String reasonName) { this.reasonName = reasonName; } private String reasonName; public Integer getState() { return state; } public void setState(Integer state) { this.state = state; } public String getReasonId() { return reasonId; } public void setReasonId(String reasonId) { this.reasonId = reasonId; } public void addNode(TreeNode node) { if (nodes == null) { nodes = new ArrayList(); } nodes.add(node); } public void addExtendAttr(String attr, String value) { if (extendAttr == null) { extendAttr = new HashMap(); } extendAttr.put(attr, value); } public String getId() { return id; } public void setId(String id) { this.id = id; } public String getIcon() { return icon; } public void setIcon(String image) { this.icon = image; } public String getValue() { return value; } public void setValue(String value) { this.value = value; } public String getText() { return text; } public void setText(String text) { this.text = text; } public boolean isLeaf() { return leaf; } public void setLeaf(boolean isLeaf) { this.leaf = isLeaf; } public void setInit(boolean init) { this.init = init; } public boolean isInit() { return init; } public boolean isExpanded() { return expanded; } public void setExpanded(boolean expanded) { this.expanded = expanded; } public String getOperations() { return operations; } public void setOperations(String operations) { this.operations = operations; } public String getHref() { return href; } public void setHref(String href) { this.href = href; } public String getAttrs() { return attrs; } public void setAttrs(String attrs) { this.attrs = attrs; } public boolean isCheckbox() { return checkbox; } public void setCheckbox(boolean checkbox) { this.checkbox = checkbox; } public boolean isChecked() { return checked; } public void setChecked(boolean checked) { this.checked = checked; } public List getNodes() { return nodes; } @SuppressWarnings("unchecked") public List getNodes(boolean init) { if (nodes == null) nodes = new ArrayList(); return nodes; } public void setNodes(List nodes) { this.nodes = nodes; } public void setExpanedIcon(String expanedIcon) { this.expanedIcon = expanedIcon; } public String getExpanedIcon() { return expanedIcon; } public void setCollapsedIcon(String collapsedIcon) { this.collapsedIcon = collapsedIcon; } public String getCollapsedIcon() { return collapsedIcon; } public void setCanSelect(boolean canSelect) { this.canSelect = canSelect; } public boolean isCanSelect() { return canSelect; } @SuppressWarnings("unchecked") public void setExtendAttr(HashMap extendAttr) { this.extendAttr = extendAttr; } @SuppressWarnings("unchecked") public HashMap getExtendAttr() { return extendAttr; } public String getIconCls() { return iconCls; } public void setIconCls(String iconCls) { this.iconCls = iconCls; } public String getCls() { return cls; } public void setCls(String cls) { this.cls = cls; } }