public void setReplaceState(boolean val) {
    boolean changed = val != isReplaceState;
    if (changed) {
      isReplaceState = val;
      notifyObservers();
    }
  }
public void setReplaceState(boolean val)