01: /**
02: * Copyright (c) 2004-2006 Regents of the University of California.
03: * See "license-prefuse.txt" for licensing terms.
04: */package prefuse.visual;
05:
06: import java.util.Iterator;
07:
08: import prefuse.data.expression.Predicate;
09:
10: /**
11: * VisualItem that represents an aggregation of one or more other VisualItems.
12: * AggregateItems include methods adding and removing items from the aggregate
13: * collection, and are backed by an {@link AggregateTable} instance.
14: *
15: * @author <a href="http://jheer.org">jeffrey heer</a>
16: */
17: public interface AggregateItem extends VisualItem {
18:
19: /**
20: * Get the size of this AggregateItem, the number of visual items
21: * contained in the aggregation.
22: * @return the aggregate size
23: */
24: public int getAggregateSize();
25:
26: /**
27: * Indicates is a given VisualItem is contained in the aggregation.
28: * @param item the VisualItem to check for containment
29: * @return true if the given item is contained in this aggregate,
30: * false otherwise.
31: */
32: public boolean containsItem(VisualItem item);
33:
34: /**
35: * Add a VisualItem to this aggregate.
36: * @param item the item to add
37: */
38: public void addItem(VisualItem item);
39:
40: /**
41: * Remove a VisualItem from this aggregate.
42: * @param item the item to remove
43: */
44: public void removeItem(VisualItem item);
45:
46: /**
47: * Remove all items contained in this aggregate.
48: */
49: public void removeAllItems();
50:
51: /**
52: * Get an iterator over all the items contained in this aggregate.
53: * @return an iterator over the items in this aggregate
54: */
55: public Iterator items();
56:
57: /**
58: * Get a filtered iterator over all the items contained in this aggregate.
59: * @param filter a Predicate instance indicating the filter criteria
60: * @return an iterator over the items in this aggregate
61: */
62: public Iterator items(Predicate filter);
63:
64: } // end of interface AggregateItem
|