public final class KielerLayoutUtil extends java.lang.Object
| Constructor and Description |
|---|
KielerLayoutUtil() |
| Modifier and Type | Method and Description |
|---|---|
static java.awt.geom.Point2D |
getCenterPoint(diva.canvas.Site site)
Get the center point of a Perimeter Site.
|
static java.awt.geom.Point2D[] |
getHeadTailPoints(diva.canvas.connector.Connector connector,
java.util.List<java.awt.geom.Point2D> bendPoints)
Get the starting and ending points of a connector.
|
static Locatable |
getLocation(NamedObj namedObj)
Find a location for the given object.
|
static java.awt.geom.Point2D |
getLocationPoint(Locatable locatable)
Retrieve the actual position from a locatable instance.
|
static java.awt.geom.Point2D |
getLocationPoint(NamedObj namedObj)
Get the location given by the location attribute of the given input
object.
|
static double |
getNormal(java.awt.geom.Point2D origin,
java.awt.geom.Point2D other)
Get the angle in radians from the origin to the other point.
|
public KielerLayoutUtil()
public static java.awt.geom.Point2D getCenterPoint(diva.canvas.Site site)
PerimeterSite.getPoint(double).site - the sitepublic static java.awt.geom.Point2D[] getHeadTailPoints(diva.canvas.connector.Connector connector, java.util.List<java.awt.geom.Point2D> bendPoints)
BasicManhattanRouter.routeManhattan(diva.canvas.connector.ManhattanConnector).connector - The connector.bendPoints - a list of bendpoints to determine the anchor point on the sitepublic static double getNormal(java.awt.geom.Point2D origin, java.awt.geom.Point2D other)
origin - the original pointother - the other pointpublic static Locatable getLocation(NamedObj namedObj)
namedObj - a model objectnull if there is no locationpublic static java.awt.geom.Point2D getLocationPoint(NamedObj namedObj)
namedObj - The Ptolemy object for which the location should be
retrieved.public static java.awt.geom.Point2D getLocationPoint(Locatable locatable)
locatable - a locatable