|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.scopemvc.model.basic.BasicModel | +--org.scopemvc.model.collection.ListModel
A BasicModel wrapper for an List
that can propagate changes to
contained Models up the Model hierarchy. The list itself is exposed via the
"list" property, however, changes to this list must be made through this
class's public API in order to maintain the event propagation.
By default ListModel registers itself as a listener to Models that are added to the list and deregisters when those Models are removed. This behaviour can be changed at creation so that ModelChangeEvent propagation is disabled.
Field Summary | |
protected java.util.List |
contents
TODO: describe of the Field |
static Selector |
LIST
TODO: describe of the Field |
protected boolean |
propagateModelChanges
TODO: describe of the Field |
protected static java.lang.String |
TO_STRING_SEPARATOR
TODO: describe of the Field |
protected static int |
TO_STRING_SEPARATOR_LENGTH
TODO: describe of the Field |
Fields inherited from interface org.scopemvc.core.ModelChangeTypes |
ACCESS_CHANGED, VALUE_ADDED, VALUE_CHANGED, VALUE_REMOVED |
Constructor Summary | |
ListModel()
Constructor for the ListModel object |
|
ListModel(boolean inPropagateModelChanges)
Constructor for the ListModel object |
|
ListModel(boolean inPropagateModelChanges,
java.util.List inList)
Constructor for the ListModel object |
|
ListModel(java.util.List inList)
Constructor for the ListModel object |
Method Summary | |
void |
add(int index,
java.lang.Object o)
TODO: document the method |
boolean |
add(java.lang.Object o)
TODO: document the method |
boolean |
addAll(java.util.Collection c)
Adds an element to the All attribute of the ListModel object |
boolean |
addAll(int index,
java.util.Collection c)
Adds an element to the All attribute of the ListModel object |
void |
clear()
TODO: document the method |
boolean |
contains(java.lang.Object o)
TODO: document the method |
boolean |
containsAll(java.util.Collection c)
TODO: document the method |
boolean |
equals(java.lang.Object o)
TODO: document the method |
java.lang.Object |
get(int index)
TODO: document the method |
int |
getIndexOf(java.lang.Object inValue)
Gets the index of |
java.util.List |
getList()
Gets the list |
int |
getSize()
Gets the size |
int |
hashCode()
TODO: document the method |
int |
indexOf(java.lang.Object o)
TODO: document the method |
boolean |
isEmpty()
Gets the empty |
java.util.Iterator |
iterator()
TODO: document the method |
int |
lastIndexOf(java.lang.Object o)
TODO: document the method |
java.util.ListIterator |
listIterator()
TODO: document the method |
java.util.ListIterator |
listIterator(int index)
TODO: document the method |
java.lang.Object |
remove(int index)
TODO: document the method |
boolean |
remove(java.lang.Object o)
TODO: document the method |
boolean |
removeAll(java.util.Collection c)
TODO: document the method |
boolean |
retainAll(java.util.Collection c)
TODO: document the method |
java.lang.Object |
set(int index,
java.lang.Object element)
TODO: document the method |
void |
setList(java.util.List inContents)
Set contents to the passed Object list and fire a ModelChangeEvent. |
int |
size()
TODO: document the method |
java.util.List |
subList(int fromIndex,
int toIndex)
TODO: document the method |
java.lang.Object[] |
toArray()
TODO: document the method |
java.lang.Object[] |
toArray(java.lang.Object[] a)
TODO: document the method |
java.lang.String |
toString()
TODO: document the method |
Methods inherited from class org.scopemvc.model.basic.BasicModel |
addModelChangeListener, fireModelChange, listenNewSubmodel, makeActive, modelChanged, removeModelChangeListener, unlistenOldSubmodel |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final Selector LIST
protected static final java.lang.String TO_STRING_SEPARATOR
protected static final int TO_STRING_SEPARATOR_LENGTH
protected java.util.List contents
protected boolean propagateModelChanges
Constructor Detail |
public ListModel()
public ListModel(java.util.List inList)
inList
- TODO: Describe the Parameterpublic ListModel(boolean inPropagateModelChanges)
inPropagateModelChanges
- TODO: Describe the Parameterpublic ListModel(boolean inPropagateModelChanges, java.util.List inList)
inPropagateModelChanges
- TODO: Describe the ParameterinList
- TODO: Describe the ParameterMethod Detail |
public java.util.List getList()
public int getSize()
public int getIndexOf(java.lang.Object inValue)
inValue
- TODO: Describe the Parameter
public boolean isEmpty()
isEmpty
in interface java.util.List
public java.lang.Object get(int index)
get
in interface java.util.List
index
- TODO: Describe the Parameter
public void setList(java.util.List inContents)
inContents
- The new list valuepublic java.lang.Object set(int index, java.lang.Object element)
set
in interface java.util.List
index
- TODO: Describe the Parameterelement
- TODO: Describe the Parameter
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.Iterator iterator()
iterator
in interface java.util.List
public int size()
size
in interface java.util.List
public java.lang.Object[] toArray(java.lang.Object[] a)
toArray
in interface java.util.List
a
- TODO: Describe the Parameter
public boolean contains(java.lang.Object o)
contains
in interface java.util.List
o
- TODO: Describe the Parameter
public boolean remove(java.lang.Object o)
remove
in interface java.util.List
o
- TODO: Describe the Parameter
public java.lang.Object[] toArray()
toArray
in interface java.util.List
public boolean addAll(java.util.Collection c)
addAll
in interface java.util.List
c
- The element to be added to the All attribute
public boolean add(java.lang.Object o)
add
in interface java.util.List
o
- TODO: Describe the Parameter
public boolean removeAll(java.util.Collection c)
removeAll
in interface java.util.List
c
- TODO: Describe the Parameter
public boolean containsAll(java.util.Collection c)
containsAll
in interface java.util.List
c
- TODO: Describe the Parameter
public void clear()
clear
in interface java.util.List
public boolean addAll(int index, java.util.Collection c)
addAll
in interface java.util.List
index
- The element to be added to the All attributec
- The element to be added to the All attribute
public int hashCode()
hashCode
in interface java.util.List
hashCode
in class java.lang.Object
public boolean retainAll(java.util.Collection c)
retainAll
in interface java.util.List
c
- TODO: Describe the Parameter
public boolean equals(java.lang.Object o)
equals
in interface java.util.List
equals
in class java.lang.Object
o
- TODO: Describe the Parameter
public java.lang.Object remove(int index)
remove
in interface java.util.List
index
- TODO: Describe the Parameter
public int lastIndexOf(java.lang.Object o)
lastIndexOf
in interface java.util.List
o
- TODO: Describe the Parameter
public void add(int index, java.lang.Object o)
add
in interface java.util.List
index
- TODO: Describe the Parametero
- TODO: Describe the Parameterpublic java.util.ListIterator listIterator(int index)
listIterator
in interface java.util.List
index
- TODO: Describe the Parameter
public int indexOf(java.lang.Object o)
indexOf
in interface java.util.List
o
- TODO: Describe the Parameter
public java.util.ListIterator listIterator()
listIterator
in interface java.util.List
public java.util.List subList(int fromIndex, int toIndex)
subList
in interface java.util.List
fromIndex
- TODO: Describe the ParametertoIndex
- TODO: Describe the Parameter
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |