|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.taursys.model.AbstractCollectionValueHolder com.taursys.model.AbstractListValueHolder
AbstractListValueHolder is a partial implementation of a ListValueHolder Interface.
Constructor Summary | |
AbstractListValueHolder(ObjectValueHolder holder)
Constructs a new AbstractListValueHolder |
|
AbstractListValueHolder(ObjectValueHolder holder,
java.util.List list)
Constructs a new AbstractListValueHolder |
Method Summary | |
void |
add(int index,
java.lang.Object element)
|
boolean |
add(java.lang.Object o)
Ensures that the underlying collection of this holder contains the specified element (optional operation). |
boolean |
addAll(java.util.Collection c)
Adds all of the elements in the specified collection to the underlying collection of this holder (optional operation). |
boolean |
addAll(int index,
java.util.Collection c)
|
void |
addListSelectionListener(javax.swing.event.ListSelectionListener l)
Add a listener to the list that's notified each time a change to the selection occurs. |
void |
clear()
Removes all of the elements from the underlying collection of this holder (optional operation). |
protected void |
fireValueChanged()
Notifies all ListSelectionListeners that the position has changed. |
protected void |
fireValueChanged(javax.swing.event.ListSelectionEvent e)
Notifies all ListSelectionListeners of the given ListSelectionEvent. |
void |
first()
Makes the last object in the List available. |
java.lang.Object |
get(int index)
|
java.util.Comparator |
getComparator()
Get the Comparator that will be used to sort this List. |
java.util.List |
getList()
Gets the List that this ValueHolder will use. |
int |
getPosition()
Gets the current position in the list. |
java.lang.Object |
getPropertyValue(java.lang.String propertyName,
int index)
Returns the value of the given property in the valueObject of the given index. |
java.lang.Object[] |
getPropertyValues(java.lang.String[] propertyNames,
int index)
Get the values for the given properties in the valueObject at the given index. |
int |
getRowCount()
Gets the current number of rows in the list. |
boolean |
hasAny()
Indicates if the List has any Objects. |
boolean |
hasNext()
Indicates whether there is another (any) Objects in the List. |
boolean |
hasPrior()
Indicates whether there is a prior Object in the List. |
int |
indexOf(java.lang.Object o)
|
int |
indexOf(java.lang.String[] propertyNames,
java.lang.Object[] values)
Search through the items in the list for a match based on comparing the given properties/values. |
void |
last()
Makes the last object in the List available. |
int |
lastIndexOf(java.lang.Object o)
|
java.util.ListIterator |
listIterator()
|
java.util.ListIterator |
listIterator(int index)
|
void |
moveTo(int row)
Makes the given row number the current available object. |
void |
next()
Makes the next object in the List available. |
void |
prior()
Makes the prior object in the List available. |
java.lang.Object |
remove()
|
java.lang.Object |
remove(int index)
|
boolean |
remove(java.lang.Object o)
Removes a single instance of the specified element from this collection, if it is present (optional operation). |
boolean |
removeAll(java.util.Collection c)
Removes all the underlying collection of this holder's elements that are also contained in the specified collection (optional operation). |
void |
removeListSelectionListener(javax.swing.event.ListSelectionListener l)
Remove a listener from the list that's notified each time a change to the selection occurs. |
void |
reset()
Resets this holder so that you can iterate the List from the beginning. |
boolean |
retainAll(java.util.Collection c)
Retains only the elements in the underlying collection of this holder that are contained in the specified collection (optional operation). |
java.lang.Object |
set(int index,
java.lang.Object element)
|
void |
setCollection(java.util.Collection newCollection)
Sets the List that this ValueHolder will use and moves to first position (if any). |
void |
setComparator(java.util.Comparator comparator)
Set the Comparator that will be used to sort this List. |
void |
setList(java.util.List newList)
Sets the List(collection) that this ValueHolder will use. |
void |
setObject(java.lang.Object obj)
Sets (replace/copy) the object in the current position. |
void |
setPropertyValues(java.lang.String[] propertyNames,
java.lang.Object[] values,
int index)
Set the values for the given properties in the valueObject. |
void |
sort()
Sort the list using the current comparator. |
java.util.List |
subList(int fromIndex,
int toIndex)
|
java.lang.String |
toString()
Returns a string representation of this object. |
Methods inherited from class com.taursys.model.AbstractCollectionValueHolder |
addChangeListener, contains, containsAll, getAlias, getCollection, getJavaDataType, getObject, getObjectValueHolder, getParentPropertyName, getParentValueHolder, getPropertyValue, getPropertyValues, isEmpty, iterator, removeChangeListener, setAlias, setParentPropertyName, setParentValueHolder, setPropertyValue, setPropertyValues, size, stateChanged, toArray, toArray |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.taursys.model.CollectionValueHolder |
contains, containsAll, equals, getObject, hashCode, isEmpty, iterator, size, toArray, toArray |
Methods inherited from interface com.taursys.model.ValueHolder |
addChangeListener, getAlias, getJavaDataType, getPropertyValue, getPropertyValues, removeChangeListener, setPropertyValue, setPropertyValues |
Methods inherited from interface java.util.List |
contains, containsAll, equals, hashCode, isEmpty, iterator, size, toArray, toArray |
Constructor Detail |
public AbstractListValueHolder(ObjectValueHolder holder)
public AbstractListValueHolder(ObjectValueHolder holder, java.util.List list)
Method Detail |
public boolean hasNext()
hasNext
in interface CollectionValueHolder
hasNext
in class AbstractCollectionValueHolder
public boolean hasPrior()
hasPrior
in interface ListValueHolder
public boolean hasAny()
hasAny
in interface ListValueHolder
public int getPosition()
getPosition
in interface ListValueHolder
public int getRowCount()
getRowCount
in interface ListValueHolder
public void moveTo(int row)
moveTo
in interface ListValueHolder
public void first()
first
in interface ListValueHolder
public void next()
next
in interface CollectionValueHolder
next
in class AbstractCollectionValueHolder
public void prior()
prior
in interface ListValueHolder
public void last()
last
in interface ListValueHolder
public void reset()
reset
in interface CollectionValueHolder
reset
in class AbstractCollectionValueHolder
public int indexOf(java.lang.String[] propertyNames, java.lang.Object[] values) throws ModelException
indexOf
in interface ListValueHolder
propertyNames
- which properties to compare for a matchvalues
- the values to match
ModelException
public java.lang.Object[] getPropertyValues(java.lang.String[] propertyNames, int index) throws ModelException
getPropertyValues
in interface ListValueHolder
ModelException
public java.lang.Object getPropertyValue(java.lang.String propertyName, int index) throws ModelException
getPropertyValue
in interface ListValueHolder
ModelException
public void setPropertyValues(java.lang.String[] propertyNames, java.lang.Object[] values, int index) throws ModelException
ModelException
public void setObject(java.lang.Object obj)
setObject
in interface CollectionValueHolder
setObject
in class AbstractCollectionValueHolder
public void setCollection(java.util.Collection newCollection)
setCollection
in class AbstractCollectionValueHolder
newCollection
- the List that this ValueHolder will use
java.lang.ClassCastException
- if given collection is not a Listpublic void setList(java.util.List newList)
newList
- the List that this ValueHolder will usepublic java.util.List getList()
public void setComparator(java.util.Comparator comparator)
comparator
- the Comparator used to sort this List.public java.util.Comparator getComparator()
public void sort()
public void removeListSelectionListener(javax.swing.event.ListSelectionListener l)
removeListSelectionListener
in interface ListValueHolder
l
- the ListSelectionListeneraddListSelectionListener(javax.swing.event.ListSelectionListener)
public void addListSelectionListener(javax.swing.event.ListSelectionListener l)
addListSelectionListener
in interface ListValueHolder
l
- the ListSelectionListenerremoveListSelectionListener(javax.swing.event.ListSelectionListener)
protected void fireValueChanged()
protected void fireValueChanged(javax.swing.event.ListSelectionEvent e)
public java.lang.Object remove()
public java.lang.Object remove(int index)
remove
in interface java.util.List
public boolean remove(java.lang.Object o)
CollectionValueHolder
remove
in interface CollectionValueHolder
remove
in class AbstractCollectionValueHolder
o
- element to be removed from the underlying collection of this holder, if present.
public boolean removeAll(java.util.Collection c)
CollectionValueHolder
removeAll
in interface CollectionValueHolder
removeAll
in class AbstractCollectionValueHolder
c
- elements to be removed from the underlying collection of this holder.
AbstractCollectionValueHolder.remove(Object)
,
AbstractCollectionValueHolder.contains(Object)
public boolean retainAll(java.util.Collection c)
CollectionValueHolder
retainAll
in interface CollectionValueHolder
retainAll
in class AbstractCollectionValueHolder
c
- elements to be retained in the underlying collection of this holder.
AbstractCollectionValueHolder.remove(Object)
,
AbstractCollectionValueHolder.contains(Object)
public void clear()
CollectionValueHolder
clear
in interface CollectionValueHolder
clear
in class AbstractCollectionValueHolder
public boolean add(java.lang.Object o)
CollectionValueHolder
Collections that support this operation may place limitations on what elements may be added to the underlying collection of this holder. In particular, some collections will refuse to add null elements, and others will impose restrictions on the type of elements that may be added. Collection classes should clearly specify in their documentation any restrictions on what elements may be added.
If a collection refuses to add a particular element for any reason other than that it already contains the element, it must throw an exception (rather than returning false). This preserves the invariant that a collection always contains the specified element after this call returns.
add
in interface CollectionValueHolder
add
in class AbstractCollectionValueHolder
o
- element whose presence in the underlying collection of this holder is to be ensured.
public void add(int index, java.lang.Object element)
add
in interface java.util.List
public boolean addAll(java.util.Collection c)
CollectionValueHolder
addAll
in interface CollectionValueHolder
addAll
in class AbstractCollectionValueHolder
c
- elements to be inserted into the underlying collection of this holder.
AbstractCollectionValueHolder.add(Object)
public boolean addAll(int index, java.util.Collection c)
addAll
in interface java.util.List
public java.lang.Object set(int index, java.lang.Object element)
set
in interface java.util.List
public java.lang.Object get(int index)
get
in interface java.util.List
public int indexOf(java.lang.Object o)
indexOf
in interface java.util.List
public int lastIndexOf(java.lang.Object o)
lastIndexOf
in interface java.util.List
public java.util.ListIterator listIterator()
listIterator
in interface java.util.List
public java.util.ListIterator listIterator(int index)
listIterator
in interface java.util.List
public java.util.List subList(int fromIndex, int toIndex)
subList
in interface java.util.List
public java.lang.String toString()
toString
in class AbstractCollectionValueHolder
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |