Overview | Package | Class | Tree | Deprecated | Index | Help | Weka's home
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## weka.gui.ensembleLibraryEditor
Class ModelList.SortedListModel

    java.lang.Object
      javax.swing.AbstractListModel
          weka.gui.ensembleLibraryEditor.ModelList.SortedListModel

All Implemented Interfaces:
  java.io.Serializable, javax.swing.ListModel

Enclosing class:
  ModelList

    public class ModelList.SortedListModel

extends javax.swing.AbstractListModel

This is a helper class that creates a custom list model for the ModelList class. It basically ensures that all model entries are 1) unique - so that no duplicate entries can find their way in, and 2) sorted alphabetically. It also numbers them.

This nested class was adapted from code found in a freely available tutorial on sorting JList entries by John Zukowski - wait a sec, he's the guy who wrote the other tutorial I cited in the AddModelsPanel. wow, different web site even. This guy is really in to writing tutorials. Anyway, it was very helpful, if you would like to know more about implementing swing MVC stuff.

Anyway, John Zukowski's tutorial can be found at:
http://www.jguru.com/faq/view.jsp?EID=15245

See Also:
  Serialized Form

Constructor Summary
`ModelList.SortedListModel()` default constructor

Method Summary
`void` | `add(java.lang.Object element)`
`void` | `addAll(java.lang.Object[] elements)`
`void` | `clear()`
`boolean` | `contains(java.lang.Object element)`
`java.lang.Object` | `firstElement()`
`java.lang.Object` | `getElementAt(int index)`
`int` | `getSize()`
`java.util.Iterator` | `iterator()`
`java.lang.Object` | `lastElement()`
`boolean` | `removeElement(java.lang.Object element)`

Methods inherited from class javax.swing.AbstractListModel
`addListDataListener, getListDataListeners, getListeners, removeListDataListener`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ModelList.SortedListModel

    public ModelList.SortedListModel()

  default constructor

Method Detail

### getSize

    public int getSize()

### getElementAt

    public java.lang.Object getElementAt(int index)

### add

    public void add(java.lang.Object element)

### addAll

    public void addAll(java.lang.Object[] elements)

### clear

    public void clear()

### contains

    public boolean contains(java.lang.Object element)

### firstElement

    public java.lang.Object firstElement()

### iterator

    public java.util.Iterator iterator()

### lastElement

    public java.lang.Object lastElement()

### removeElement

    public boolean removeElement(java.lang.Object element)

Overview | Package | Class | Tree | Deprecated | Index | Help | Weka's home
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD