1 package com.yuji.ef.dao;
3 import java.util.ArrayList;
6 import com.yuji.ef.LabelIconView;
8 import com.yuji.ef.common.CommonUtil;
10 public class DirNode extends Node {
11 public enum Category {
12 NOTEBOOK, NOTEBOOK_TAG, NONE
15 private Status status = Status.CLOSE;
16 private Category category = Category.NONE;
18 // private String notebookGuid = null;
20 public DirNode(String name, LabelIconView view) {
23 children = new ArrayList<Long>();
26 public DirNode(String name, LabelIconView view, String childrenStr,
30 children = new ArrayList<Long>();
32 List<String> l = CommonUtil.split(childrenStr, NodeDao.DELM);
34 children.add(Long.parseLong(s));
36 status = Node.getStatus(stCode);
39 public Category getCategory() {
43 public void setCategory(Category category) {
44 this.category = category;
47 // public String getNotebookGuid() {
48 // return notebookGuid;
51 // public void setNotebookGuid(String notebookGuid) {
52 // this.notebookGuid = notebookGuid;
56 public int getType() {
61 public int getIconId() {
62 return CommonUtil.isNull(this.getGuid()) ? R.drawable.test2
67 public Status getStatus() {
72 public void setStatus(Status status) {
77 public void toggleStatus() {
78 if (status == Status.NONE) {
81 status = (status == Status.CLOSE) ? Status.OPEN : Status.CLOSE;
85 public int getStatusIconId() {
86 if (status == Status.CLOSE) {
87 return R.drawable.close;
89 return R.drawable.open;