src/share/classes/java/awt/DefaultFocusTraversalPolicy.java

Print this page




  37  * <p>
  38  * If client code has explicitly set the focusability of a Component by either
  39  * overriding <code>Component.isFocusTraversable()</code> or
  40  * <code>Component.isFocusable()</code>, or by calling
  41  * <code>Component.setFocusable()</code>, then a DefaultFocusTraversalPolicy
  42  * behaves exactly like a ContainerOrderFocusTraversalPolicy. If, however, the
  43  * Component is relying on default focusability, then a
  44  * DefaultFocusTraversalPolicy will reject all Components with non-focusable
  45  * peers. This is the default FocusTraversalPolicy for all AWT Containers.
  46  * <p>
  47  * The focusability of a peer is implementation-dependent. Sun recommends that
  48  * all implementations for a particular native platform construct peers with
  49  * the same focusability. The recommendations for Windows and Unix are that
  50  * Canvases, Labels, Panels, Scrollbars, ScrollPanes, Windows, and lightweight
  51  * Components have non-focusable peers, and all other Components have focusable
  52  * peers. These recommendations are used in the Sun AWT implementations. Note
  53  * that the focusability of a Component's peer is different from, and does not
  54  * impact, the focusability of the Component itself.
  55  * <p>
  56  * Please see
  57  * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html">
  58  * How to Use the Focus Subsystem</a>,
  59  * a section in <em>The Java Tutorial</em>, and the
  60  * <a href="../../java/awt/doc-files/FocusSpec.html">Focus Specification</a>
  61  * for more information.
  62  *
  63  * @author David Mendenhall
  64  *
  65  * @see Container#getComponents
  66  * @see Component#isFocusable
  67  * @see Component#setFocusable
  68  * @since 1.4
  69  */
  70 public class DefaultFocusTraversalPolicy
  71     extends ContainerOrderFocusTraversalPolicy
  72 {
  73     /*
  74      * serialVersionUID
  75      */
  76     private static final long serialVersionUID = 8876966522510157497L;
  77 




  37  * <p>
  38  * If client code has explicitly set the focusability of a Component by either
  39  * overriding <code>Component.isFocusTraversable()</code> or
  40  * <code>Component.isFocusable()</code>, or by calling
  41  * <code>Component.setFocusable()</code>, then a DefaultFocusTraversalPolicy
  42  * behaves exactly like a ContainerOrderFocusTraversalPolicy. If, however, the
  43  * Component is relying on default focusability, then a
  44  * DefaultFocusTraversalPolicy will reject all Components with non-focusable
  45  * peers. This is the default FocusTraversalPolicy for all AWT Containers.
  46  * <p>
  47  * The focusability of a peer is implementation-dependent. Sun recommends that
  48  * all implementations for a particular native platform construct peers with
  49  * the same focusability. The recommendations for Windows and Unix are that
  50  * Canvases, Labels, Panels, Scrollbars, ScrollPanes, Windows, and lightweight
  51  * Components have non-focusable peers, and all other Components have focusable
  52  * peers. These recommendations are used in the Sun AWT implementations. Note
  53  * that the focusability of a Component's peer is different from, and does not
  54  * impact, the focusability of the Component itself.
  55  * <p>
  56  * Please see
  57  * <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html">
  58  * How to Use the Focus Subsystem</a>,
  59  * a section in <em>The Java Tutorial</em>, and the
  60  * <a href="../../java/awt/doc-files/FocusSpec.html">Focus Specification</a>
  61  * for more information.
  62  *
  63  * @author David Mendenhall
  64  *
  65  * @see Container#getComponents
  66  * @see Component#isFocusable
  67  * @see Component#setFocusable
  68  * @since 1.4
  69  */
  70 public class DefaultFocusTraversalPolicy
  71     extends ContainerOrderFocusTraversalPolicy
  72 {
  73     /*
  74      * serialVersionUID
  75      */
  76     private static final long serialVersionUID = 8876966522510157497L;
  77