public void NotifyAll() { if (observers != null) { foreach (ModelComponentObserver o in observers) { o.notify(this); } if (container != null) { container.NotifyAll(); } } }
public void SetContainer(ModelComponent composite) { ModelComponent tempContainer = container; if (container != null) { container.GetChildren().Remove(this); } container = composite; // Notify the new tree. NotifyAll(); if (tempContainer != null) { // Notify the old tree. tempContainer.NotifyAll(); } }