
package de.ivu.elect.jee.presentation.dynamicform;

public class ReadOnlyBooleanProperty extends AbstractBooleanProperty {

  private final String label;

  private final Boolean value;

  public ReadOnlyBooleanProperty(String label, Boolean value) {
    super();

    this.label = label;
    this.value = value;
  }

  @Override
  public boolean isReadonly() {
    return true;
  }

  @Override
  public boolean getDefaultRequired() {
    return false;
  }

  @Override
  public String getDefaultLabel() {
    return label;
  }

  @Override
  public Boolean getValue() {
    return value;
  }

  @Override
  public void setValue(Boolean value) {
    // Readonly!
  }
}
