01: package fr.aliacom.common.ui.tree;
02:
03: import java.util.ArrayList;
04:
05: /**
06: * @author tom
07: *
08: * (C) 2001, 2002 Thomas Cataldo
09: */
10: public final class TreeModel {
11:
12: private ArrayList listeners;
13: private ITreeNode root;
14:
15: public TreeModel(ITreeNode root) {
16: listeners = new ArrayList();
17: this .root = root;
18: }
19:
20: public ITreeNode getRoot() {
21: return root;
22: }
23:
24: public void addModelListener(ITreeModelListener tml) {
25: listeners.add(tml);
26: }
27:
28: public void removeModelListener(ITreeModelListener tml) {
29: listeners.remove(tml);
30: }
31:
32: }
|