org.jdesktop.swingx.multislider
Class DefaultMultiThumbModel<E>

java.lang.Object
  extended by org.jdesktop.swingx.multislider.AbstractMultiThumbModel<E>
      extended by org.jdesktop.swingx.multislider.DefaultMultiThumbModel<E>
All Implemented Interfaces:
Iterable<Thumb<E>>, MultiThumbModel<E>

public class DefaultMultiThumbModel<E>
extends AbstractMultiThumbModel<E>
implements MultiThumbModel<E>


Field Summary
protected  List<Thumb<E>> thumbs
           
 
Fields inherited from class org.jdesktop.swingx.multislider.AbstractMultiThumbModel
maximumValue, minimumValue, thumbDataListeners
 
Constructor Summary
DefaultMultiThumbModel()
          Creates a new instance of DefaultMultiThumbModel
 
Method Summary
 int addThumb(float value, E obj)
           
 List<Thumb<E>> getSortedThumbs()
           
 Thumb<E> getThumbAt(int index)
           
 int getThumbCount()
           
 int getThumbIndex(Thumb<E> thumb)
           
 void insertThumb(float value, E obj, int index)
           
 Iterator<Thumb<E>> iterator()
          Returns an iterator over a set of elements of type T.
 void removeThumb(int index)
           
 
Methods inherited from class org.jdesktop.swingx.multislider.AbstractMultiThumbModel
addThumbDataListener, fireThumbPositionChanged, fireThumbValueChanged, getMaximumValue, getMinimumValue, removeThumbDataListener, setMaximumValue, setMinimumValue, thumbPositionChanged, thumbValueChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jdesktop.swingx.multislider.MultiThumbModel
addThumbDataListener, getMaximumValue, getMinimumValue, removeThumbDataListener, setMaximumValue, setMinimumValue, thumbPositionChanged, thumbValueChanged
 

Field Detail

thumbs

protected List<Thumb<E>> thumbs
Constructor Detail

DefaultMultiThumbModel

public DefaultMultiThumbModel()
Creates a new instance of DefaultMultiThumbModel

Method Detail

addThumb

public int addThumb(float value,
                    E obj)
Specified by:
addThumb in interface MultiThumbModel<E>

insertThumb

public void insertThumb(float value,
                        E obj,
                        int index)
Specified by:
insertThumb in interface MultiThumbModel<E>

removeThumb

public void removeThumb(int index)
Specified by:
removeThumb in interface MultiThumbModel<E>

getThumbCount

public int getThumbCount()
Specified by:
getThumbCount in interface MultiThumbModel<E>

getThumbAt

public Thumb<E> getThumbAt(int index)
Specified by:
getThumbAt in interface MultiThumbModel<E>

getSortedThumbs

public List<Thumb<E>> getSortedThumbs()
Specified by:
getSortedThumbs in interface MultiThumbModel<E>

iterator

public Iterator<Thumb<E>> iterator()
Description copied from interface: java.lang.Iterable
Returns an iterator over a set of elements of type T.

Specified by:
iterator in interface Iterable<Thumb<E>>
Returns:
an Iterator.

getThumbIndex

public int getThumbIndex(Thumb<E> thumb)
Specified by:
getThumbIndex in interface MultiThumbModel<E>