org.oddjob.arooa.design
Class IndexedDesignProperty

java.lang.Object
  extended by org.oddjob.arooa.design.IndexedDesignProperty
All Implemented Interfaces:
DesignElementProperty, DesignProperty

public class IndexedDesignProperty
extends Object


Constructor Summary
IndexedDesignProperty(String property, Class<?> propertyClass, ArooaType type, DesignInstance parent)
           
IndexedDesignProperty(String property, DesignInstance parent)
           
 
Method Summary
 void addDesignListener(DesignListener listener)
          Add a DesignListener.
 void clear()
           
 ArooaContext getArooaContext()
          Get the ArooaContext associated with the element.
 DesignInstance instanceAt(int index)
          Overridden by subclasses to provide the design of the property value at the index.
 int instanceCount()
          Overridden by subclasses to provide the number of design instances for this property.
 boolean isPopulated()
          Used by the Field Selection View to work out which group to check box.
 String property()
          The name of the property.
 void removeDesignListener(DesignListener listener)
          Remove a DesignListener.
 FormItem view()
          Provide the FormItem model that represents the view for the design of this property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndexedDesignProperty

public IndexedDesignProperty(String property,
                             Class<?> propertyClass,
                             ArooaType type,
                             DesignInstance parent)

IndexedDesignProperty

public IndexedDesignProperty(String property,
                             DesignInstance parent)
Method Detail

instanceCount

public int instanceCount()
Overridden by subclasses to provide the number of design instances for this property.

Returns:
The number of design instances.

instanceAt

public DesignInstance instanceAt(int index)
Overridden by subclasses to provide the design of the property value at the index.

Parameters:
index - The property value's index.
Returns:
The design. Never null.

view

public FormItem view()
Description copied from interface: DesignProperty
Provide the FormItem model that represents the view for the design of this property.

Returns:
The FormItem. Never null.

clear

public void clear()

isPopulated

public boolean isPopulated()
Description copied from interface: DesignProperty
Used by the Field Selection View to work out which group to check box.

Returns:

property

public String property()
Description copied from interface: DesignProperty
The name of the property.

Specified by:
property in interface DesignProperty
Returns:
The name of the property. Never null.

getArooaContext

public ArooaContext getArooaContext()
Description copied from interface: DesignElementProperty
Get the ArooaContext associated with the element.

Specified by:
getArooaContext in interface DesignElementProperty
Returns:
The ArooaContext. Never Null.

addDesignListener

public void addDesignListener(DesignListener listener)
Description copied from interface: DesignElementProperty
Add a DesignListener. The listener will be notified when instances of either components or types are added to this property.

Specified by:
addDesignListener in interface DesignElementProperty
Parameters:
listener - The listener. Must not be null.

removeDesignListener

public void removeDesignListener(DesignListener listener)
Description copied from interface: DesignElementProperty
Remove a DesignListener.

Specified by:
removeDesignListener in interface DesignElementProperty
Parameters:
listener - The listener. Must not be null.