Exemple #1
0
  public void setDirty(boolean value) {
    modified = value;
    for (LeafListener<DataItem> l : listeners) {
      l.leafStateChanged(this);
    }

    if (modified && parent != null && !parent.isDirty()) ((Folder) parent).setDirty();
  }
Exemple #2
0
  @Override
  public void setName(String name) {
    if (this.name != name) {
      String oldName = this.name;
      this.name = name;
      for (LeafListener<DataItem> l : listeners) {
        l.leafNameChanged(this, oldName);
      }

      if (parent != null) parent.registerNameChange(oldName, name);

      setDirty();
    }
  }