public class PortConnectSite extends 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| Red (eal) |
| Yellow (eal) |
_hasNormal, _normal| Constructor and Description |
|---|
PortConnectSite(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 |
|---|---|
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.
|
getNormal, getPoint, getPoint, getPoint, getTransformContext, hasNormal, isNormal, translatepublic 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.public Figure getFigure()
getFigure in interface SitegetFigure in class AbstractSitepublic int getID()
getID in interface SitegetID in class AbstractSitepublic java.awt.geom.Point2D getPoint(double normal)
getPoint in interface SitegetPoint in class AbstractSitenormal - The normal.public PortTerminal getTerminal()
public double getX()
getX in interface SitegetX in class AbstractSitepublic double getY()
getY in interface SitegetY in class AbstractSitepublic void setNormal(double normal)
setNormal in interface SitesetNormal in class AbstractSitenormal - The normal.public java.lang.String toString()
toString in class java.lang.Object