com.mxgraph.layout.hierarchical.model

## Class mxGraphAbstractHierarchyCell

- java.lang.Object
- - com.mxgraph.layout.hierarchical.model.mxGraphAbstractHierarchyCell

- Direct Known Subclasses:
    mxGraphHierarchyEdge, mxGraphHierarchyNode

      public abstract class mxGraphAbstractHierarchyCell
      extends java.lang.Object

  An abstraction of an internal hierarchy node or edge

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `double` | `height` The height of this cell
    `int` | `maxRank` The maximum rank this cell occupies
    `int` | `minRank` The minimum rank this cell occupies
    `protected java.util.List<mxGraphAbstractHierarchyCell>[]` | `nextLayerConnectedCells` A cached version of the cells this cell connects to on the next layer up
    `protected java.util.List<mxGraphAbstractHierarchyCell>[]` | `previousLayerConnectedCells` A cached version of the cells this cell connects to on the next layer down
    `int[]` | `temp` Temporary variable for general use.
    `double` | `width` The width of this cell
    `double[]` | `x` The x position of this cell for each layer it occupies
    `double[]` | `y` The y position of this cell for each layer it occupies

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `mxGraphAbstractHierarchyCell()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract int` | `getGeneralPurposeVariable(int layer)` Gets the value of temp for the specified layer
    `abstract java.util.List<mxGraphAbstractHierarchyCell>` | `getNextLayerConnectedCells(int layer)` Returns the cells this cell connects to on the next layer up
    `abstract java.util.List<mxGraphAbstractHierarchyCell>` | `getPreviousLayerConnectedCells(int layer)` Returns the cells this cell connects to on the next layer down
    `double` | `getX(int layer)` Gets the value of x on the specified layer
    `abstract boolean` | `isEdge()`
    `abstract boolean` | `isVertex()`
    `abstract void` | `setGeneralPurposeVariable(int layer, int value)` Set the value of temp for the specified layer
    `void` | `setX(int layer, double value)` Set the value of x for the specified layer
    `void` | `setY(int layer, double value)` Set the value of y for the specified layer

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### maxRank

          public int maxRank

      The maximum rank this cell occupies

    - #### minRank

          public int minRank

      The minimum rank this cell occupies

    - #### x

          public double[] x

      The x position of this cell for each layer it occupies

    - #### y

          public double[] y

      The y position of this cell for each layer it occupies

    - #### width

          public double width

      The width of this cell

    - #### height

          public double height

      The height of this cell

    - #### nextLayerConnectedCells

          protected java.util.List<mxGraphAbstractHierarchyCell>[] nextLayerConnectedCells

      A cached version of the cells this cell connects to on the next layer up

    - #### previousLayerConnectedCells

          protected java.util.List<mxGraphAbstractHierarchyCell>[] previousLayerConnectedCells

      A cached version of the cells this cell connects to on the next layer down

    - #### temp

          public int[] temp

      Temporary variable for general use. Generally, try to avoid carrying information between stages. Currently, the longest path layering sets temp to the rank position in fixRanks() and the crossing reduction uses this. This meant temp couldn't be used for hashing the nodes in the model dfs and so hashCode was created

  - ### Constructor Detail

    - #### mxGraphAbstractHierarchyCell

          public mxGraphAbstractHierarchyCell()

  - ### Method Detail

    - #### getNextLayerConnectedCells

          public abstract java.util.List<mxGraphAbstractHierarchyCell> getNextLayerConnectedCells(int layer)

      Returns the cells this cell connects to on the next layer up
      Parameters:
        `layer` - the layer this cell is on
      Returns:
        the cells this cell connects to on the next layer up

    - #### getPreviousLayerConnectedCells

          public abstract java.util.List<mxGraphAbstractHierarchyCell> getPreviousLayerConnectedCells(int layer)

      Returns the cells this cell connects to on the next layer down
      Parameters:
        `layer` - the layer this cell is on
      Returns:
        the cells this cell connects to on the next layer down

    - #### isEdge

          public abstract boolean isEdge()

      Returns:
        whether or not this cell is an edge

    - #### isVertex

          public abstract boolean isVertex()

      Returns:
        whether or not this cell is a node

    - #### getGeneralPurposeVariable

          public abstract int getGeneralPurposeVariable(int layer)

      Gets the value of temp for the specified layer
      Parameters:
        `layer` - the layer relating to a specific entry into temp
      Returns:
        the value for that layer

    - #### setGeneralPurposeVariable

          public abstract void setGeneralPurposeVariable(int layer,
                                       int value)

      Set the value of temp for the specified layer
      Parameters:
        `layer` - the layer relating to a specific entry into temp
        `value` - the value for that layer

    - #### setX

          public void setX(int layer,
                  double value)

      Set the value of x for the specified layer
      Parameters:
        `layer` - the layer relating to a specific entry into x[]
        `value` - the x value for that layer

    - #### getX

          public double getX(int layer)

      Gets the value of x on the specified layer
      Parameters:
        `layer` - the layer to obtain x for
      Returns:
        the value of x on the specified layer

    - #### setY

          public void setY(int layer,
                  double value)

      Set the value of y for the specified layer
      Parameters:
        `layer` - the layer relating to a specific entry into y[]
        `value` - the y value for that layer

Copyright (c) 2010 Gaudenz Alder. All rights reserved.