|
|||||||||
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)
Faceted
Facet
of the requested Type
for this object.getFacet
in interface Faceted
org.favabeans.base.Faceted
type
- the Type
of Facet
requested for this object.Facet
, or null
if none can
be created as requested.public Object getTarget()
Feature
Feature
.getTarget
in interface Feature
org.favabeans.base.Feature
public int size()
size
in interface List
size
in class AbstractCollection
public Object get(int i)
get
in interface List
get
in class AbstractList
public Object set(int i, Object o)
set
in interface List
set
in class AbstractList
public void add(int i, Object o)
add
in interface List
add
in class AbstractList
public Object remove(int i)
remove
in interface List
remove
in class AbstractList
public Class getValueClass()
Column
Property
. As a minimum, this
operation should return Object
.getValueClass
in interface Column
org.favabeans.base.Column
public boolean isEnabled()
Column
Column
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 Column
org.favabeans.base.Column
true
if this Column
is
enabled; false
if it is disabled.public PropertyEditor newEditor(int i)
Column
PropertyEditor
instance suitable for
editing one of the values of ths Property object.newEditor
in interface Column
org.favabeans.base.Column
i
- the index of the column value for which to obtain a
PropertyEditor
.PropertyEditor
.public boolean isValueSettable()
Column
Column
can be
set. If this method returns false
, calls to
setValue
will return silently with no effect.isValueSettable
in interface Column
org.favabeans.base.Column
true
if the values can be set;
false
otherwise.public boolean isValueSettable(int i, Object value)
Column
Column.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 Column
org.favabeans.base.Column
i
- 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
Column
Column
.setValue
in interface Column
org.favabeans.base.Column
i
- 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()
Column
Column
is derived can be sorted based on the
values of this Column
.isSortable
in interface Column
org.favabeans.base.Column
true
if sorting is supported;
false
otherwise.public int[] getAscendingSort()
Column
Column
(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 Column
org.favabeans.base.Column
public void addListDataListener(ListDataListener l)
addListDataListener
in interface Column
public void removeListDataListener(ListDataListener l)
removeListDataListener
in interface Column
public void addPropertyChangeListener(PropertyChangeListener l)
addPropertyChangeListener
in interface Column
public 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 Column
protected void fireContentsChanged()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |