net.sourceforge.jsh3modtool.gui.imagetable.cellsorters
Class FoldersFirstCellSorter

java.lang.Object
  extended by net.sourceforge.jsh3modtool.gui.imagetable.cellsorters.AbstractCellSorter
      extended by net.sourceforge.jsh3modtool.gui.imagetable.cellsorters.FoldersFirstCellSorter
All Implemented Interfaces:
java.util.Comparator

public class FoldersFirstCellSorter
extends AbstractCellSorter

The FoldersFirstCellSorter sorts so all folders are first and images comes afterwards. In order to be able to sort the same cell types another Comparator must be used when sorting objects of the same type.

Author:
erma

Constructor Summary
FoldersFirstCellSorter(java.util.Comparator sorter)
          Creates a FoldersFirstCellSorter.
 
Method Summary
 int compare(java.lang.Object o1, java.lang.Object o2)
          
 
Methods inherited from class net.sourceforge.jsh3modtool.gui.imagetable.cellsorters.AbstractCellSorter
getFileName, isFolderCell, isImageCell
 
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

FoldersFirstCellSorter

public FoldersFirstCellSorter(java.util.Comparator sorter)
Creates a FoldersFirstCellSorter.

Parameters:
sorter - the actual comparator to use for the same class types.
Method Detail

compare

public int compare(java.lang.Object o1,
                   java.lang.Object o2)



Copyright © 2005 sourceforge.net. All Rights Reserved.