|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.commons.iloader.node.DataNode.ComputedField
public static class DataNode.ComputedField
An attribute whose values may or may not have a direct bearing on the underlying
model. A ComputedField can get information that is outside the bounds of the model
associated with the current DataNode. Clients will typically override the getValue(Object)
,
setValue(Object, String, DataChangeNotifier)
, isReadOnly()
and
shouldRecompute(Object, Object, int, IMember, int)
methods.
Field Summary |
---|
Fields inherited from interface com.ibm.commons.iloader.node.IMember |
---|
TYPE_BOOLEAN, TYPE_INTEGER, TYPE_NUMBER, TYPE_OBJECT, TYPE_STRING |
Constructor Summary | |
---|---|
DataNode.ComputedField(java.lang.String name,
int type)
Creates a new instance of this class. |
Method Summary | |
---|---|
java.lang.String |
getCategory()
Get the category. |
java.lang.String |
getDefaultValue()
Returns the default value of the property. |
java.lang.String |
getDescription()
Get a description, for user help. |
java.lang.String |
getDisplayName()
Get the attribute display name. |
IPropertyEditor |
getEditor()
Returns a property editor that can be used to define this property. |
ILookup |
getLookup()
Returns a lookup that can be used to define the possible values of the property/attribute that this class represents. |
java.lang.String |
getName()
Get the attribute name. |
IClassDef |
getParent()
Get the class definition parent of this member. |
java.lang.String |
getPropertyToDisplay()
|
IValidator |
getScriptValidator(java.lang.Object obj)
Returns a validator that will be associated with the IPropertyEditor that is associated with this property. |
int |
getType()
Get the attribute data type. |
IClassDef |
getTypeDef()
In the case of a member whose type is com.ibm.commons.iloader.node.IMember.TYPE_OBJECT this
method will return the class that can be used to define a new Object. |
java.lang.String |
getValue(java.lang.Object instance)
Returns the value of the ComputedField in respect to the current model. |
boolean |
isComputable()
Returns true if the field's value is computable. |
boolean |
isReadOnly()
Returns whether or not a member is read-only. |
boolean |
isScriptable(IScript script)
Defines whether or not the property's value can be a script value. |
boolean |
isVisible(java.lang.Object obj)
Check if the member is visible. |
void |
setValue(java.lang.Object instance,
java.lang.String value,
DataChangeNotifier notifier)
Sets the value of the ComputedField. |
boolean |
shouldRecompute(java.lang.Object instance,
java.lang.Object object,
int operation,
IMember member,
int position)
Determines if the value of the field should be recomputed based on the operation provided |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DataNode.ComputedField(java.lang.String name, int type)
name
- the property name of this fieldtype
- the type of the fieldMethod Detail |
---|
public java.lang.String getName()
IMember
getName
in interface IMember
public java.lang.String getDisplayName()
IMember
getDisplayName
in interface IMember
public java.lang.String getDescription()
IMember
getDescription
in interface IMember
public java.lang.String getCategory()
IMember
getCategory
in interface IMember
public IClassDef getParent()
IMember
getParent
in interface IMember
IClassDef
public int getType()
IMember
getType
in interface IMember
public IClassDef getTypeDef()
IMember
com.ibm.commons.iloader.node.IMember.TYPE_OBJECT
this
method will return the class that can be used to define a new Object.
getTypeDef
in interface IMember
public ILookup getLookup()
IAttribute
getLookup
in interface IAttribute
ILookup
public boolean isReadOnly()
IMember
isReadOnly
in interface IMember
public boolean isVisible(java.lang.Object obj)
IMember
isVisible
in interface IMember
public java.lang.String getDefaultValue()
IMember
getDefaultValue
in interface IMember
public IPropertyEditor getEditor()
IMember
getEditor
in interface IMember
IPropertyEditor
public boolean isScriptable(IScript script)
IMember
isScriptable
in interface IMember
public java.lang.String getValue(java.lang.Object instance) throws com.ibm.commons.iloader.node.NodeException
instance
- the model
NodeException
public void setValue(java.lang.Object instance, java.lang.String value, DataChangeNotifier notifier) throws com.ibm.commons.iloader.node.NodeException
instance
- the modelvalue
- the value of the ComputedFieldnotifier
- a notifier who will notify listeners of the change
NodeException
public boolean shouldRecompute(java.lang.Object instance, java.lang.Object object, int operation, IMember member, int position)
instance
- the modelobject
- the new value of the propertyoperation
- the operation that was performed (value changed, inserted, deleted)member
- the member that changedposition
- the position of the member
public boolean isComputable()
public java.lang.String getPropertyToDisplay()
public IValidator getScriptValidator(java.lang.Object obj)
IMember
getScriptValidator
in interface IMember
#getEditor()}, {@link com.ibm.commons.iloader.node.validators.IValidator}
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |