org.favabeans.base
Interface Folder

All Superinterfaces:
Collection, Facet, List
All Known Implementing Classes:
CollectionFolder, ArrayFolder

public interface Folder
extends Facet, List

This Folder Facet of an object allows it to be treated as a collection.

The isMutable() property determines whether elements can be added to or removed from this Folder, and the isOrderingSemantic() property determines whether some mutating List operations are supported. Since it is likely that implementors of this interface will extend AbstractList, we specify the effect of these properties on the operations required to complete a concrete AbstractList subclass as follows:

isMutable() false false true true
isOrderingSemantic() false true false true
Collection.size()
Collection.add(Object)
Collection.remove(Object)
List.get(int)
List.set(int, Object)
List.add(int, Object)
List.remove(int)

Where the key for interpreting the notes in the above table is as follows:
Unsupported; should throw UnsupportedOperationException.
Must be implemented.
May implement but, if extending AbstractList, the superclass will generate an implementation in terms of other methods.


Method Summary
 void addListDataListener(ListDataListener l)
           
 void addPropertyChangeListener(PropertyChangeListener l)
           
 void addPropertyChangeListener(String propertyName, PropertyChangeListener l)
           
 Column[] getColumns()
          The columns of this Folder, represented as a set of Column objects.
 boolean isMutable()
          Determine whether this Folder supports mutation.
 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.
 void removeListDataListener(ListDataListener l)
           
 void removePropertyChangeListener(PropertyChangeListener l)
           
 void removePropertyChangeListener(String propertyName, PropertyChangeListener l)
           
 
Methods inherited from interface org.favabeans.base.Facet
getPrimaryObject
 
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray
 

Method Detail

getColumns

public Column[] getColumns()
The columns of this Folder, represented as a set of Column objects.

addListDataListener

public void addListDataListener(ListDataListener l)

removeListDataListener

public void removeListDataListener(ListDataListener l)

isOrderingSemantic

public 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.

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.


isMutable

public boolean isMutable()
Determine whether this Folder supports mutation.
Returns:
true if elements can be added to or removed from this Folder.

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener l)

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener l)

addPropertyChangeListener

public void addPropertyChangeListener(String propertyName,
                                      PropertyChangeListener l)

removePropertyChangeListener

public void removePropertyChangeListener(String propertyName,
                                         PropertyChangeListener l)


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