< prev index next >

src/java.desktop/share/classes/javax/swing/InternalFrameFocusTraversalPolicy.java

Print this page




  29 import java.awt.FocusTraversalPolicy;
  30 
  31 /**
  32  * A FocusTraversalPolicy which can optionally provide an algorithm for
  33  * determining a JInternalFrame's initial Component. The initial Component is
  34  * the first to receive focus when the JInternalFrame is first selected. By
  35  * default, this is the same as the JInternalFrame's default Component to
  36  * focus.
  37  *
  38  * @author David Mendenhall
  39  *
  40  * @since 1.4
  41  */
  42 public abstract class InternalFrameFocusTraversalPolicy
  43     extends FocusTraversalPolicy
  44 {
  45 
  46     /**
  47      * Returns the Component that should receive the focus when a
  48      * JInternalFrame is selected for the first time. Once the JInternalFrame
  49      * has been selected by a call to <code>setSelected(true)</code>, the
  50      * initial Component will not be used again. Instead, if the JInternalFrame
  51      * loses and subsequently regains selection, or is made invisible or
  52      * undisplayable and subsequently made visible and displayable, the
  53      * JInternalFrame's most recently focused Component will become the focus
  54      * owner. The default implementation of this method returns the
  55      * JInternalFrame's default Component to focus.
  56      *
  57      * @param frame the JInternalFrame whose initial Component is to be
  58      *        returned
  59      * @return the Component that should receive the focus when frame is
  60      *         selected for the first time, or null if no suitable Component
  61      *         can be found
  62      * @see JInternalFrame#getMostRecentFocusOwner
  63      * @throws IllegalArgumentException if window is null
  64      */
  65     public Component getInitialComponent(JInternalFrame frame) {
  66         return getDefaultComponent(frame);
  67     }
  68 }


  29 import java.awt.FocusTraversalPolicy;
  30 
  31 /**
  32  * A FocusTraversalPolicy which can optionally provide an algorithm for
  33  * determining a JInternalFrame's initial Component. The initial Component is
  34  * the first to receive focus when the JInternalFrame is first selected. By
  35  * default, this is the same as the JInternalFrame's default Component to
  36  * focus.
  37  *
  38  * @author David Mendenhall
  39  *
  40  * @since 1.4
  41  */
  42 public abstract class InternalFrameFocusTraversalPolicy
  43     extends FocusTraversalPolicy
  44 {
  45 
  46     /**
  47      * Returns the Component that should receive the focus when a
  48      * JInternalFrame is selected for the first time. Once the JInternalFrame
  49      * has been selected by a call to {@code setSelected(true)}, the
  50      * initial Component will not be used again. Instead, if the JInternalFrame
  51      * loses and subsequently regains selection, or is made invisible or
  52      * undisplayable and subsequently made visible and displayable, the
  53      * JInternalFrame's most recently focused Component will become the focus
  54      * owner. The default implementation of this method returns the
  55      * JInternalFrame's default Component to focus.
  56      *
  57      * @param frame the JInternalFrame whose initial Component is to be
  58      *        returned
  59      * @return the Component that should receive the focus when frame is
  60      *         selected for the first time, or null if no suitable Component
  61      *         can be found
  62      * @see JInternalFrame#getMostRecentFocusOwner
  63      * @throws IllegalArgumentException if window is null
  64      */
  65     public Component getInitialComponent(JInternalFrame frame) {
  66         return getDefaultComponent(frame);
  67     }
  68 }
< prev index next >