| java.lang.Object net.sf.jmoney.model2.PropertyAccessor net.sf.jmoney.model2.ScalarPropertyAccessor
Method Summary | |
public IPropertyControl | createPropertyControl(Composite parent) Create a Control object that edits the property. | public Method | findMethod(String prefix, String propertyName, Class[] parameters) | public String | formatValueForMessage(ExtendableObject object) Format the value of a property so it can be embedded into a
message.
The returned value will look sensible when embedded in a message.
Therefore null values and empty values are returned as non-empty
text such as "none" or "empty". | public String | formatValueForTable(ExtendableObject object) Format the value of a property as appropriate for displaying in a
table.
The returned value is expected to be displayed in a table or some similar
view. | public Class<V> | getClassOfValueObject() Returns the class for the values of this property. | public Class> | getClassOfValueType() Returns the class for the values of this property. | public Comparator<ExtendableObject> | getComparator() Return a comparator to be used to compare two extendable objects based on the value
of this property. | public V | getDefaultValue() The default value for a property is suitable for uses such
as:
- setting the default columnn value in a database
- providing values when the value is missing from an
XML file
It is expected that this value is constant (the same value
is always returned for a given property). | public int | getIndexIntoScalarProperties() It is often useful to have an array of property values
of an extendable object. | public int | getMinimumWidth() The minimum width to be used when this property is displayed
in a table or a grid. | public int | getWeight() The width weighting to be used when this property is displayed
in a table or a grid. | public V | invokeGetMethod(Object invocationTarget) | public void | invokeSetMethod(Object invocationTarget, V value) | public boolean | isEditable() Indicates whether the property may be edited by the user. | public boolean | isList() Indicates if the property is a list of objects. | public boolean | isNullAllowed() Indicates whether the property may take null values.
All properties may take null values except properties whose values are
the intrinsic types (int, long, boolean, char). | public boolean | isPropertyApplicable(ExtendableObject containingObject) Indicates if this property is applicable. | public boolean | isSortable() Indicates whether users are able to sort views based on this property. | public void | setIndexIntoScalarProperties(int indexIntoScalarProperties) |
createPropertyControl | public IPropertyControl createPropertyControl(Composite parent)(Code) | | Create a Control object that edits the property.
Parameters: parent - An interface to a wrapper class. |
formatValueForMessage | public String formatValueForMessage(ExtendableObject object)(Code) | | Format the value of a property so it can be embedded into a
message.
The returned value will look sensible when embedded in a message.
Therefore null values and empty values are returned as non-empty
text such as "none" or "empty". Text values are placed in
quotes unless sure that only a single word will be returned that
would be readable without quotes.
The value of the property formatted as appropriate. |
formatValueForTable | public String formatValueForTable(ExtendableObject object)(Code) | | Format the value of a property as appropriate for displaying in a
table.
The returned value is expected to be displayed in a table or some similar
view. Null and empty values are therefore returned as empty strings.
Text values are not quoted.
The value of the property formatted as appropriate. |
getClassOfValueObject | public Class<V> getClassOfValueObject()(Code) | | Returns the class for the values of this property. This is
usually the class that is returned by the getter method, but if
the getter method returns int, long, boolean, or char then this
method will return Integer.class, Long.class, Boolean.class, or
Character.class.
the class of the property values (if the method signatures show int,long, boolean, or char, this field will be Integer.class, Long.class,Boolean.class, or Character.class) |
getClassOfValueType | public Class> getClassOfValueType()(Code) | | Returns the class for the values of this property. This is the
class that is returned by the getter method.
the class of the property values (if the method signatures show int,long, boolean, or char, this field will be int.class, long.class,boolean.class, or char.class) |
getComparator | public Comparator<ExtendableObject> getComparator()(Code) | | Return a comparator to be used to compare two extendable objects based on the value
of this property. This method looks to the comparator, if any, provided by
the IPropertyControlFactory implementation. The ordering is thus defined by the
plug-in that added this property.
a comparator, or null if no comparator was providedfor use with this property |
getDefaultValue | public V getDefaultValue()(Code) | | The default value for a property is suitable for uses such
as:
- setting the default columnn value in a database
- providing values when the value is missing from an
XML file
It is expected that this value is constant (the same value
is always returned for a given property). The results will
be unpredicable if this is not the case.
the default value to use for this property, which maybe null if the property is of a nullable type |
getIndexIntoScalarProperties | public int getIndexIntoScalarProperties()(Code) | | It is often useful to have an array of property values
of an extendable object. This array contains all scalar
properties in the extendable object, including extension
properties and properties from any base property sets.
In these arrays, the properties (including extension properties)
from the base property sets are put first in the array.
This means a given property will always be at the same index
in the array regardless of the actual derived property set.
This index is guaranteed to match the order in which
properties are returned by the PropertySet.getPropertyIterator_Scalar3().
i.e. if this method returns n then in every case where the
collection returned by getPropertyIterator_Scalar3 contains this property,
this property will be returned as the (n+1)'th element in the collection.
the index of this property in the list of scalarproperties for the class. This method returns zerofor the first scalar property returned byPropertySet.getPropertyIterator3() and so on. |
getMinimumWidth | public int getMinimumWidth()(Code) | | The minimum width to be used when this property is displayed
in a table or a grid.
|
getWeight | public int getWeight()(Code) | | The width weighting to be used when this property is displayed
in a table or a grid. If the width available for the table
or grid is more than the sum of the minimum widths then the
excess width is distributed across the columns.
This weight indicates how much the property
can benefit from being given excess width. For example
a property containing a description can benefit, whereas
a property containing a date cannot.
|
invokeGetMethod | public V invokeGetMethod(Object invocationTarget)(Code) | | |
invokeSetMethod | public void invokeSetMethod(Object invocationTarget, V value)(Code) | | |
isEditable | public boolean isEditable()(Code) | | Indicates whether the property may be edited by the user.
|
isList | public boolean isList()(Code) | | Indicates if the property is a list of objects.
|
isNullAllowed | public boolean isNullAllowed()(Code) | | Indicates whether the property may take null values.
All properties may take null values except properties whose values are
the intrinsic types (int, long, boolean, char). Properties of type Integer,
Long, Boolean, and Character may take null values.
|
isPropertyApplicable | public boolean isPropertyApplicable(ExtendableObject containingObject)(Code) | | Indicates if this property is applicable. An instance of an object
containing this property is passed. This method should look to the values
of the other properties in the object to determine if this property is applicable.
If the property is not applicable then the UI should not show a value for this
property nor allow it to be updated.
|
isSortable | public boolean isSortable()(Code) | | Indicates whether users are able to sort views based on this property.
|
setIndexIntoScalarProperties | public void setIndexIntoScalarProperties(int indexIntoScalarProperties)(Code) | | |
|
|