< prev index next >

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

Print this page




3834          * @param p the point defining the top-left corner of the
3835          *    {@code Accessible}, given in the coordinate space
3836          *    of the object's parent
3837          * @return the {@code Accessible}, if it exists,
3838          *    at the specified location; else {@code null}
3839          */
3840         public Accessible getAccessibleAt(Point p) {
3841             return Container.this.getAccessibleAt(p);
3842         }
3843 
3844         /**
3845          * Number of PropertyChangeListener objects registered. It's used
3846          * to add/remove ContainerListener to track target Container's state.
3847          */
3848         private transient volatile int propertyListenersCount = 0;
3849 
3850         /**
3851          * The handler to fire {@code PropertyChange}
3852          * when children are added or removed
3853          */

3854         protected ContainerListener accessibleContainerHandler = null;
3855 
3856         /**
3857          * Fire {@code PropertyChange} listener, if one is registered,
3858          * when children are added or removed.
3859          * @since 1.3
3860          */
3861         protected class AccessibleContainerHandler
3862             implements ContainerListener, Serializable {
3863             private static final long serialVersionUID = -480855353991814677L;
3864 
3865             public void componentAdded(ContainerEvent e) {
3866                 Component c = e.getChild();
3867                 if (c != null && c instanceof Accessible) {
3868                     AccessibleAWTContainer.this.firePropertyChange(
3869                         AccessibleContext.ACCESSIBLE_CHILD_PROPERTY,
3870                         null, ((Accessible) c).getAccessibleContext());
3871                 }
3872             }
3873             public void componentRemoved(ContainerEvent e) {




3834          * @param p the point defining the top-left corner of the
3835          *    {@code Accessible}, given in the coordinate space
3836          *    of the object's parent
3837          * @return the {@code Accessible}, if it exists,
3838          *    at the specified location; else {@code null}
3839          */
3840         public Accessible getAccessibleAt(Point p) {
3841             return Container.this.getAccessibleAt(p);
3842         }
3843 
3844         /**
3845          * Number of PropertyChangeListener objects registered. It's used
3846          * to add/remove ContainerListener to track target Container's state.
3847          */
3848         private transient volatile int propertyListenersCount = 0;
3849 
3850         /**
3851          * The handler to fire {@code PropertyChange}
3852          * when children are added or removed
3853          */
3854         @SuppressWarnings("serial") // Not statically typed as Serializable
3855         protected ContainerListener accessibleContainerHandler = null;
3856 
3857         /**
3858          * Fire {@code PropertyChange} listener, if one is registered,
3859          * when children are added or removed.
3860          * @since 1.3
3861          */
3862         protected class AccessibleContainerHandler
3863             implements ContainerListener, Serializable {
3864             private static final long serialVersionUID = -480855353991814677L;
3865 
3866             public void componentAdded(ContainerEvent e) {
3867                 Component c = e.getChild();
3868                 if (c != null && c instanceof Accessible) {
3869                     AccessibleAWTContainer.this.firePropertyChange(
3870                         AccessibleContext.ACCESSIBLE_CHILD_PROPERTY,
3871                         null, ((Accessible) c).getAccessibleContext());
3872                 }
3873             }
3874             public void componentRemoved(ContainerEvent e) {


< prev index next >