Class ListModelSetProxy<E>

    • Constructor Detail

      • ListModelSetProxy

        public ListModelSetProxy​(ListModelSet<E> origin,
                                 java.lang.annotation.Annotation[] callerAnnots)
    • Method Detail

      • onDirtyChange

        public void onDirtyChange()
      • onDataChange

        public void onDataChange​(java.lang.Object o)
      • setDirty

        protected void setDirty​(boolean d)
      • setSelection

        public void setSelection​(java.util.Collection<? extends E> selection)
        Description copied from class: AbstractListModel
        Replace the current selection with the given set.

        If this represents a change to the current selection then notify each ListDataListener, including UI.

        Specified by:
        setSelection in interface Selectable<E>
        Overrides:
        setSelection in class AbstractListModel<E>
      • addToSelection

        public boolean addToSelection​(E obj)
        Description copied from class: AbstractListModel
        Add the specified object into selection.

        If this represents a change to the current selection then notify each ListDataListener, including UI.

        Specified by:
        addToSelection in interface Selectable<E>
        Overrides:
        addToSelection in class AbstractListModel<E>
        Parameters:
        obj - the object to be as selection.
        Returns:
        true if it is added successfully; false if obj is not part of the data, or was already selected.
      • removeFromSelection

        public boolean removeFromSelection​(java.lang.Object obj)
        Description copied from class: AbstractListModel
        Remove the specified object from selection.

        If this represents a change to the current selection then notify each ListDataListener, including UI.

        Specified by:
        removeFromSelection in interface Selectable<E>
        Overrides:
        removeFromSelection in class AbstractListModel<E>
        Parameters:
        obj - the object to be remove from selection.
        Returns:
        whether it is removed successfully
      • add

        public boolean add​(E o)
        Description copied from class: ListModelSet
        This implementation optimized on the LinkedHashSet(which guarantees the sequence of the added item). Other implementation needs one more linear search.
        Specified by:
        add in interface java.util.Collection<E>
        Specified by:
        add in interface java.util.Set<E>
        Overrides:
        add in class ListModelSet<E>
      • addAll

        public boolean addAll​(java.util.Collection<? extends E> c)
        Description copied from class: ListModelSet
        This implementation optimized on the LinkedHashSet(which guarantees the sequence of the added item). Other implementation needs one more linear search.
        Specified by:
        addAll in interface java.util.Collection<E>
        Specified by:
        addAll in interface java.util.Set<E>
        Overrides:
        addAll in class ListModelSet<E>
      • clear

        public void clear()
        Specified by:
        clear in interface java.util.Collection<E>
        Specified by:
        clear in interface java.util.Set<E>
        Overrides:
        clear in class ListModelSet<E>
      • contains

        public boolean contains​(java.lang.Object o)
        Specified by:
        contains in interface java.util.Collection<E>
        Specified by:
        contains in interface java.util.Set<E>
        Overrides:
        contains in class ListModelSet<E>
      • containsAll

        public boolean containsAll​(java.util.Collection<?> c)
        Specified by:
        containsAll in interface java.util.Collection<E>
        Specified by:
        containsAll in interface java.util.Set<E>
        Overrides:
        containsAll in class ListModelSet<E>
      • equals

        public boolean equals​(java.lang.Object o)
        Specified by:
        equals in interface java.util.Collection<E>
        Specified by:
        equals in interface java.util.Set<E>
        Overrides:
        equals in class ListModelSet<E>
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface java.util.Collection<E>
        Specified by:
        hashCode in interface java.util.Set<E>
        Overrides:
        hashCode in class ListModelSet<E>
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface java.util.Collection<E>
        Specified by:
        isEmpty in interface java.util.Set<E>
        Overrides:
        isEmpty in class ListModelSet<E>
      • iterator

        public java.util.Iterator<E> iterator()
        Specified by:
        iterator in interface java.util.Collection<E>
        Specified by:
        iterator in interface java.lang.Iterable<E>
        Specified by:
        iterator in interface java.util.Set<E>
        Overrides:
        iterator in class ListModelSet<E>
      • remove

        public boolean remove​(java.lang.Object o)
        Specified by:
        remove in interface java.util.Collection<E>
        Specified by:
        remove in interface java.util.Set<E>
        Overrides:
        remove in class ListModelSet<E>
      • indexOf

        public int indexOf​(java.lang.Object o)
        Description copied from class: ListModelSet
        Returns the index of the specified object, or -1 if not found.
        Overrides:
        indexOf in class ListModelSet<E>
      • removeAll

        public boolean removeAll​(java.util.Collection<?> c)
        Specified by:
        removeAll in interface java.util.Collection<E>
        Specified by:
        removeAll in interface java.util.Set<E>
        Overrides:
        removeAll in class ListModelSet<E>
      • retainAll

        public boolean retainAll​(java.util.Collection<?> c)
        Specified by:
        retainAll in interface java.util.Collection<E>
        Specified by:
        retainAll in interface java.util.Set<E>
        Overrides:
        retainAll in class ListModelSet<E>
      • size

        public int size()
        Specified by:
        size in interface java.util.Collection<E>
        Specified by:
        size in interface java.util.Set<E>
        Overrides:
        size in class ListModelSet<E>
      • toArray

        public java.lang.Object[] toArray()
        Specified by:
        toArray in interface java.util.Collection<E>
        Specified by:
        toArray in interface java.util.Set<E>
        Overrides:
        toArray in class ListModelSet<E>
      • toArray

        public <T> T[] toArray​(T[] a)
        Specified by:
        toArray in interface java.util.Collection<E>
        Specified by:
        toArray in interface java.util.Set<E>
        Overrides:
        toArray in class ListModelSet<E>
      • sort

        public void sort​(java.util.Comparator<E> cmpr,
                         boolean ascending)
        Description copied from class: ListModelSet
        Sorts the data.
        Specified by:
        sort in interface Sortable<E>
        Overrides:
        sort in class ListModelSet<E>
        Parameters:
        cmpr - the comparator.
        ascending - whether to sort in the ascending order. It is ignored since this implementation uses cmpr to compare.
      • sort

        public void sort()
        Description copied from interface: Sortable
        Sort the data model by default or assigned comparator. Notice that the default implementation does nothing, the model which implements Sortable need to implement this method.
        Specified by:
        sort in interface Sortable<E>
        Overrides:
        sort in class ListModelSet<E>
        See Also:
        Sortable.sort(Comparator, boolean)
      • getSortDirection

        public java.lang.String getSortDirection​(java.util.Comparator<E> cmpr)
        Description copied from interface: Sortable
        Returns the sort direction of this model for the given comparator. It must be one of "ascending", "descending" and "natural".

        Default: "natural".

        Specified by:
        getSortDirection in interface Sortable<E>
        Overrides:
        getSortDirection in class ListModelSet<E>
      • setHandler

        public void setHandler​(javassist.util.proxy.MethodHandler mi)
        Specified by:
        setHandler in interface javassist.util.proxy.Proxy
      • resetFromOrigin

        public void resetFromOrigin()
        Description copied from interface: FormProxyObject
        Resets all of the changes of this form from the origin object.
        Specified by:
        resetFromOrigin in interface FormProxyObject
      • isFormDirty

        public boolean isFormDirty()
        Description copied from interface: FormProxyObject
        Returns whether the form proxy object is dirty or not, including all of its attributes.
        Specified by:
        isFormDirty in interface FormProxyObject
      • setFormOwner

        public void setFormOwner​(java.lang.Object owner,
                                 FormBinding binding)
        Description copied from interface: FormProxyObject
        Sets the owner of this form with its binding.
        Specified by:
        setFormOwner in interface FormProxyObject
        Parameters:
        owner - the object associated with this form.
      • setPath

        public void setPath​(java.lang.String property,
                            ProxyNode parent)
        Description copied from interface: FormProxyObject
        Set the property of current form proxy object and it's creator
        Specified by:
        setPath in interface FormProxyObject
        Parameters:
        property - p the property
        parent - parent the parent proxy node
      • cacheSavePropertyBinding

        public void cacheSavePropertyBinding​(java.lang.String property,
                                             SavePropertyBinding s)
        Description copied from interface: FormProxyObject
        Cache save property binding by property string
        Specified by:
        cacheSavePropertyBinding in interface FormProxyObject
        Parameters:
        property - the property of save property binding
        s - the save property binding
      • testEquals

        protected static boolean testEquals​(java.lang.Object e,
                                            java.lang.Object o)
      • createProxyObject

        protected <T> T createProxyObject​(T t)