public boolean acceptable( Component component ){ Dockable dockable = getDockable(); if( ensureDockableFocused && dockable != null ){ return SwingUtilities.isDescendingFrom( component, dockable.getComponent() ); } return true; }
public boolean validate( FocusController controller ){ this.controller = controller.getController(); if( force ){ return true; } return controller.getFocusedDockable() != getDockable(); }
public FocusRequest grant( Component component ){ Dockable dockable = getDockable(); if( dockable != null ){ if( ensureFocusSet || ensureDockableFocused ){ return new EnsuringFocusRequest( dockable, ensureDockableFocused, component ); } } if( component == null && controller != null ){ Window root = controller.getRootWindowProvider().searchWindow(); if( root != null ){ // if another dockable gains the focus, then it is going to do that // before this request gets even processed. So this is a backup // executed to ensure that the application does not lose focus return new RepeatingFocusRequest( null, root, isHardRequest() ); } } return null; } }