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

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

public class CombinedListModel<T>
extends SimpleListModel<T>

A composite list model which concatinates several other list models. Changes on the contained list models are forwarded to this model.


Nested Class Summary
 
Nested classes/interfaces inherited from interface de.matthiasmann.twl.model.ListModel
ListModel.ChangeListener
 
Constructor Summary
CombinedListModel()
           
 
Method Summary
 void addSubList(int index, ListModel<T> model)
           
 void addSubList(ListModel<T> model)
           
 int findSubList(ListModel<T> model)
           
 T getEntry(int index)
           
 java.lang.Object getEntryTooltip(int index)
           
 ListModel<ListModel<T>> getModelForSubLists()
           
 int getNumEntries()
           
 int getNumSubLists()
           
 int getStartIndexOfSublist(int sublistIndex)
           
 void removeAllSubLists()
           
 ListModel<T> removeSubList(int index)
           
 boolean removeSubList(ListModel<T> model)
           
 
Methods inherited from class de.matthiasmann.twl.model.SimpleListModel
matchPrefix
 
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

CombinedListModel

public CombinedListModel()
Method Detail

getNumEntries

public int getNumEntries()

getEntry

public T getEntry(int index)

getEntryTooltip

public java.lang.Object getEntryTooltip(int index)
Specified by:
getEntryTooltip in interface ListModel<T>
Overrides:
getEntryTooltip in class SimpleListModel<T>

getNumSubLists

public int getNumSubLists()

addSubList

public void addSubList(ListModel<T> model)

addSubList

public void addSubList(int index,
                       ListModel<T> model)

findSubList

public int findSubList(ListModel<T> model)

removeAllSubLists

public void removeAllSubLists()

removeSubList

public boolean removeSubList(ListModel<T> model)

removeSubList

public ListModel<T> removeSubList(int index)

getModelForSubLists

public ListModel<ListModel<T>> getModelForSubLists()

getStartIndexOfSublist

public int getStartIndexOfSublist(int sublistIndex)