Class ListModelMapProxy<K,​V>

    • Constructor Detail

      • ListModelMapProxy

        public ListModelMapProxy​(ListModelMap<K,​V> origin,
                                 java.lang.annotation.Annotation[] callerAnnots)
    • Method Detail

      • getSelection

        public java.util.Set<java.util.Map.Entry<K,​V>> getSelection()
        Description copied from class: AbstractListModel
        Returns the current selection. It is readonly. Don't modify it directly
        Specified by:
        getSelection in interface Selectable<K>
        Overrides:
        getSelection in class AbstractListModel<java.util.Map.Entry<K,​V>>
        Returns:
        the current selection.
      • setSelection

        public void setSelection​(java.util.Set<java.util.Map.Entry<K,​V>> selection)
      • addToSelection

        public boolean addToSelection​(java.util.Map.Entry<K,​V> 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<K>
        Overrides:
        addToSelection in class AbstractListModel<java.util.Map.Entry<K,​V>>
        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<K>
        Overrides:
        removeFromSelection in class AbstractListModel<java.util.Map.Entry<K,​V>>
        Parameters:
        obj - the object to be remove from selection.
        Returns:
        whether it is removed successfully
      • clearSelection

        public void clearSelection()
        Description copied from class: AbstractListModel
        Change the selection to the empty set.

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

        Specified by:
        clearSelection in interface Selectable<K>
        Overrides:
        clearSelection in class AbstractListModel<java.util.Map.Entry<K,​V>>
      • addSelection

        public void addSelection​(java.util.Map.Entry<K,​V> obj)
      • removeSelection

        public void removeSelection​(java.lang.Object obj)
      • getPageCount

        public int getPageCount()
        Description copied from interface: Pageable
        Returns the number of pages. Note: there is at least one page even no item at all.
        Specified by:
        getPageCount in interface Pageable
        Overrides:
        getPageCount in class AbstractListModel<java.util.Map.Entry<K,​V>>
      • containsKey

        public boolean containsKey​(java.lang.Object key)
        Specified by:
        containsKey in interface java.util.Map<K,​V>
        Overrides:
        containsKey in class ListModelMap<K,​V>
      • containsValue

        public boolean containsValue​(java.lang.Object value)
        Specified by:
        containsValue in interface java.util.Map<K,​V>
        Overrides:
        containsValue in class ListModelMap<K,​V>
      • entrySet

        public java.util.Set<java.util.Map.Entry<K,​V>> entrySet()
        Specified by:
        entrySet in interface java.util.Map<K,​V>
        Overrides:
        entrySet in class ListModelMap<K,​V>
      • equals

        public boolean equals​(java.lang.Object o)
        Specified by:
        equals in interface java.util.Map<K,​V>
        Overrides:
        equals in class ListModelMap<K,​V>
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface java.util.Map<K,​V>
        Overrides:
        hashCode in class ListModelMap<K,​V>
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface java.util.Map<K,​V>
        Overrides:
        isEmpty in class ListModelMap<K,​V>
      • get

        public V get​(java.lang.Object key)
        Specified by:
        get in interface java.util.Map<K,​V>
        Overrides:
        get in class ListModelMap<K,​V>
      • put

        public V put​(K key,
                     V value)
        Specified by:
        put in interface java.util.Map<K,​V>
        Overrides:
        put in class ListModelMap<K,​V>
      • remove

        public V remove​(java.lang.Object key)
        Specified by:
        remove in interface java.util.Map<K,​V>
        Overrides:
        remove in class ListModelMap<K,​V>
      • putAll

        public void putAll​(java.util.Map<? extends K,​? extends V> m)
        Specified by:
        putAll in interface java.util.Map<K,​V>
        Overrides:
        putAll in class ListModelMap<K,​V>
      • clear

        public void clear()
        Specified by:
        clear in interface java.util.Map<K,​V>
        Overrides:
        clear in class ListModelMap<K,​V>
      • keySet

        public java.util.Set<K> keySet()
        Specified by:
        keySet in interface java.util.Map<K,​V>
        Overrides:
        keySet in class ListModelMap<K,​V>
      • values

        public java.util.Collection<V> values()
        Specified by:
        values in interface java.util.Map<K,​V>
        Overrides:
        values in class ListModelMap<K,​V>
      • indexOfKey

        public int indexOfKey​(java.lang.Object o)
        Description copied from class: ListModelMap
        Returns the index of the specified object based on the key.
        Overrides:
        indexOfKey in class ListModelMap<K,​V>
        Parameters:
        o - the key to look for
      • indexOf

        public int indexOf​(java.lang.Object o)
        Description copied from class: ListModelMap
        Returns the index of the specified object based on the entry (Map.Entry).
        Overrides:
        indexOf in class ListModelMap<K,​V>
        Parameters:
        o - the object to look for. It must be an instance of Map.Entry.
      • size

        public int size()
        Specified by:
        size in interface java.util.Map<K,​V>
        Overrides:
        size in class ListModelMap<K,​V>
      • sort

        public void sort​(java.util.Comparator<java.util.Map.Entry<K,​V>> cmpr,
                         boolean ascending)
        Description copied from class: ListModelMap
        Sorts the data.
        Specified by:
        sort in interface Sortable<K>
        Overrides:
        sort in class ListModelMap<K,​V>
        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<K>
        Overrides:
        sort in class ListModelMap<K,​V>
        See Also:
        Sortable.sort(Comparator, boolean)
      • getSortDirection

        public java.lang.String getSortDirection​(java.util.Comparator<java.util.Map.Entry<K,​V>> 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<K>
        Overrides:
        getSortDirection in class ListModelMap<K,​V>
      • onDirtyChange

        public void onDirtyChange()
      • onDataChange

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

        protected void setDirty​(boolean d)
      • setHandler

        public void setHandler​(javassist.util.proxy.MethodHandler mi)
        Specified by:
        setHandler in interface javassist.util.proxy.Proxy
      • 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
      • 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
      • testEquals

        protected static boolean testEquals​(java.lang.Object e,
                                            java.lang.Object o)
      • 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.
      • 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
      • 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