Class JaxxFilterableListModel<E>

    • Field Detail

      • filteredItems

        protected final ArrayList<E> filteredItems
      • filterText

        protected String filterText
      • decorator

        protected io.ultreia.java4all.decoration.Decorator decorator
        the decorator of data
    • Constructor Detail

      • JaxxFilterableListModel

        public JaxxFilterableListModel()
    • Method Detail

      • getElementAt

        public E getElementAt​(int index)
        Description copied from class: JaxxDefaultListModel
        Returns the component at the specified index.
        Note: Although this method is not deprecated, the preferred method to use is get(int), which implements the List interface defined in the 1.2 Collections framework.
        Specified by:
        getElementAt in interface ListModel<E>
        Overrides:
        getElementAt in class JaxxDefaultListModel<E>
        Parameters:
        index - an index into this list
        Returns:
        the component at the specified index
        See Also:
        JaxxDefaultListModel.get(int)
      • elementAt

        public E elementAt​(int index)
        Description copied from class: JaxxDefaultListModel
        Returns the component at the specified index. Throws an ArrayIndexOutOfBoundsException if the index is negative or not less than the size of the list.
        Note: Although this method is not deprecated, the preferred method to use is get(int), which implements the List interface defined in the 1.2 Collections framework.
        Overrides:
        elementAt in class JaxxDefaultListModel<E>
        Parameters:
        index - an index into this list
        Returns:
        the component at the specified index
        See Also:
        JaxxDefaultListModel.get(int), Vector.elementAt(int)
      • getSize

        public int getSize()
        Description copied from class: JaxxDefaultListModel
        Returns the number of components in this list.

        This method is identical to size, which implements the List interface defined in the 1.2 Collections framework. This method exists in conjunction with setSize so that size is identifiable as a JavaBean property.

        Specified by:
        getSize in interface ListModel<E>
        Overrides:
        getSize in class JaxxDefaultListModel<E>
        Returns:
        the number of components in this list
        See Also:
        JaxxDefaultListModel.size()
      • ensureCapacity

        public void ensureCapacity​(int minCapacity)
        Description copied from class: JaxxDefaultListModel
        Increases the capacity of this list, if necessary, to ensure that it can hold at least the number of components specified by the minimum capacity argument.
        Overrides:
        ensureCapacity in class JaxxDefaultListModel<E>
        Parameters:
        minCapacity - the desired minimum capacity
        See Also:
        Vector.ensureCapacity(int)
      • setElementAt

        public void setElementAt​(E element,
                                 int index)
        Description copied from class: JaxxDefaultListModel
        Sets the component at the specified index of this list to be the specified element. The previous component at that position is discarded.

        Throws an ArrayIndexOutOfBoundsException if the index is invalid.

        Note: Although this method is not deprecated, the preferred method to use is set(int,Object), which implements the List interface defined in the 1.2 Collections framework.
        Overrides:
        setElementAt in class JaxxDefaultListModel<E>
        Parameters:
        element - what the component is to be set to
        index - the specified index
        See Also:
        JaxxDefaultListModel.set(int, Object), Vector.setElementAt(Object, int)
      • removeElementAt

        public void removeElementAt​(int index)
        Description copied from class: JaxxDefaultListModel
        Deletes the component at the specified index.

        Throws an ArrayIndexOutOfBoundsException if the index is invalid.

        Note: Although this method is not deprecated, the preferred method to use is remove(int), which implements the List interface defined in the 1.2 Collections framework.
        Overrides:
        removeElementAt in class JaxxDefaultListModel<E>
        Parameters:
        index - the index of the object to remove
        See Also:
        JaxxDefaultListModel.remove(int), Vector.removeElementAt(int)
      • insertElementAt

        public void insertElementAt​(E element,
                                    int index)
        Description copied from class: JaxxDefaultListModel
        Inserts the specified element as a component in this list at the specified index.

        Throws an ArrayIndexOutOfBoundsException if the index is invalid.

        Note: Although this method is not deprecated, the preferred method to use is add(int,Object), which implements the List interface defined in the 1.2 Collections framework.
        Overrides:
        insertElementAt in class JaxxDefaultListModel<E>
        Parameters:
        element - the component to insert
        index - where to insert the new component
        See Also:
        JaxxDefaultListModel.add(int, Object), Vector.insertElementAt(Object, int)
      • set

        public E set​(int index,
                     E element)
        Description copied from class: JaxxDefaultListModel
        Replaces the element at the specified position in this list with the specified element.

        Throws an ArrayIndexOutOfBoundsException if the index is out of range (index < 0 || index >= size()).

        Overrides:
        set in class JaxxDefaultListModel<E>
        Parameters:
        index - index of element to replace
        element - element to be stored at the specified position
        Returns:
        the element previously at the specified position
      • add

        public void add​(int index,
                        E element)
        Description copied from class: JaxxDefaultListModel
        Inserts the specified element at the specified position in this list.

        Throws an ArrayIndexOutOfBoundsException if the index is out of range (index < 0 || index > size()).

        Overrides:
        add in class JaxxDefaultListModel<E>
        Parameters:
        index - index at which the specified element is to be inserted
        element - element to be inserted
      • remove

        public E remove​(int index)
        Description copied from class: JaxxDefaultListModel
        Removes the element at the specified position in this list. Returns the element that was removed from the list.

        Throws an ArrayIndexOutOfBoundsException if the index is out of range (index < 0 || index >= size()).

        Overrides:
        remove in class JaxxDefaultListModel<E>
        Parameters:
        index - the index of the element to removed
        Returns:
        the element previously at the specified position
      • clear

        public void clear()
        Description copied from class: JaxxDefaultListModel
        Removes all of the elements from this list. The list will be empty after this call returns (unless it throws an exception).
        Overrides:
        clear in class JaxxDefaultListModel<E>
      • removeRange

        public void removeRange​(int fromIndex,
                                int toIndex)
        Description copied from class: JaxxDefaultListModel
        Deletes the components at the specified range of indexes. The removal is inclusive, so specifying a range of (1,5) removes the component at index 1 and the component at index 5, as well as all components in between.

        Throws an ArrayIndexOutOfBoundsException if the index was invalid. Throws an IllegalArgumentException if fromIndex > toIndex.

        Overrides:
        removeRange in class JaxxDefaultListModel<E>
        Parameters:
        fromIndex - the index of the lower end of the range
        toIndex - the index of the upper end of the range
        See Also:
        JaxxDefaultListModel.remove(int)
      • getFilterText

        public String getFilterText()
      • setFilterText

        public void setFilterText​(String filterText)
      • getDecorator

        public io.ultreia.java4all.decoration.Decorator getDecorator()
      • setDecorator

        public void setDecorator​(io.ultreia.java4all.decoration.Decorator decorator)
      • addFilter

        public void addFilter​(Predicate<E> filter)
      • removeFilter

        public void removeFilter​(Predicate<E> filter)
      • clearFilters

        public void clearFilters()
      • refreshFilteredElements

        public void refreshFilteredElements()
      • refilter

        protected void refilter()