Class PnmlPosition


  • public class PnmlPosition
    extends PnmlElement
    PNML graphics position object.
    Author:
    hverbeek
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected boolean hasX
      Whether the coordinates are valid.
      protected boolean hasY  
      protected static double SCALE  
      static java.lang.String TAG
      PNML position tag.
      protected double x
      The coordinates.
      protected double y  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected PnmlPosition()
      Creates a fresh PNML position.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void checkValidity​(Pnml pnml)
      Checks validity.
      PnmlPosition convertFromNet​(ExpandableSubNet parent, java.awt.geom.Point2D point)  
      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.
      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.
      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.
      protected java.lang.String exportAttributes​(Pnml pnml)
      Exports the dimension.
      protected double getX()  
      protected double getY()  
      protected void importAttributes​(org.xmlpull.v1.XmlPullParser xpp, Pnml pnml)
      Imports the known attributes.
      protected void setX​(java.lang.Double x)  
      protected void setY​(java.lang.Double y)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • hasX

        protected boolean hasX
        Whether the coordinates are valid.
      • hasY

        protected boolean hasY
      • x

        protected double x
        The coordinates.
      • y

        protected double y
    • Constructor Detail

      • PnmlPosition

        protected PnmlPosition()
        Creates a fresh PNML position.
    • Method Detail

      • importAttributes

        protected void importAttributes​(org.xmlpull.v1.XmlPullParser xpp,
                                        Pnml pnml)
        Imports the known attributes.
        Overrides:
        importAttributes in class PnmlElement
      • exportAttributes

        protected java.lang.String exportAttributes​(Pnml pnml)
        Exports the dimension.
        Overrides:
        exportAttributes in class PnmlElement
        Returns:
      • checkValidity

        protected void checkValidity​(Pnml pnml)
        Checks validity. Should have both an x and a y attribute.
        Overrides:
        checkValidity in class PnmlElement
      • 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.