org.favabeans.base
Class ListFolder

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractList
              |
              +--org.favabeans.base.CollectionFolder
                    |
                    +--org.favabeans.base.ListFolder
All Implemented Interfaces:
Collection, Facet, Faceted, Folder, List

public class ListFolder
extends CollectionFolder

a ListFolder is a Folder Facet suitable for use with List primary objects.


Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
ListFolder(Object primaryObject)
           
 
Method Summary
 void add(int i, Object o)
           
 Object get(int i)
          Get the ith element, as defined by the primary object's natural ordering.
 boolean isOrderingSemantic()
          Determine whether the ordering of this Folder is merely coincidental, based on the need to make up an ordering for the convenience of UI elements, or semantic, that is to say, of actual importance to the underlying domain object model.
 Object remove(int i)
          Remove the ith element of the collection.
 Object set(int i, Object o)
           
 int size()
          Get the number of elements in the collection.
 
Methods inherited from class org.favabeans.base.CollectionFolder
addListDataListener, addPropertyChangeListener, addPropertyChangeListener, buildAdditionalColumns, fireContentsChanged, fireStateChanged, getCollection, getColumns, getFacet, getPrimaryObject, isMutable, removeListDataListener, removePropertyChangeListener, removePropertyChangeListener, shouldIncludeBeanColumn
 
Methods inherited from class java.util.AbstractList
add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, subList
 
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
add, addAll, addAll, clear, contains, containsAll, equals, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, removeAll, retainAll, subList, toArray, toArray
 

Constructor Detail

ListFolder

public ListFolder(Object primaryObject)
Method Detail

get

public Object get(int i)
Description copied from class: CollectionFolder
Get the ith element, as defined by the primary object's natural ordering.
Overrides:
get in class CollectionFolder
Following copied from class: org.favabeans.base.CollectionFolder
Returns:
the appropriate object.

size

public int size()
Description copied from class: CollectionFolder
Get the number of elements in the collection.
Overrides:
size in class CollectionFolder
Following copied from class: org.favabeans.base.CollectionFolder
Returns:
the number of elements.

set

public Object set(int i,
                  Object o)
Overrides:
set in class CollectionFolder
Following copied from class: org.favabeans.base.CollectionFolder
Throws:
UnsupportedOperationException - always.

add

public void add(int i,
                Object o)
Overrides:
add in class CollectionFolder
Following copied from class: org.favabeans.base.CollectionFolder
Throws:
UnsupportedOperationException - always.

remove

public Object remove(int i)
Description copied from class: CollectionFolder
Remove the ith element of the collection.
Overrides:
remove in class CollectionFolder
Following copied from class: org.favabeans.base.CollectionFolder
Returns:
the value previously at this location.
Throws:
UnsupportedOperationException - if the primary object returns false from Collection.remove(Object).

isOrderingSemantic

public boolean isOrderingSemantic()
Description copied from interface: Folder
Determine whether the ordering of this Folder is merely coincidental, based on the need to make up an ordering for the convenience of UI elements, or semantic, that is to say, of actual importance to the underlying domain object model.

UI elements will typically only display "move up/down", "add before", "add after" and "add between" interactors to the end-user if this method returns true.

An example of a coincidental ordering is the ordering we would generate for files in a typical operating system directory. Though we can sort the files (see Column.getAscendingSort()), it does not make sense to add a new file "before" or "after" another one, or "between" two other files.

An example of a semantic ordering is what we would generate for a list of print jobs in a print queue, where the order of execution is based on the order of submission. An end-user with sufficient privileges may wish to move jobs forwards or backwards in the queue, or insert a new job at a specific position. @return true if the ordering is semantic; false otherwise.

Overrides:
isOrderingSemantic in class CollectionFolder


Copyright © 2000-2001, Regents of the University of Minnesota. All Rights Reserved.