|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.beans.FeatureDescriptor
com.sun.rave.designtime.markup.AttributeDescriptor
An AttributeDescriptor describes a markup attribute that is used to persist the value of a JavaBean property. The AttributeDescriptor is "stuffed" into the PropertyDescriptor using the name-value pair storage: FeatureDescriptor.setValue(String key, Object value). The key is defined by Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR, or literally "attributeDescriptor". If an AttributeDescriptor is found in a property's PropertyDescriptor, the IDE will persist any property settings in the .jsp file as an attribute. If no AttributeDescriptor is found, any property settings will be persisted in the .java file as standard JavaBeans properties. For example, a property called 'background' of type 'java.awt.Color' might be persisted in two ways:
background="#FFFFFF"
setBackground(new java.awt.Color(255, 255, 255));
FeatureDescriptor.setValue(String, Object),
Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR| Field Summary | |
protected boolean |
bindable
protected storage for the 'bindable' property |
protected java.lang.String |
defaultValue
protected storage for the 'defaultValue' property |
protected boolean |
required
protected storage for the 'required' property |
| Constructor Summary | |
AttributeDescriptor()
Constructs an empty AttributeDescriptor |
|
AttributeDescriptor(java.lang.String attributeName)
Constructs an AttributeDescriptor with the specified attributeName |
|
AttributeDescriptor(java.lang.String attributeName,
boolean required,
java.lang.String defaultValue)
Constructs an AttributeDescriptor with the specified attributeName, required state, and default value |
|
AttributeDescriptor(java.lang.String attributeName,
boolean required,
java.lang.String defaultValue,
boolean bindable)
Constructs an AttributeDescriptor with the specified attributeName, required state, default value, and bindable state |
|
| Method Summary | |
boolean |
equals(java.lang.Object o)
|
java.lang.String |
getDefaultValue()
Gets the 'defaultValue' property. |
boolean |
isBindable()
Gets the 'bindable' property. |
boolean |
isRequired()
Gets the 'required' property. |
void |
setBindable(boolean bindable)
Sets the 'bindable' property. |
void |
setDefaultValue(java.lang.String defaultValue)
Sets the 'defaultValue' property. |
void |
setRequired(boolean required)
Sets the 'required' property. |
| Methods inherited from class java.beans.FeatureDescriptor |
attributeNames, getDisplayName, getName, getShortDescription, getValue, isExpert, isHidden, isPreferred, setDisplayName, setExpert, setHidden, setName, setPreferred, setShortDescription, setValue |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected boolean bindable
protected java.lang.String defaultValue
protected boolean required
| Constructor Detail |
public AttributeDescriptor()
public AttributeDescriptor(java.lang.String attributeName)
attributeName - The desired attribute name
public AttributeDescriptor(java.lang.String attributeName,
boolean required,
java.lang.String defaultValue)
attributeName - The desired attribute namerequired - true if this is a required attribute, false if notdefaultValue - The default value for this attribute (will not be persisted if the
set value matches the default value)
public AttributeDescriptor(java.lang.String attributeName,
boolean required,
java.lang.String defaultValue,
boolean bindable)
attributeName - The desired attribute namerequired - true if this is a required attribute, false if notdefaultValue - The default value for this attribute (will not be persisted if the
set value matches the default value)bindable - true if this property is 'bindable', meaning it can have a value expression
set on it, or false if not| Method Detail |
public boolean equals(java.lang.Object o)
public java.lang.String getDefaultValue()
public boolean isBindable()
public boolean isRequired()
public void setBindable(boolean bindable)
bindable - true if this attribute should be bindable, false if notpublic void setDefaultValue(java.lang.String defaultValue)
defaultValue - The default value for this attribute (will not be persisted if the set
value matches the default value)public void setRequired(boolean required)
required - true if this attribute should be required, false if not
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||