org.formaria.editor.project.pages.components.properties
Class DataProperty

java.lang.Object
  extended by org.formaria.editor.project.pages.components.properties.PlainProperty
      extended by org.formaria.editor.project.pages.components.properties.DataProperty

public class DataProperty
extends PlainProperty

A helper class to describe a data binding property

Copyright (c) Formaria Ltd., 2002-2003

$Revision: 1.10 $


Field Summary
protected  boolean cloneable
           
protected  java.lang.String dataName
          The data property name
protected  java.lang.String type
           
 
Fields inherited from class org.formaria.editor.project.pages.components.properties.PlainProperty
argType, BOOLEAN_PROPERTY, COMPONENT_NAME_PROPERTY, currentProject, DATA_PROPERTY, DOUBLE_PROPERTY, EVENT_HANDLER_PROPERTY, getterMethod, getterName, IMAGE_NAME_PROPERTY, INT_LIST_PROPERTY, INTEGER_PROPERTY, isEnabled, LANG_PROPERTY, LAYOUT_CONSTRAINT_PROPERTY, LAYOUT_PROPERTY, LIST_PROPERTY, PLAIN_PROPERTY, propertyName, setterMethod, setterName, STYLE_PROPERTY, VALIDATION_PROPERTY
 
Constructor Summary
DataProperty(java.lang.String name, java.lang.String dataType)
          The data property name
 
Method Summary
 java.lang.String getDataType()
          Gets the data type
 boolean getIsCloneable()
          Can this property value be cloned?
 java.lang.String getPropertyName()
          Gets the property name
 int getPropertyType()
          The the data binding for the component
 java.lang.Object getPropertyValue(PropertyHelper propertyHelper, PageResource pageResource, java.lang.Object comp, java.lang.String propertyName)
          Get the value of the property exposed by the component
protected  void setData(PageResource pageResource, java.awt.Component comp, DataBinding binding)
          The the data binding for the component
 void setIsCloneable(boolean canClone)
          Can this property value be cloned?
 boolean setPropertyValue(PropertyHelper propertyHelper, PageResource pageResource, java.lang.Object comp, java.lang.String propertyName, java.lang.Object value)
          Set the value of the property exposed by the component
 
Methods inherited from class org.formaria.editor.project.pages.components.properties.PlainProperty
getBuilder, getCellEditor, getDisplayPropertyValue, getEnabled, getExpression, getExpression, getOutputPropertyValue, getViaReflection, isDataBindingProperty, setEnabled, setExpression, setExpression, setGetterName, setSetterName, setViaReflection, setViaReflection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dataName

protected java.lang.String dataName
The data property name


type

protected java.lang.String type

cloneable

protected boolean cloneable
Constructor Detail

DataProperty

public DataProperty(java.lang.String name,
                    java.lang.String dataType)
The data property name

Method Detail

getPropertyValue

public java.lang.Object getPropertyValue(PropertyHelper propertyHelper,
                                         PageResource pageResource,
                                         java.lang.Object comp,
                                         java.lang.String propertyName)
Get the value of the property exposed by the component

Overrides:
getPropertyValue in class PlainProperty
Parameters:
propertyHelper - the helper that is using this property
pageResource - the page resource to which this component belongs
comp - the component instance
propertyName - the property name
Returns:
the value

setPropertyValue

public boolean setPropertyValue(PropertyHelper propertyHelper,
                                PageResource pageResource,
                                java.lang.Object comp,
                                java.lang.String propertyName,
                                java.lang.Object value)
Set the value of the property exposed by the component

Overrides:
setPropertyValue in class PlainProperty
Parameters:
value - The value to be set for the property
propertyHelper - the helper that is using this property
pageResource - the page resource to which this component belongs
comp - the component instance
propertyName - the property name
Returns:
Whether the property was set successfully

setData

protected void setData(PageResource pageResource,
                       java.awt.Component comp,
                       DataBinding binding)
The the data binding for the component

Parameters:
pageResource - The PageResource object taking care of the component
comp - The component being bound
binding - The DataBinding being bound to the component

getIsCloneable

public boolean getIsCloneable()
Can this property value be cloned?

Overrides:
getIsCloneable in class PlainProperty
Returns:
true if the property can be cloned

setIsCloneable

public void setIsCloneable(boolean canClone)
Can this property value be cloned?

Parameters:
canClone - true if the property can be cloned

getDataType

public java.lang.String getDataType()
Gets the data type


getPropertyName

public java.lang.String getPropertyName()
Gets the property name

Overrides:
getPropertyName in class PlainProperty

getPropertyType

public int getPropertyType()
The the data binding for the component

Overrides:
getPropertyType in class PlainProperty
Parameters:
pageResource - The PageResource object taking care of the component
comp - The component being bound
binding - The DataBinding being bound to the component