|
|||||||||||
| 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.ArrayModel
A BasicModel wrapper for an Object[] that can propagate changes
to contained Models up the Model hierarchy, and implements the java.util.List
interface. The array itself is exposed via the "array" property, however,
changes to this array must be made through the public API in order to
maintain the model change propagation.
By default ArrayModel registers itself as a listener to Models that are added to the array and deregisters when those Models are removed. This behaviour can be changed at creation so that ModelChangeEvent propagation is disabled.
| Field Summary | |
static Selector |
ARRAY
The selector for the array contained in this wrapper class. |
| Fields inherited from interface org.scopemvc.core.ModelChangeTypes |
ACCESS_CHANGED, VALUE_ADDED, VALUE_CHANGED, VALUE_REMOVED |
| Constructor Summary | |
ArrayModel()
Constructor for the ArrayModel object |
|
ArrayModel(boolean inPropagateModelChanges)
Constructor for the ArrayModel object |
|
ArrayModel(boolean inPropagateModelChanges,
int inSize)
Constructor for the ArrayModel object |
|
ArrayModel(boolean inPropagateModelChanges,
java.lang.Object[] inArray)
Constructor for the ArrayModel object |
|
ArrayModel(int inSize)
Constructor for the ArrayModel object |
|
ArrayModel(java.lang.Object[] inArray)
Constructor for the ArrayModel object |
|
| Method Summary | |
void |
add(int index,
java.lang.Object element)
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 ArrayModel object |
boolean |
addAll(int index,
java.util.Collection c)
Adds an element to the All attribute of the ArrayModel 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 |
java.lang.Object[] |
getArray()
Gets the array |
int |
getIndexOf(java.lang.Object inValue)
Deprecated. see indexOf |
int |
getSize()
Expose size as a JavaBeans property. |
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 |
setArray(java.lang.Object[] inContents)
Set contents to the passed Object array 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 ARRAY
| Constructor Detail |
public ArrayModel()
public ArrayModel(java.lang.Object[] inArray)
inArray - The array to wrappublic ArrayModel(int inSize)
inSize - The initial size of the arraypublic ArrayModel(boolean inPropagateModelChanges)
inPropagateModelChanges - If true, propagate the changes made in the
elements of the array
public ArrayModel(boolean inPropagateModelChanges,
int inSize)
inPropagateModelChanges - If true, propagate the changes made in the
elements of the arrayinSize - The initial size of the array
public ArrayModel(boolean inPropagateModelChanges,
java.lang.Object[] inArray)
inPropagateModelChanges - If true, propagate the changes made in the
elements of the arrayinArray - The array to wrap| Method Detail |
public java.lang.Object[] getArray()
public int getSize()
public int getIndexOf(java.lang.Object inValue)
inValue - TODO: Describe the Parameter
public boolean isEmpty()
isEmpty in interface java.util.Listpublic java.lang.Object get(int index)
get in interface java.util.Listindex - TODO: Describe the Parameter
public void setArray(java.lang.Object[] inContents)
inContents - The new array value
public java.lang.Object set(int index,
java.lang.Object element)
set in interface java.util.Listindex - TODO: Describe the Parameterelement - TODO: Describe the Parameter
public java.lang.String toString()
toString in class java.lang.Objectpublic java.util.Iterator iterator()
iterator in interface java.util.Listpublic int size()
size in interface java.util.Listpublic java.lang.Object[] toArray(java.lang.Object[] a)
toArray in interface java.util.Lista - TODO: Describe the Parameter
public boolean contains(java.lang.Object o)
contains in interface java.util.Listo - TODO: Describe the Parameter
public boolean remove(java.lang.Object o)
remove in interface java.util.Listo - TODO: Describe the Parameter
public java.lang.Object[] toArray()
toArray in interface java.util.Listpublic boolean addAll(java.util.Collection c)
addAll in interface java.util.Listc - The element to be added to the All attribute
public boolean add(java.lang.Object o)
add in interface java.util.Listo - TODO: Describe the Parameter
public boolean removeAll(java.util.Collection c)
removeAll in interface java.util.Listc - TODO: Describe the Parameter
public boolean containsAll(java.util.Collection c)
containsAll in interface java.util.Listc - 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.Listindex - 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.ListhashCode in class java.lang.Objectpublic boolean retainAll(java.util.Collection c)
retainAll in interface java.util.Listc - TODO: Describe the Parameter
public boolean equals(java.lang.Object o)
equals in interface java.util.Listequals in class java.lang.Objecto - TODO: Describe the Parameter
public java.lang.Object remove(int index)
remove in interface java.util.Listindex - TODO: Describe the Parameter
public int lastIndexOf(java.lang.Object o)
lastIndexOf in interface java.util.Listo - TODO: Describe the Parameter
public void add(int index,
java.lang.Object element)
add in interface java.util.Listindex - TODO: Describe the Parameterelement - TODO: Describe the Parameterpublic java.util.ListIterator listIterator(int index)
listIterator in interface java.util.Listindex - TODO: Describe the Parameter
public int indexOf(java.lang.Object o)
indexOf in interface java.util.Listo - 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.ListfromIndex - TODO: Describe the ParametertoIndex - TODO: Describe the Parameter
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||