KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > prefuse > visual > EdgeItem


1 package prefuse.visual;
2
3 import prefuse.data.Edge;
4
5 /**
6  * VisualItem that represents an edge in a graph. This interface combines
7  * the {@link VisualItem} interface with the {@link prefuse.data.Edge}
8  * interface.
9  *
10  * @author <a HREF="http://jheer.org">jeffrey heer</a>
11  */

12 public interface EdgeItem extends VisualItem, Edge {
13
14     /**
15      * Get the first, or source, NodeItem upon which this edge is incident.
16      * @return the source NodeItem
17      */

18     public NodeItem getSourceItem();
19     
20     /**
21      * Get the second, or target, NodeItem upon which this edge is incident.
22      * @return the target NodeItem
23      */

24     public NodeItem getTargetItem();
25     
26     /**
27      * Get the NodeItem connected to the given NodeItem by this edge.
28      * @param n a NodeItem upon which this edge is incident. If this item
29      * is not connected to this edge, a runtime exception will be thrown.
30      * @return the other NodeItem connected to this edge
31      */

32     public NodeItem getAdjacentItem(NodeItem n);
33     
34 } // end of interface EdgeItem
35
Popular Tags