edu.umd.cfar.lamp.apploader.propertysheets
Interface InstancePropertyDescriptor

All Known Implementing Classes:
ExplicitPropertyDescriptor

public interface InstancePropertyDescriptor

Describes a property of a given instance of a class.


Method Summary
 java.lang.Object applyGetter(java.lang.Object bean)
          Get the value from the bean instance.
 void applySetter(java.lang.Object bean, java.lang.Object toValue)
          Set the value of this property on the given bean
 java.lang.Class getBeanType()
          Gets the java class of the bean.
 javax.swing.JComponent getEditor(java.lang.Object bean, AppLoader core)
          Gets the associated cell editor for the property
 PropertyInterfacer getInterfacer()
          Get a property interfacer for the bean.
 java.lang.String getName()
          Gets the display name of the property.
 javax.swing.JComponent getRenderer(java.lang.Object bean, AppLoader core)
          Gets the associated cell renderer for the property.
 boolean isSettable(java.lang.Object bean)
          Checks to see if the property is currently settable on the given instance bean.
 void setInterfacer(PropertyInterfacer functor)
          Set the interfacer for the property.
 

Method Detail

applyGetter

public java.lang.Object applyGetter(java.lang.Object bean)
Get the value from the bean instance.

Parameters:
bean - The instance to get this property from
Returns:
The value of the bean
Throws:
PropertyException - When the value can't be extracted.

applySetter

public void applySetter(java.lang.Object bean,
                        java.lang.Object toValue)
Set the value of this property on the given bean

Parameters:
bean - The instance to set this property of
toValue - The new value for the property
Throws:
PropertyException - When the value can't be set.

isSettable

public boolean isSettable(java.lang.Object bean)
Checks to see if the property is currently settable on the given instance bean.

Parameters:
bean - the instance to check
Returns:
false if the bean may not be set

getEditor

public javax.swing.JComponent getEditor(java.lang.Object bean,
                                        AppLoader core)
                                 throws PreferenceException
Gets the associated cell editor for the property

Parameters:
bean -
core -
Returns:
Throws:
PreferenceException

getRenderer

public javax.swing.JComponent getRenderer(java.lang.Object bean,
                                          AppLoader core)
                                   throws PreferenceException
Gets the associated cell renderer for the property.

Parameters:
bean -
core -
Returns:
Throws:
PreferenceException

getInterfacer

public PropertyInterfacer getInterfacer()
Get a property interfacer for the bean.

Returns:

setInterfacer

public void setInterfacer(PropertyInterfacer functor)
Set the interfacer for the property.

Parameters:
functor -

getBeanType

public java.lang.Class getBeanType()
Gets the java class of the bean.

Returns:

getName

public java.lang.String getName()
Gets the display name of the property.

Returns: