Class PositionComparator

  extended by net.wotonomy.ui.swing.util.PositionComparator
All Implemented Interfaces:, java.util.Comparator

public class PositionComparator
extends java.lang.Object
implements java.util.Comparator,

A Comparator that will sort components in a common container based first on their y-coordinate and then on their x-coordinate, producing a list sorted from top to bottom and left to right. If all components are not in the same container, the resulting sort is undefined.

$Revision: 904 $
Author:, $Author: cgruber $
See Also:
Serialized Form

Constructor Summary
PositionComparator(java.awt.Container aContainer)
          Standard constructor to configure the comparator.
Method Summary
 int compare(java.lang.Object o1, java.lang.Object o2)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Comparator

Constructor Detail


public PositionComparator(java.awt.Container aContainer)
Standard constructor to configure the comparator.

aContainer - The common container for all the objects to be compared.
Method Detail


public int compare(java.lang.Object o1,
                   java.lang.Object o2)
Specified by:
compare in interface java.util.Comparator

Copyright © 2006 null. All Rights Reserved.