Class ApplyLayoutRequest
- java.lang.Object
-
- ptolemy.kernel.util.ChangeRequest
-
- ptolemy.vergil.basic.layout.kieler.ApplyLayoutRequest
-
public class ApplyLayoutRequest extends ChangeRequest
A change request specialized for application of automatically computed layout. This is used to set new locations for graph elements and to set layout hints for connection routing.- Since:
- Ptolemy II 10.0
- Version:
- $Id$
- Author:
- Miro Spoenemann (msp)
- Pt.AcceptedRating:
- Red (msp)
- Pt.ProposedRating:
- Red (msp)
-
-
Constructor Summary
Constructors Constructor Description ApplyLayoutRequest(java.lang.Object source)
Create a request for applying layout.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
_execute()
Execute the request.void
addConnection(Relation relation, NamedObj head, NamedObj tail, double[] bendPoints)
Add a new connection routing change to the request.void
addConnection(Relation relation, NamedObj head, NamedObj tail, double[] bendPoints, java.awt.geom.Point2D.Double labelLocation)
Add a new connection routing change to the request.void
addCurve(Transition transition, double exitAngle)
Add a new transition curve change to the request.void
addLocation(Locatable locatable, double x, double y)
Add a new location change to the request.-
Methods inherited from class ptolemy.kernel.util.ChangeRequest
addChangeListener, execute, getDescription, getLocality, getSource, isErrorReported, isPersistent, isStructuralChange, removeChangeListener, setDescription, setErrorReported, setListeners, setPersistent, waitForCompletion
-
-
-
-
Method Detail
-
addLocation
public void addLocation(Locatable locatable, double x, double y)
Add a new location change to the request.- Parameters:
locatable
- The locatable that will be changedx
- The new x coordinatey
- The new y coordinate
-
addConnection
public void addConnection(Relation relation, NamedObj head, NamedObj tail, double[] bendPoints)
Add a new connection routing change to the request.- Parameters:
relation
- The relation that owns the connection.head
- The head object of the connection.tail
- The tail object of the connection.bendPoints
- The new bend points.
-
addConnection
public void addConnection(Relation relation, NamedObj head, NamedObj tail, double[] bendPoints, java.awt.geom.Point2D.Double labelLocation)
Add a new connection routing change to the request.- Parameters:
relation
- The relation that owns the connection.head
- The head object of the connection.tail
- The tail object of the connection.bendPoints
- The new bend points.labelLocation
- The location of a label, may be null
-
addCurve
public void addCurve(Transition transition, double exitAngle)
Add a new transition curve change to the request.- Parameters:
transition
- The transition that is represented by the curve.exitAngle
- The new value for the exit angle.
-
_execute
protected void _execute() throws java.lang.Exception
Execute the request. This sets the previously configured locations and connections.- Specified by:
_execute
in classChangeRequest
- Throws:
java.lang.Exception
- If the change fails.
-
-