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

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

public class ListIndexProperty
extends ListProperty

A helper class to describe a list property. Sets and gets the index of a selected list item.

Copyright (c) Formaria Ltd., 2002-2005


Field Summary
 
Fields inherited from class org.formaria.editor.project.pages.components.properties.ListProperty
getterMethod, ids, options
 
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, 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
ListIndexProperty(java.lang.String name, java.lang.String[] listOptions, int[] listIds)
           
 
Method Summary
 java.lang.Object getDisplayPropertyValue(PropertyHelper propertyHelper, PageResource pageResource, java.lang.Object comp, java.lang.String propertyName)
          Get the value of the property displayed by the editor
 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 setPropertyValue(java.lang.Object comp, java.lang.Object value, int selIdx)
          For convenience when subclassing this method is called from the public setPropertyValue mehtod.
 
Methods inherited from class org.formaria.editor.project.pages.components.properties.ListProperty
getCellEditor, getListItems, getPropertyType, setPropertyValue
 
Methods inherited from class org.formaria.editor.project.pages.components.properties.PlainProperty
getBuilder, getEnabled, getExpression, getExpression, getIsCloneable, getOutputPropertyValue, getPropertyName, 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
 

Constructor Detail

ListIndexProperty

public ListIndexProperty(java.lang.String name,
                         java.lang.String[] listOptions,
                         int[] listIds)
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 ListProperty
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

getDisplayPropertyValue

public java.lang.Object getDisplayPropertyValue(PropertyHelper propertyHelper,
                                                PageResource pageResource,
                                                java.lang.Object comp,
                                                java.lang.String propertyName)
Get the value of the property displayed by the editor

Overrides:
getDisplayPropertyValue 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
Returns:
the value

setPropertyValue

protected void setPropertyValue(java.lang.Object comp,
                                java.lang.Object value,
                                int selIdx)
For convenience when subclassing this method is called from the public setPropertyValue mehtod.

Overrides:
setPropertyValue in class ListProperty
Parameters:
comp - the component instance
value - the value to be assigned to the property
selIdx - the index of the property if needed