Class TsmlPosition
- java.lang.Object
-
- org.processmining.plugins.tsml.TsmlElement
-
- org.processmining.plugins.tsml.graphics.TsmlPosition
-
public class TsmlPosition extends TsmlElement
-
-
Field Summary
Fields Modifier and Type Field Description static doubleSCALEstatic java.lang.StringTAGPNML position tag.-
Fields inherited from class org.processmining.plugins.tsml.TsmlElement
lineNumber, tag
-
-
Constructor Summary
Constructors Constructor Description TsmlPosition()Creates a fresh PNML position.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckValidity(Tsml tsml)Checks validity.protected java.lang.StringexportAttributes(Tsml tsml)Exports the dimension.doublegetX()doublegetY()protected voidimportAttributes(org.xmlpull.v1.XmlPullParser xpp, Tsml tsml)Imports the known attributes.TsmlPositionmarshall(java.awt.geom.Point2D point)TsmlPositionmarshall(org.processmining.models.graphbased.AbstractGraphElement element, org.processmining.models.connections.GraphLayoutConnection layout)Creates a TsmlPosition object for the given element with the given parent.voidsetX(java.lang.Double x)voidsetY(java.lang.Double y)voidunmarshall(org.processmining.models.graphbased.AbstractGraphElement element, java.util.List<java.awt.geom.Point2D> list)Extends the positions of the given graph element (should be an edge) with this position.voidunmarshall(org.processmining.models.graphbased.AbstractGraphElement element, org.processmining.framework.util.Pair<java.awt.geom.Point2D.Double,java.awt.geom.Point2D.Double> boundingBox, org.processmining.models.connections.GraphLayoutConnection layout)Sets the position of the given graph element to this position.-
Methods inherited from class org.processmining.plugins.tsml.TsmlElement
exportAttribute, exportElement, exportElements, importElement, importElements, importText
-
-
-
-
Field Detail
-
TAG
public static final java.lang.String TAG
PNML position tag.- See Also:
- Constant Field Values
-
SCALE
public static final double SCALE
- See Also:
- Constant Field Values
-
-
Method Detail
-
importAttributes
protected void importAttributes(org.xmlpull.v1.XmlPullParser xpp, Tsml tsml)Imports the known attributes.- Overrides:
importAttributesin classTsmlElement
-
exportAttributes
protected java.lang.String exportAttributes(Tsml tsml)
Exports the dimension.- Overrides:
exportAttributesin classTsmlElement- Returns:
-
checkValidity
protected void checkValidity(Tsml tsml)
Checks validity. Should have both an x and a y attribute.- Overrides:
checkValidityin classTsmlElement
-
getX
public double getX()
-
getY
public double getY()
-
setX
public void setX(java.lang.Double x)
-
setY
public void setY(java.lang.Double y)
-
unmarshall
public void unmarshall(org.processmining.models.graphbased.AbstractGraphElement element, org.processmining.framework.util.Pair<java.awt.geom.Point2D.Double,java.awt.geom.Point2D.Double> boundingBox, org.processmining.models.connections.GraphLayoutConnection layout)Sets the position of the given graph element to this position.- Parameters:
element- The given element.
-
unmarshall
public void unmarshall(org.processmining.models.graphbased.AbstractGraphElement element, java.util.List<java.awt.geom.Point2D> list)Extends the positions of the given graph element (should be an edge) with this position.- Parameters:
element- The given element.displacement- The displacement for this sub net.
-
marshall
public TsmlPosition marshall(org.processmining.models.graphbased.AbstractGraphElement element, org.processmining.models.connections.GraphLayoutConnection layout)
Creates a TsmlPosition object for the given element with the given parent.- Parameters:
element- The given element.- Returns:
- The created TsmlPosition object.
-
marshall
public TsmlPosition marshall(java.awt.geom.Point2D point)
-
-