Class ListModel2<E>

  • All Implemented Interfaces:
    java.io.Serializable, javax.swing.ListModel<E>

    public class ListModel2<E>
    extends javax.swing.AbstractListModel<E>
    ListModel implementation that represents the concatenation of two supplied constituent ListModels.
    Since:
    10 May 2018
    Author:
    Mark Taylor
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class javax.swing.AbstractListModel

        listenerList
    • Constructor Summary

      Constructors 
      Constructor Description
      ListModel2​(javax.swing.ListModel<E> model1, javax.swing.ListModel<E> model2)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      E getElementAt​(int ix)  
      javax.swing.ListModel<E> getModel1()
      Returns the model providing the first run of entries.
      javax.swing.ListModel<E> getModel2()
      Returns the model providing the second run of entries.
      int getSize()  
      • 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

      • ListModel2

        public ListModel2​(javax.swing.ListModel<E> model1,
                          javax.swing.ListModel<E> model2)
        Constructor.
        Parameters:
        model1 - first constituent model
        model2 - second constituend model
    • Method Detail

      • getModel1

        public javax.swing.ListModel<E> getModel1()
        Returns the model providing the first run of entries.
        Returns:
        model 1
      • getModel2

        public javax.swing.ListModel<E> getModel2()
        Returns the model providing the second run of entries.
        Returns:
        model 2
      • getElementAt

        public E getElementAt​(int ix)
      • getSize

        public int getSize()