KickJava   Java API By Example, From Geeks To Geeks.

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


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  * Selects the visible nodes
17  */

18 public interface NodeFilter {
19   /**
20    * accept() == true for all nodes
21    */

22   public static final NodeFilter TRUE_FILTER = new NodeFilter() {
23     public boolean accept(Object JavaDoc node) {
24       return true;
25     }
26   };
27
28   /**
29    * accept() == false for all nodes
30    */

31   public static final NodeFilter FALSE_FILTER = new NodeFilter() {
32     public boolean accept(Object JavaDoc node) {
33       return false;
34     }
35   };
36   
37   /**
38    * @return true if the node shall be visible in the tree component
39    */

40   boolean accept(Object JavaDoc node);
41 }
42
Popular Tags