KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > prefuse > visual > AggregateItem


1 /**
2  * Copyright (c) 2004-2006 Regents of the University of California.
3  * See "license-prefuse.txt" for licensing terms.
4  */

5 package prefuse.visual;
6
7 import java.util.Iterator JavaDoc;
8
9 import prefuse.data.expression.Predicate;
10
11 /**
12  * VisualItem that represents an aggregation of one or more other VisualItems.
13  * AggregateItems include methods adding and removing items from the aggregate
14  * collection, and are backed by an {@link AggregateTable} instance.
15  *
16  * @author <a HREF="http://jheer.org">jeffrey heer</a>
17  */

18 public interface AggregateItem extends VisualItem {
19     
20     /**
21      * Get the size of this AggregateItem, the number of visual items
22      * contained in the aggregation.
23      * @return the aggregate size
24      */

25     public int getAggregateSize();
26     
27     /**
28      * Indicates is a given VisualItem is contained in the aggregation.
29      * @param item the VisualItem to check for containment
30      * @return true if the given item is contained in this aggregate,
31      * false otherwise.
32      */

33     public boolean containsItem(VisualItem item);
34     
35     /**
36      * Add a VisualItem to this aggregate.
37      * @param item the item to add
38      */

39     public void addItem(VisualItem item);
40     
41     /**
42      * Remove a VisualItem from this aggregate.
43      * @param item the item to remove
44      */

45     public void removeItem(VisualItem item);
46     
47     /**
48      * Remove all items contained in this aggregate.
49      */

50     public void removeAllItems();
51     
52     /**
53      * Get an iterator over all the items contained in this aggregate.
54      * @return an iterator over the items in this aggregate
55      */

56     public Iterator JavaDoc items();
57     
58     /**
59      * Get a filtered iterator over all the items contained in this aggregate.
60      * @param filter a Predicate instance indicating the filter criteria
61      * @return an iterator over the items in this aggregate
62      */

63     public Iterator JavaDoc items(Predicate filter);
64     
65 } // end of interface AggregateItem
66
Popular Tags