KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tonbeller > wcf > tree > EmptyTreeModel


1 /*
2  * ====================================================================
3  * This software is subject to the terms of the Common Public License
4  * Agreement, available at the following URL:
5  * http://www.opensource.org/licenses/cpl.html .
6  * Copyright (C) 2003-2004 TONBELLER AG.
7  * All Rights Reserved.
8  * You must accept the terms of that agreement to use this software.
9  * ====================================================================
10  *
11  *
12  */

13 package com.tonbeller.wcf.tree;
14
15 /**
16  * @author av
17  */

18 public class EmptyTreeModel implements TreeModel {
19   static TreeModel model = new EmptyTreeModel();
20   public static TreeModel instance() {
21     return model;
22   }
23   
24   private EmptyTreeModel() {
25   }
26   
27   public Object JavaDoc[] getRoots() {
28     return new Object JavaDoc[0];
29   }
30
31   public boolean hasChildren(Object JavaDoc node) {
32     return false;
33   }
34
35   public Object JavaDoc[] getChildren(Object JavaDoc node) {
36     return null;
37   }
38
39   public Object JavaDoc getParent(Object JavaDoc node) {
40     return null;
41   }
42
43   public void addTreeModelChangeListener(TreeModelChangeListener l) {
44   }
45
46   public void removeTreeModelChangeListener(TreeModelChangeListener l) {
47   }
48
49   public void fireModelChanged(boolean identityChanged) {
50   }
51 }
52
Popular Tags