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, translate
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.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