Class
caplin.presenter.property

Properties

A class used to hold collections of properties, and providing utility methods for performing operations over those collections.

Constructor Summary

Attributes Name and Description
caplin.presenter.property.Properties(Array pProperties)

Constructs a new Properties instance containing the given list of caplin.presenter.property.Property objects.

Method Summary

Attributes Name and Description
void add(Object vProperties)

Add the given properties to this collection.

caplin.presenter.property.PropertyListener addChangeListener(Object oListener, String sMethod, boolean bNotifyImmediately)

Convenience method that allows a change listener to be added to added for objects that do not themselves implement caplin.presenter.property.PropertyListener.

void addListener( oListener, bNotifyImmediately)

Add a listener to all properties

caplin.presenter.property.PropertyListener addUpdateListener(Object oListener, String sMethod, boolean bNotifyImmediately)

Convenience method that allows an update listener to be added to added for objects that do not themselves implement caplin.presenter.property.PropertyListener.

int getSize()

Returns the size of the collection.

void removeAllListeners()

Removes all the listeners attached to the properties.

void setValue(Object vValue)

Invoke setValue() on all writable properties within the collection.

caplin.presenter.property.Snapshot snapshot()

Returns a snapshot of the current collection that can be restored at a later date.

Constructor Detail

caplin.presenter.property.Properties(Array pProperties)

Constructs a new Properties instance containing the given list of caplin.presenter.property.Property objects.

Parameters
Array pProperties (optional) The initial set of properties.

Method Detail

void add(Object vProperties)

Add the given properties to this collection. The single argument passed to add() can be any of the following types:

Parameters
Object vProperties The new properties to add.

caplin.presenter.property.PropertyListener addChangeListener(Object oListener, String sMethod, boolean bNotifyImmediately)

Convenience method that allows a change listener to be added to added for objects that do not themselves implement caplin.presenter.property.PropertyListener.

Listeners added using addChangeListener() will only be notified when caplin.presenter.property.PropertyListener#onPropertyChanged fires, and will not be notified if any of the other caplin.presenter.property.PropertyListener call-backs fire. The advantage to using this method is that objects can choose to listen to call-back events on multiple properties.

Parameters
Object oListener The listener to be added.
String sMethod The name of the method on the listener that will be invoked each time the property changes.
boolean bNotifyImmediately (optional) Whether to invoke the listener immediately for the current value.

void addListener( oListener, bNotifyImmediately)

Add a listener to all properties

Parameters
oListener
bNotifyImmediately

caplin.presenter.property.PropertyListener addUpdateListener(Object oListener, String sMethod, boolean bNotifyImmediately)

Convenience method that allows an update listener to be added to added for objects that do not themselves implement caplin.presenter.property.PropertyListener.

Listeners added using addUpdateListener() will only be notified when caplin.presenter.property.PropertyListener#onPropertyUpdated fires, and will not be notified if any of the other caplin.presenter.property.PropertyListener call-backs fire. The advantage to using this method is that objects can choose to listen to call-back events on multiple properties.

Parameters
Object oListener The listener to be added.
String sMethod The name of the method on the listener that will be invoked each time the property changes.
boolean bNotifyImmediately (optional) Whether to invoke the listener immediately for the current value.

int getSize()

Returns the size of the collection.

void removeAllListeners()

Removes all the listeners attached to the properties.

void setValue(Object vValue)

Invoke setValue() on all writable properties within the collection.

Parameters
Object vValue The value that all property instances will be set to.

caplin.presenter.property.Snapshot snapshot()

Returns a snapshot of the current collection that can be restored at a later date.