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

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

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

revision 1.19 by rabbit78, Mon May 23 13:37:43 2005 UTC revision 1.20 by rabbit78, Wed May 25 08:58:21 2005 UTC
# Line 146  public class JLayeredPane extends JCompo Line 146  public class JLayeredPane extends JCompo
146      if (lp == null)      if (lp == null)
147        return 0;        return 0;
148      else      else
149        return lp.getLayer(comp);        // The cast here forces the call to the instance method getLayer()
150          // instead of the static method (this would lead to infinite
151          // recursion).
152          return lp.getLayer((Component) comp);
153      }
154    
155      /**
156       * Returns the first JLayeredPane that contains the Component
157       * <code>comp</code> or <code>null</code> if <code>comp</code> is
158       * not contained in a JLayeredPane.
159       *
160       * @param comp the component for which we are searching the JLayeredPane
161       *     ancestor
162       *
163       * @return the first JLayeredPane that contains the Component
164       *     <code>comp</code> or <code>null</code> if <code>comp</code> is
165       *     not contained in a JLayeredPane
166       */
167      public static JLayeredPane getLayeredPaneAbove(Component comp)
168      {
169        JLayeredPane lp = (JLayeredPane) SwingUtilities.getAncestorOfClass
170          (JLayeredPane.class, comp);
171        return lp;
172    }    }
173    
174    /**    /**

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.20

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