KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > terracotta > dso > views > RootWrapper


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright
3  * notice. All rights reserved.
4  */

5 package org.terracotta.dso.views;
6
7 public class RootWrapper {
8   private RootsWrapper m_parent;
9   private int m_index;
10   
11   RootWrapper(RootsWrapper parent, int index) {
12     m_parent = parent;
13     m_index = index;
14   }
15   
16   RootsWrapper getParent() {
17     return m_parent;
18   }
19   
20   String JavaDoc getFieldName() {
21     return m_parent.getRootArray(m_index).getFieldName();
22   }
23   
24   void remove() {
25     m_parent.removeRoot(m_index);
26   }
27   
28   public String JavaDoc toString() {
29     return getFieldName();
30   }
31 }
32
Popular Tags