diff -r 821c4950b619 -r dca186d3911f src/main/java/de/uapcore/lightpit/MenuEntry.java --- a/src/main/java/de/uapcore/lightpit/MenuEntry.java Tue May 19 19:34:57 2020 +0200 +++ b/src/main/java/de/uapcore/lightpit/MenuEntry.java Fri May 22 16:21:31 2020 +0200 @@ -45,6 +45,11 @@ private final ResourceKey resourceKey; /** + * Custom menu text. + */ + private final String text; + + /** * Path name of the module, linked by this menu entry. */ private final String pathName; @@ -54,20 +59,33 @@ */ private final int sequence; + /** + * True if this menu entry is active. + */ + private boolean active = false; + public MenuEntry(ResourceKey resourceKey, String pathName, int sequence) { + this.text = null; this.resourceKey = resourceKey; this.pathName = pathName; this.sequence = sequence; } - public MenuEntry(ResourceKey resourceKey, String pathName) { - this(resourceKey, pathName, 0); + public MenuEntry(String text, String pathName, int sequence) { + this.text = text; + this.resourceKey = null; + this.pathName = pathName; + this.sequence = sequence; } public ResourceKey getResourceKey() { return resourceKey; } + public String getText() { + return text; + } + public String getPathName() { return pathName; } @@ -76,6 +94,14 @@ return sequence; } + public boolean isActive() { + return this.active; + } + + public void setActive(boolean active) { + this.active = true; + } + @Override public boolean equals(Object o) { if (this == o) return true;