org.oddjob.arooa.design.screem
Class BeanForm

java.lang.Object
  extended by org.oddjob.arooa.design.screem.BeanForm
All Implemented Interfaces:
Form

public class BeanForm
extends Object
implements Form

The form used by a BeanType. This form consists of a field for the class name and a sub form that is the properties of the given class or a blank message form if the class is not found.

Author:
rob

Nested Class Summary
static class BeanForm.ClassNotFoundForm
          Form for when the class is missing or not found.
static class BeanForm.PropertiesForm
          Form for the properties of the class when it is found.
 
Field Summary
static String SUBFORM_PROPERTY
           
 
Constructor Summary
BeanForm(DynamicDesignInstance design)
          Constructor.
 
Method Summary
 void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
          Add a property listener.
protected  void fire(String propertyName, Object oldValue, Object newValue)
          Fire property change events.
 DynamicDesignInstance getDesign()
          Get the design instance that created this form.
 Form getSubForm()
          Getter for the sub form.
 String getTitle()
           
 void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
          Remove a property listener.
 void setClassName(String className)
          Set the class name.
 void setSubForm(Form subForm)
          Set the sub form and fire a property change event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SUBFORM_PROPERTY

public static final String SUBFORM_PROPERTY
See Also:
Constant Field Values
Constructor Detail

BeanForm

public BeanForm(DynamicDesignInstance design)
Constructor.

Parameters:
design - The instance this form belongs to.
Method Detail

addPropertyChangeListener

public void addPropertyChangeListener(String propertyName,
                                      PropertyChangeListener listener)
Add a property listener. For sub form change.

Parameters:
propertyName -
listener -

removePropertyChangeListener

public void removePropertyChangeListener(String propertyName,
                                         PropertyChangeListener listener)
Remove a property listener.

Parameters:
propertyName -
listener -

fire

protected void fire(String propertyName,
                    Object oldValue,
                    Object newValue)
Fire property change events.

Parameters:
propertyName -
oldValue -
newValue -

getDesign

public DynamicDesignInstance getDesign()
Get the design instance that created this form.

Returns:

setClassName

public void setClassName(String className)
Set the class name. Called by the view to change the sub form.

Parameters:
className -

setSubForm

public void setSubForm(Form subForm)
Set the sub form and fire a property change event.

Parameters:
subForm -

getSubForm

public Form getSubForm()
Getter for the sub form.

Returns:

getTitle

public String getTitle()
Specified by:
getTitle in interface Form