NextApp Echo3
v3.0.b4

nextapp.echo.app
Class MutableStyleSheet

java.lang.Object
  extended by nextapp.echo.app.MutableStyleSheet
All Implemented Interfaces:
java.io.Serializable, StyleSheet

public class MutableStyleSheet
extends java.lang.Object
implements StyleSheet

A mutable implementation of a StyleSheet.

See Also:
Serialized Form

Constructor Summary
MutableStyleSheet()
           
 
Method Summary
 void addStyle(java.lang.Class componentClass, java.lang.String styleName, Style style)
          Adds a Style to the StyleSheet.
 void addStyleSheet(MutableStyleSheet styleSheet)
          Adds the contents of another StyleSheet to this StyleSheet.
 java.util.Iterator getComponentTypes(java.lang.String styleName)
          Retrieves the names of all component types present in the StyleSheet with the specified name.
 Style getStyle(java.lang.String styleName, java.lang.Class componentClass, boolean searchSuperClasses)
          Retrieves the appropriate style for the specified component class and style name.
 java.util.Iterator getStyleNames()
          Retrieves the names of all styles present in the StyleSheet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MutableStyleSheet

public MutableStyleSheet()
Method Detail

addStyle

public void addStyle(java.lang.Class componentClass,
                     java.lang.String styleName,
                     Style style)
Adds a Style to the StyleSheet.

Parameters:
componentClass - the Class of the Component for which the style is to be used
styleName - the name of the style
style - the Style to be added

addStyleSheet

public void addStyleSheet(MutableStyleSheet styleSheet)
Adds the contents of another StyleSheet to this StyleSheet. Future changes to the added StyleSheet will not be reflected, unless it is re-added.

Parameters:
styleSheet - the StyleSheet to add

getComponentTypes

public java.util.Iterator getComponentTypes(java.lang.String styleName)
Description copied from interface: StyleSheet
Retrieves the names of all component types present in the StyleSheet with the specified name.

Specified by:
getComponentTypes in interface StyleSheet
Parameters:
styleName - the style name
Returns:
an iterator containing Classes providing the fully qualified names of all component types which provide styles for the styleName value
See Also:
StyleSheet.getComponentTypes(java.lang.String)

getStyle

public Style getStyle(java.lang.String styleName,
                      java.lang.Class componentClass,
                      boolean searchSuperClasses)
Description copied from interface: StyleSheet
Retrieves the appropriate style for the specified component class and style name.

Specified by:
getStyle in interface StyleSheet
Parameters:
styleName - the name of the Component's specified named style
componentClass - the Class of the Component for which style information is being determined
searchSuperClasses - flag indicating whether a style for a superclass should be returned in the event that no specific style can be found for the specified componentClass
Returns:
the appropriate Style if found, or null otherwise
See Also:
StyleSheet.getStyle(java.lang.String, java.lang.Class, boolean)

getStyleNames

public java.util.Iterator getStyleNames()
Description copied from interface: StyleSheet
Retrieves the names of all styles present in the StyleSheet

Specified by:
getStyleNames in interface StyleSheet
Returns:
an iterator containing Strings naming all styles present
See Also:
StyleSheet.getStyleNames()

NextApp Echo3
v3.0.b4