private boolean grant( FocusRequest request, Component component ){ FocusRequest next; try{ onFocusing = true; next = request.grant( component ); } finally{ onFocusing = false; } if( next != null ){ boolean accepted = request.getSource() == next.getSource() && component == next.getComponent(); Request nextRequest = new Request( next, accepted ); return nextRequest.enqueue(); } return true; }
public boolean excluded( Component component ){ return !request.acceptable( component ); } });
/** * Starts this request * @return <code>true</code> if the request has already been handled * <code>false</code> otherwise */ public boolean enqueue(){ if( request.getDelay() <= 0 ){ run(); return true; } else{ Timer timer = new Timer( request.getDelay(), this ); timer.setRepeats( false ); timer.start(); return false; } }
if( !request.validate( this ) ){ return null; FocusVeto veto = checkFocusedDockable( request.getSource() ); if( veto == null ){ veto = FocusVeto.NONE; request.veto( veto ); if( veto != FocusVeto.NONE ){ return null; Component component = request.getComponent(); if( !request.isHardRequest() ){ if( !component.isVisible() || !component.isShowing() ){ component = null;
private void run(){ if( !canceled ){ Component component = accept(); if( component != null ){ execute( request, getDockable(), component ); } else if( request.getSource() == null && request.getComponent() == null && pendingRequests.size() == 1 ){ execute( request, null, null ); } else{ synchronized( pendingRequests ) { pendingRequests.remove( this ); } } } } }
/** * Gets the {@link Dockable} which receives the focus through this request. * @return the dockable or <code>null</code> */ public Dockable getDockable(){ DockElementRepresentative source = request.getSource(); if( source == null ){ return null; } return source.getElement().asDockable(); }
public Component getMouseClicked(){ return request.getComponent(); }
if( !request.validate( this ) ){ return null; FocusVeto veto = checkFocusedDockable( request.getSource() ); if( veto == null ){ veto = FocusVeto.NONE; request.veto( veto ); if( veto != FocusVeto.NONE ){ return null; Component component = request.getComponent(); if( !request.isHardRequest() ){ if( !component.isVisible() || !component.isShowing() ){ component = null;
private void run(){ if( !canceled ){ Component component = accept(); if( component != null ){ execute( request, getDockable(), component ); } else if( request.getSource() == null && request.getComponent() == null && pendingRequests.size() == 1 ){ execute( request, null, null ); } else{ synchronized( pendingRequests ) { pendingRequests.remove( this ); } } } } }
/** * Gets the {@link Dockable} which receives the focus through this request. * @return the dockable or <code>null</code> */ public Dockable getDockable(){ DockElementRepresentative source = request.getSource(); if( source == null ){ return null; } return source.getElement().asDockable(); }
public Component getMouseClicked(){ return request.getComponent(); }
private boolean grant( FocusRequest request, Component component ){ FocusRequest next; try{ onFocusing = true; next = request.grant( component ); } finally{ onFocusing = false; } if( next != null ){ boolean accepted = request.getSource() == next.getSource() && component == next.getComponent(); Request nextRequest = new Request( next, accepted ); return nextRequest.enqueue(); } return true; }
@Override public void setFocusedDockable( FocusRequest request ){ if( request.getSource() != null ){ Dockable focusedDockable = request.getSource().getElement().asDockable(); CLocationModeManager states = owner.getLocationManager(); if( states != null && !states.isOnTransaction() && focusedDockable != null ){ states.ensureNotHidden( focusedDockable ); } } super.setFocusedDockable( request ); }
private Component accept(){ if( accepted ){ return request.getComponent(); } else{ return DefaultFocusController.this.accept( request, getDockable() ); } }
public boolean excluded( Component component ){ return !request.acceptable( component ); } });
/** * Starts this request * @return <code>true</code> if the request has already been handled * <code>false</code> otherwise */ public boolean enqueue(){ if( request.getDelay() <= 0 ){ run(); return true; } else{ Timer timer = new Timer( request.getDelay(), this ); timer.setRepeats( false ); timer.start(); return false; } }
@Override public void setFocusedDockable( FocusRequest request ){ if( request.getSource() != null ){ Dockable focusedDockable = request.getSource().getElement().asDockable(); CLocationModeManager states = owner.getLocationManager(); if( states != null && !states.isOnTransaction() && focusedDockable != null ){ states.ensureNotHidden( focusedDockable ); } } super.setFocusedDockable( request ); }
private Component accept(){ if( accepted ){ return request.getComponent(); } else{ return DefaultFocusController.this.accept( request, getDockable() ); } }