/[classpath]/classpath/javax/swing/SwingUtilities.java
ViewVC logotype

Diff of /classpath/javax/swing/SwingUtilities.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.15.2.9 by gnu_andrew, Fri May 27 00:01:45 2005 UTC revision 1.15.2.10 by gnu_andrew, Sun Jun 5 19:36:38 2005 UTC
# Line 365  public class SwingUtilities Line 365  public class SwingUtilities
365     * @return the first ancestor Window of <code>comp</code> or     * @return the first ancestor Window of <code>comp</code> or
366     *     <code>null</code> if <code>comp</code> is not contained in a Window     *     <code>null</code> if <code>comp</code> is not contained in a Window
367     */     */
368    public Window getWindowAncestor(Component comp)    public static Window getWindowAncestor(Component comp)
369    {    {
370      return (Window) getAncestorOfClass(Window.class, comp);      return (Window) getAncestorOfClass(Window.class, comp);
371    }    }
# Line 1128  public class SwingUtilities Line 1128  public class SwingUtilities
1128        component.setActionMap(uiActionMap);        component.setActionMap(uiActionMap);
1129      else      else
1130        {        {
1131          while(child.getParent() != null          ActionMap parent = child.getParent();
1132                && !(child.getParent() instanceof ActionMapUIResource))          while(parent != null)
1133            child = child.getParent();            {
1134                child = parent;
1135                parent = child.getParent();
1136              }
1137    
1138          if (child != null)          if (child != null)
1139            child.setParent(uiActionMap);            child.setParent(uiActionMap);
1140        }        }

Legend:
Removed from v.1.15.2.9  
changed lines
  Added in v.1.15.2.10

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26