KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > coach > tracing > server > viewer > IdentityModel


1 package org.coach.tracing.server.viewer;
2
3 import javax.swing.*;
4 import javax.swing.event.*;
5 import javax.swing.tree.*;
6
7 public class IdentityModel extends DefaultTreeModel {
8     private TreePath selection;
9     private IdentityNode nodeRoot;
10
11     public IdentityModel(IdentityNode root) {
12         super(root);
13         nodeRoot = root;
14         selection = new TreePath(root);
15     }
16     
17     public TreePath getSelection() {
18         return selection;
19     }
20
21     public void setSelection(TreePath s) {
22         selection = s;
23     }
24     
25     public void setRoot(IdentityNode root) {
26         super.setRoot(root);
27         nodeRoot = root;
28         selection = new TreePath(root);
29     }
30 }
31
Popular Tags