|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.util.AbstractCollection
|
+--java.util.AbstractList
|
+--org.favabeans.base.BeanColumn
| Fields inherited from class java.util.AbstractList |
modCount |
| Constructor Summary | |
BeanColumn(Object target,
Class elementClass,
String propertyName)
Create a new BeanColumn. |
|
BeanColumn(Object target,
PropertyDescriptor descriptor)
Create a new BeanColumn. |
|
| Method Summary | |
void |
add(int i,
Object o)
|
void |
addListDataListener(ListDataListener l)
|
void |
addPropertyChangeListener(PropertyChangeListener l)
|
void |
addPropertyChangeListener(String propertyName,
PropertyChangeListener l)
|
protected void |
fireContentsChanged()
|
Object |
get(int i)
|
int[] |
getAscendingSort()
Obtain a permutation on this Column (and its
associated Folder) representing an ascending total
ordering of its contents. |
Facet |
getFacet(Type facetType)
Obtain a Facet of the requested Type
for this object. |
Object |
getTarget()
Obtain the target of this Feature. |
Class |
getValueClass()
Determine the most general Java class of the objects which are values of this Property. |
boolean |
isEnabled()
Determine whether this Column is enabled. |
boolean |
isSortable()
Determine whether the elements of the collection from which this Column is derived can be sorted based on the
values of this Column. |
boolean |
isValueSettable()
Determine whether the values of this Column can be
set. |
boolean |
isValueSettable(int i,
Object value)
Check if the given value is an allowable argument to setValue(int,Object). |
PropertyEditor |
newEditor(int i)
Obtain a PropertyEditor instance suitable for
editing one of the values of ths Property object. |
Object |
remove(int i)
|
void |
removeListDataListener(ListDataListener l)
|
void |
removePropertyChangeListener(PropertyChangeListener l)
|
void |
removePropertyChangeListener(String propertyName,
PropertyChangeListener l)
|
Object |
set(int i,
Object o)
|
void |
setValue(int i,
Object value)
Set a value of the Column. |
int |
size()
|
| 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 |
public BeanColumn(Object target,
Class elementClass,
String propertyName)
BeanColumn.target - the target collection.elementClass - the common superclass or a common
super-interface of all the elements in the target collection.propertyName - the name of the Bean property (of class
elementClass) which this BeanColumn
will represent.
public BeanColumn(Object target,
PropertyDescriptor descriptor)
BeanColumn.target - the target collection.propertyDescriptor - a Bean property descriptor applicable
to the common superclass or a common super-interface of all the
elements of the target collection.| Method Detail |
public Facet getFacet(Type facetType)
FacetedFacet of the requested Type
for this object.getFacet in interface Facetedorg.favabeans.base.Facetedtype - the Type of Facet
requested for this object.Facet, or null if none can
be created as requested.public Object getTarget()
FeatureFeature.getTarget in interface Featureorg.favabeans.base.Featurepublic int size()
size in interface Listsize in class AbstractCollectionpublic Object get(int i)
get in interface Listget in class AbstractList
public Object set(int i,
Object o)
set in interface Listset in class AbstractList
public void add(int i,
Object o)
add in interface Listadd in class AbstractListpublic Object remove(int i)
remove in interface Listremove in class AbstractListpublic Class getValueClass()
ColumnProperty. As a minimum, this
operation should return Object.getValueClass in interface Columnorg.favabeans.base.Columnpublic boolean isEnabled()
ColumnColumn is enabled. a
"disabled" property is one which should be displayed in UI
elements, but in a state which indicates that it is
non-functional and/or non-applicable (e.g., by "graying out").isEnabled in interface Columnorg.favabeans.base.Columntrue if this Column is
enabled; false if it is disabled.public PropertyEditor newEditor(int i)
ColumnPropertyEditor instance suitable for
editing one of the values of ths Property object.newEditor in interface Columnorg.favabeans.base.Columni - the index of the column value for which to obtain a
PropertyEditor.PropertyEditor.public boolean isValueSettable()
ColumnColumn can be
set. If this method returns false, calls to
setValue will return silently with no effect.isValueSettable in interface Columnorg.favabeans.base.Columntrue if the values can be set;
false otherwise.
public boolean isValueSettable(int i,
Object value)
ColumnColumn.setValue(int,Object). This should be overridden to provide
end-user feedback regarding the correctness of a value, where
such information is available to the implementation.
The default behavior of this method is to return
true, and throw an exception in setValue(Object) if necessary.
isValueSettable in interface Columnorg.favabeans.base.Columni - the index at which to set the candidate column value.value - the candidate column value.false if the candidate value is known to
be unacceptable; true otherwise.
public void setValue(int i,
Object value)
throws PropertyValueException
ColumnColumn.setValue in interface Columnorg.favabeans.base.Columni - the index at which to set the column value.value - the desired new column value.PropertyValueException - if there was a problem
setting the value, or if the value was not acceptable.public boolean isSortable()
ColumnColumn is derived can be sorted based on the
values of this Column.isSortable in interface Columnorg.favabeans.base.Columntrue if sorting is supported;
false otherwise.public int[] getAscendingSort()
ColumnColumn (and its
associated Folder) representing an ascending total
ordering of its contents. A descending ordering is by
definition simply the reverse of this permutation.
To use this permutation to gain access to the elements in
ascending order, given Column c, we would do --
for (int i = 0; i < c.size(); i++) System.out.println(c.get(c.getAscendingSort()[i]));
and, in descending order --
for (int i = c.size(); i-- > 0; ) System.out.println(c.get(c.getAscendingSort()[i]));
getAscendingSort in interface Columnorg.favabeans.base.Columnpublic void addListDataListener(ListDataListener l)
addListDataListener in interface Columnpublic void removeListDataListener(ListDataListener l)
removeListDataListener in interface Columnpublic void addPropertyChangeListener(PropertyChangeListener l)
addPropertyChangeListener in interface Columnpublic void removePropertyChangeListener(PropertyChangeListener l)
removePropertyChangeListener in interface Column
public void addPropertyChangeListener(String propertyName,
PropertyChangeListener l)
addPropertyChangeListener in interface Column
public void removePropertyChangeListener(String propertyName,
PropertyChangeListener l)
removePropertyChangeListener in interface Columnprotected void fireContentsChanged()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||