|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.util.DynamicPropertyBag
public abstract class DynamicPropertyBag
This abstract class represents a property bag component, which defines a collection of dynamic properties that can be specified at design time within the IDE via a customizer.
PropertyBag
,
Serialized FormConstructor Summary | |
---|---|
DynamicPropertyBag()
Create a new DynamicPropertyBag |
Method Summary | |
---|---|
void |
addPropertyBagChangedListener(com.sas.collection.PropertyBagChangedListener listener)
Add a listener for the com.sas.collection.PropertyBagChangedEvent event. |
java.lang.Object |
clone()
Clone a dynamic property bag. |
boolean |
containsKey(java.lang.String key)
Determine if the property bag contains a property with this name (key). |
int |
count()
Return the number of properties in the property bag. |
java.lang.Object |
get(java.lang.String key)
Get an item from a property bag. |
java.lang.Object |
get(java.lang.String key,
java.lang.Object defaultValue)
Get an item from a property bag, or return a default if it does not exist. |
java.beans.BeanInfo |
getBeanInfo()
Retrieve information about this object's properties, exposed methods, and events. |
java.lang.Class |
getPropertyType(java.lang.Object bean,
java.lang.String property)
Return the type of the specified property. |
java.lang.Object |
getPropertyValue(java.lang.Object bean,
java.lang.String property)
Return the value of the property specified. |
java.lang.String[] |
listKeys()
Return a list of the keys for this property bag. |
void |
merge(com.sas.collection.StaticPropertyBagInterface other)
Merge into this bag any property from the source which does not exist in this bag. |
void |
remove(java.lang.String key)
Remove a property from the property bag. |
void |
removeAll()
Remove all items from the property bag. |
void |
removePropertyBagChangedListener(com.sas.collection.PropertyBagChangedListener listener)
Remove a listener for the com.sas.collection.PropertyBagChangedEvent event. |
void |
set(com.sas.collection.StaticPropertyBagInterface other)
Add the contents of another property bag to this property bag. |
void |
set(java.lang.String key,
java.lang.Object property)
Put a property in the property bag. |
void |
setPropertyValue(java.lang.Object bean,
java.lang.String property,
java.lang.Object value)
Set the value of the specified property. |
com.sas.collection.DictionaryInterface |
toDictionary(com.sas.collection.DictionaryInterface initialDictionary)
Place the property bag items into a dictionary and return that dictionary. |
Methods inherited from interface com.sas.util.DynamicBeanInfoInterface |
---|
addPropertyChangeListener, removePropertyChangeListener |
Methods inherited from interface com.sas.util.UserCodeGenClassInterface |
---|
getUserCodeGenClass |
Constructor Detail |
---|
public DynamicPropertyBag()
Method Detail |
---|
public java.beans.BeanInfo getBeanInfo()
getBeanInfo
in interface DynamicBeanInfoInterface
public java.lang.Object getPropertyValue(java.lang.Object bean, java.lang.String property)
getPropertyValue
in interface com.sas.PropertyValueQueryInterface
bean
- The bean to get the property value from.property
- The name of the property to return the value of.
public void setPropertyValue(java.lang.Object bean, java.lang.String property, java.lang.Object value)
setPropertyValue
in interface com.sas.PropertyValueQueryInterface
bean
- The bean to set the property value on.property
- The name of the property to set the value of.value
- The new value of the property.public java.lang.Class getPropertyType(java.lang.Object bean, java.lang.String property)
getPropertyType
in interface com.sas.PropertyValueQueryInterface
bean
- The bean which has the property.property
- The name of the property to get the type of.
public int count()
count
in interface com.sas.collection.StaticPropertyBagInterface
count
in interface com.sas.util.Countable
public boolean containsKey(java.lang.String key)
containsKey
in interface com.sas.collection.StaticPropertyBagInterface
key
- the name of the property.
This string must be
an interned string and may not be null.
(Use aString.intern() to create an interned string.)
- Returns:
- true if the property bag contains the property.
public java.lang.Object get(java.lang.String key)
get
in interface com.sas.collection.StaticPropertyBagInterface
key
- the name of the property.
This string must be
an interned string and may not be null.
(Use aString.intern() to create an interned string.)
- Returns:
- the object associated with the key
- Throws:
java.util.NoSuchElementException
- if there
is no such property in the property bag.
(this is necessary to distinguish between
no such key and a property value of null.)
public java.lang.Object get(java.lang.String key, java.lang.Object defaultValue)
get
in interface com.sas.collection.StaticPropertyBagInterface
key
- the name of the property.
This string must be
an interned string and may not be null.
(Use aString.intern() to create an interned string.)defaultValue
- a default value to return if the named property does
not exist in the property bag
- Returns:
- the object associated with the key, or the defaultValue
if the bag does not contain an element for the specified key.
public com.sas.collection.DictionaryInterface toDictionary(com.sas.collection.DictionaryInterface initialDictionary)
toDictionary
in interface com.sas.collection.StaticPropertyBagInterface
initialDictionary
- a dictionary into which the property bag
places all of its values via. This may be null, in which case
a new Dictionary is created.
Dictionary
,
DictionaryInterface.set(Object,Object)
public java.lang.String[] listKeys()
listKeys
in interface com.sas.collection.StaticPropertyBagInterface
StringCollection
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in interface com.sas.collection.StaticPropertyBagInterface
clone
in interface com.sas.PublicClonable
clone
in class com.sas.Component
java.lang.CloneNotSupportedException
- if the object cannot be cloned.public void set(java.lang.String key, java.lang.Object property)
set
in interface com.sas.collection.PropertyBagInterface
key
- the name of the property.
This string must be
an interned string and may not be null.
(Use aString.intern() to create an interned string.)property
- the value to associate with the property name
Property values may be null.
public void remove(java.lang.String key)
remove
in interface com.sas.collection.PropertyBagInterface
key
- the name of the property.
This string must be
an interned string and may not be null.
(Use aString.intern() to create an interned string.)
- Throws:
java.util.NoSuchElementException
- if the
bag does not contains the named element.
public void removeAll()
removeAll
in interface com.sas.collection.PropertyBagInterface
public void set(com.sas.collection.StaticPropertyBagInterface other)
set
in interface com.sas.collection.PropertyBagInterface
other
- another property bagPropertyBagInterface.merge(com.sas.collection.StaticPropertyBagInterface)
public void merge(com.sas.collection.StaticPropertyBagInterface other)
merge
in interface com.sas.collection.PropertyBagInterface
other
- another property bagPropertyBagInterface.set(com.sas.collection.StaticPropertyBagInterface)
public void addPropertyBagChangedListener(com.sas.collection.PropertyBagChangedListener listener)
addPropertyBagChangedListener
in interface com.sas.collection.PropertyBagChangedSource
listener
- an object which handles PropertyBagChangedEvent events
the listener is not added a second time if it already exists
in the list of listeners for this event.PropertyBagChangedSource
public void removePropertyBagChangedListener(com.sas.collection.PropertyBagChangedListener listener)
removePropertyBagChangedListener
in interface com.sas.collection.PropertyBagChangedSource
listener
- an object which handles PropertyBagChangedEvent eventsPropertyBagChangedSource
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |