KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > fractal > swing > JTreeImpl


1 // skeleton class automatically generated
2

3 package org.objectweb.fractal.swing;
4
5 import org.objectweb.fractal.api.control.BindingController;
6
7 import javax.swing.tree.TreeModel JavaDoc;
8 import javax.swing.tree.TreeSelectionModel JavaDoc;
9 import javax.swing.tree.TreeCellRenderer JavaDoc;
10
11 public class JTreeImpl
12   extends javax.swing.JTree JavaDoc
13   implements JTreeItf, JTreeAttributes, BindingController
14 {
15
16   // fields manually added
17
public final static String JavaDoc TREE_MODEL_BINDING = "tree-model";
18   public final static String JavaDoc TREE_SELECTION_MODEL_BINDING = "tree-selection-model";
19   public final static String JavaDoc TREE_CELL_RENDERER_BINDING = "tree-cell-renderer";
20
21   public JTreeImpl () {
22     super();
23   }
24   public JTreeImpl (Object JavaDoc[] arg0) {
25     super(arg0);
26   }
27   public JTreeImpl (java.util.Vector JavaDoc arg0) {
28     super(arg0);
29   }
30   public JTreeImpl (java.util.Hashtable JavaDoc arg0) {
31     super(arg0);
32   }
33   public JTreeImpl (javax.swing.tree.TreeNode JavaDoc arg0) {
34     super(arg0);
35   }
36   public JTreeImpl (javax.swing.tree.TreeNode JavaDoc arg0, boolean arg1) {
37     super(arg0,arg1);
38   }
39   public JTreeImpl (javax.swing.tree.TreeModel JavaDoc arg0) {
40     super(arg0);
41   }
42
43   public String JavaDoc[] listFc () {
44     // put your own code here
45
return new String JavaDoc[] {
46       TREE_MODEL_BINDING,
47       TREE_SELECTION_MODEL_BINDING,
48       TREE_CELL_RENDERER_BINDING
49     };
50   }
51
52   public Object JavaDoc lookupFc (String JavaDoc clientItfName) {
53     // put your own code here
54
if (clientItfName.equals(TREE_MODEL_BINDING)) {
55       return getModel();
56     } else if (clientItfName.equals(TREE_SELECTION_MODEL_BINDING)) {
57       return getSelectionModel();
58     } else if (clientItfName.equals(TREE_CELL_RENDERER_BINDING)) {
59       return getCellRenderer();
60     }
61     return null;
62   }
63
64   public void bindFc (String JavaDoc clientItfName, Object JavaDoc serverItf) {
65     // put your own code here
66
if (clientItfName.equals(TREE_MODEL_BINDING)) {
67       setModel((TreeModel JavaDoc)serverItf);
68     } else if (clientItfName.equals(TREE_SELECTION_MODEL_BINDING)) {
69       setSelectionModel((TreeSelectionModel JavaDoc)serverItf);
70     } else if (clientItfName.equals(TREE_CELL_RENDERER_BINDING)) {
71       setCellRenderer((TreeCellRenderer JavaDoc)serverItf);
72     }
73   }
74
75   public void unbindFc (String JavaDoc clientItfName) {
76     // put your own code here
77
if (clientItfName.equals(TREE_MODEL_BINDING)) {
78       setModel(null);
79     } else if (clientItfName.equals(TREE_SELECTION_MODEL_BINDING)) {
80       setSelectionModel(null);
81     } else if (clientItfName.equals(TREE_CELL_RENDERER_BINDING)) {
82       setCellRenderer(null);
83     }
84   }
85
86 }
87
Popular Tags