mxGraph 2.5.0.1


com.mxgraph.layout
Class mxCompactTreeLayout.WeightedCellSorter

java.lang.Object
  extended by com.mxgraph.layout.mxCompactTreeLayout.WeightedCellSorter
All Implemented Interfaces:
Comparable<Object>
Enclosing class:
mxCompactTreeLayout

protected class mxCompactTreeLayout.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
 mxCompactTreeLayout.TreeNode cell
          The cell whose median value is being calculated
 boolean nudge
          Whether or not to flip equal weight values.
 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
mxCompactTreeLayout.WeightedCellSorter()
           
mxCompactTreeLayout.WeightedCellSorter(mxCompactTreeLayout.TreeNode 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


cell

public mxCompactTreeLayout.TreeNode cell
The cell whose median value is being calculated

Constructor Detail

mxCompactTreeLayout.WeightedCellSorter

public mxCompactTreeLayout.WeightedCellSorter()

mxCompactTreeLayout.WeightedCellSorter

public mxCompactTreeLayout.WeightedCellSorter(mxCompactTreeLayout.TreeNode 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

mxGraph 2.5.0.1


Copyright (c) 2010 Gaudenz Alder, David Benson. All rights reserved.