public void controllerChanged( DockHierarchyEvent event ) { check(); } public void hierarchyChanged( DockHierarchyEvent event ) {
/** * Checks the current {@link DockController} and may replace the controller * when a new one is available. */ public void check(){ DockController current = bound ? dockable.getController() : null; if( current != controller ){ changed( controller, current ); controller = current; } }
public void unbind() { if( bound ){ bound = false; dockable.removeDockHierarchyListener( listener ); check(); } delegate.unbind(); } }
public void bind(){ if( !bound ){ // if we would live in a perfect world, this check wouldn't be necessary bound = true; dockable.addDockHierarchyListener( listener ); check(); } delegate.bind(); }