public class PortConnectSite extends diva.canvas.AbstractSite
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| Constructor and Description |
|---|
PortConnectSite(diva.canvas.Figure figure,
PortTerminal terminal,
int id,
double normal)
Create a port connect site for the specified figure
and id.
|
| Modifier and Type | Method and Description |
|---|---|
diva.canvas.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.
|
public PortConnectSite(diva.canvas.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.public diva.canvas.Figure getFigure()
getFigure in interface diva.canvas.SitegetFigure in class diva.canvas.AbstractSitepublic int getID()
getID in interface diva.canvas.SitegetID in class diva.canvas.AbstractSitepublic java.awt.geom.Point2D getPoint(double normal)
getPoint in interface diva.canvas.SitegetPoint in class diva.canvas.AbstractSitenormal - The normal.public PortTerminal getTerminal()
public double getX()
getX in interface diva.canvas.SitegetX in class diva.canvas.AbstractSitepublic double getY()
getY in interface diva.canvas.SitegetY in class diva.canvas.AbstractSitepublic void setNormal(double normal)
setNormal in interface diva.canvas.SitesetNormal in class diva.canvas.AbstractSitenormal - The normal.public java.lang.String toString()
toString in class java.lang.Object