Class EnhancedListModel<T>

    • Constructor Detail

      • EnhancedListModel

        public EnhancedListModel()
      • EnhancedListModel

        public EnhancedListModel​(Collection<? extends T> pContents)
    • Method Detail

      • isEventFiringEnabled

        protected boolean isEventFiringEnabled()
        ListModelEvents are fired if this is true.
      • setEventFiringEnabled

        protected void setEventFiringEnabled​(boolean pEventFiringEnabled)
        See Also:
        isEventFiringEnabled()
      • moveAll

        public void moveAll​(int[] pIndices,
                            EnhancedListModel.Direction pDir)
        Shifts elements at specified locations in specified direction. One event is fired with indices determined by range of updates. Behavior undefined if indices are duplicated or out of range.
        Specified by:
        moveAll in interface Reorderable
      • moveAll

        public void moveAll​(Collection<?> pObjects,
                            EnhancedListModel.Direction pDir)
        Move specified objects up or down. Behavior undefined if objects in collection are duplicated.
      • getIndices

        public int[] getIndices​(Collection<?> pColl)
        Any elements not present in list marked with -1.
        Returns:
        int array with same size of Collection.
      • addAll

        public void addAll​(Collection<? extends T> pObjects)
        Add all elements in a collection. Fires a single event.
        Overrides:
        addAll in class DefaultListModel<T>
      • insertAll

        public void insertAll​(Collection<? extends T> pObjects,
                              int pIdx)
        Inserts all elements in a collection. Fires a single event.
      • removeAll

        public void removeAll​(int[] pIndices)
        Remove specified indices. Contiguous ranges are removed as a batch. This method minimizes event notifications rather that execution time. Behavior undefined if indices are repeated or out of range.
      • removeAll

        public boolean removeAll​(Collection<?> pColl)
        Remove all elements in a collection. Minimizes number of events rather than execution time. Behavior undefined if duplicate elements contained within argument collection.
        Returns:
        true if list is updated.