DESY ACOP Beans Home

com.cosylab.gui.components.table
Class DefaultRowComparator

java.lang.Object
  extended by com.cosylab.gui.components.table.DefaultRowComparator
All Implemented Interfaces:
RowComparator, java.util.Comparator<TableRow>

public class DefaultRowComparator
extends java.lang.Object
implements RowComparator

Default implementation of the RowComparator.

Version:
$Id: DefaultRowComparator.java,v 1.5 2008-04-22 12:28:40 jbobnar Exp $
Author:
Jaka Bobnar

Constructor Summary
DefaultRowComparator(int col, boolean desc)
           
 
Method Summary
 int compare(TableRow o1, TableRow o2)
           
 int getColumn()
           
 boolean getDescending()
           
 void setColumn(int column)
           
 void setDescending(boolean descending)
           
 
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
 

Constructor Detail

DefaultRowComparator

public DefaultRowComparator(int col,
                            boolean desc)
Method Detail

compare

public int compare(TableRow o1,
                   TableRow o2)
Specified by:
compare in interface java.util.Comparator<TableRow>

setColumn

public void setColumn(int column)
Specified by:
setColumn in interface RowComparator

setDescending

public void setDescending(boolean descending)
Specified by:
setDescending in interface RowComparator

getColumn

public int getColumn()
Specified by:
getColumn in interface RowComparator

getDescending

public boolean getDescending()
Specified by:
getDescending in interface RowComparator


Copyright © 2010. All Rights Reserved.