NextApp Echo2
v2.1.0

nextapp.echo2.app
Class DerivedMutableStyle

java.lang.Object
  extended by nextapp.echo2.app.MutableStyle
      extended by nextapp.echo2.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.echo2.app.MutableStyle
MutableStyle.IndexedPropertyValue
 
Constructor Summary
DerivedMutableStyle()
          Default constructor.
DerivedMutableStyle(Style parentStyle)
          Creates a new DerivedMutableStyle.
 
Method Summary
 java.lang.Object getIndexedProperty(java.lang.String propertyName, int propertyIndex)
          Retrieves the value of the specified indexed property.
 Style getParentStyle()
          Returns the parent style.
 java.lang.Object getProperty(java.lang.String propertyName)
          Retrieves the value of the specified property.
 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.echo2.app.MutableStyle
addStyleContent, getPropertyIndices, getPropertyNames, removeIndexedProperty, removeProperty, 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

getIndexedProperty

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

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

getProperty

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

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

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 Echo2
v2.1.0