classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cp-patches] FYI: Added getWindowAncestor in javax.swing.SwingUtilit


From: Michael Koch
Subject: Re: [cp-patches] FYI: Added getWindowAncestor in javax.swing.SwingUtilities
Date: Mon, 23 May 2005 13:37:20 +0200
User-agent: mutt-ng 1.5.9-r292i (Debian)

On Mon, May 23, 2005 at 01:12:26PM +0200, Roman Kennke wrote:
> 2005-05-23  Roman Kennke  <address@hidden>
> 
>         * javax/swing/JFileChooser.java:
>         Fixed the values of several public constant fields.
> 
> /Roman
> 

> Index: javax/swing/SwingUtilities.java
> ===================================================================
> RCS file: /cvsroot/classpath/classpath/javax/swing/SwingUtilities.java,v
> retrieving revision 1.26
> diff -u -r1.26 SwingUtilities.java
> --- javax/swing/SwingUtilities.java   20 May 2005 12:10:21 -0000      1.26
> +++ javax/swing/SwingUtilities.java   23 May 2005 11:10:32 -0000
> @@ -352,6 +352,25 @@
>    }
>  
>    /**
> +   * Returns the first ancestor of <code>comp</code> that is a 
> address@hidden Window}
> +   * or <code>null</code> if <code>comp</code> is not contained in a
> +   * address@hidden Window}.
> +   *
> +   * This is equivalent to calling
> +   * <code>getAncestorOfClass(Window, comp)</code> or
> +   * <code>windowForComponent(comp)</code>.
> +   *
> +   * @param comp the component for which we are searching the ancestor Window
> +   *
> +   * @return the first ancestor Window of <code>comp</code> or
> +   *     <code>null</code> if <code>comp</code> is not contained in a Window
> +   */
> +  public Window getWindowAncestor(Component comp)
> +  {
> +    return (Window) getAncestorOfClass(Window.class, comp);
> +  }
> +
> +  /**
>     * Equivalent to calling <code>getAncestorOfClass(Window, comp)</code>.
>     *
>     * @param comp The component to search for an ancestor window 

Somehow the ChangeLog entry and the patch does not fit together. ;-)


Michael
-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]