public abstract class IlvAbstractUserDefinedProperty extends IlvAbstractStringProperty
IlvAbstractUserDefinedProperty
provides a common framework
for accessing arbitrary user-defined properties of an
IlvUserPropertyHolder
via the generic
IlvStringProperty
interface.
A Format
can be supplied to convert non-String
properties to/from a string. The user-defined property class is also
used to try to convert non-String
property values to/from
a string, when there is no format specified and the property class is
not String
._formatter
Constructor and Description |
---|
IlvAbstractUserDefinedProperty(String userPropertyName)
Constructs a new
IlvAbstractUserDefinedProperty for the
given user-property of class String . |
IlvAbstractUserDefinedProperty(String userPropertyName,
Class userPropertyClass)
Constructs a new
IlvAbstractUserDefinedProperty for the
given user-property of a given class. |
Modifier and Type | Method and Description |
---|---|
Class |
getPropertyClass()
Gets the class of the user-defined property this adapter is used for.
|
String |
getPropertyName()
Gets the name of the user-defined property this adapter is used for.
|
protected Object |
getValueImpl(Object target)
/**
Returns the value of the property represented by this adapter from the
specified
target object, or null if the
target object is not an IlvUserPropertyHolder |
protected void |
setValueImpl(Object target,
Object value)
/**
Sets the value of the property represented by this adapter in the
specified
target object. |
changedRowsIterator, getFormat, getValue, isPropertyChangedEvent, setFormat, setValue
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getEventClass
public IlvAbstractUserDefinedProperty(String userPropertyName)
IlvAbstractUserDefinedProperty
for the
given user-property of class String
.userPropertyName
- the name of the property in the model.public IlvAbstractUserDefinedProperty(String userPropertyName, Class userPropertyClass)
IlvAbstractUserDefinedProperty
for the
given user-property of a given class.userPropertyName
- the name of the property in the model.userPropertyClass
- the name of the property in the model.public Class getPropertyClass()
Class
of the user-defined property.public String getPropertyName()
protected Object getValueImpl(Object target) throws IllegalArgumentException
target
object, or null
if the
target object is not an IlvUserPropertyHolder
getValueImpl
in class IlvAbstractStringProperty
target
- the target object.IllegalArgumentException
- if the property name is null.IlvAbstractStringProperty.getValue(java.lang.Object)
protected void setValueImpl(Object target, Object value)
target
object.
If the value is not of the correct type, the value is not set.setValueImpl
in class IlvAbstractStringProperty
target
- the target object.value
- the property value of the target object.IllegalArgumentException
- if the property name is null, or if
the target is not an IlvUserPropertyHolder
.IlvAbstractStringProperty.setValue(java.lang.Object, java.lang.String)
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.