38 import java.io.ObjectInputStream;
39 import java.io.ObjectOutputStream;
40 import java.io.ObjectStreamField;
41 import java.io.PrintStream;
42 import java.io.PrintWriter;
43
44 import java.lang.ref.WeakReference;
45 import java.security.AccessController;
46
47 import java.util.ArrayList;
48 import java.util.EventListener;
49 import java.util.HashSet;
50 import java.util.Set;
51
52 import javax.accessibility.*;
53
54 import sun.util.logging.PlatformLogger;
55
56 import sun.awt.AppContext;
57 import sun.awt.AWTAccessor;
58 import sun.awt.CausedFocusEvent;
59 import sun.awt.PeerEvent;
60 import sun.awt.SunToolkit;
61
62 import sun.awt.dnd.SunDropTargetEvent;
63
64 import sun.java2d.pipe.Region;
65
66 import sun.security.action.GetBooleanAction;
67
68 /**
69 * A generic Abstract Window Toolkit(AWT) container object is a component
70 * that can contain other AWT components.
71 * <p>
72 * Components added to a container are tracked in a list. The order
73 * of the list will define the components' front-to-back stacking order
74 * within the container. If no index is specified when adding a
75 * component to a container, it will be added to the end of the list
76 * (and hence to the bottom of the stacking order).
77 * <p>
78 * <b>Note</b>: For details on the focus subsystem, see
3508
3509 /**
3510 * Transfers the focus down one focus traversal cycle. If this Container is
3511 * a focus cycle root, then the focus owner is set to this Container's
3512 * default Component to focus, and the current focus cycle root is set to
3513 * this Container. If this Container is not a focus cycle root, then no
3514 * focus traversal operation occurs.
3515 *
3516 * @see Component#requestFocus()
3517 * @see #isFocusCycleRoot
3518 * @see #setFocusCycleRoot
3519 * @since 1.4
3520 */
3521 public void transferFocusDownCycle() {
3522 if (isFocusCycleRoot()) {
3523 KeyboardFocusManager.getCurrentKeyboardFocusManager().
3524 setGlobalCurrentFocusCycleRootPriv(this);
3525 Component toFocus = getFocusTraversalPolicy().
3526 getDefaultComponent(this);
3527 if (toFocus != null) {
3528 toFocus.requestFocus(CausedFocusEvent.Cause.TRAVERSAL_DOWN);
3529 }
3530 }
3531 }
3532
3533 void preProcessKeyEvent(KeyEvent e) {
3534 Container parent = this.parent;
3535 if (parent != null) {
3536 parent.preProcessKeyEvent(e);
3537 }
3538 }
3539
3540 void postProcessKeyEvent(KeyEvent e) {
3541 Container parent = this.parent;
3542 if (parent != null) {
3543 parent.postProcessKeyEvent(e);
3544 }
3545 }
3546
3547 boolean postsOldMouseEvents() {
3548 return true;
|
38 import java.io.ObjectInputStream;
39 import java.io.ObjectOutputStream;
40 import java.io.ObjectStreamField;
41 import java.io.PrintStream;
42 import java.io.PrintWriter;
43
44 import java.lang.ref.WeakReference;
45 import java.security.AccessController;
46
47 import java.util.ArrayList;
48 import java.util.EventListener;
49 import java.util.HashSet;
50 import java.util.Set;
51
52 import javax.accessibility.*;
53
54 import sun.util.logging.PlatformLogger;
55
56 import sun.awt.AppContext;
57 import sun.awt.AWTAccessor;
58 import sun.awt.PeerEvent;
59 import sun.awt.SunToolkit;
60
61 import sun.awt.dnd.SunDropTargetEvent;
62
63 import sun.java2d.pipe.Region;
64
65 import sun.security.action.GetBooleanAction;
66
67 /**
68 * A generic Abstract Window Toolkit(AWT) container object is a component
69 * that can contain other AWT components.
70 * <p>
71 * Components added to a container are tracked in a list. The order
72 * of the list will define the components' front-to-back stacking order
73 * within the container. If no index is specified when adding a
74 * component to a container, it will be added to the end of the list
75 * (and hence to the bottom of the stacking order).
76 * <p>
77 * <b>Note</b>: For details on the focus subsystem, see
3507
3508 /**
3509 * Transfers the focus down one focus traversal cycle. If this Container is
3510 * a focus cycle root, then the focus owner is set to this Container's
3511 * default Component to focus, and the current focus cycle root is set to
3512 * this Container. If this Container is not a focus cycle root, then no
3513 * focus traversal operation occurs.
3514 *
3515 * @see Component#requestFocus()
3516 * @see #isFocusCycleRoot
3517 * @see #setFocusCycleRoot
3518 * @since 1.4
3519 */
3520 public void transferFocusDownCycle() {
3521 if (isFocusCycleRoot()) {
3522 KeyboardFocusManager.getCurrentKeyboardFocusManager().
3523 setGlobalCurrentFocusCycleRootPriv(this);
3524 Component toFocus = getFocusTraversalPolicy().
3525 getDefaultComponent(this);
3526 if (toFocus != null) {
3527 toFocus.requestFocus(FocusEvent.Cause.TRAVERSAL_DOWN);
3528 }
3529 }
3530 }
3531
3532 void preProcessKeyEvent(KeyEvent e) {
3533 Container parent = this.parent;
3534 if (parent != null) {
3535 parent.preProcessKeyEvent(e);
3536 }
3537 }
3538
3539 void postProcessKeyEvent(KeyEvent e) {
3540 Container parent = this.parent;
3541 if (parent != null) {
3542 parent.postProcessKeyEvent(e);
3543 }
3544 }
3545
3546 boolean postsOldMouseEvents() {
3547 return true;
|