|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiva.canvas.AbstractSite
ptolemy.vergil.actor.PortConnectSite
public class PortConnectSite
A site for instances of PortTerminal. For non-muiltiports, a PortTerminal will have exactly one of these sites, and it will be the connect site for the terminal. Multiports, however, will generate distinct site for each connection to the multiport.
The normal for this site (the direction in which connections are made to it) is fixed when the site is constructed, and cannot be changed after that.
PortTerminal
Red (eal) |
Yellow (eal) |
Field Summary | |
---|---|
private int |
_id
The ID. |
private Figure |
_parentFigure
The parent figure. |
private PortTerminal |
_terminal
The port terminal. |
Fields inherited from class diva.canvas.AbstractSite |
---|
_hasNormal, _normal |
Constructor Summary | |
---|---|
PortConnectSite(Figure figure,
PortTerminal terminal,
int id,
double normal)
Create a port connect site for the specified figure and id. |
Method Summary | |
---|---|
Figure |
getFigure()
Return the parent figure specified in the constructor. |
int |
getID()
Return the ID specified in the constructor. |
java.awt.geom.Point2D |
getPoint(double normal)
Get the position of this site. |
PortTerminal |
getTerminal()
Get the terminal to which this site belongs. |
double |
getX()
Get the horizontal position of this site with the normal that was set up by the constructor. |
double |
getY()
Get the vertical position of this site with the normal that was set up by the constructor. |
void |
setNormal(double normal)
Do nothing. |
java.lang.String |
toString()
Return a string representation of this connect site. |
Methods inherited from class diva.canvas.AbstractSite |
---|
getNormal, getPoint, getPoint, getPoint, getTransformContext, hasNormal, isNormal, translate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private int _id
private Figure _parentFigure
private PortTerminal _terminal
Constructor Detail |
---|
public PortConnectSite(Figure figure, PortTerminal terminal, int id, double normal)
figure
- The parent figure.terminal
- The port terminal.id
- The ID.normal
- The normal for this connect site.Method Detail |
---|
public Figure getFigure()
getFigure
in interface Site
getFigure
in class AbstractSite
public int getID()
getID
in interface Site
getID
in class AbstractSite
public java.awt.geom.Point2D getPoint(double normal)
getPoint
in interface Site
getPoint
in class AbstractSite
normal
- The normal.
public PortTerminal getTerminal()
public double getX()
getX
in interface Site
getX
in class AbstractSite
public double getY()
getY
in interface Site
getY
in class AbstractSite
public void setNormal(double normal)
setNormal
in interface Site
setNormal
in class AbstractSite
normal
- The normal.public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |