public void setDirty(boolean value) { modified = value; for (LeafListener<DataItem> l : listeners) { l.leafStateChanged(this); } if (modified && parent != null && !parent.isDirty()) ((Folder) parent).setDirty(); }
@Override public void setParent(Branch<DataItem> parent, boolean addToParent) { if (this.parent == parent) return; if (this.parent != null) this.parent.removeItem(this); this.parent = parent; if (addToParent) parent.addItem(this); setDirty(); }
@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(); } }