[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] FYI: Added getWindowAncestor in javax.swing.SwingUtilities
From: |
Roman Kennke |
Subject: |
[cp-patches] FYI: Added getWindowAncestor in javax.swing.SwingUtilities |
Date: |
Mon, 23 May 2005 13:12:26 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021204 |
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
- [cp-patches] FYI: Added getWindowAncestor in javax.swing.SwingUtilities,
Roman Kennke <=