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; } }