@Override protected void descendantGainedFocus(Component descendant, Component previousFocusedComponent) { this.focusDescendant = descendant; super.descendantGainedFocus(descendant, previousFocusedComponent); }
@Override protected void descendantGainedFocus(Component descendant, Component previousFocusedComponent) { this.focusDescendant = descendant; super.descendantGainedFocus(descendant, previousFocusedComponent); }
protected void descendantGainedFocus(Component descendant, Component previousFocusedComponent) { Container parent = getParent(); if (parent != null) { parent.descendantGainedFocus(descendant, previousFocusedComponent); } }
protected void descendantGainedFocus(Component descendant, Component previousFocusedComponent) { Container parent = getParent(); if (parent != null) { parent.descendantGainedFocus(descendant, previousFocusedComponent); } }
/** * Called to notify a component that its focus state has changed. * * @param focused * <tt>true</tt> if the component has received the input focus; * <tt>false</tt> if the component has lost the focus. * * @param obverseComponent * If <tt>focused</tt> is true, the component that has lost the focus; * otherwise, the component that has gained the focus. */ protected void setFocused(boolean focused, Component obverseComponent) { if (focused) { parent.descendantGainedFocus(this, obverseComponent); } else { parent.descendantLostFocus(this); } componentStateListeners.focusedChanged(this, obverseComponent); }
/** * Called to notify a component that its focus state has changed. * * @param focused * <tt>true</tt> if the component has received the input focus; * <tt>false</tt> if the component has lost the focus. * * @param obverseComponent * If <tt>focused</tt> is true, the component that has lost the focus; * otherwise, the component that has gained the focus. */ protected void setFocused(boolean focused, Component obverseComponent) { if (focused) { parent.descendantGainedFocus(this, obverseComponent); } else { parent.descendantLostFocus(this); } componentStateListeners.focusedChanged(this, obverseComponent); }