de.jaret.util.ui.table
Class JaretTable.RowComparator

java.lang.Object
  extended by de.jaret.util.misc.PropertyObservableBase
      extended by de.jaret.util.ui.table.JaretTable.RowComparator
All Implemented Interfaces:
de.jaret.util.misc.PropertyObservable, IRowSorter, java.util.Comparator<IRow>
Enclosing class:
JaretTable

public class JaretTable.RowComparator
extends de.jaret.util.misc.PropertyObservableBase
implements IRowSorter

Comparator based on the sorting settings of the columns.

Version:
$Id: JaretTable.java 1076 2010-12-05 13:34:42Z kliem $
Author:
Peter Kliem

Field Summary
 
Fields inherited from class de.jaret.util.misc.PropertyObservableBase
_propertyChangeSupport
 
Constructor Summary
JaretTable.RowComparator()
          Construct it.
 
Method Summary
 boolean canSort()
          Check whether the comparator is able to sort.
 int compare(IRow r1, IRow r2)
          
 
Methods inherited from class de.jaret.util.misc.PropertyObservableBase
addPropertyChangeListener, firePropertyChange, isRealModification, removePropertyChangeListener
 
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
equals
 
Methods inherited from interface de.jaret.util.misc.PropertyObservable
addPropertyChangeListener, removePropertyChangeListener
 

Constructor Detail

JaretTable.RowComparator

public JaretTable.RowComparator()
Construct it. Initializes itself with the columns.

Method Detail

canSort

public boolean canSort()
Check whether the comparator is able to sort.

Returns:
true if comparators are present

compare

public int compare(IRow r1,
                   IRow r2)

Specified by:
compare in interface java.util.Comparator<IRow>


Copyright © 2012. All Rights Reserved.