Class ArrangeableListModel<E>

  • Type Parameters:
    E - Generic data type this list will contain.
    All Implemented Interfaces:
    java.io.Serializable, javax.swing.ListModel<E>

    public class ArrangeableListModel<E>
    extends javax.swing.AbstractListModel<E>
    Custom ArrayList wrapper around an ArrayList which offers methods for shifting a contiguous range of entries earlier or later in the list (for shifting rows).
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class javax.swing.AbstractListModel

        listenerList
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addElement​(E element)  
      void clear()  
      E getElementAt​(int index)  
      int getSize()  
      void remove​(int index)  
      boolean shiftRowsDown​(int firstRowIndex, int lastRowIndex)  
      boolean shiftRowsUp​(int firstRowIndex, int lastRowIndex)  
      int size()  
      • 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

      • ArrangeableListModel

        public ArrangeableListModel()
    • Method Detail

      • getElementAt

        public E getElementAt​(int index)
      • getSize

        public int getSize()
      • size

        public int size()
      • shiftRowsUp

        public boolean shiftRowsUp​(int firstRowIndex,
                                   int lastRowIndex)
      • shiftRowsDown

        public boolean shiftRowsDown​(int firstRowIndex,
                                     int lastRowIndex)
      • addElement

        public void addElement​(E element)
      • remove

        public void remove​(int index)
      • clear

        public void clear()