com.borland.primetime.properties
Class GlobalArrayProperty

java.lang.Object
  |
  +--com.borland.primetime.properties.Property
        |
        +--com.borland.primetime.properties.GlobalArrayProperty

public class GlobalArrayProperty
extends Property

Instances of GlobalArrayProperty are used to represent global settings with a related set of zero or more values under the user's control.


Fields inherited from class com.borland.primetime.properties.Property
category, name
 
Constructor Summary
GlobalArrayProperty(java.lang.String category, java.lang.String name)
          Creates a property whose values will be stored as a sequence of individual properties with the names 'name.0', 'name.1', etc.
 
Method Summary
 void addPropertyListener(GlobalArrayPropertyListener listener)
          Adds a GlobalArrayPropertyListener to the list of listeners that receive events.
 void firePropertyChange(java.lang.String[] newValue)
          Notifies all registered GlobalArrayPropertyListeners that the value of the property has been changed.
 java.lang.String[] getValues()
          Fetches the current setting of this property.
 void removePropertyListener(GlobalArrayPropertyListener listener)
          Removes a GlobalArrayPropertyListener from the list of listeners that receive events.
 boolean setValues(java.lang.String[] values)
          Changes the current setting of the property to the array of strings provided.
 
Methods inherited from class com.borland.primetime.properties.Property
compareTo, equals, getPropertyCategory, getPropertyName, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GlobalArrayProperty

public GlobalArrayProperty(java.lang.String category,
                           java.lang.String name)
Creates a property whose values will be stored as a sequence of individual properties with the names 'name.0', 'name.1', etc.
Parameters:
category - The category this property will be stored under.
name - The root name used to generate each of the individual property names for entries in the array.
Method Detail

setValues

public boolean setValues(java.lang.String[] values)
Changes the current setting of the property to the array of strings provided.
Parameters:
values - The desired array of parameter values. Null is treated the same as an empty array.
Returns:
True if the property value was changed as a result, false if the property was already set to this value.

getValues

public java.lang.String[] getValues()
Fetches the current setting of this property.
Returns:
The stored array of parameter values, or an empty array if no values have been stored.

addPropertyListener

public void addPropertyListener(GlobalArrayPropertyListener listener)
Adds a GlobalArrayPropertyListener to the list of listeners that receive events.
Parameters:
listener - The listener.

removePropertyListener

public void removePropertyListener(GlobalArrayPropertyListener listener)
Removes a GlobalArrayPropertyListener from the list of listeners that receive events.
Parameters:
listener - The listener.

firePropertyChange

public void firePropertyChange(java.lang.String[] newValue)
Notifies all registered GlobalArrayPropertyListeners that the value of the property has been changed.