01: package prefuse.visual;
02:
03: import prefuse.data.Edge;
04:
05: /**
06: * VisualItem that represents an edge in a graph. This interface combines
07: * the {@link VisualItem} interface with the {@link prefuse.data.Edge}
08: * interface.
09: *
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
|