01: /*
02: * @(#)Port.java 1.0 03-JUL-04
03: *
04: * Copyright (c) 2001-2004 Gaudenz Alder
05: *
06: */
07: package org.jgraph.graph;
08:
09: import java.util.Iterator;
10:
11: /**
12: * Defines the requirements for an object that
13: * represents a port in a graph model.
14: *
15: * @version 1.0 1/1/02
16: * @author Gaudenz Alder
17: */
18:
19: public interface Port extends GraphCell {
20:
21: /**
22: * Returns an iterator of the edges connected
23: * to the port.
24: */
25: Iterator edges();
26:
27: /**
28: * Adds <code>edge</code> to the list of ports.
29: */
30: boolean addEdge(Object edge);
31:
32: /**
33: * Removes <code>edge</code> from the list of ports.
34: */
35: boolean removeEdge(Object edge);
36:
37: /**
38: * Returns the anchor of the port.
39: */
40: Port getAnchor();
41:
42: /**
43: * Sets the anchor of the port.
44: */
45: void setAnchor(Port port);
46:
47: }
|