|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.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 field| Method Detail |
|---|
public java.lang.String getName()
IMember
getName in interface IMemberpublic java.lang.String getDisplayName()
IMember
getDisplayName in interface IMemberpublic java.lang.String getDescription()
IMember
getDescription in interface IMemberpublic java.lang.String getCategory()
IMember
getCategory in interface IMemberpublic IClassDef getParent()
IMember
getParent in interface IMemberIClassDefpublic int getType()
IMember
getType in interface IMemberpublic IClassDef getTypeDef()
IMembercom.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 IMemberpublic ILookup getLookup()
IAttribute
getLookup in interface IAttributeILookuppublic boolean isReadOnly()
IMember
isReadOnly in interface IMemberpublic boolean isVisible(java.lang.Object obj)
IMember
isVisible in interface IMemberpublic java.lang.String getDefaultValue()
IMember
getDefaultValue in interface IMemberpublic IPropertyEditor getEditor()
IMember
getEditor in interface IMemberIPropertyEditorpublic 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 | |||||||||