public class MutableStyleSheet extends java.lang.Object implements StyleSheet
StyleSheet.| Constructor and Description |
|---|
MutableStyleSheet() |
| Modifier and Type | Method and Description |
|---|---|
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 |
public void addStyle(java.lang.Class componentClass,
java.lang.String styleName,
Style style)
Style to the StyleSheet.componentClass - the Class of the
Component for which the style is to be usedstyleName - the name of the stylestyle - the Style to be addedpublic void addStyleSheet(MutableStyleSheet styleSheet)
StyleSheet to this
StyleSheet. Future changes to the added
StyleSheet will not be reflected, unless it is re-added.styleSheet - the StyleSheet to addpublic java.util.Iterator getComponentTypes(java.lang.String styleName)
StyleSheetStyleSheet with the specified name.getComponentTypes in interface StyleSheetstyleName - the style nameClasses providing the fully qualified names of all component types
which provide styles for the styleName valueStyleSheet.getComponentTypes(java.lang.String)public Style getStyle(java.lang.String styleName, java.lang.Class componentClass, boolean searchSuperClasses)
StyleSheetgetStyle in interface StyleSheetstyleName - the name of the Component's specified named stylecomponentClass - the Class of the Component for which style information is being determinedsearchSuperClasses - flag indicating whether a style for a superclass should be returned in the event that no
specific style can be found for the specified componentClassStyle if found, or null otherwiseStyleSheet.getStyle(java.lang.String, java.lang.Class, boolean)public java.util.Iterator getStyleNames()
StyleSheetStyleSheetgetStyleNames in interface StyleSheetStrings naming all styles presentStyleSheet.getStyleNames()