mxCoordinateAssignment.WeightedCellSorter (JGraph X 2.1.0.7 API Specification)
Date: 2013-07-31

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| JGraph X 2.1.0.7
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.mxgraph.layout.hierarchical.stage
Class mxCoordinateAssignment.WeightedCellSorter

    java.lang.Object
      com.mxgraph.layout.hierarchical.stage.mxCoordinateAssignment.WeightedCellSorter

All Implemented Interfaces:
  Comparable<Object>

Enclosing class:
  mxCoordinateAssignment

    protected class mxCoordinateAssignment.WeightedCellSorter

extends Object
implements Comparable<Object>

A utility class used to track cells whilst sorting occurs on the weighted sum of their connected edges. Does not violate (x.compareTo(y)==0) == (x.equals(y))

Field Summary
`mxGraphAbstractHierarchyCell` | `cell` The cell whose median value is being calculated
`boolean` | `nudge` Whether or not to flip equal weight values.
`int` | `rankIndex` The index this cell is in the model rank
`boolean` | `visited` Whether or not this cell has been visited in the current assignment
`int` | `weightedValue` The weighted value of the cell stored

Constructor Summary
`mxCoordinateAssignment.WeightedCellSorter()`
`mxCoordinateAssignment.WeightedCellSorter(mxGraphAbstractHierarchyCell cell, int weightedValue)`

Method Summary
`int` | `compareTo(Object arg0)` comparator on the medianValue

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### weightedValue

    public int weightedValue

  The weighted value of the cell stored

### nudge

    public boolean nudge

  Whether or not to flip equal weight values.

### visited

    public boolean visited

  Whether or not this cell has been visited in the current assignment

### rankIndex

    public int rankIndex

  The index this cell is in the model rank

### cell

    public mxGraphAbstractHierarchyCell cell

  The cell whose median value is being calculated

Constructor Detail

### mxCoordinateAssignment.WeightedCellSorter

    public mxCoordinateAssignment.WeightedCellSorter()

### mxCoordinateAssignment.WeightedCellSorter

    public mxCoordinateAssignment.WeightedCellSorter(mxGraphAbstractHierarchyCell cell,
                                                     int weightedValue)

Method Detail

### compareTo

    public int compareTo(Object arg0)

  comparator on the medianValue

  Specified by:
    `compareTo` in interface `Comparable<Object>`
  Parameters:
    `arg0` - the object to be compared to
  Returns:
    the standard return you would expect when comparing two double

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| JGraph X 2.1.0.7
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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