|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiva.canvas.AbstractFigure
diva.canvas.connector.TerminalFigure
ptolemy.vergil.actor.PortTerminal
public class PortTerminal
A terminal figure for ports that supports multiports. In particular, this figure provides a method to determine the "order index" of a link to the port. When multiple relations are linked to a port, the order in which they are linked matters. The provided method returns the position within that order.
When this is constructed, a figure is specified for the port, and properties of this figure, such as its bounds, whether it intersects other objects, etc., are determined by that figure. The extra decorations added to support multiple connections are not treated as part of the figure.
PortSite
Red (eal) |
Yellow (eal) |
Field Summary | |
---|---|
private boolean |
_inside
True if the terminal is an external port, and connections represent inside connections. |
private IOPort |
_port
The port that owns this terminal. |
Fields inherited from class diva.canvas.connector.TerminalFigure |
---|
_connectSite |
Constructor Summary | |
---|---|
PortTerminal(IOPort port,
Figure figure,
double normal,
boolean inside)
Construct a port terminal with the specified figure as the port figure. |
Method Summary | |
---|---|
int |
getNumberOfLinks()
Return the number of links to relations that this port has. |
int |
getOrderIndex(LinkManhattanConnector connector)
Return the order index of the connection represented by the specified connector. |
IOPort |
getPort()
Return the port specified in the constructor. |
Methods inherited from class diva.canvas.connector.TerminalFigure |
---|
contains, getAttachSite, getBounds, getConnectSite, getFigure, getInteractor, getLayer, getOrigin, getParent, getShape, getToolTipText, getTransformContext, getUserObject, hit, intersects, isVisible, paint, paint, relocate, repaint, repaint, setAttachSite, setInteractor, setParent, setToolTipText, setUserObject, setVisible, transform, translate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private boolean _inside
private IOPort _port
Constructor Detail |
---|
public PortTerminal(IOPort port, Figure figure, double normal, boolean inside)
port
- The port.figure
- The associated figure.normal
- The normal direction.inside
- True if this is external port and the terminal represents
inside connections.Method Detail |
---|
public int getNumberOfLinks()
public int getOrderIndex(LinkManhattanConnector connector)
connector
- The connector.
public IOPort getPort()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |