|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openbp.common.generic.description.DescriptionObjectImpl
org.openbp.common.generic.description.DisplayObjectImpl
org.openbp.common.generic.propertybrowser.ObjectDescriptor
public class ObjectDescriptor
An object descriptor describes an object that can be edited by an property browser.
A particular object descriptor always refers to the class of the object to be edited.
This class can also be an interface.
The OD describes the object in general (display name, description) and all of its
properties (PropertyDescriptor objects).
The object descriptor can be serialized to/deserialized from XML.
The XML file will reside in the same location as the object's class file.
Use the ObjectDescriptorMgr class to access object descriptors for a particular class.
The manager will automatically locate and locate the object descriptor for this class.
After loading the OD, the object descriptor manager will iterate the property list.
The manager will try to resolve attribute information of a property that is not set
(e. g. description, type name, editor class name) from the OD of the super class
or from the OD of its implemented interfaces.
This means that for common attributes you only need to specify their property name
in the property descriptor list; the remaining information about the property will
be retrieved from the base class.
| Field Summary |
|---|
| Fields inherited from interface org.openbp.common.generic.Copyable |
|---|
COPY_DEEP, COPY_FIRST_LEVEL, COPY_SHALLOW |
| Constructor Summary | |
|---|---|
ObjectDescriptor()
Default constructor. |
|
| Method Summary | |
|---|---|
void |
addProperty(PropertyDescriptor property)
Adds a property. |
void |
clearProperties()
Clears the list of properties. |
void |
copyFrom(java.lang.Object source,
int copyMode)
Copies the values of the source object to this object. |
java.lang.Class |
getObjectClass()
Gets the object class this descriptor is suitable for. |
java.lang.String |
getObjectClassName()
Gets the name of the object class this descriptor is suitable for. |
java.util.Iterator |
getProperties()
Gets the list of properties. |
PropertyDescriptor |
getProperty(java.lang.String name)
Gets the property descriptor for a particular property. |
java.util.List |
getPropertyList()
Gets the list of properties. |
java.lang.Class |
getValidatorClass()
Gets the validator class. |
java.lang.String |
getValidatorClassName()
Gets the validator class name. |
boolean |
isCustomDescriptor()
Gets the flag if this descriptor is a custom descriptor (see ObjectDescriptorMgr). |
boolean |
isPropertiesResolved()
Gets the flag if the properties of this descriptor have been resolved (see implementation of ObjectDescriptorMgr). |
void |
setCustomDescriptor(boolean customDescriptor)
Sets the flag if this descriptor is a custom descriptor (see ObjectDescriptorMgr). |
void |
setObjectClass(java.lang.Class objectClass)
Sets the object class this descriptor is suitable for. |
void |
setObjectClassName(java.lang.String objectClassName)
Sets the name of the object class this descriptor is suitable for. |
void |
setPropertiesResolved(boolean propertiesResolved)
Sets the flag if the properties of this descriptor have been resolved (see implementation of ObjectDescriptorMgr). |
void |
setValidatorClass(java.lang.Class validatorClass)
Sets the validator class. |
void |
setValidatorClassName(java.lang.String validatorClassName)
Sets the validator class name. |
| Methods inherited from class org.openbp.common.generic.description.DisplayObjectImpl |
|---|
getDisplayName, getDisplayText, setDisplayName |
| Methods inherited from class org.openbp.common.generic.description.DescriptionObjectImpl |
|---|
clone, compareTo, getDescription, getDescriptionEscape, getDescriptionText, getName, setDescription, setDescriptionEscape, setName, toString, validate |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.openbp.common.generic.description.DescriptionObject |
|---|
clone, getDescription, getDescriptionText, getName, setDescription, setName |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Constructor Detail |
|---|
public ObjectDescriptor()
| Method Detail |
|---|
public void copyFrom(java.lang.Object source,
int copyMode)
throws java.lang.CloneNotSupportedException
copyFrom in interface CopyablecopyFrom in class DisplayObjectImplsource - The source object. Must be of the same type as this object.copyMode - Determines if a deep copy, a first level copy or a shallow copy is to be
performed. See the constants of the org.openbp.common.generic.description.Copyable class.
java.lang.CloneNotSupportedException - If the cloning of one of the contained objects failedpublic java.lang.String getObjectClassName()
public void setObjectClassName(java.lang.String objectClassName)
public java.lang.Class getObjectClass()
public void setObjectClass(java.lang.Class objectClass)
public java.lang.String getValidatorClassName()
public void setValidatorClassName(java.lang.String validatorClassName)
validatorClassName - Specifies a class that implements the ObjectValidator interfacepublic java.lang.Class getValidatorClass()
public void setValidatorClass(java.lang.Class validatorClass)
validatorClass - A class that implements the ObjectValidator interfacepublic PropertyDescriptor getProperty(java.lang.String name)
name - Name of the property
public java.util.Iterator getProperties()
PropertyDescriptor objectspublic void addProperty(PropertyDescriptor property)
property - The property to addpublic void clearProperties()
public java.util.List getPropertyList()
PropertyDescriptor objectspublic boolean isCustomDescriptor()
ObjectDescriptorMgr).
public void setCustomDescriptor(boolean customDescriptor)
ObjectDescriptorMgr).
public boolean isPropertiesResolved()
ObjectDescriptorMgr).
public void setPropertiesResolved(boolean propertiesResolved)
ObjectDescriptorMgr).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||