|
| 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 Form| Constructor Summary | |
|---|---|
DynamicPropertyBag()
Create a new DynamicPropertyBag |
|
| Method Summary | |
|---|---|
void |
addPropertyBagChangedListener(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(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(PropertyBagChangedListener listener)
Remove a listener for the com.sas.collection.PropertyBagChangedEvent event. |
void |
set(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. |
DictionaryInterface |
toDictionary(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.PropertyValueQueryInterfacebean - 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.PropertyValueQueryInterfacebean - 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.PropertyValueQueryInterfacebean - The bean which has the property.property - The name of the property to get the type of.
public int count()
count in interface StaticPropertyBagInterfacecount in interface com.sas.util.Countablepublic boolean containsKey(java.lang.String key)
containsKey in interface StaticPropertyBagInterfacekey - 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 StaticPropertyBagInterfacekey - 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 StaticPropertyBagInterfacekey - 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 DictionaryInterface toDictionary(DictionaryInterface initialDictionary)
toDictionary in interface StaticPropertyBagInterfaceinitialDictionary - 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 StaticPropertyBagInterfaceStringCollection
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in interface StaticPropertyBagInterfaceclone in interface com.sas.PublicClonableclone in class Componentjava.lang.CloneNotSupportedException - if the object cannot be cloned.
public void set(java.lang.String key,
java.lang.Object property)
set in interface PropertyBagInterfacekey - 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 PropertyBagInterfacekey - 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 PropertyBagInterfacepublic void set(StaticPropertyBagInterface other)
set in interface PropertyBagInterfaceother - another property bagPropertyBagInterface.merge(com.sas.collection.StaticPropertyBagInterface)public void merge(StaticPropertyBagInterface other)
merge in interface PropertyBagInterfaceother - another property bagPropertyBagInterface.set(com.sas.collection.StaticPropertyBagInterface)public void addPropertyBagChangedListener(PropertyBagChangedListener listener)
addPropertyBagChangedListener in interface PropertyBagChangedSourcelistener - 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.PropertyBagChangedSourcepublic void removePropertyBagChangedListener(PropertyBagChangedListener listener)
removePropertyBagChangedListener in interface PropertyBagChangedSourcelistener - an object which handles PropertyBagChangedEvent eventsPropertyBagChangedSource
|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||