< prev index next >

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

Print this page

        

*** 181,201 **** */ private static final long serialVersionUID = 4613797578919906343L; /** * A constant which toggles one of the controllable behaviors ! * of <code>getMouseEventTarget</code>. It is used to specify whether * the method can return the Container on which it is originally called * in case if none of its children are the current mouse event targets. * * @see #getMouseEventTarget(int, int, boolean) */ static final boolean INCLUDE_SELF = true; /** * A constant which toggles one of the controllable behaviors ! * of <code>getMouseEventTarget</code>. It is used to specify whether * the method should search only lightweight components. * * @see #getMouseEventTarget(int, int, boolean) */ static final boolean SEARCH_HEAVYWEIGHTS = true; --- 181,201 ---- */ private static final long serialVersionUID = 4613797578919906343L; /** * A constant which toggles one of the controllable behaviors ! * of {@code getMouseEventTarget}. It is used to specify whether * the method can return the Container on which it is originally called * in case if none of its children are the current mouse event targets. * * @see #getMouseEventTarget(int, int, boolean) */ static final boolean INCLUDE_SELF = true; /** * A constant which toggles one of the controllable behaviors ! * of {@code getMouseEventTarget}. It is used to specify whether * the method should search only lightweight components. * * @see #getMouseEventTarget(int, int, boolean) */ static final boolean SEARCH_HEAVYWEIGHTS = true;
*** 382,392 **** /** * Determines the insets of this container, which indicate the size * of the container's border. * <p> ! * A <code>Frame</code> object, for example, has a top inset that * corresponds to the height of the frame's title bar. * @return the insets of this container. * @see Insets * @see LayoutManager * @since 1.1 --- 382,392 ---- /** * Determines the insets of this container, which indicate the size * of the container's border. * <p> ! * A {@code Frame} object, for example, has a top inset that * corresponds to the height of the frame's title bar. * @return the insets of this container. * @see Insets * @see LayoutManager * @since 1.1
*** 397,407 **** /** * Returns the insets for this container. * * @deprecated As of JDK version 1.1, ! * replaced by <code>getInsets()</code>. * @return the insets for this container */ @Deprecated public Insets insets() { ComponentPeer peer = this.peer; --- 397,407 ---- /** * Returns the insets for this container. * * @deprecated As of JDK version 1.1, ! * replaced by {@code getInsets()}. * @return the insets for this container */ @Deprecated public Insets insets() { ComponentPeer peer = this.peer;
*** 437,447 **** /** * Adds the specified component to this container. * This is a convenience method for {@link #addImpl}. * <p> * This method is obsolete as of 1.1. Please use the ! * method <code>add(Component, Object)</code> instead. * <p> * This method changes layout-related information, and therefore, * invalidates the component hierarchy. If the container has already been * displayed, the hierarchy must be validated thereafter in order to * display the added component. --- 437,447 ---- /** * Adds the specified component to this container. * This is a convenience method for {@link #addImpl}. * <p> * This method is obsolete as of 1.1. Please use the ! * method {@code add(Component, Object)} instead. * <p> * This method changes layout-related information, and therefore, * invalidates the component hierarchy. If the container has already been * displayed, the hierarchy must be validated thereafter in order to * display the added component.
*** 469,483 **** * display the added component. * * * @param comp the component to be added * @param index the position at which to insert the component, ! * or <code>-1</code> to append the component to the end * @exception NullPointerException if {@code comp} is {@code null} * @exception IllegalArgumentException if {@code index} is invalid (see * {@link #addImpl} for details) ! * @return the component <code>comp</code> * @see #addImpl * @see #remove * @see #invalidate * @see #validate * @see javax.swing.JComponent#revalidate() --- 469,483 ---- * display the added component. * * * @param comp the component to be added * @param index the position at which to insert the component, ! * or {@code -1} to append the component to the end * @exception NullPointerException if {@code comp} is {@code null} * @exception IllegalArgumentException if {@code index} is invalid (see * {@link #addImpl} for details) ! * @return the component {@code comp} * @see #addImpl * @see #remove * @see #invalidate * @see #validate * @see javax.swing.JComponent#revalidate()
*** 530,540 **** throw new IllegalArgumentException("illegal component position"); } if (comp.parent == this) { if (index == component.size()) { throw new IllegalArgumentException("illegal component position " + ! index + " should be less then " + component.size()); } } checkAddToSelf(comp); checkNotAWindow(comp); --- 530,540 ---- throw new IllegalArgumentException("illegal component position"); } if (comp.parent == this) { if (index == component.size()) { throw new IllegalArgumentException("illegal component position " + ! index + " should be less than " + component.size()); } } checkAddToSelf(comp); checkNotAWindow(comp);
*** 732,775 **** * z-order paints over the component with the higher z-order. * <p> * If the component is a child of some other container, it is * removed from that container before being added to this container. * The important difference between this method and ! * <code>java.awt.Container.add(Component, int)</code> is that this method ! * doesn't call <code>removeNotify</code> on the component while * removing it from its previous container unless necessary and when * allowed by the underlying native windowing system. This way, if the * component has the keyboard focus, it maintains the focus when * moved to the new position. * <p> * This property is guaranteed to apply only to lightweight ! * non-<code>Container</code> components. * <p> * This method changes layout-related information, and therefore, * invalidates the component hierarchy. * <p> * <b>Note</b>: Not all platforms support changing the z-order of * heavyweight components from one container into another without ! * the call to <code>removeNotify</code>. There is no way to detect * whether a platform supports this, so developers shouldn't make * any assumptions. * * @param comp the component to be moved * @param index the position in the container's list to ! * insert the component, where <code>getComponentCount()</code> * appends to the end ! * @exception NullPointerException if <code>comp</code> is ! * <code>null</code> ! * @exception IllegalArgumentException if <code>comp</code> is one of the * container's parents ! * @exception IllegalArgumentException if <code>index</code> is not in ! * the range <code>[0, getComponentCount()]</code> for moving * between containers, or not in the range ! * <code>[0, getComponentCount()-1]</code> for moving inside * a container * @exception IllegalArgumentException if adding a container to itself ! * @exception IllegalArgumentException if adding a <code>Window</code> * to a container * @see #getComponentZOrder(java.awt.Component) * @see #invalidate * @since 1.5 */ --- 732,775 ---- * z-order paints over the component with the higher z-order. * <p> * If the component is a child of some other container, it is * removed from that container before being added to this container. * The important difference between this method and ! * {@code java.awt.Container.add(Component, int)} is that this method ! * doesn't call {@code removeNotify} on the component while * removing it from its previous container unless necessary and when * allowed by the underlying native windowing system. This way, if the * component has the keyboard focus, it maintains the focus when * moved to the new position. * <p> * This property is guaranteed to apply only to lightweight ! * non-{@code Container} components. * <p> * This method changes layout-related information, and therefore, * invalidates the component hierarchy. * <p> * <b>Note</b>: Not all platforms support changing the z-order of * heavyweight components from one container into another without ! * the call to {@code removeNotify}. There is no way to detect * whether a platform supports this, so developers shouldn't make * any assumptions. * * @param comp the component to be moved * @param index the position in the container's list to ! * insert the component, where {@code getComponentCount()} * appends to the end ! * @exception NullPointerException if {@code comp} is ! * {@code null} ! * @exception IllegalArgumentException if {@code comp} is one of the * container's parents ! * @exception IllegalArgumentException if {@code index} is not in ! * the range {@code [0, getComponentCount()]} for moving * between containers, or not in the range ! * {@code [0, getComponentCount()-1]} for moving inside * a container * @exception IllegalArgumentException if adding a container to itself ! * @exception IllegalArgumentException if adding a {@code Window} * to a container * @see #getComponentZOrder(java.awt.Component) * @see #invalidate * @since 1.5 */
*** 947,957 **** * its index. The component with the lowest z-order index is * painted last, above all other child components. * * @param comp the component being queried * @return the z-order index of the component; otherwise ! * returns -1 if the component is <code>null</code> * or doesn't belong to the container * @see #setComponentZOrder(java.awt.Component, int) * @since 1.5 */ public int getComponentZOrder(Component comp) { --- 947,957 ---- * its index. The component with the lowest z-order index is * painted last, above all other child components. * * @param comp the component being queried * @return the z-order index of the component; otherwise ! * returns -1 if the component is {@code null} * or doesn't belong to the container * @see #setComponentZOrder(java.awt.Component, int) * @since 1.5 */ public int getComponentZOrder(Component comp) {
*** 1008,1018 **** * * * @param comp the component to be added * @param constraints an object expressing layout constraints for this * @param index the position in the container's list at which to insert ! * the component; <code>-1</code> means insert at the end * component * @exception NullPointerException if {@code comp} is {@code null} * @exception IllegalArgumentException if {@code index} is invalid (see * {@link #addImpl} for details) * @see #addImpl --- 1008,1018 ---- * * * @param comp the component to be added * @param constraints an object expressing layout constraints for this * @param index the position in the container's list at which to insert ! * the component; {@code -1} means insert at the end * component * @exception NullPointerException if {@code comp} is {@code null} * @exception IllegalArgumentException if {@code index} is invalid (see * {@link #addImpl} for details) * @see #addImpl
*** 1028,1051 **** /** * Adds the specified component to this container at the specified * index. This method also notifies the layout manager to add * the component to this container's layout using the specified ! * constraints object via the <code>addLayoutComponent</code> * method. * <p> * The constraints are * defined by the particular layout manager being used. For ! * example, the <code>BorderLayout</code> class defines five ! * constraints: <code>BorderLayout.NORTH</code>, ! * <code>BorderLayout.SOUTH</code>, <code>BorderLayout.EAST</code>, ! * <code>BorderLayout.WEST</code>, and <code>BorderLayout.CENTER</code>. * <p> ! * The <code>GridBagLayout</code> class requires a ! * <code>GridBagConstraints</code> object. Failure to pass * the correct type of constraints object results in an ! * <code>IllegalArgumentException</code>. * <p> * If the current layout manager implements {@code LayoutManager2}, then * {@link LayoutManager2#addLayoutComponent(Component,Object)} is invoked on * it. If the current layout manager does not implement * {@code LayoutManager2}, and constraints is a {@code String}, then --- 1028,1051 ---- /** * Adds the specified component to this container at the specified * index. This method also notifies the layout manager to add * the component to this container's layout using the specified ! * constraints object via the {@code addLayoutComponent} * method. * <p> * The constraints are * defined by the particular layout manager being used. For ! * example, the {@code BorderLayout} class defines five ! * constraints: {@code BorderLayout.NORTH}, ! * {@code BorderLayout.SOUTH}, {@code BorderLayout.EAST}, ! * {@code BorderLayout.WEST}, and {@code BorderLayout.CENTER}. * <p> ! * The {@code GridBagLayout} class requires a ! * {@code GridBagConstraints} object. Failure to pass * the correct type of constraints object results in an ! * {@code IllegalArgumentException}. * <p> * If the current layout manager implements {@code LayoutManager2}, then * {@link LayoutManager2#addLayoutComponent(Component,Object)} is invoked on * it. If the current layout manager does not implement * {@code LayoutManager2}, and constraints is a {@code String}, then
*** 1059,1069 **** * every add request to a container as all other add methods defer * to this one. An overriding method should * usually include a call to the superclass's version of the method: * * <blockquote> ! * <code>super.addImpl(comp, constraints, index)</code> * </blockquote> * <p> * This method changes layout-related information, and therefore, * invalidates the component hierarchy. If the container has already been * displayed, the hierarchy must be validated thereafter in order to --- 1059,1069 ---- * every add request to a container as all other add methods defer * to this one. An overriding method should * usually include a call to the superclass's version of the method: * * <blockquote> ! * {@code super.addImpl(comp, constraints, index)} * </blockquote> * <p> * This method changes layout-related information, and therefore, * invalidates the component hierarchy. If the container has already been * displayed, the hierarchy must be validated thereafter in order to
*** 1071,1081 **** * * @param comp the component to be added * @param constraints an object expressing layout constraints * for this component * @param index the position in the container's list at which to ! * insert the component, where <code>-1</code> * means append to the end * @exception IllegalArgumentException if {@code index} is invalid; * if {@code comp} is a child of this container, the valid * range is {@code [-1, getComponentCount()-1]}; if component is * not a child of this container, the valid range is --- 1071,1081 ---- * * @param comp the component to be added * @param constraints an object expressing layout constraints * for this component * @param index the position in the container's list at which to ! * insert the component, where {@code -1} * means append to the end * @exception IllegalArgumentException if {@code index} is invalid; * if {@code comp} is a child of this container, the valid * range is {@code [-1, getComponentCount()-1]}; if component is * not a child of this container, the valid range is
*** 1194,1208 **** } } } /** ! * Removes the component, specified by <code>index</code>, * from this container. * This method also notifies the layout manager to remove the * component from this container's layout via the ! * <code>removeLayoutComponent</code> method. * <p> * This method changes layout-related information, and therefore, * invalidates the component hierarchy. If the container has already been * displayed, the hierarchy must be validated thereafter in order to * reflect the changes. --- 1194,1208 ---- } } } /** ! * Removes the component, specified by {@code index}, * from this container. * This method also notifies the layout manager to remove the * component from this container's layout via the ! * {@code removeLayoutComponent} method. * <p> * This method changes layout-related information, and therefore, * invalidates the component hierarchy. If the container has already been * displayed, the hierarchy must be validated thereafter in order to * reflect the changes.
*** 1261,1271 **** /** * Removes the specified component from this container. * This method also notifies the layout manager to remove the * component from this container's layout via the ! * <code>removeLayoutComponent</code> method. * <p> * This method changes layout-related information, and therefore, * invalidates the component hierarchy. If the container has already been * displayed, the hierarchy must be validated thereafter in order to * reflect the changes. --- 1261,1271 ---- /** * Removes the specified component from this container. * This method also notifies the layout manager to remove the * component from this container's layout via the ! * {@code removeLayoutComponent} method. * <p> * This method changes layout-related information, and therefore, * invalidates the component hierarchy. If the container has already been * displayed, the hierarchy must be validated thereafter in order to * reflect the changes.
*** 1290,1300 **** /** * Removes all the components from this container. * This method also notifies the layout manager to remove the * components from this container's layout via the ! * <code>removeLayoutComponent</code> method. * <p> * This method changes layout-related information, and therefore, * invalidates the component hierarchy. If the container has already been * displayed, the hierarchy must be validated thereafter in order to * reflect the changes. --- 1290,1300 ---- /** * Removes all the components from this container. * This method also notifies the layout manager to remove the * components from this container's layout via the ! * {@code removeLayoutComponent} method. * <p> * This method changes layout-related information, and therefore, * invalidates the component hierarchy. If the container has already been * displayed, the hierarchy must be validated thereafter in order to * reflect the changes.
*** 1510,1520 **** } /** * Causes this container to lay out its components. Most programs * should not call this method directly, but should invoke ! * the <code>validate</code> method instead. * @see LayoutManager#layoutContainer * @see #setLayout * @see #validate * @since 1.1 */ --- 1510,1520 ---- } /** * Causes this container to lay out its components. Most programs * should not call this method directly, but should invoke ! * the {@code validate} method instead. * @see LayoutManager#layoutContainer * @see #setLayout * @see #validate * @since 1.1 */
*** 1522,1532 **** layout(); } /** * @deprecated As of JDK version 1.1, ! * replaced by <code>doLayout()</code>. */ @Deprecated public void layout() { LayoutManager layoutMgr = this.layoutMgr; if (layoutMgr != null) { --- 1522,1532 ---- layout(); } /** * @deprecated As of JDK version 1.1, ! * replaced by {@code doLayout()}. */ @Deprecated public void layout() { LayoutManager layoutMgr = this.layoutMgr; if (layoutMgr != null) {
*** 1701,1711 **** /** * Recursively descends the container tree and recomputes the * layout for any subtrees marked as needing it (those marked as * invalid). Synchronization should be provided by the method ! * that calls this one: <code>validate</code>. * * @see #doLayout * @see #validate */ protected void validateTree() { --- 1701,1711 ---- /** * Recursively descends the container tree and recomputes the * layout for any subtrees marked as needing it (those marked as * invalid). Synchronization should be provided by the method ! * that calls this one: {@code validate}. * * @see #doLayout * @see #validate */ protected void validateTree() {
*** 1789,1799 **** * {@code LayoutManager}. Implementations that cache need not invoke * {@code preferredLayoutSize} on the {@code LayoutManager} every time * this method is invoked, rather the {@code LayoutManager} will only * be queried after the {@code Container} becomes invalid. * ! * @return an instance of <code>Dimension</code> that represents * the preferred size of this container. * @see #getMinimumSize * @see #getMaximumSize * @see #getLayout * @see LayoutManager#preferredLayoutSize(Container) --- 1789,1799 ---- * {@code LayoutManager}. Implementations that cache need not invoke * {@code preferredLayoutSize} on the {@code LayoutManager} every time * this method is invoked, rather the {@code LayoutManager} will only * be queried after the {@code Container} becomes invalid. * ! * @return an instance of {@code Dimension} that represents * the preferred size of this container. * @see #getMinimumSize * @see #getMaximumSize * @see #getLayout * @see LayoutManager#preferredLayoutSize(Container)
*** 1803,1813 **** return preferredSize(); } /** * @deprecated As of JDK version 1.1, ! * replaced by <code>getPreferredSize()</code>. */ @Deprecated public Dimension preferredSize() { /* Avoid grabbing the lock if a reasonable cached size value * is available. --- 1803,1813 ---- return preferredSize(); } /** * @deprecated As of JDK version 1.1, ! * replaced by {@code getPreferredSize()}. */ @Deprecated public Dimension preferredSize() { /* Avoid grabbing the lock if a reasonable cached size value * is available.
*** 1840,1850 **** * {@code LayoutManager}. Implementations that cache need not invoke * {@code minimumLayoutSize} on the {@code LayoutManager} every time * this method is invoked, rather the {@code LayoutManager} will only * be queried after the {@code Container} becomes invalid. * ! * @return an instance of <code>Dimension</code> that represents * the minimum size of this container. * @see #getPreferredSize * @see #getMaximumSize * @see #getLayout * @see LayoutManager#minimumLayoutSize(Container) --- 1840,1850 ---- * {@code LayoutManager}. Implementations that cache need not invoke * {@code minimumLayoutSize} on the {@code LayoutManager} every time * this method is invoked, rather the {@code LayoutManager} will only * be queried after the {@code Container} becomes invalid. * ! * @return an instance of {@code Dimension} that represents * the minimum size of this container. * @see #getPreferredSize * @see #getMaximumSize * @see #getLayout * @see LayoutManager#minimumLayoutSize(Container)
*** 1855,1865 **** return minimumSize(); } /** * @deprecated As of JDK version 1.1, ! * replaced by <code>getMinimumSize()</code>. */ @Deprecated public Dimension minimumSize() { /* Avoid grabbing the lock if a reasonable cached size value * is available. --- 1855,1865 ---- return minimumSize(); } /** * @deprecated As of JDK version 1.1, ! * replaced by {@code getMinimumSize()}. */ @Deprecated public Dimension minimumSize() { /* Avoid grabbing the lock if a reasonable cached size value * is available.
*** 1893,1903 **** * {@code LayoutManager2}. Implementations that cache need not invoke * {@code maximumLayoutSize} on the {@code LayoutManager2} every time * this method is invoked, rather the {@code LayoutManager2} will only * be queried after the {@code Container} becomes invalid. * ! * @return an instance of <code>Dimension</code> that represents * the maximum size of this container. * @see #getPreferredSize * @see #getMinimumSize * @see #getLayout * @see LayoutManager2#maximumLayoutSize(Container) --- 1893,1903 ---- * {@code LayoutManager2}. Implementations that cache need not invoke * {@code maximumLayoutSize} on the {@code LayoutManager2} every time * this method is invoked, rather the {@code LayoutManager2} will only * be queried after the {@code Container} becomes invalid. * ! * @return an instance of {@code Dimension} that represents * the maximum size of this container. * @see #getPreferredSize * @see #getMinimumSize * @see #getLayout * @see LayoutManager2#maximumLayoutSize(Container)
*** 2167,2177 **** /** * Returns an array of all the container listeners * registered on this container. * ! * @return all of this container's <code>ContainerListener</code>s * or an empty array if no container * listeners are currently registered * * @see #addContainerListener * @see #removeContainerListener --- 2167,2177 ---- /** * Returns an array of all the container listeners * registered on this container. * ! * @return all of this container's {@code ContainerListener}s * or an empty array if no container * listeners are currently registered * * @see #addContainerListener * @see #removeContainerListener
*** 2182,2216 **** } /** * Returns an array of all the objects currently registered * as <code><em>Foo</em>Listener</code>s ! * upon this <code>Container</code>. * <code><em>Foo</em>Listener</code>s are registered using the * <code>add<em>Foo</em>Listener</code> method. * * <p> ! * You can specify the <code>listenerType</code> argument * with a class literal, such as * <code><em>Foo</em>Listener.class</code>. * For example, you can query a ! * <code>Container</code> <code>c</code> * for its container listeners with the following code: * * <pre>ContainerListener[] cls = (ContainerListener[])(c.getListeners(ContainerListener.class));</pre> * * If no such listeners exist, this method returns an empty array. * * @param listenerType the type of listeners requested; this parameter * should specify an interface that descends from ! * <code>java.util.EventListener</code> * @return an array of all objects registered as * <code><em>Foo</em>Listener</code>s on this container, * or an empty array if no such listeners have been added ! * @exception ClassCastException if <code>listenerType</code> * doesn't specify a class or interface that implements ! * <code>java.util.EventListener</code> * @exception NullPointerException if {@code listenerType} is {@code null} * * @see #getContainerListeners * * @since 1.3 --- 2182,2216 ---- } /** * Returns an array of all the objects currently registered * as <code><em>Foo</em>Listener</code>s ! * upon this {@code Container}. * <code><em>Foo</em>Listener</code>s are registered using the * <code>add<em>Foo</em>Listener</code> method. * * <p> ! * You can specify the {@code listenerType} argument * with a class literal, such as * <code><em>Foo</em>Listener.class</code>. * For example, you can query a ! * {@code Container c} * for its container listeners with the following code: * * <pre>ContainerListener[] cls = (ContainerListener[])(c.getListeners(ContainerListener.class));</pre> * * If no such listeners exist, this method returns an empty array. * * @param listenerType the type of listeners requested; this parameter * should specify an interface that descends from ! * {@code java.util.EventListener} * @return an array of all objects registered as * <code><em>Foo</em>Listener</code>s on this container, * or an empty array if no such listeners have been added ! * @exception ClassCastException if {@code listenerType} * doesn't specify a class or interface that implements ! * {@code java.util.EventListener} * @exception NullPointerException if {@code listenerType} is {@code null} * * @see #getContainerListeners * * @since 1.3
*** 2240,2253 **** return super.eventEnabled(e); } /** * Processes events on this container. If the event is a ! * <code>ContainerEvent</code>, it invokes the ! * <code>processContainerEvent</code> method, else it invokes ! * its superclass's <code>processEvent</code>. ! * <p>Note that if the event parameter is <code>null</code> * the behavior is unspecified and may result in an * exception. * * @param e the event */ --- 2240,2253 ---- return super.eventEnabled(e); } /** * Processes events on this container. If the event is a ! * {@code ContainerEvent}, it invokes the ! * {@code processContainerEvent} method, else it invokes ! * its superclass's {@code processEvent}. ! * <p>Note that if the event parameter is {@code null} * the behavior is unspecified and may result in an * exception. * * @param e the event */
*** 2265,2278 **** * NOTE: This method will not be called unless container events * are enabled for this component; this happens when one of the * following occurs: * <ul> * <li>A ContainerListener object is registered via ! * <code>addContainerListener</code> ! * <li>Container events are enabled via <code>enableEvents</code> * </ul> ! * <p>Note that if the event parameter is <code>null</code> * the behavior is unspecified and may result in an * exception. * * @param e the container event * @see Component#enableEvents --- 2265,2278 ---- * NOTE: This method will not be called unless container events * are enabled for this component; this happens when one of the * following occurs: * <ul> * <li>A ContainerListener object is registered via ! * {@code addContainerListener} ! * <li>Container events are enabled via {@code enableEvents} * </ul> ! * <p>Note that if the event parameter is {@code null} * the behavior is unspecified and may result in an * exception. * * @param e the container event * @see Component#enableEvents
*** 2363,2377 **** /** * A private version of getMouseEventTarget which has two additional * controllable behaviors. This method searches for the top-most * descendant of this container that contains the given coordinates * and is accepted by the given filter. The search will be constrained to ! * lightweight descendants if the last argument is <code>false</code>. * * @param filter EventTargetFilter instance to determine whether the * given component is a valid target for this event. ! * @param searchHeavyweights if <code>false</code>, the method * will bypass heavyweight components during the search. */ private Component getMouseEventTarget(int x, int y, boolean includeSelf, EventTargetFilter filter, boolean searchHeavyweights) { --- 2363,2377 ---- /** * A private version of getMouseEventTarget which has two additional * controllable behaviors. This method searches for the top-most * descendant of this container that contains the given coordinates * and is accepted by the given filter. The search will be constrained to ! * lightweight descendants if the last argument is {@code false}. * * @param filter EventTargetFilter instance to determine whether the * given component is a valid target for this event. ! * @param searchHeavyweights if {@code false}, the method * will bypass heavyweight components during the search. */ private Component getMouseEventTarget(int x, int y, boolean includeSelf, EventTargetFilter filter, boolean searchHeavyweights) {
*** 2397,2417 **** * descendant of this container that contains the given coordinates * and is accepted by the given filter. The search will be constrained to * descendants of only lightweight children or only heavyweight children * of this container depending on searchHeavyweightChildren. The search will * be constrained to only lightweight descendants of the searched children ! * of this container if searchHeavyweightDescendants is <code>false</code>. * * @param filter EventTargetFilter instance to determine whether the * selected component is a valid target for this event. ! * @param searchHeavyweightChildren if <code>true</code>, the method * will bypass immediate lightweight children during the search. ! * If <code>false</code>, the methods will bypass immediate * heavyweight children during the search. ! * @param searchHeavyweightDescendants if <code>false</code>, the method * will bypass heavyweight descendants which are not immediate ! * children during the search. If <code>true</code>, the method * will traverse both lightweight and heavyweight descendants during * the search. */ private Component getMouseEventTargetImpl(int x, int y, boolean includeSelf, EventTargetFilter filter, --- 2397,2417 ---- * descendant of this container that contains the given coordinates * and is accepted by the given filter. The search will be constrained to * descendants of only lightweight children or only heavyweight children * of this container depending on searchHeavyweightChildren. The search will * be constrained to only lightweight descendants of the searched children ! * of this container if searchHeavyweightDescendants is {@code false}. * * @param filter EventTargetFilter instance to determine whether the * selected component is a valid target for this event. ! * @param searchHeavyweightChildren if {@code true}, the method * will bypass immediate lightweight children during the search. ! * If {@code false}, the methods will bypass immediate * heavyweight children during the search. ! * @param searchHeavyweightDescendants if {@code false}, the method * will bypass heavyweight descendants which are not immediate ! * children during the search. If {@code true}, the method * will traverse both lightweight and heavyweight descendants during * the search. */ private Component getMouseEventTargetImpl(int x, int y, boolean includeSelf, EventTargetFilter filter,
*** 2523,2533 **** } } /** * @deprecated As of JDK version 1.1, ! * replaced by <code>dispatchEvent(AWTEvent e)</code> */ @Deprecated public void deliverEvent(Event e) { Component comp = getComponentAt(e.x, e.y); if ((comp != null) && (comp != this)) { --- 2523,2533 ---- } } /** * @deprecated As of JDK version 1.1, ! * replaced by {@code dispatchEvent(AWTEvent e)} */ @Deprecated public void deliverEvent(Event e) { Component comp = getComponentAt(e.x, e.y); if ((comp != null) && (comp != this)) {
*** 2560,2570 **** return locate(x, y); } /** * @deprecated As of JDK version 1.1, ! * replaced by <code>getComponentAt(int, int)</code>. */ @Deprecated public Component locate(int x, int y) { if (!contains(x, y)) { return null; --- 2560,2570 ---- return locate(x, y); } /** * @deprecated As of JDK version 1.1, ! * replaced by {@code getComponentAt(int, int)}. */ @Deprecated public Component locate(int x, int y) { if (!contains(x, y)) { return null;
*** 2591,2626 **** /** * Gets the component that contains the specified point. * @param p the point. * @return returns the component that contains the point, ! * or <code>null</code> if the component does * not contain the point. * @see Component#contains * @since 1.1 */ public Component getComponentAt(Point p) { return getComponentAt(p.x, p.y); } /** ! * Returns the position of the mouse pointer in this <code>Container</code>'s ! * coordinate space if the <code>Container</code> is under the mouse pointer, ! * otherwise returns <code>null</code>. * This method is similar to {@link Component#getMousePosition()} with the exception ! * that it can take the <code>Container</code>'s children into account. ! * If <code>allowChildren</code> is <code>false</code>, this method will return ! * a non-null value only if the mouse pointer is above the <code>Container</code> * directly, not above the part obscured by children. ! * If <code>allowChildren</code> is <code>true</code>, this method returns ! * a non-null value if the mouse pointer is above <code>Container</code> or any * of its descendants. * * @exception HeadlessException if GraphicsEnvironment.isHeadless() returns true * @param allowChildren true if children should be taken into account * @see Component#getMousePosition ! * @return mouse coordinates relative to this <code>Component</code>, or null * @since 1.5 */ public Point getMousePosition(boolean allowChildren) throws HeadlessException { if (GraphicsEnvironment.isHeadless()) { throw new HeadlessException(); --- 2591,2626 ---- /** * Gets the component that contains the specified point. * @param p the point. * @return returns the component that contains the point, ! * or {@code null} if the component does * not contain the point. * @see Component#contains * @since 1.1 */ public Component getComponentAt(Point p) { return getComponentAt(p.x, p.y); } /** ! * Returns the position of the mouse pointer in this {@code Container}'s ! * coordinate space if the {@code Container} is under the mouse pointer, ! * otherwise returns {@code null}. * This method is similar to {@link Component#getMousePosition()} with the exception ! * that it can take the {@code Container}'s children into account. ! * If {@code allowChildren} is {@code false}, this method will return ! * a non-null value only if the mouse pointer is above the {@code Container} * directly, not above the part obscured by children. ! * If {@code allowChildren} is {@code true}, this method returns ! * a non-null value if the mouse pointer is above {@code Container} or any * of its descendants. * * @exception HeadlessException if GraphicsEnvironment.isHeadless() returns true * @param allowChildren true if children should be taken into account * @see Component#getMousePosition ! * @return mouse coordinates relative to this {@code Component}, or null * @since 1.5 */ public Point getMousePosition(boolean allowChildren) throws HeadlessException { if (GraphicsEnvironment.isHeadless()) { throw new HeadlessException();
*** 2846,2857 **** /** * Checks if the component is contained in the component hierarchy of * this container. * @param c the component ! * @return <code>true</code> if it is an ancestor; ! * <code>false</code> otherwise. * @since 1.1 */ public boolean isAncestorOf(Component c) { Container p; if (c == null || ((p = c.getParent()) == null)) { --- 2846,2857 ---- /** * Checks if the component is contained in the component hierarchy of * this container. * @param c the component ! * @return {@code true} if it is an ancestor; ! * {@code false} otherwise. * @since 1.1 */ public boolean isAncestorOf(Component c) { Container p; if (c == null || ((p = c.getParent()) == null)) {
*** 2981,2995 **** } /* End of JOptionPane support code */ /** ! * Returns a string representing the state of this <code>Container</code>. * This method is intended to be used only for debugging purposes, and the * content and format of the returned string may vary between * implementations. The returned string may be empty but may not be ! * <code>null</code>. * * @return the parameter string of this container */ protected String paramString() { String str = super.paramString(); --- 2981,2995 ---- } /* End of JOptionPane support code */ /** ! * Returns a string representing the state of this {@code Container}. * This method is intended to be used only for debugging purposes, and the * content and format of the returned string may vary between * implementations. The returned string may be empty but may not be ! * {@code null}. * * @return the parameter string of this container */ protected String paramString() { String str = super.paramString();
*** 3003,3014 **** /** * Prints a listing of this container to the specified output * stream. The listing starts at the specified indentation. * <p> * The immediate children of the container are printed with ! * an indentation of <code>indent+1</code>. The children ! * of those children are printed at <code>indent+2</code> * and so on. * * @param out a print stream * @param indent the number of spaces to indent * @throws NullPointerException if {@code out} is {@code null} --- 3003,3014 ---- /** * Prints a listing of this container to the specified output * stream. The listing starts at the specified indentation. * <p> * The immediate children of the container are printed with ! * an indentation of {@code indent+1}. The children ! * of those children are printed at {@code indent+2} * and so on. * * @param out a print stream * @param indent the number of spaces to indent * @throws NullPointerException if {@code out} is {@code null}
*** 3030,3041 **** /** * Prints out a list, starting at the specified indentation, * to the specified print writer. * <p> * The immediate children of the container are printed with ! * an indentation of <code>indent+1</code>. The children ! * of those children are printed at <code>indent+2</code> * and so on. * * @param out a print writer * @param indent the number of spaces to indent * @throws NullPointerException if {@code out} is {@code null} --- 3030,3041 ---- /** * Prints out a list, starting at the specified indentation, * to the specified print writer. * <p> * The immediate children of the container are printed with ! * an indentation of {@code indent+1}. The children ! * of those children are printed at {@code indent+2} * and so on. * * @param out a print writer * @param indent the number of spaces to indent * @throws NullPointerException if {@code out} is {@code null}
*** 3147,3157 **** } /** * Returns the Set of focus traversal keys for a given traversal operation * for this Container. (See ! * <code>setFocusTraversalKeys</code> for a full description of each key.) * <p> * If a Set of traversal keys has not been explicitly defined for this * Container, then this Container's parent's Set is returned. If no Set * has been explicitly defined for any of this Container's ancestors, then * the current KeyboardFocusManager's default Set is returned. --- 3147,3157 ---- } /** * Returns the Set of focus traversal keys for a given traversal operation * for this Container. (See ! * {@code setFocusTraversalKeys} for a full description of each key.) * <p> * If a Set of traversal keys has not been explicitly defined for this * Container, then this Container's parent's Set is returned. If no Set * has been explicitly defined for any of this Container's ancestors, then * the current KeyboardFocusManager's default Set is returned.
*** 3186,3205 **** } /** * Returns whether the Set of focus traversal keys for the given focus * traversal operation has been explicitly defined for this Container. If ! * this method returns <code>false</code>, this Container is inheriting the * Set from an ancestor, or from the current KeyboardFocusManager. * * @param id one of KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, * KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS, * KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS, or * KeyboardFocusManager.DOWN_CYCLE_TRAVERSAL_KEYS ! * @return <code>true</code> if the Set of focus traversal keys for the * given focus traversal operation has been explicitly defined for ! * this Component; <code>false</code> otherwise. * @throws IllegalArgumentException if id is not one of * KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, * KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS, * KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS, or * KeyboardFocusManager.DOWN_CYCLE_TRAVERSAL_KEYS --- 3186,3205 ---- } /** * Returns whether the Set of focus traversal keys for the given focus * traversal operation has been explicitly defined for this Container. If ! * this method returns {@code false}, this Container is inheriting the * Set from an ancestor, or from the current KeyboardFocusManager. * * @param id one of KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, * KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS, * KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS, or * KeyboardFocusManager.DOWN_CYCLE_TRAVERSAL_KEYS ! * @return {@code true} if the Set of focus traversal keys for the * given focus traversal operation has been explicitly defined for ! * this Component; {@code false} otherwise. * @throws IllegalArgumentException if id is not one of * KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, * KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS, * KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS, or * KeyboardFocusManager.DOWN_CYCLE_TRAVERSAL_KEYS
*** 3218,3233 **** * Container's focus traversal cycle. Each focus traversal cycle has only * a single focus cycle root and each Container which is not a focus cycle * root belongs to only a single focus traversal cycle. Containers which * are focus cycle roots belong to two cycles: one rooted at the Container * itself, and one rooted at the Container's nearest focus-cycle-root ! * ancestor. This method will return <code>true</code> for both such * Containers in this case. * * @param container the Container to be tested ! * @return <code>true</code> if the specified Container is a focus-cycle- ! * root of this Container; <code>false</code> otherwise * @see #isFocusCycleRoot() * @since 1.4 */ public boolean isFocusCycleRoot(Container container) { if (isFocusCycleRoot() && container == this) { --- 3218,3233 ---- * Container's focus traversal cycle. Each focus traversal cycle has only * a single focus cycle root and each Container which is not a focus cycle * root belongs to only a single focus traversal cycle. Containers which * are focus cycle roots belong to two cycles: one rooted at the Container * itself, and one rooted at the Container's nearest focus-cycle-root ! * ancestor. This method will return {@code true} for both such * Containers in this case. * * @param container the Container to be tested ! * @return {@code true} if the specified Container is a focus-cycle- ! * root of this Container; {@code false} otherwise * @see #isFocusCycleRoot() * @since 1.4 */ public boolean isFocusCycleRoot(Container container) { if (isFocusCycleRoot() && container == this) {
*** 3392,3406 **** } } /** * Returns whether the focus traversal policy has been explicitly set for ! * this Container. If this method returns <code>false</code>, this * Container will inherit its focus traversal policy from an ancestor. * ! * @return <code>true</code> if the focus traversal policy has been ! * explicitly set for this Container; <code>false</code> otherwise. * @since 1.4 */ public boolean isFocusTraversalPolicySet() { return (focusTraversalPolicy != null); } --- 3392,3406 ---- } } /** * Returns whether the focus traversal policy has been explicitly set for ! * this Container. If this method returns {@code false}, this * Container will inherit its focus traversal policy from an ancestor. * ! * @return {@code true} if the focus traversal policy has been ! * explicitly set for this Container; {@code false} otherwise. * @since 1.4 */ public boolean isFocusTraversalPolicySet() { return (focusTraversalPolicy != null); }
*** 3462,3472 **** } /** * Sets whether this container will be used to provide focus * traversal policy. Container with this property as ! * <code>true</code> will be used to acquire focus traversal policy * instead of closest focus cycle root ancestor. * @param provider indicates whether this container will be used to * provide focus traversal policy * @see #setFocusTraversalPolicy * @see #getFocusTraversalPolicy --- 3462,3472 ---- } /** * Sets whether this container will be used to provide focus * traversal policy. Container with this property as ! * {@code true} will be used to acquire focus traversal policy * instead of closest focus cycle root ancestor. * @param provider indicates whether this container will be used to * provide focus traversal policy * @see #setFocusTraversalPolicy * @see #getFocusTraversalPolicy
*** 3484,3505 **** firePropertyChange("focusTraversalPolicyProvider", oldProvider, provider); } /** * Returns whether this container provides focus traversal ! * policy. If this property is set to <code>true</code> then when * keyboard focus manager searches container hierarchy for focus * traversal policy and encounters this container before any other * container with this property as true or focus cycle roots then * its focus traversal policy will be used instead of focus cycle * root's policy. * @see #setFocusTraversalPolicy * @see #getFocusTraversalPolicy * @see #setFocusCycleRoot * @see #setFocusTraversalPolicyProvider ! * @return <code>true</code> if this container provides focus traversal ! * policy, <code>false</code> otherwise * @since 1.5 * @beaninfo * bound: true */ public final boolean isFocusTraversalPolicyProvider() { --- 3484,3505 ---- firePropertyChange("focusTraversalPolicyProvider", oldProvider, provider); } /** * Returns whether this container provides focus traversal ! * policy. If this property is set to {@code true} then when * keyboard focus manager searches container hierarchy for focus * traversal policy and encounters this container before any other * container with this property as true or focus cycle roots then * its focus traversal policy will be used instead of focus cycle * root's policy. * @see #setFocusTraversalPolicy * @see #getFocusTraversalPolicy * @see #setFocusCycleRoot * @see #setFocusTraversalPolicyProvider ! * @return {@code true} if this container provides focus traversal ! * policy, {@code false} otherwise * @since 1.5 * @beaninfo * bound: true */ public final boolean isFocusTraversalPolicyProvider() {
*** 3547,3565 **** boolean postsOldMouseEvents() { return true; } /** ! * Sets the <code>ComponentOrientation</code> property of this container * and all components contained within it. * <p> * This method changes layout-related information, and therefore, * invalidates the component hierarchy. * * @param o the new component orientation of this container and * the components contained within it. ! * @exception NullPointerException if <code>orientation</code> is null. * @see Component#setComponentOrientation * @see Component#getComponentOrientation * @see #invalidate * @since 1.4 */ --- 3547,3565 ---- boolean postsOldMouseEvents() { return true; } /** ! * Sets the {@code ComponentOrientation} property of this container * and all components contained within it. * <p> * This method changes layout-related information, and therefore, * invalidates the component hierarchy. * * @param o the new component orientation of this container and * the components contained within it. ! * @exception NullPointerException if {@code orientation} is null. * @see Component#setComponentOrientation * @see Component#getComponentOrientation * @see #invalidate * @since 1.4 */
*** 3658,3687 **** * Container Serial Data Version. */ private int containerSerializedDataVersion = 1; /** ! * Serializes this <code>Container</code> to the specified ! * <code>ObjectOutputStream</code>. * <ul> * <li>Writes default serializable fields to the stream.</li> * <li>Writes a list of serializable ContainerListener(s) as optional * data. The non-serializable ContainerListener(s) are detected and * no attempt is made to serialize them.</li> * <li>Write this Container's FocusTraversalPolicy if and only if it ! * is Serializable; otherwise, <code>null</code> is written.</li> * </ul> * ! * @param s the <code>ObjectOutputStream</code> to write ! * @serialData <code>null</code> terminated sequence of 0 or more pairs; ! * the pair consists of a <code>String</code> and <code>Object</code>; ! * the <code>String</code> indicates the type of object and * is one of the following: ! * <code>containerListenerK</code> indicating an ! * <code>ContainerListener</code> object; ! * the <code>Container</code>'s <code>FocusTraversalPolicy</code>, ! * or <code>null</code> * * @see AWTEventMulticaster#save(java.io.ObjectOutputStream, java.lang.String, java.util.EventListener) * @see Container#containerListenerK * @see #readObject(ObjectInputStream) */ --- 3658,3687 ---- * Container Serial Data Version. */ private int containerSerializedDataVersion = 1; /** ! * Serializes this {@code Container} to the specified ! * {@code ObjectOutputStream}. * <ul> * <li>Writes default serializable fields to the stream.</li> * <li>Writes a list of serializable ContainerListener(s) as optional * data. The non-serializable ContainerListener(s) are detected and * no attempt is made to serialize them.</li> * <li>Write this Container's FocusTraversalPolicy if and only if it ! * is Serializable; otherwise, {@code null} is written.</li> * </ul> * ! * @param s the {@code ObjectOutputStream} to write ! * @serialData {@code null} terminated sequence of 0 or more pairs; ! * the pair consists of a {@code String} and {@code Object}; ! * the {@code String} indicates the type of object and * is one of the following: ! * {@code containerListenerK} indicating an ! * {@code ContainerListener} object; ! * the {@code Container}'s {@code FocusTraversalPolicy}, ! * or {@code null} * * @see AWTEventMulticaster#save(java.io.ObjectOutputStream, java.lang.String, java.util.EventListener) * @see Container#containerListenerK * @see #readObject(ObjectInputStream) */
*** 3706,3726 **** s.writeObject(null); } } /** ! * Deserializes this <code>Container</code> from the specified ! * <code>ObjectInputStream</code>. * <ul> * <li>Reads default serializable fields from the stream.</li> * <li>Reads a list of serializable ContainerListener(s) as optional * data. If the list is null, no Listeners are installed.</li> * <li>Reads this Container's FocusTraversalPolicy, which may be null, * as optional data.</li> * </ul> * ! * @param s the <code>ObjectInputStream</code> to read * @serial * @see #addContainerListener * @see #writeObject(ObjectOutputStream) */ private void readObject(ObjectInputStream s) --- 3706,3726 ---- s.writeObject(null); } } /** ! * Deserializes this {@code Container} from the specified ! * {@code ObjectInputStream}. * <ul> * <li>Reads default serializable fields from the stream.</li> * <li>Reads a list of serializable ContainerListener(s) as optional * data. If the list is null, no Listeners are installed.</li> * <li>Reads this Container's FocusTraversalPolicy, which may be null, * as optional data.</li> * </ul> * ! * @param s the {@code ObjectInputStream} to read * @serial * @see #addContainerListener * @see #writeObject(ObjectOutputStream) */ private void readObject(ObjectInputStream s)
*** 3804,3841 **** */ private static final long serialVersionUID = 5081320404842566097L; /** * Returns the number of accessible children in the object. If all ! * of the children of this object implement <code>Accessible</code>, * then this method should return the number of children of this object. * * @return the number of accessible children in the object */ public int getAccessibleChildrenCount() { return Container.this.getAccessibleChildrenCount(); } /** ! * Returns the nth <code>Accessible</code> child of the object. * * @param i zero-based index of child ! * @return the nth <code>Accessible</code> child of the object */ public Accessible getAccessibleChild(int i) { return Container.this.getAccessibleChild(i); } /** ! * Returns the <code>Accessible</code> child, if one exists, ! * contained at the local coordinate <code>Point</code>. * * @param p the point defining the top-left corner of the ! * <code>Accessible</code>, given in the coordinate space * of the object's parent ! * @return the <code>Accessible</code>, if it exists, ! * at the specified location; else <code>null</code> */ public Accessible getAccessibleAt(Point p) { return Container.this.getAccessibleAt(p); } --- 3804,3841 ---- */ private static final long serialVersionUID = 5081320404842566097L; /** * Returns the number of accessible children in the object. If all ! * of the children of this object implement {@code Accessible}, * then this method should return the number of children of this object. * * @return the number of accessible children in the object */ public int getAccessibleChildrenCount() { return Container.this.getAccessibleChildrenCount(); } /** ! * Returns the nth {@code Accessible} child of the object. * * @param i zero-based index of child ! * @return the nth {@code Accessible} child of the object */ public Accessible getAccessibleChild(int i) { return Container.this.getAccessibleChild(i); } /** ! * Returns the {@code Accessible} child, if one exists, ! * contained at the local coordinate {@code Point}. * * @param p the point defining the top-left corner of the ! * {@code Accessible}, given in the coordinate space * of the object's parent ! * @return the {@code Accessible}, if it exists, ! * at the specified location; else {@code null} */ public Accessible getAccessibleAt(Point p) { return Container.this.getAccessibleAt(p); }
*** 3850,3860 **** * when children are added or removed */ protected ContainerListener accessibleContainerHandler = null; /** ! * Fire <code>PropertyChange</code> listener, if one is registered, * when children are added or removed. * @since 1.3 */ protected class AccessibleContainerHandler implements ContainerListener { --- 3850,3860 ---- * when children are added or removed */ protected ContainerListener accessibleContainerHandler = null; /** ! * Fire {@code PropertyChange} listener, if one is registered, * when children are added or removed. * @since 1.3 */ protected class AccessibleContainerHandler implements ContainerListener {
*** 3906,3924 **** } } // inner class AccessibleAWTContainer /** ! * Returns the <code>Accessible</code> child contained at the local ! * coordinate <code>Point</code>, if one exists. Otherwise ! * returns <code>null</code>. * * @param p the point defining the top-left corner of the ! * <code>Accessible</code>, given in the coordinate space * of the object's parent ! * @return the <code>Accessible</code> at the specified location, ! * if it exists; otherwise <code>null</code> */ Accessible getAccessibleAt(Point p) { synchronized (getTreeLock()) { if (this instanceof Accessible) { Accessible a = (Accessible)this; --- 3906,3924 ---- } } // inner class AccessibleAWTContainer /** ! * Returns the {@code Accessible} child contained at the local ! * coordinate {@code Point}, if one exists. Otherwise ! * returns {@code null}. * * @param p the point defining the top-left corner of the ! * {@code Accessible}, given in the coordinate space * of the object's parent ! * @return the {@code Accessible} at the specified location, ! * if it exists; otherwise {@code null} */ Accessible getAccessibleAt(Point p) { synchronized (getTreeLock()) { if (this instanceof Accessible) { Accessible a = (Accessible)this;
*** 3970,3980 **** } } /** * Returns the number of accessible children in the object. If all ! * of the children of this object implement <code>Accessible</code>, * then this method should return the number of children of this object. * * @return the number of accessible children in the object */ int getAccessibleChildrenCount() { --- 3970,3980 ---- } } /** * Returns the number of accessible children in the object. If all ! * of the children of this object implement {@code Accessible}, * then this method should return the number of children of this object. * * @return the number of accessible children in the object */ int getAccessibleChildrenCount() {
*** 3989,4002 **** return count; } } /** ! * Returns the nth <code>Accessible</code> child of the object. * * @param i zero-based index of child ! * @return the nth <code>Accessible</code> child of the object */ Accessible getAccessibleChild(int i) { synchronized (getTreeLock()) { Component[] children = this.getComponents(); int count = 0; --- 3989,4002 ---- return count; } } /** ! * Returns the nth {@code Accessible} child of the object. * * @param i zero-based index of child ! * @return the nth {@code Accessible} child of the object */ Accessible getAccessibleChild(int i) { synchronized (getTreeLock()) { Component[] children = this.getComponents(); int count = 0;
< prev index next >