/[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.26 by rabbit78, Fri May 20 12:10:21 2005 UTC revision 1.27 by rabbit78, Mon May 23 11:12:02 2005 UTC
# Line 352  public class SwingUtilities Line 352  public class SwingUtilities
352    }    }
353    
354    /**    /**
355       * Returns the first ancestor of <code>comp</code> that is a {@link Window}
356       * or <code>null</code> if <code>comp</code> is not contained in a
357       * {@link Window}.
358       *
359       * This is equivalent to calling
360       * <code>getAncestorOfClass(Window, comp)</code> or
361       * <code>windowForComponent(comp)</code>.
362       *
363       * @param comp the component for which we are searching the ancestor Window
364       *
365       * @return the first ancestor Window of <code>comp</code> or
366       *     <code>null</code> if <code>comp</code> is not contained in a Window
367       */
368      public Window getWindowAncestor(Component comp)
369      {
370        return (Window) getAncestorOfClass(Window.class, comp);
371      }
372    
373      /**
374     * Equivalent to calling <code>getAncestorOfClass(Window, comp)</code>.     * Equivalent to calling <code>getAncestorOfClass(Window, comp)</code>.
375     *     *
376     * @param comp The component to search for an ancestor window     * @param comp The component to search for an ancestor window

Legend:
Removed from v.1.26  
changed lines
  Added in v.1.27

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