src/share/classes/java/awt/Container.java

Print this page




 241         new ObjectStreamField("layoutMgr", LayoutManager.class),
 242         new ObjectStreamField("dispatcher", LightweightDispatcher.class),
 243         new ObjectStreamField("maxSize", Dimension.class),
 244         new ObjectStreamField("focusCycleRoot", Boolean.TYPE),
 245         new ObjectStreamField("containerSerializedDataVersion", Integer.TYPE),
 246         new ObjectStreamField("focusTraversalPolicyProvider", Boolean.TYPE),
 247     };
 248 
 249     static {
 250         /* ensure that the necessary native libraries are loaded */
 251         Toolkit.loadLibraries();
 252         if (!GraphicsEnvironment.isHeadless()) {
 253             initIDs();
 254         }
 255 
 256         AWTAccessor.setContainerAccessor(new AWTAccessor.ContainerAccessor() {
 257             @Override
 258             public void validateUnconditionally(Container cont) {
 259                 cont.validateUnconditionally();
 260             }




 261         });
 262     }
 263 
 264     /**
 265      * Initialize JNI field and method IDs for fields that may be
 266        called from C.
 267      */
 268     private static native void initIDs();
 269 
 270     /**
 271      * Constructs a new Container. Containers can be extended directly,
 272      * but are lightweight in this case and must be contained by a parent
 273      * somewhere higher up in the component tree that is native.
 274      * (such as Frame for example).
 275      */
 276     public Container() {
 277     }
 278     @SuppressWarnings({"unchecked","rawtypes"})
 279     void initializeFocusTraversalKeys() {
 280         focusTraversalKeys = new Set[4];




 241         new ObjectStreamField("layoutMgr", LayoutManager.class),
 242         new ObjectStreamField("dispatcher", LightweightDispatcher.class),
 243         new ObjectStreamField("maxSize", Dimension.class),
 244         new ObjectStreamField("focusCycleRoot", Boolean.TYPE),
 245         new ObjectStreamField("containerSerializedDataVersion", Integer.TYPE),
 246         new ObjectStreamField("focusTraversalPolicyProvider", Boolean.TYPE),
 247     };
 248 
 249     static {
 250         /* ensure that the necessary native libraries are loaded */
 251         Toolkit.loadLibraries();
 252         if (!GraphicsEnvironment.isHeadless()) {
 253             initIDs();
 254         }
 255 
 256         AWTAccessor.setContainerAccessor(new AWTAccessor.ContainerAccessor() {
 257             @Override
 258             public void validateUnconditionally(Container cont) {
 259                 cont.validateUnconditionally();
 260             }
 261             
 262             public Component findComponentAt(Container cont, int x, int y, boolean ignoreEnabled) {
 263                 return cont.findComponentAt(x, y, ignoreEnabled);
 264             }
 265         });
 266     }
 267 
 268     /**
 269      * Initialize JNI field and method IDs for fields that may be
 270        called from C.
 271      */
 272     private static native void initIDs();
 273 
 274     /**
 275      * Constructs a new Container. Containers can be extended directly,
 276      * but are lightweight in this case and must be contained by a parent
 277      * somewhere higher up in the component tree that is native.
 278      * (such as Frame for example).
 279      */
 280     public Container() {
 281     }
 282     @SuppressWarnings({"unchecked","rawtypes"})
 283     void initializeFocusTraversalKeys() {
 284         focusTraversalKeys = new Set[4];