Class PnmlPosition
- java.lang.Object
-
- org.processmining.plugins.pnml.base.PnmlElement
-
- org.processmining.plugins.pnml.elements.graphics.PnmlPosition
-
public class PnmlPosition extends PnmlElement
PNML graphics position object.- Author:
- hverbeek
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanhasXWhether the coordinates are valid.protected booleanhasYprotected static doubleSCALEstatic java.lang.StringTAGPNML position tag.protected doublexThe coordinates.protected doubley-
Fields inherited from class org.processmining.plugins.pnml.base.PnmlElement
factory, lineNumber, tag
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedPnmlPosition()Creates a fresh PNML position.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckValidity(Pnml pnml)Checks validity.PnmlPositionconvertFromNet(ExpandableSubNet parent, java.awt.geom.Point2D point)PnmlPositionconvertFromNet(ExpandableSubNet parent, org.processmining.models.graphbased.AbstractGraphElement element, org.processmining.models.connections.GraphLayoutConnection layout)Creates a PnmlPosition object for the given element with the given parent.voidconvertToNet(ExpandableSubNet subNet, org.processmining.models.graphbased.AbstractGraphElement element, java.awt.geom.Point2D.Double displacement, 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.voidconvertToNet(ExpandableSubNet subNet, org.processmining.models.graphbased.AbstractGraphElement element, java.util.List<java.awt.geom.Point2D> list, java.awt.geom.Point2D.Double displacement)Extends the positions of the given graph element (should be an edge) with this position.protected java.lang.StringexportAttributes(Pnml pnml)Exports the dimension.protected doublegetX()protected doublegetY()protected voidimportAttributes(org.xmlpull.v1.XmlPullParser xpp, Pnml pnml)Imports the known attributes.protected voidsetX(java.lang.Double x)protected voidsetY(java.lang.Double y)-
Methods inherited from class org.processmining.plugins.pnml.base.PnmlElement
exportAttribute, exportElement, exportElements, importElement, importElements, importText, setFactory
-
-
-
-
Field Detail
-
TAG
public static final java.lang.String TAG
PNML position tag.- See Also:
- Constant Field Values
-
hasX
protected boolean hasX
Whether the coordinates are valid.
-
hasY
protected boolean hasY
-
x
protected double x
The coordinates.
-
y
protected double y
-
SCALE
protected static final double SCALE
- See Also:
- Constant Field Values
-
-
Method Detail
-
importAttributes
protected void importAttributes(org.xmlpull.v1.XmlPullParser xpp, Pnml pnml)Imports the known attributes.- Overrides:
importAttributesin classPnmlElement
-
exportAttributes
protected java.lang.String exportAttributes(Pnml pnml)
Exports the dimension.- Overrides:
exportAttributesin classPnmlElement- Returns:
-
checkValidity
protected void checkValidity(Pnml pnml)
Checks validity. Should have both an x and a y attribute.- Overrides:
checkValidityin classPnmlElement
-
getX
protected double getX()
-
getY
protected double getY()
-
setX
protected void setX(java.lang.Double x)
-
setY
protected void setY(java.lang.Double y)
-
convertToNet
public void convertToNet(ExpandableSubNet subNet, org.processmining.models.graphbased.AbstractGraphElement element, java.awt.geom.Point2D.Double displacement, 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:
subNet- The given sub net.element- The given element.
-
convertToNet
public void convertToNet(ExpandableSubNet subNet, org.processmining.models.graphbased.AbstractGraphElement element, java.util.List<java.awt.geom.Point2D> list, java.awt.geom.Point2D.Double displacement)
Extends the positions of the given graph element (should be an edge) with this position.- Parameters:
subNet- The given sub net.element- The given element.displacement- The displacement for this sub net.
-
convertFromNet
public PnmlPosition convertFromNet(ExpandableSubNet parent, org.processmining.models.graphbased.AbstractGraphElement element, org.processmining.models.connections.GraphLayoutConnection layout)
Creates a PnmlPosition object for the given element with the given parent.- Parameters:
parent- The given parent.element- The given element.- Returns:
- The created PnmlPosition object.
-
convertFromNet
public PnmlPosition convertFromNet(ExpandableSubNet parent, java.awt.geom.Point2D point)
-
-