avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ran...@apache.org
Subject cvs commit: jakarta-avalon-apps/ftpserver/src/java/org/apache/avalon/ftpserver/gui GuiUtils.java
Date Mon, 20 Jan 2003 15:14:08 GMT
rana_b      2003/01/20 07:14:08

  Modified:    ftpserver/src/java/org/apache/avalon/ftpserver/gui
                        GuiUtils.java
  Log:
  Added getTopFrame method
  
  Revision  Changes    Path
  1.8       +11 -1     jakarta-avalon-apps/ftpserver/src/java/org/apache/avalon/ftpserver/gui/GuiUtils.java
  
  Index: GuiUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-apps/ftpserver/src/java/org/apache/avalon/ftpserver/gui/GuiUtils.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- GuiUtils.java	10 Mar 2002 06:10:36 -0000	1.7
  +++ GuiUtils.java	20 Jan 2003 15:14:07 -0000	1.8
  @@ -91,6 +91,16 @@
           return splashWin;
       }
   
  +    /**
  +     * Get top frame. May return null, if parent frame not found.
  +     */    
  +    public static Component getFrame(Component comp) {
  +        Component frameComp = comp;
  +        while( (frameComp != null) && !(frameComp instanceof java.awt.Frame) )
{
  +            frameComp = frameComp.getParent();
  +        }        
  +        return frameComp;
  +    }
   
   
       /**
  @@ -216,4 +226,4 @@
           parent.repaint();
       }
        
  -}
  \ No newline at end of file
  +}
  
  
  

--
To unsubscribe, e-mail:   <mailto:avalon-cvs-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@jakarta.apache.org>


Mime
View raw message