NextApp Echo3
v3.0.b4

nextapp.echo.app
Class DerivedMutableStyle

java.lang.Object
  extended by nextapp.echo.app.MutableStyle
      extended by nextapp.echo.app.DerivedMutableStyle
All Implemented Interfaces:
java.io.Serializable, Style

public class DerivedMutableStyle
extends MutableStyle

A MutableStyle which will retrieve properties from a "parent" style when they are not set locally.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class nextapp.echo.app.MutableStyle
MutableStyle.IndexedPropertyValue
 
Constructor Summary
DerivedMutableStyle()
          Default constructor.
DerivedMutableStyle(Style parentStyle)
          Creates a new DerivedMutableStyle.
 
Method Summary
 java.lang.Object get(java.lang.String propertyName)
          Retrieves the value of the specified property.
 java.lang.Object getIndex(java.lang.String propertyName, int propertyIndex)
          Retrieves the value of the specified indexed property.
 Style getParentStyle()
          Returns the parent style.
 java.util.Iterator getPropertyNames()
          Retrieves the names of all set properties.
 boolean isIndexedPropertySet(java.lang.String propertyName, int propertyIndex)
          Determines if a particular index of an indexed property is set.
 boolean isPropertySet(java.lang.String propertyName)
          Determines if a particular property is set.
 void setParentStyle(Style parentStyle)
          Sets the parent style, from which properties will be retrieved if they are not found in this style.
 
Methods inherited from class nextapp.echo.app.MutableStyle
addStyleContent, getIndexedProperty, getProperty, getPropertyIndices, removeIndexedProperty, removeProperty, set, setIndex, setIndexedProperty, setProperty, size, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DerivedMutableStyle

public DerivedMutableStyle()
Default constructor.


DerivedMutableStyle

public DerivedMutableStyle(Style parentStyle)
Creates a new DerivedMutableStyle.

Parameters:
parentStyle - the style from which to retrieve properties when they are not set within this style
Method Detail

getParentStyle

public Style getParentStyle()
Returns the parent style.

Returns:
the parent style

getIndex

public java.lang.Object getIndex(java.lang.String propertyName,
                                 int propertyIndex)
Description copied from interface: Style
Retrieves the value of the specified indexed property.

Specified by:
getIndex in interface Style
Overrides:
getIndex in class MutableStyle
See Also:
Style.getIndex(java.lang.String, int)

get

public java.lang.Object get(java.lang.String propertyName)
Description copied from interface: Style
Retrieves the value of the specified property.

Specified by:
get in interface Style
Overrides:
get in class MutableStyle
See Also:
Style.get(java.lang.String)

getPropertyNames

public java.util.Iterator getPropertyNames()
Description copied from interface: Style
Retrieves the names of all set properties.

Specified by:
getPropertyNames in interface Style
Overrides:
getPropertyNames in class MutableStyle
Returns:
an Iterator that returns the names of all set properties
See Also:
Style.getPropertyNames()

isIndexedPropertySet

public boolean isIndexedPropertySet(java.lang.String propertyName,
                                    int propertyIndex)
Description copied from interface: Style
Determines if a particular index of an indexed property is set.

Specified by:
isIndexedPropertySet in interface Style
Overrides:
isIndexedPropertySet in class MutableStyle
Parameters:
propertyName - the property name
propertyIndex - the index
Returns:
true if the index is set
See Also:
Style.isIndexedPropertySet(java.lang.String, int)

isPropertySet

public boolean isPropertySet(java.lang.String propertyName)
Description copied from interface: Style
Determines if a particular property is set. In the case of an indexed property, this method will return true if any indices are set.

Specified by:
isPropertySet in interface Style
Overrides:
isPropertySet in class MutableStyle
Parameters:
propertyName - the property name
Returns:
true if the property is set
See Also:
Style.isPropertySet(java.lang.String)

setParentStyle

public void setParentStyle(Style parentStyle)
Sets the parent style, from which properties will be retrieved if they are not found in this style.

Parameters:
parentStyle - the parent style

NextApp Echo3
v3.0.b4