org.apache.myfaces.trinidadinternal.style.xml.parse
Class StyleSheetNode

java.lang.Object
  extended by org.apache.myfaces.trinidadinternal.style.xml.parse.StyleSheetNode

public class StyleSheetNode
extends java.lang.Object

Private implementation of StyleSheetNode. A StyleSheetNode has StyleNodes for particular browsers, direction, versions, platforms and mode. In addition, the StyleSheetNode provides access to IconNodes representing the icons which were defined within the context of this style sheet. StyleSheetNodes are contained in StyleSheetDocuments. And a StyleSheetNode is created for .css files. .css skin files create StyleSheetNodes via SkinStyleSheetParserUtils

Version:
$Name: $ ($Revision: adfrt/faces/adf-faces-impl/src/main/java/oracle/adfinternal/view/faces/style/xml/parse/StyleSheetNode.java#0 $) $Date: 10-nov-2005.18:58:46 $
See Also:
SkinStyleSheetParserUtils

Constructor Summary
StyleSheetNode(StyleNode[] styles, java.util.Collection<IconNode> icons, java.util.Set<java.util.Locale> locales, int direction, AgentAtRuleMatcher agentMatcher, int[] platforms, int mode, java.util.Set<java.lang.String> accessibilityProperties)
          Creates a StyleSheetNode with the specified attributes.
 
Method Summary
 int compareVariants(java.util.Locale locale, int direction, TrinidadAgent agent, int mode, org.apache.myfaces.trinidad.context.AccessibilityProfile accessibilityProfile)
          Tests whether this StyleSheet matches the specified variants.
 boolean equals(java.lang.Object obj)
           
 java.util.Collection<java.lang.String> getAccessibilityProperties()
          Returns the accessibility properties for this StyleSheetNode.
 AgentAtRuleMatcher getAgentMatcher()
           
 java.util.Collection<IconNode> getIcons()
          Returns icons contained by this StyleSheetNode.
 java.util.Collection<java.util.Locale> getLocales()
          Implementation of StyleSheetNode.getLocales().
 int getMode()
           
 java.util.Collection<java.lang.Integer> getPlatforms()
          Implementation of StyleSheetNode.getPlatforms().
 int getReadingDirection()
          Implementation of StyleSheetNode.getReadingDirection();
 java.util.Collection<StyleNode> getStyles()
          Implementation of StyleSheetNode.getStyles().
 int getStyleSheetId()
          Returns an int-based id which can be used by StyleSheetDocument.getDocumentId() to (semi-)uniquely identify this StyleSheetNode.
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StyleSheetNode

public StyleSheetNode(StyleNode[] styles,
                      java.util.Collection<IconNode> icons,
                      java.util.Set<java.util.Locale> locales,
                      int direction,
                      AgentAtRuleMatcher agentMatcher,
                      int[] platforms,
                      int mode,
                      java.util.Set<java.lang.String> accessibilityProperties)
Creates a StyleSheetNode with the specified attributes.

Method Detail

getStyles

public java.util.Collection<StyleNode> getStyles()
Implementation of StyleSheetNode.getStyles().


getIcons

public java.util.Collection<IconNode> getIcons()
Returns icons contained by this StyleSheetNode.


getReadingDirection

public int getReadingDirection()
Implementation of StyleSheetNode.getReadingDirection();


getMode

public int getMode()

getLocales

public java.util.Collection<java.util.Locale> getLocales()
Implementation of StyleSheetNode.getLocales().


getAgentMatcher

public AgentAtRuleMatcher getAgentMatcher()
Returns:
AgentAtRuleMatcher for matching @agent selectors

getPlatforms

public java.util.Collection<java.lang.Integer> getPlatforms()
Implementation of StyleSheetNode.getPlatforms().


getAccessibilityProperties

public java.util.Collection<java.lang.String> getAccessibilityProperties()
Returns the accessibility properties for this StyleSheetNode.


compareVariants

public int compareVariants(java.util.Locale locale,
                           int direction,
                           TrinidadAgent agent,
                           int mode,
                           org.apache.myfaces.trinidad.context.AccessibilityProfile accessibilityProfile)
Tests whether this StyleSheet matches the specified variants. Returns a number indicating the specificity of the match. Zero means there is no match. Larger numbers indicate better matches. The value returned by compareVariants is used to sort style sheets according to precedence.

Parameters:
mode -

equals

public final boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public final int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getStyleSheetId

public int getStyleSheetId()
Returns an int-based id which can be used by StyleSheetDocument.getDocumentId() to (semi-)uniquely identify this StyleSheetNode. This id is very similar to a hash code, though is not exactly the same, as some StyleSheetNode properties (such as icons) are intentionally excluded from the style sheet id.

Returns:
An integer value suitable for use by StyleSheetDocument.getDocumentId().


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