5152535455565758
} public void addHandler(RestorationHandler handler) { if(handler!=null) { restorationHandlers.add(handler); EventManager.dispatch(new RegistrationEvent(handler, this, true)); } }
606162636465666768
public boolean removeHandler(RestorationHandler handler) { boolean ret = false; if(handler!=null) { ret = restorationHandlers.remove(handler); if(ret) EventManager.dispatch(new RegistrationEvent(handler, this, false)); } return ret; }
9596979899100101
// create and add dockingstateinfo here info = new DockingState(dockableId); dockingInfo.put(dockableId, info); } EventManager.dispatch(new RegistrationEvent(info, this, true)); }
108109110111112113114115
synchronized(dockingInfo) { info = (DockingState)dockingInfo.remove(dockableId); } // dispatch event notification if we actually removed something if(info!=null) EventManager.dispatch(new RegistrationEvent(info, this, false)); return info; }