1 11 12 package org.eclipse.core.databinding.observable; 13 14 18 public abstract class ChangeSupport extends ChangeManager { 19 20 23 public ChangeSupport(Realm realm) { 24 super(realm); 25 } 26 27 public void addListener(Object listenerType, 28 IObservablesListener listener) { 29 super.addListener(listenerType, listener); 30 } 31 32 public void removeListener(Object listenerType, 33 IObservablesListener listener) { 34 super.removeListener(listenerType, listener); 35 } 36 37 public void fireEvent(ObservableEvent event) { 38 super.fireEvent(event); 39 } 40 41 44 protected abstract void firstListenerAdded(); 45 46 49 protected abstract void lastListenerRemoved(); 50 51 54 public void addChangeListener(IChangeListener listener) { 55 addListener(ChangeEvent.TYPE, listener); 56 } 57 58 61 public void removeChangeListener(IChangeListener listener) { 62 removeListener(ChangeEvent.TYPE, listener); 63 } 64 65 68 public void addStaleListener(IStaleListener listener) { 69 addListener(StaleEvent.TYPE, listener); 70 } 71 72 75 public void removeStaleListener(IStaleListener listener) { 76 removeListener(StaleEvent.TYPE, listener); 77 } 78 79 } 80 | Popular Tags |