123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257 |
- 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<TreeNode> nodes;
-
- private HashMap<String, String> 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<TreeNode>();
- }
- nodes.add(node);
- }
-
- public void addExtendAttr(String attr, String value) {
- if (extendAttr == null) {
- extendAttr = new HashMap<String, String>();
- }
- 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<TreeNode> getNodes() {
- return nodes;
- }
-
- @SuppressWarnings("unchecked")
- public List<TreeNode> getNodes(boolean init) {
- if (nodes == null)
- nodes = new ArrayList();
- return nodes;
- }
- public void setNodes(List<TreeNode> 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;
- }
- }
|