org.apache.myfaces.trinidadinternal.skin
Class SkinCSSDocumentHandler

java.lang.Object
  extended by org.apache.myfaces.trinidadinternal.skin.SkinCSSDocumentHandler

public class SkinCSSDocumentHandler
extends java.lang.Object

As the Skin css file is parsed, methods in this class are called to build up a SkinStyleSheetNode. TODO figure out if this is thread-safe


Constructor Summary
SkinCSSDocumentHandler(ParseContext pContext)
           
 
Method Summary
 void atRule(java.lang.String atRule)
          Call when you have an atRule.
 void comment(java.lang.String text)
           
 void endDocument()
          Call this at the end of parsing the skin css file.
 void endSelector(java.util.List<java.lang.String> selectors)
          Call this at the end of parsing one set of selectors/properties.
 java.util.List<org.apache.myfaces.trinidadinternal.skin.SkinStyleSheetNode> getSkinStyleSheetNodes()
          Return the List of SkinStyleSheetNodes that was created at the end of parsing the skin css file (endDocument).
 void property(java.lang.String name, java.lang.String value)
          Call this when a property name/value is found.
 void startDocument()
          Call this at the start of parsing the skin css file.
 void startSelector()
          Call this at the beginning of parsing one set of selectors/properties.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SkinCSSDocumentHandler

public SkinCSSDocumentHandler(ParseContext pContext)
Method Detail

getSkinStyleSheetNodes

public java.util.List<org.apache.myfaces.trinidadinternal.skin.SkinStyleSheetNode> getSkinStyleSheetNodes()
Return the List of SkinStyleSheetNodes that was created at the end of parsing the skin css file (endDocument).


startDocument

public void startDocument()
Call this at the start of parsing the skin css file.


endDocument

public void endDocument()
Call this at the end of parsing the skin css file.


comment

public void comment(java.lang.String text)

startSelector

public void startSelector()
Call this at the beginning of parsing one set of selectors/properties. e.g., .AFDefaultFont, af|breadCrumbs::font {font-family:Arial,Helvetica; font-size:small}


endSelector

public void endSelector(java.util.List<java.lang.String> selectors)
Call this at the end of parsing one set of selectors/properties.

Parameters:
selectors - A List of Strings, each String is a selector. e.g., given the selectors/properties: .AFDefaultFont, af|breadCrumbs::font {font-family:Arial,Helvetica; font-size:small} The selectors in the List are ".AFDefaultFont" and "af|breadCrumbs::font"

property

public void property(java.lang.String name,
                     java.lang.String value)
Call this when a property name/value is found. e.g., given the selectors/properties: .AFDefaultFont, af|breadCrumbs::font {font-family:Arial,Helvetica; font-size:small} One property name/value pair is "font-family"/"Arial,Helvetica" If the name and value are both non-null and we are in a style rule, then a PropertyNode will be created and added to the _propertyNodeList.

Parameters:
name -
value -

atRule

public void atRule(java.lang.String atRule)
Call when you have an atRule. This will do further processing.

Parameters:
atRule - The @rule string e.g., @namespace af url(http:\\www.xxx.com); e.g., @agent gecko { .foo {color:red}}


Copyright © 2001-2011 The Apache Software Foundation. All Rights Reserved.