1 16 package org.apache.jetspeed.tutorial.modules.actions.portlets; 17 18 import java.io.Serializable ; 19 25 public class ExampleBrowserItem implements Serializable 26 { 27 boolean expanded = false; 28 int checked = -1; 29 int index = -1; 30 int type = -3; 31 int level = 0; 32 ExampleBrowserItem parent = null; 33 int oldChecked = -1; 34 35 36 public ExampleBrowserItem() 37 { 38 } 39 40 public void init(int type, 41 int index, 42 int level, 43 boolean expanded, 44 ExampleBrowserItem parent, 45 int checked) 46 { 47 this.index = index; 48 this.expanded = expanded; 49 this.type = type; 50 this.level = level; 51 this.parent = parent; 52 this.checked= checked; 53 this.oldChecked = checked; 54 } 55 56 public boolean isExpanded() 57 { 58 return this.expanded; 59 } 60 61 public boolean isChecked() 62 { 63 return (this.checked > -1); 64 } 65 66 public boolean isOldChecked() 67 { 68 return (this.oldChecked > -1); 69 } 70 71 public void toggleExpanded() 72 { 73 this.expanded = !this.expanded; 74 } 75 76 public void setExpanded(boolean expanded) 77 { 78 this.expanded = expanded; 79 } 80 81 public boolean getExpanded() 82 { 83 return this.expanded; 84 } 85 86 public int getIndex() 87 { 88 return this.index; 89 } 90 91 public int getType() 92 { 93 return this.type; 94 } 95 96 public void setChecked(int checked) 97 { 98 this.checked = checked; 99 } 100 101 public void setOldChecked(int oldChecked) 102 { 103 this.oldChecked = oldChecked; 104 } 105 106 public int getLevel() 107 { 108 return this.level; 109 } 110 111 public ExampleBrowserItem getParent() 112 { 113 return this.parent; 114 } 115 116 public void setLevel(int level) 117 { 118 this.level = level; 119 } 120 } 121 122 123 | Popular Tags |