Class mxOrganicLayout.CellWrapper

  • Enclosing class:
    mxOrganicLayout

    public class mxOrganicLayout.CellWrapper
    extends java.lang.Object
    Internal representation of a node or edge that holds cached information to enable the layout to perform more quickly and to simplify the code
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.Object cell
      The actual graph cell this wrapper represents
      protected int[] connectedEdges
      the index of all connected edges in the e array to this node.
      protected double heightSquared
      The height of the node squared, only used if approxNodeDimensions is set to true.
      protected double radiusSquared
      The approximate radius squared of this cell, nodes only.
      protected int[] relevantEdges
      All edge that repel this cell, only used for nodes.
      protected int source
      The index of the node attached to this edge as source, edges only
      protected int target
      The index of the node attached to this edge as target, edges only
      protected double x
      The x-coordinate position of this cell, nodes only
      protected double y
      The y-coordinate position of this cell, nodes only
    • Constructor Summary

      Constructors 
      Constructor Description
      CellWrapper​(java.lang.Object cell)
      Constructs a new CellWrapper
    • Field Detail

      • cell

        protected java.lang.Object cell
        The actual graph cell this wrapper represents
      • relevantEdges

        protected int[] relevantEdges
        All edge that repel this cell, only used for nodes. This array is equivalent to all edges unconnected to this node
      • connectedEdges

        protected int[] connectedEdges
        the index of all connected edges in the e array to this node. This is only used for nodes.
      • x

        protected double x
        The x-coordinate position of this cell, nodes only
      • y

        protected double y
        The y-coordinate position of this cell, nodes only
      • radiusSquared

        protected double radiusSquared
        The approximate radius squared of this cell, nodes only. If approxNodeDimensions is true on the layout this value holds the width of the node squared
      • heightSquared

        protected double heightSquared
        The height of the node squared, only used if approxNodeDimensions is set to true.
      • source

        protected int source
        The index of the node attached to this edge as source, edges only
      • target

        protected int target
        The index of the node attached to this edge as target, edges only
    • Constructor Detail

      • CellWrapper

        public CellWrapper​(java.lang.Object cell)
        Constructs a new CellWrapper
        Parameters:
        cell - the graph cell this wrapper represents
    • Method Detail

      • getRelevantEdges

        public int[] getRelevantEdges()
        Returns:
        the relevantEdges
      • setRelevantEdges

        public void setRelevantEdges​(int[] relevantEdges)
        Parameters:
        relevantEdges - the relevantEdges to set
      • getConnectedEdges

        public int[] getConnectedEdges()
        Returns:
        the connectedEdges
      • setConnectedEdges

        public void setConnectedEdges​(int[] connectedEdges)
        Parameters:
        connectedEdges - the connectedEdges to set
      • getX

        public double getX()
        Returns:
        the x
      • setX

        public void setX​(double x)
        Parameters:
        x - the x to set
      • getY

        public double getY()
        Returns:
        the y
      • setY

        public void setY​(double y)
        Parameters:
        y - the y to set
      • getRadiusSquared

        public double getRadiusSquared()
        Returns:
        the radiusSquared
      • setRadiusSquared

        public void setRadiusSquared​(double radiusSquared)
        Parameters:
        radiusSquared - the radiusSquared to set
      • getHeightSquared

        public double getHeightSquared()
        Returns:
        the heightSquared
      • setHeightSquared

        public void setHeightSquared​(double heightSquared)
        Parameters:
        heightSquared - the heightSquared to set
      • getSource

        public int getSource()
        Returns:
        the source
      • setSource

        public void setSource​(int source)
        Parameters:
        source - the source to set
      • getTarget

        public int getTarget()
        Returns:
        the target
      • setTarget

        public void setTarget​(int target)
        Parameters:
        target - the target to set
      • getCell

        public java.lang.Object getCell()
        Returns:
        the cell