src/main/java/de/uapcore/lightpit/MenuEntry.java

changeset 109
2e0669e814ff
parent 97
602f75801644
equal deleted inserted replaced
108:6657dad897ea 109:2e0669e814ff
48 /** 48 /**
49 * True if this menu entry is active. 49 * True if this menu entry is active.
50 */ 50 */
51 private boolean active = false; 51 private boolean active = false;
52 52
53 /**
54 * The menu level.
55 */
56 private int level;
57
58 public MenuEntry(ResourceKey resourceKey, String pathName) { 53 public MenuEntry(ResourceKey resourceKey, String pathName) {
59 this(0, resourceKey, pathName);
60 }
61
62 public MenuEntry(String text, String pathName) {
63 this(0, text, pathName);
64 }
65
66 public MenuEntry(int level, ResourceKey resourceKey, String pathName) {
67 this.level = level;
68 this.text = null; 54 this.text = null;
69 this.resourceKey = resourceKey; 55 this.resourceKey = resourceKey;
70 this.pathName = pathName;
71 }
72
73 public MenuEntry(int level, String text, String pathName) {
74 this.level = level;
75 this.text = text;
76 this.resourceKey = null;
77 this.pathName = pathName; 56 this.pathName = pathName;
78 } 57 }
79 58
80 public ResourceKey getResourceKey() { 59 public ResourceKey getResourceKey() {
81 return resourceKey; 60 return resourceKey;
92 public boolean isActive() { 71 public boolean isActive() {
93 return this.active; 72 return this.active;
94 } 73 }
95 74
96 public void setActive(boolean active) { 75 public void setActive(boolean active) {
97 this.active = true; 76 this.active = active;
98 }
99
100 public int getLevel() {
101 return level;
102 }
103
104 public void setLevel(int level) {
105 this.level = level;
106 } 77 }
107 } 78 }

mercurial