org.openbp.common.generic.propertybrowser
Class PropertyDescriptor

java.lang.Object
  extended by org.openbp.common.generic.description.DescriptionObjectImpl
      extended by org.openbp.common.generic.description.DisplayObjectImpl
          extended by org.openbp.common.generic.propertybrowser.PropertyDescriptor
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Comparable, Copyable, DescriptionObject, Displayable, DisplayObject, Validatable

public class PropertyDescriptor
extends DisplayObjectImpl

Property description for the standard property browser. The 'name' member of the super class specifies the name of the property. If no getter/setter methods are specified, the member name will be used to generate the access method names (getName/isName and setName). The 'group' specification may be used to group properties in a tree table-like representation.

Author:
Heiko Erhardt
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.openbp.common.generic.Copyable
COPY_DEEP, COPY_FIRST_LEVEL, COPY_SHALLOW
 
Constructor Summary
PropertyDescriptor()
          Default constructor.
 
Method Summary
 void copyFrom(java.lang.Object source, int copyMode)
          Copies the values of the source object to this object.
protected  void copyNonNull(PropertyDescriptor source)
          Copies all attributes of a property descriptor that are not yet present in this descriptor.
 CollectionDescriptor getCollectionDescriptor()
          Gets the collection descriptor.
 ObjectDescriptor getComplexProperty()
          Gets the object descriptor describing a complex type property.
 java.lang.String getComplexPropertyType()
          Gets the type of the complex type property value.
 java.lang.Class getEditorClass()
          Gets the editor class.
 java.lang.String getEditorClassName()
          Gets the editor class.
 java.lang.Object getEditorParam()
          Gets the optional editor parameters.
 java.lang.String getEditorParamString()
          Gets the optional editor parameter string.
 java.lang.String getGroup()
          Gets the group specification or null.
 java.lang.Class getValidatorClass()
          Gets the validator class.
 java.lang.String getValidatorClassName()
          Gets the validator class name.
 boolean hasReadOnly()
          Determines if the flag if the property is read only is set.
 boolean hasRequired()
          Determines if the flag if the property is required is set.
 boolean isExpanded()
          Gets the flag if the property is expanded, i\. e\. visible in the property tree by default.
 boolean isReadOnly()
          Gets the flag if the property is read only.
 boolean isRequired()
          Gets the flag if the property is required.
 void setCollectionDescriptor(CollectionDescriptor collectionDescriptor)
          Sets the collection descriptor.
 void setComplexProperty(ObjectDescriptor complexProperty)
          Sets the object descriptor describing a complex type property.
 void setComplexPropertyType(java.lang.String complexPropertyType)
          Sets the type of the complex type property value.
 void setEditorClass(java.lang.Class editorClass)
          Sets the editor class.
 void setEditorClassName(java.lang.String editorClassName)
          Sets the editor class.
 void setEditorParam(java.lang.Object editorParam)
          Sets the optional editor parameters.
 void setEditorParamString(java.lang.String editorParamString)
          Sets the optional editor parameter string.
 void setExpanded(boolean expanded)
          Sets the flag if the property is expanded, i\. e\. visible in the property tree by default.
 void setGroup(java.lang.String group)
          Sets the group specification or null.
 void setReadOnly(boolean readOnly)
          Sets the flag if the property is read only.
 void setRequired(boolean required)
          Sets the flag if the property is required.
 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

PropertyDescriptor

public PropertyDescriptor()
Default constructor.

Method Detail

copyFrom

public void copyFrom(java.lang.Object source,
                     int copyMode)
              throws java.lang.CloneNotSupportedException
Copies the values of the source object to this object.

Specified by:
copyFrom in interface Copyable
Overrides:
copyFrom in class DisplayObjectImpl
Parameters:
source - 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.
Throws:
java.lang.CloneNotSupportedException - If the cloning of one of the contained objects failed

copyNonNull

protected void copyNonNull(PropertyDescriptor source)
Copies all attributes of a property descriptor that are not yet present in this descriptor.

Parameters:
source - Source descriptor

getGroup

public java.lang.String getGroup()
Gets the group specification or null.


setGroup

public void setGroup(java.lang.String group)
Sets the group specification or null.


isRequired

public boolean isRequired()
Gets the flag if the property is required.


hasRequired

public boolean hasRequired()
Determines if the flag if the property is required is set. Will be removed if Castor supports boolean defaults.


setRequired

public void setRequired(boolean required)
Sets the flag if the property is required.


isReadOnly

public boolean isReadOnly()
Gets the flag if the property is read only.


hasReadOnly

public boolean hasReadOnly()
Determines if the flag if the property is read only is set. Will be removed if Castor supports boolean defaults.


setReadOnly

public void setReadOnly(boolean readOnly)
Sets the flag if the property is read only.


isExpanded

public boolean isExpanded()
Gets the flag if the property is expanded, i\. e\. visible in the property tree by default.


setExpanded

public void setExpanded(boolean expanded)
Sets the flag if the property is expanded, i\. e\. visible in the property tree by default.


getValidatorClassName

public java.lang.String getValidatorClassName()
Gets the validator class name.

Returns:
Specifies a class that implements the PropertyValidator interface

setValidatorClassName

public void setValidatorClassName(java.lang.String validatorClassName)
Sets the validator class name.

Parameters:
validatorClassName - Specifies a class that implements the PropertyValidator interface

getEditorClassName

public java.lang.String getEditorClassName()
Gets the editor class.

Returns:
Specifies a class that implements the PropertyEditor interface

setEditorClassName

public void setEditorClassName(java.lang.String editorClassName)
Sets the editor class.

Parameters:
editorClassName - Specifies a class that implements the PropertyEditor interface

getEditorParamString

public java.lang.String getEditorParamString()
Gets the optional editor parameter string.


setEditorParamString

public void setEditorParamString(java.lang.String editorParamString)
Sets the optional editor parameter string.


getValidatorClass

public java.lang.Class getValidatorClass()
Gets the validator class.

Returns:
A class that implements the PropertyValidator interface

setValidatorClass

public void setValidatorClass(java.lang.Class validatorClass)
Sets the validator class.

Parameters:
validatorClass - A class that implements the PropertyValidator interface

getEditorClass

public java.lang.Class getEditorClass()
Gets the editor class.

Returns:
A class that implements the PropertyEditor interface

setEditorClass

public void setEditorClass(java.lang.Class editorClass)
Sets the editor class.

Parameters:
editorClass - A class that implements the PropertyEditor interface

getEditorParam

public java.lang.Object getEditorParam()
Gets the optional editor parameters.


setEditorParam

public void setEditorParam(java.lang.Object editorParam)
Sets the optional editor parameters.


getComplexPropertyType

public java.lang.String getComplexPropertyType()
Gets the type of the complex type property value.


setComplexPropertyType

public void setComplexPropertyType(java.lang.String complexPropertyType)
Sets the type of the complex type property value.


getComplexProperty

public ObjectDescriptor getComplexProperty()
Gets the object descriptor describing a complex type property.


setComplexProperty

public void setComplexProperty(ObjectDescriptor complexProperty)
Sets the object descriptor describing a complex type property.


getCollectionDescriptor

public CollectionDescriptor getCollectionDescriptor()
Gets the collection descriptor.


setCollectionDescriptor

public void setCollectionDescriptor(CollectionDescriptor collectionDescriptor)
Sets the collection descriptor.



Copyright © 2011. All Rights Reserved.