|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.myfaces.trinidad.skin.Skin
org.apache.myfaces.trinidadinternal.skin.SkinImpl
org.apache.myfaces.trinidadinternal.skin.SkinExtension
public class SkinExtension
A Skin which extends another Skin, possibly adding customizations.
Constructor Summary | |
---|---|
SkinExtension(org.apache.myfaces.trinidad.skin.Skin baseSkin,
java.lang.String id,
java.lang.String family,
java.lang.String renderKitId)
Creates a Skin which extends the specified base Skin. |
Method Summary | |
---|---|
org.apache.myfaces.trinidad.skin.Skin |
getBaseSkin()
Returns the base Skin which this custom Skin "extends". |
java.lang.String |
getBundleName()
Returns the name of the bundle for the extension. |
java.lang.String |
getFamily()
Returns the name of the Skin family that this SkinExtension belongs to. |
org.apache.myfaces.trinidad.skin.Icon |
getIcon(java.lang.String iconName,
boolean resolve)
Override of Skin.getIcon() to look in the base skin for the icon if it isn't registered yet with this skin. |
java.lang.String |
getId()
Returns the id of this custom Skin. |
java.lang.Object |
getProperty(java.lang.Object key)
Try to pull a locally set property, if null pull a property from the base skin. |
java.lang.String |
getRenderKitId()
Returns the name of the render-kit-id for this Skin. |
java.util.Map<java.lang.String,java.lang.String> |
getStyleClassMap(org.apache.myfaces.trinidad.context.RenderingContext arc)
Returns the styleClassMap for this extension |
StyleSheetDocument |
getStyleSheetDocument(StyleContext context)
Override of Skin.getStyleSheetDocument() which merges styles from the base Skin's style sheet and the SkinExtension's style sheet. |
java.lang.String |
getStyleSheetName()
Returns the name of the XSS style sheet for this Skin if on has been set |
java.lang.Object |
getTranslatedValue(org.apache.myfaces.trinidad.context.LocaleContext lContext,
java.lang.String key)
Override of Skin.getTranslatedValue() which supports pulling translations from component providers as well as the base Skin. |
void |
registerIcon(java.lang.String iconName,
org.apache.myfaces.trinidad.skin.Icon icon)
Override of Skin.registerIcon(). |
void |
setBundleName(java.lang.String bundleName)
Returns the name of the bundle for the extension. |
void |
setStyleSheetName(java.lang.String styleSheetName)
Sets the name of the style sheet for this Skin. |
Methods inherited from class org.apache.myfaces.trinidadinternal.skin.SkinImpl |
---|
getIcon, getTranslatedString, registerStyleSheet, setProperty |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SkinExtension(org.apache.myfaces.trinidad.skin.Skin baseSkin, java.lang.String id, java.lang.String family, java.lang.String renderKitId)
baseSkin
- The base Skin that this custom
Skin "extends". If it is a Skin designed for "org.apache.myfaces.trinidad.desktop"
render-kit-id, then its base skin should be SimpleDesktopSkin.
If it is a Skin designed for "org.apache.myfaces.trinidad.pda" render-kit-id,
then its base skin should be SimplePdaSkin.
Must be non-null.id
- A string which can be used to uniquely identify the
Skin .
Must be non-null.family
- The Skin family name that this
SkinExtension belongs to. For example, you might have
a Skin that makes your pages look purple for the
desktop renderkit and a Skin that makes your pages
look purple for the pda renderkit.
You can set the skin-family to "purple" in
trinidad-config.xml, and the Skin with skin-family
and render-kit-id match will be chosen.
Must be non-null.renderKitId
- The render-kit-id that this Skin is designed for.
java.lang.NullPointerException
- if baseSkin, id, or family is null.Method Detail |
---|
public org.apache.myfaces.trinidad.skin.Skin getBaseSkin()
public java.lang.String getId()
getId
in class SkinImpl
org.apache.myfaces.trinidadinternal.skin.SkinFactory#getSkin
public java.lang.String getFamily()
getFamily
in class SkinImpl
public java.lang.String getStyleSheetName()
getStyleSheetName
in class SkinImpl
setStyleSheetName
public java.lang.String getRenderKitId()
getRenderKitId
in class SkinImpl
public java.lang.String getBundleName()
getBundleName
in class SkinImpl
public void setBundleName(java.lang.String bundleName)
public void registerIcon(java.lang.String iconName, org.apache.myfaces.trinidad.skin.Icon icon)
registerIcon
in class SkinImpl
iconName
- The name of the icon. Cannot be null.icon
- The Icon to register.public java.util.Map<java.lang.String,java.lang.String> getStyleClassMap(org.apache.myfaces.trinidad.context.RenderingContext arc)
getStyleClassMap
in class SkinImpl
arc
- RenderingContext
public java.lang.Object getTranslatedValue(org.apache.myfaces.trinidad.context.LocaleContext lContext, java.lang.String key) throws java.util.MissingResourceException
getTranslatedValue
in class SkinImpl
lContext
- The LocaleContext which provides the translation Locale.
Cannot be null.key
- The key of the translation to retrieve. Cannot be null.
java.util.MissingResourceException
public java.lang.Object getProperty(java.lang.Object key)
getProperty
in class SkinImpl
public org.apache.myfaces.trinidad.skin.Icon getIcon(java.lang.String iconName, boolean resolve)
getIcon
in class SkinImpl
iconName
- The name of the icon to retrieve. Cannot be nullpublic void setStyleSheetName(java.lang.String styleSheetName)
public StyleSheetDocument getStyleSheetDocument(StyleContext context)
getStyleSheetDocument
in class SkinImpl
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |