org.equanda.util.swing
Class JSortedListModel<ELEMENT>

java.lang.Object
  extended by javax.swing.AbstractListModel
      extended by org.equanda.util.swing.JSortedListModel<ELEMENT>
All Implemented Interfaces:
Serializable, ListModel

public class JSortedListModel<ELEMENT>
extends AbstractListModel

Sorted List Model

Author:
NetRom team, Andrei Chiritescu
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.AbstractListModel
listenerList
 
Constructor Summary
JSortedListModel()
           
JSortedListModel(Collection<ELEMENT> data)
           
JSortedListModel(Collection<ELEMENT> data, Comparator<ELEMENT> comparator)
           
JSortedListModel(ELEMENT[] data)
           
JSortedListModel(ELEMENT[] data, Comparator<ELEMENT> comparator)
           
 
Method Summary
 void addAll(ELEMENT[] elements)
           
 void addAll(List<ELEMENT> elements)
           
 void addElement(ELEMENT element)
           
 void clear()
           
 boolean contains(ELEMENT element)
           
 Object firstElement()
           
 Vector<ELEMENT> getData()
           
 ELEMENT getElementAt(int index)
           
 int getSize()
           
 Iterator iterator()
           
 Object lastElement()
           
 boolean removeElement(ELEMENT element)
           
 ELEMENT[] toArray()
           
 
Methods inherited from class javax.swing.AbstractListModel
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JSortedListModel

public JSortedListModel()

JSortedListModel

public JSortedListModel(ELEMENT[] data)

JSortedListModel

public JSortedListModel(ELEMENT[] data,
                        Comparator<ELEMENT> comparator)

JSortedListModel

public JSortedListModel(Collection<ELEMENT> data)

JSortedListModel

public JSortedListModel(Collection<ELEMENT> data,
                        Comparator<ELEMENT> comparator)
Method Detail

getSize

public int getSize()

getElementAt

public ELEMENT getElementAt(int index)

addElement

public void addElement(ELEMENT element)

addAll

public void addAll(ELEMENT[] elements)

addAll

public void addAll(List<ELEMENT> elements)

clear

public void clear()

contains

public boolean contains(ELEMENT element)

firstElement

public Object firstElement()

iterator

public Iterator iterator()

lastElement

public Object lastElement()

removeElement

public boolean removeElement(ELEMENT element)

getData

public Vector<ELEMENT> getData()

toArray

public ELEMENT[] toArray()


Copyright © 2007-2009. All Rights Reserved.