|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectdiva.canvas.AbstractSite
ptolemy.vergil.toolbox.PortSite
public class PortSite
A site that locates itself on the bounds of a figure's shape, designed for placing ports.
| Red (johnr) |
| Red (eal) |
| Field Summary | |
|---|---|
private int |
_count
The number of ports of the kind as this one. |
private int |
_direction
The direction of the port. |
private double |
_normal
The normal. |
private int |
_number
The number of this port within the ones of the same kind. |
private Figure |
_parentFigure
The parent figure. |
private double |
_snap
The snap resolution. |
| Fields inherited from class diva.canvas.AbstractSite |
|---|
_hasNormal |
| Constructor Summary | |
|---|---|
PortSite(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. |
|
| Method Summary | |
|---|---|
private double |
_getNormal()
Get the normal of the site. |
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()
|
| Methods inherited from class diva.canvas.AbstractSite |
|---|
getPoint, getPoint, getPoint, getPoint, getTransformContext, hasNormal, isNormal, setNormal, translate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private int _count
private int _direction
private double _normal
private int _number
private Figure _parentFigure
private double _snap
| Constructor Detail |
|---|
public PortSite(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}.| Method Detail |
|---|
public Figure getFigure()
getFigure in interface SitegetFigure in class AbstractSitepublic int getID()
getID in interface SitegetID in class AbstractSitepublic double getNormal()
getNormal in interface SitegetNormal in class AbstractSitepublic double getX()
getX in interface SitegetX in class AbstractSitepublic double getY()
getY in interface SitegetY in class AbstractSitepublic java.lang.String toString()
toString in class java.lang.Objectprivate double _getNormal()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||