public class PortSite extends diva.canvas.AbstractSite
Constructor and Description |
---|
PortSite(diva.canvas.Figure figure,
Port port,
int number,
int count,
int direction)
Create a new site on the given figure with the given ID
port type, and port number.
|
Modifier and Type | Method and Description |
---|---|
diva.canvas.Figure |
getFigure()
Get the figure to which this site is attached.
|
int |
getID()
Return the ID for this site, which is the number of the port.
|
double |
getNormal()
Get the normal of the site.
|
double |
getX()
Get the x-coordinate of the site.
|
double |
getY()
Get the y-coordinate of the site.
|
java.lang.String |
toString() |
public PortSite(diva.canvas.Figure figure, Port port, int number, int count, int direction)
figure
- The figure for the entity icon.port
- The port, which is ignored by this methodnumber
- The number of the port within its kind, starting with 0.count
- The number of ports of its kind.direction
- One of SwingConstants.{WEST, NORTH, EAST, SOUTH}.public diva.canvas.Figure getFigure()
getFigure
in interface diva.canvas.Site
getFigure
in class diva.canvas.AbstractSite
public int getID()
getID
in interface diva.canvas.Site
getID
in class diva.canvas.AbstractSite
public double getNormal()
getNormal
in interface diva.canvas.Site
getNormal
in class diva.canvas.AbstractSite
public double getX()
getX
in interface diva.canvas.Site
getX
in class diva.canvas.AbstractSite
public double getY()
getY
in interface diva.canvas.Site
getY
in class diva.canvas.AbstractSite
public java.lang.String toString()
toString
in class java.lang.Object