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 FtpTree.java
Date Mon, 20 Jan 2003 15:15:48 GMT
rana_b      2003/01/20 07:15:48

  Modified:    ftpserver/src/java/org/apache/avalon/ftpserver/gui
                        FtpTree.java
  Log:
  method name changed - getTopFrame
  
  Revision  Changes    Path
  1.3       +17 -3     jakarta-avalon-apps/ftpserver/src/java/org/apache/avalon/ftpserver/gui/FtpTree.java
  
  Index: FtpTree.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-apps/ftpserver/src/java/org/apache/avalon/ftpserver/gui/FtpTree.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FtpTree.java	20 May 2002 10:20:17 -0000	1.2
  +++ FtpTree.java	20 Jan 2003 15:15:48 -0000	1.3
  @@ -9,6 +9,7 @@
   package org.apache.avalon.ftpserver.gui;
   
   import java.util.Vector;
  +import java.awt.Component;
   import javax.swing.JTree;
   import javax.swing.JPanel;
   import javax.swing.tree.TreePath;
  @@ -62,6 +63,7 @@
   
       private Vector mListenrList;
   
  +    private Component mTopFrame;
       private FtpRootPanel  mRootPanel;
       private PluginPanel[] mPluginPanels;
       private CommonHandler mCommonHandler;
  @@ -141,7 +143,7 @@
        */
       public int getIndexOfChild(Object parent, Object child) {
          int childIdx = -1;
  -       for(int i=CHILDREN.length; --i>=0; ) {
  +       for(int i=0; i<CHILDREN.length; i++) {
              if(CHILDREN[i].equals(child)) {
                  childIdx = i;
                  break;
  @@ -177,12 +179,24 @@
           return mRootPanel;
       }
   
  +    
  +    /**
  +     * Get top frame
  +     */    
  +    public Component getTopFrame() {
  +        if(mTopFrame == null) {
  +            mTopFrame = GuiUtils.getFrame(this);
  +        }
  +        return mTopFrame;
  +    }
  +
  +
       /**
        * Get plugin panel.
        */
       public PluginPanel getPluginPanel(String panelName) {
           PluginPanel panel = null;
  -        for(int i=CHILDREN.length; --i>=0; ) {
  +        for(int i=0; i<CHILDREN.length; i++) {
               if (CHILDREN[i].equals(panelName)) {
                   panel = mPluginPanels[i];
                   break;
  @@ -228,4 +242,4 @@
           }
       }
   
  -}
  \ 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