Methods Summary |
---|
public void | addPropertyChangeListener(java.beans.PropertyChangeListener l)Add a property listener for this bean
propListeners.addPropertyChangeListener(l);
|
public void | addPropertyChangeListener(java.lang.String n, java.beans.PropertyChangeListener l)Add a property listener for a specific property name
propListeners.addPropertyChangeListener(n, l);
|
protected int | addValue(java.lang.String name, java.lang.Object value)
List list = getIndexedProperty(name);
list.add(value);
setValue(name, list);
return list.indexOf(value);
|
public java.lang.String | getAttributeValue(java.lang.String elementName, java.lang.String attributeName)
return getAttributeValue(elementName,0, attributeName);
|
public java.lang.String | getAttributeValue(java.lang.String attributeName)
return (String) getValue(attributeName);
|
public java.lang.String | getAttributeValue(java.lang.String elementName, int index, java.lang.String attributeName)
return (String) getValue(elementName + "-" + index + "-" + attributeName);
|
private java.util.List | getIndexedProperty(java.lang.String name)
Object o = getValue(name);
if (o==null) {
return new ArrayList();
} else {
return (List) o;
}
|
protected java.lang.Object | getValue(java.lang.String name, int index)
List list = getIndexedProperty(name);
return list.get(index);
|
public java.lang.Object | getValue(java.lang.String name)
return getExtraAttribute(name);
|
protected java.lang.Object[] | getValues(java.lang.String name)
List list = (List) getValue(name);
if (list!=null && list.size()>0) {
Class c = list.get(0).getClass();
Object array = java.lang.reflect.Array.newInstance(c, list.size());
return list.toArray((Object[]) array);
}
else
return null;
|
public void | removePropertyChangeListener(java.beans.PropertyChangeListener l)removes a property listener for this bean
propListeners.removePropertyChangeListener(l);
|
public void | removePropertyChangeListener(java.lang.String n, java.beans.PropertyChangeListener l)Remover a property listener for specific property name
propListeners.removePropertyChangeListener(n, l);
|
protected int | removeValue(java.lang.String name, java.lang.Object value)
List list = getIndexedProperty(name);
int index = list.indexOf(value);
list.remove(index);
return index;
|
protected void | removeValue(java.lang.String name, int index)
List list = getIndexedProperty(name);
list.remove(index);
|
public void | setAttributeValue(java.lang.String elementName, java.lang.String attributeName, java.lang.Object value)
// here we have to play games...
// the nodes cannot know if the property scalar is 0,1 or n
// so we look if the key name is already used (means property*
// DTD langua) and find the last one entered
int index = 0;
while (getValue(elementName + "-" + index + "-" + attributeName)!=null) {
index++;
}
setValue(elementName + "-" + index + "-" + attributeName, value);
|
public void | setAttributeValue(java.lang.String attributeName, java.lang.String value)
setValue(attributeName, value);
|
public void | setAttributeValue(java.lang.String elementName, int index, java.lang.String attributeName, java.lang.Object value)
setValue(elementName + "-" + index + "-" + attributeName, value);
|
public void | setValue(java.lang.String name, java.lang.Object value)Sets a property value
Object oldValue = getExtraAttribute(name);
addExtraAttribute(name, value);
propListeners.firePropertyChange(name, oldValue, value);
|
protected void | setValue(java.lang.String name, int index, java.lang.Object value)indexed property support
List list = getIndexedProperty(name);
list.set(index, value);
setValue(name, list);
|
protected void | setValues(java.lang.String name, java.lang.Object[] values)
List list = getIndexedProperty(name);
for (int i=0;i<values.length;) {
list.add(values[i]);
}
|
protected int | size(java.lang.String name)
List list = (List) getValue(name);
if (list!=null)
return list.size();
else
return 0;
|