Merge pull request #228 from span/developer-controls

Developer controls
This commit is contained in:
Nanne
2016-04-08 18:27:29 +02:00
11 changed files with 306 additions and 25 deletions

View File

@ -10,7 +10,7 @@ import java.io.Serializable;
*/
public class LabelDebugger implements Serializable {
private boolean isEnabled = false;
private boolean enabled = false;
/**
* <p>isEnabled.</p>
@ -18,14 +18,31 @@ public class LabelDebugger implements Serializable {
* @return a boolean.
*/
public boolean isEnabled() {
return isEnabled;
return enabled;
}
/**
* <p>enable.</p>
* <p>Enables label debugging</p>
*/
public void enable() {
this.isEnabled = true;
this.enabled = true;
}
/**
* <p>Disables label debugging</p>
*/
public void disable() {
this.enabled = false;
}
/**
* <p>Sets the status to enabled</p>
* @param enabled
* @throws Exception if enabled is null
*/
public void setEnabled(Boolean enabled) throws Exception {
if(enabled == null) throw new Exception("Cannot set enabled to null");
this.enabled = enabled;
}
}