com.jgraph.layout
Class JGraphFacade.DefaultComparator
java.lang.Object
com.jgraph.layout.JGraphFacade.DefaultComparator
- All Implemented Interfaces:
- Comparator
- Enclosing class:
- JGraphFacade
public class JGraphFacade.DefaultComparator
- extends Object
- implements Comparator
A default comparator for ordering cell views. Returns the order of the
cells as ordered in roots
in the model. Enables layouts
with levels to be laid out deterministically. Be very careful
using the default comparator on the default graph model,
getIndexOfRoot
has linear performance and so sorting the
entire model roots will have quadratic performance.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JGraphFacade.DefaultComparator
public JGraphFacade.DefaultComparator()
compare
public int compare(Object c1,
Object c2)
- Specified by:
compare
in interface Comparator
Copyright (C) 2001-2009 JGraph Ltd. All rights reserved.