de.matthiasmann.twl.model
Class ReorderListModel<T>

java.lang.Object
  extended by de.matthiasmann.twl.model.AbstractListModel<T>
      extended by de.matthiasmann.twl.model.ReorderListModel<T>
Type Parameters:
T - The type of the list entries
All Implemented Interfaces:
ListModel<T>

public class ReorderListModel<T>
extends AbstractListModel<T>

A reordering list model - forwards changes of the base model.


Nested Class Summary
 
Nested classes/interfaces inherited from interface de.matthiasmann.twl.model.ListModel
ListModel.ChangeListener
 
Constructor Summary
ReorderListModel(ListModel<T> base)
           
 
Method Summary
 void destroy()
           
 int findEntry(java.lang.Object o)
           
 T getEntry(int index)
           
 java.lang.Object getEntryTooltip(int index)
           
 int getNumEntries()
           
 boolean matchPrefix(int index, java.lang.String prefix)
           
 void shuffle()
           
 void sort(java.util.Comparator<T> c)
           
 
Methods inherited from class de.matthiasmann.twl.model.AbstractListModel
addChangeListener, fireAllChanged, fireEntriesChanged, fireEntriesDeleted, fireEntriesInserted, removeChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReorderListModel

public ReorderListModel(ListModel<T> base)
Method Detail

destroy

public void destroy()

getNumEntries

public int getNumEntries()

getEntry

public T getEntry(int index)

getEntryTooltip

public java.lang.Object getEntryTooltip(int index)

matchPrefix

public boolean matchPrefix(int index,
                           java.lang.String prefix)

findEntry

public int findEntry(java.lang.Object o)

shuffle

public void shuffle()

sort

public void sort(java.util.Comparator<T> c)