EchoPoint
1.0

echopoint.stylesheet
Class StyleAttrDescriptor

java.lang.Object
  extended byjava.beans.FeatureDescriptor
      extended byechopoint.stylesheet.StyleAttrDescriptor
All Implemented Interfaces:
java.io.Serializable

public class StyleAttrDescriptor
extends java.beans.FeatureDescriptor
implements java.io.Serializable

The StyleAttrDescriptor describes a single style attribute. It encapulates the name, type and optionally a bean property name for the style attribute.

It is derived from FeatureDescriptor so that it has a "JavaBeans" feel about it.

See Also:
Serialized Form

Constructor Summary
StyleAttrDescriptor(java.lang.String styleAttrName, java.lang.Class styleAttrType)
          Constructs a StyleAttrDescriptor with the given style attribute name, attribute value class and an null beanPropertyName and symbolicValues.
StyleAttrDescriptor(java.lang.String styleAttrName, java.lang.Class styleAttrType, java.lang.String styleBeanPropertyName)
          Constructs a StyleAttrDescriptor with the given style attribute name, attribute value class and an optional beanPropertyName and null symbolicValues.
StyleAttrDescriptor(java.lang.String styleAttrName, java.lang.Class styleAttrType, java.lang.String styleBeanPropertyName, SymbolicValue[] styleSymbolicValues)
          Constructs a StyleAttrDescriptor with the given style attribute name, attribute value class and an optional beanPropertyName and symbolic values array.
 
Method Summary
 java.lang.String getBeanPropertyName()
          Returns the name of a bean property that can be called to get or set the equivalent of this style.
 java.lang.String getName()
          Returns the name of the style attribute.
 SymbolicValue[] getSymbolicValues()
          Gets the symbolic values associated with the style attribute
 java.lang.Class getType()
          Returns the Class type of the style attribute value, for example nextapp.echo.Color.class or nextapp.echo.Font.class
 void setBeanPropertyName(java.lang.String beanPropertyName)
          Sets the name of a bean property that can be called to get or set the equivalent of this style.
 void setName(java.lang.String name)
          Sets the name of the style attribute.
 void setSymbolicValues(SymbolicValue[] values)
          Sets the symbolic values associated with the style attribute.
 void setType(java.lang.Class classStyleValue)
          Sets the Class type of the style attribute value, for example nextapp.echo.Color.class or nextapp.echo.Font.class
 java.lang.String toString()
           
 
Methods inherited from class java.beans.FeatureDescriptor
attributeNames, getDisplayName, getShortDescription, getValue, isExpert, isHidden, isPreferred, setDisplayName, setExpert, setHidden, setPreferred, setShortDescription, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StyleAttrDescriptor

public StyleAttrDescriptor(java.lang.String styleAttrName,
                           java.lang.Class styleAttrType)
Constructs a StyleAttrDescriptor with the given style attribute name, attribute value class and an null beanPropertyName and symbolicValues.

Parameters:
styleAttrName - - the name of the style attribute
styleAttrType - - the type of the style attribute value

StyleAttrDescriptor

public StyleAttrDescriptor(java.lang.String styleAttrName,
                           java.lang.Class styleAttrType,
                           java.lang.String styleBeanPropertyName)
Constructs a StyleAttrDescriptor with the given style attribute name, attribute value class and an optional beanPropertyName and null symbolicValues.

Parameters:
styleAttrName - - the name of the style attribute
styleAttrType - - the type of the style attribute value
styleBeanPropertyName - - an optional bean property name which can set the style

StyleAttrDescriptor

public StyleAttrDescriptor(java.lang.String styleAttrName,
                           java.lang.Class styleAttrType,
                           java.lang.String styleBeanPropertyName,
                           SymbolicValue[] styleSymbolicValues)
Constructs a StyleAttrDescriptor with the given style attribute name, attribute value class and an optional beanPropertyName and symbolic values array.

Parameters:
styleAttrName - - the name of the style attribute
styleAttrType - - the type of the style attribute value
styleBeanPropertyName - - an optional bean property name which can set the style
styleSymbolicValues - - an array of symbolic values
Method Detail

getName

public java.lang.String getName()
Returns the name of the style attribute. It is this name that is used in the external StyleSheets.

See Also:
FeatureDescriptor.getName()

setName

public void setName(java.lang.String name)
Sets the name of the style attribute. It is this name that is used in the external StyleSheets.

See Also:
FeatureDescriptor.setName(java.lang.String)

getBeanPropertyName

public java.lang.String getBeanPropertyName()
Returns the name of a bean property that can be called to get or set the equivalent of this style. If the name is "foo" then the component class will have a setFoo method that can be called which is the equivalent of using this style attribute name.

Returns:
- a bean property name or null

getType

public java.lang.Class getType()
Returns the Class type of the style attribute value, for example nextapp.echo.Color.class or nextapp.echo.Font.class

Returns:
- a class object for the style attribute type

setBeanPropertyName

public void setBeanPropertyName(java.lang.String beanPropertyName)
Sets the name of a bean property that can be called to get or set the equivalent of this style. If the name is "foo" then the component class will have a setFoo method that can be called which is the equivalent of using this style attribute name.

Parameters:
beanPropertyName - - the bean propertyName

setType

public void setType(java.lang.Class classStyleValue)
Sets the Class type of the style attribute value, for example nextapp.echo.Color.class or nextapp.echo.Font.class

Parameters:
classStyleValue - - a style attribute class type

getSymbolicValues

public SymbolicValue[] getSymbolicValues()
Gets the symbolic values associated with the style attribute

Returns:
- an array of symbolic values or null

setSymbolicValues

public void setSymbolicValues(SymbolicValue[] values)
Sets the symbolic values associated with the style attribute.

Parameters:
values - an arry of symbolic values or null

toString

public java.lang.String toString()
See Also:
Object.toString()

EchoPoint
1.0