myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jwald...@apache.org
Subject svn commit: r770843 [2/2] - in /myfaces/trinidad/branches/1.2.11.3-branch: ./ trinidad-api/src/main/java/org/apache/myfaces/trinidad/context/ trinidad-api/src/main/java/org/apache/myfaces/trinidad/style/ trinidad-examples/trinidad-demo/src/main/webapp/...
Date Sat, 02 May 2009 01:58:46 GMT
Modified: myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/util/CSSGenerationUtils.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/util/CSSGenerationUtils.java?rev=770843&r1=770842&r2=770843&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/util/CSSGenerationUtils.java
(original)
+++ myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/util/CSSGenerationUtils.java
Fri May  1 22:26:23 2009
@@ -117,6 +117,9 @@
     // pass to find matching StyleNodes.
     String[] propertyStrings = new String[styles.length];
 
+    // at this point the styles StyleNode[] can contain both Styles with
+    // non-null selector or non-null name(aka alias). We only generate
+    // the styles where getSelector is non-null.
     for (int i = 0; i < styles.length; i++)
     {
       StyleNode style = styles[i];
@@ -192,7 +195,7 @@
         // one will be needed.
         // TODO: figure out why we write both the uncompressed & compressed styles for
styles
         // without a '|' character, shouldn't the uncompressed be enough on its own? This
results
-        // in some ugly code here
+        // in some ugly code here.
         int stylesToBeWritten = 0;
         String[] selectors = new String[matchingStyles.length];
         String[] mappedSelectors = new String[matchingStyles.length];
@@ -204,9 +207,9 @@
           // We should always have a selector at this point
           assert (selectors[j] != null);
 
-          mappedSelectors[j] = _getMappedSelector(afSelectorMap,
-                                                     namespacePrefixArray,
-                                                     selectors[j]);
+          mappedSelectors[j] = getMappedSelector(afSelectorMap,
+                                                 namespacePrefixArray,
+                                                 selectors[j]);
 
           if (compressStyles && (mappedSelectors[j].indexOf('|') == -1))
           {
@@ -243,7 +246,7 @@
           if (!compressStyles || (mappedSelectors[j].indexOf('|') == -1))
           {
             validFullNameSelector =
-              _getValidFullNameSelector(mappedSelectors[j], namespacePrefixArray);
+              getValidFullNameSelector(mappedSelectors[j], namespacePrefixArray);
 
             if (validFullNameSelector != null)
             {
@@ -253,45 +256,18 @@
           }
 
 
-          // shorten all the css-2 style class selectors (those that start with
-          // '.' and don't have a namespace prefix in it)
-          // and return the shortened string.
-          // e.g., selector of '.OraBulletedList A' is shortened to '.xj A'
-          // e.g., selector of af|inputText::content is not shortened since
-          // it has no css-2 style class selector piece that starts with '.'.
-          // e.g., selector of af|foo.Bar will shorten the '.Bar' piece
-          // af|foo.xz
-          // e.g., .Foo:hover -> .x0:hover
+
           if (compressStyles)
           {
-            String shortSelector = _getShortSelector(mappedSelectors[j],
-                                                     shortStyleClassMap);
-
-            if (shortSelector == null)
-              shortSelector = mappedSelectors[j];
-
-            // run it through a shortener one more time to shorten any
-            // of the af component selectors.
-            // e.g., 'af|menuPath' is shortened to '.x11'
-
-            if (_hasNamespacePrefix(shortSelector, namespacePrefixArray))
-            {
-              String[] shortSelectorArray  = _splitStringByWhitespace(shortSelector);
-
-              shortSelector =
-                _getMappedNSSelector(shortStyleClassMap,
-                                     namespacePrefixArray,
-                                     shortSelector,
-                                     shortSelectorArray,
-                                     true);
-            }
+            String shortSelector = 
+              getShortSelector(shortStyleClassMap, namespacePrefixArray, mappedSelectors[j]);
 
             // if the transformed full name is different than the shortSelector
             // then write out the shortSelector, too.
             if (shortSelector != null)
             {
               String validShortSelector =
-                _getValidFullNameSelector(shortSelector, namespacePrefixArray);
+                getValidFullNameSelector(shortSelector, namespacePrefixArray);
 
               // if we wrote out a full style, check to see if we need to write out the short,
too.
               // if it is something different, write out the short, too.
@@ -364,6 +340,51 @@
   }
 
   /**
+   * Shorten (compress) the selector.
+   * @param shortStyleClassMap
+   * @param namespacePrefixArray
+   * @param selector
+   * @return the shortened selector, or selector if nothing could be shortened.
+   */
+  public static String getShortSelector(
+    Map<String, String> shortStyleClassMap,
+    String[]            namespacePrefixArray,
+    String              selector)
+  {
+    // shorten all the css-2 style class selectors (those that start with
+    // '.' and don't have a namespace prefix in it)
+    // and return the shortened string.
+    // e.g., selector of '.OraBulletedList A' is shortened to '.xj A'
+    // e.g., selector of af|inputText::content is not shortened since
+    // it has no css-2 style class selector piece that starts with '.'.
+    // e.g., selector of af|foo.Bar will shorten the '.Bar' piece
+    // af|foo.xz
+    // e.g., .Foo:hover -> .x0:hover
+    String shortSelector = _getShortNonNamespacedSelector(selector,
+                                             shortStyleClassMap);
+
+    if (shortSelector == null)
+      shortSelector = selector;
+
+    // run it through a shortener one more time to shorten any
+    // of the af component selectors.
+    // e.g., 'af|menuPath' is shortened to '.x11'
+
+    if (_hasNamespacePrefix(shortSelector, namespacePrefixArray))
+    {
+      String[] shortSelectorArray  = _splitStringByWhitespace(shortSelector);
+
+      shortSelector =
+        _getMappedNSSelector(shortStyleClassMap,
+                             namespacePrefixArray,
+                             shortSelector,
+                             shortSelectorArray,
+                             true);
+    }
+    return shortSelector;
+  }
+
+  /**
    * Tests whether the specified selector is a single style class
    * selector. A single style class selector is something like
    * ".AFInstructionText". Examples that are not single style class
@@ -646,7 +667,7 @@
   // there is a short version. does not shorten styles that start with the
   // namespace
   // returns null if it can't shorten the selector
-  private static String _getShortSelector(
+  private static String _getShortNonNamespacedSelector(
     String              selector,
     Map<String, String> shortStyleClassMap)
   {
@@ -742,6 +763,7 @@
     // return the original selector if this isn't shorter.
     return isShorter ? buffer.toString() : selector;
   }
+  
   /**
    * Runs a selector through a map. It returns the selector unchanged (except for converted
    * pseudo-classes) if there is no namespace in the selector.
@@ -753,16 +775,17 @@
    * We call this method first with the public->internal map, and then
    * to shorten it.
    * Only the pieces of the selector that start with the namespace are mapped.
-   * @param map         if shortenPass is true, then this map shortens the
-   *                    af| selector. else, it maps the public af| selector
-   *                    to the internal selector.
-   * @param namespace   most likely, "af|". The selectors with this namespace
-   *                    are the ones we map.
+   * @param afSelectorMap if shortenPass is true, then this map shortens the
+   *                 af| selector. else, it maps the public af| selector
+   *                 to the internal selector (a selector that is closer to what is written
to the
+*                    CSS file. 
+*                    e.g., af|inputText:error::content becomes 
+*                    af|inputText.p_AFError af|inputText::content
+   * @param namespacePrefixArray   most likely, "af|". The selectors with this namespace
+   *                               are the ones we map.
    * @param selector    selector to map.
-   * @param shorten     if true, then we'll add the "." to the mapped selector.
-   * @return            the selector, mapped.
    */
-  private static String _getMappedSelector (
+  public static String getMappedSelector (
     Map<String, String> afSelectorMap,
     String[]            namespacePrefixArray,
     String              selector)
@@ -1101,7 +1124,7 @@
    * @param selector
    * @return
    */
-  private static String _getValidFullNameSelector(
+  public static String getValidFullNameSelector(
     String selector,
     String[] namespacePrefixArray)
   {

Modified: myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/util/CSSUtils.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/util/CSSUtils.java?rev=770843&r1=770842&r2=770843&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/util/CSSUtils.java
(original)
+++ myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/util/CSSUtils.java
Fri May  1 22:26:23 2009
@@ -32,9 +32,10 @@
 
 import org.apache.myfaces.trinidad.logging.TrinidadLogger;
 import org.apache.myfaces.trinidad.util.ArrayMap;
+import org.apache.myfaces.trinidad.style.Style;
 import org.apache.myfaces.trinidadinternal.style.CSSStyle;
+import org.apache.myfaces.trinidadinternal.style.CoreStyle;
 import org.apache.myfaces.trinidadinternal.style.PropertyParseException;
-import org.apache.myfaces.trinidadinternal.style.Style;
 import org.apache.myfaces.trinidadinternal.util.LRUCache;
 
 /**
@@ -454,10 +455,10 @@
     value = value.toLowerCase();
 
     if (_NORMAL_STYLE.equals(value))
-      return Style.PLAIN_FONT_STYLE;
+      return CoreStyle.PLAIN_FONT_STYLE;
 
     if (_ITALIC_STYLE.equals(value) || _OBLIQUE_STYLE.equals(value))
-      return Style.ITALIC_FONT_STYLE;
+      return CoreStyle.ITALIC_FONT_STYLE;
 
     throw new PropertyParseException(_INVALID_FONT_STYLE + value);
   }
@@ -484,10 +485,10 @@
     value = value.toLowerCase();
 
     if (_NORMAL_WEIGHT.equals(value) || _LIGHTER_WEIGHT.equals(value))
-      return Style.PLAIN_FONT_WEIGHT;
+      return CoreStyle.PLAIN_FONT_WEIGHT;
 
     if (_BOLD_WEIGHT.equals(value) || _BOLDER_WEIGHT.equals(value))
-      return Style.BOLD_FONT_WEIGHT;
+      return CoreStyle.BOLD_FONT_WEIGHT;
 
     // Check for sizes 100 - 900
     try
@@ -496,9 +497,9 @@
       if ((weight >= 100) && (weight <= 900) && ((weight % 100) ==
0))
       {
         if (weight >= 600)
-          return Style.BOLD_FONT_WEIGHT;
+          return CoreStyle.BOLD_FONT_WEIGHT;
 
-        return Style.PLAIN_FONT_WEIGHT;
+        return CoreStyle.PLAIN_FONT_WEIGHT;
       }
     }
     catch (NumberFormatException e)

Modified: myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/xml/parse/StyleSheetNode.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/xml/parse/StyleSheetNode.java?rev=770843&r1=770842&r2=770843&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/xml/parse/StyleSheetNode.java
(original)
+++ myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/xml/parse/StyleSheetNode.java
Fri May  1 22:26:23 2009
@@ -583,6 +583,10 @@
   private final Set<Locale>     _locales;    // The locale variants
   private final int             _direction;  // The reading direction
   // The browsers mapped to their versions (multiple versions for browser supported)
+  // The Integer value is the APPLICATION value in TrinidadAgent, like if 
+  // Integer is 3, it is APPLICATION_GECKO.
+  // TODO It would be clearer to make the Integer an Enum, and to make the
+  // Application constants an enum.
   private final Map<Integer, Set<Version>>    _agentVersions;
   private final Set<Integer>    _platforms;  // The platform variants
   private final int             _mode;       // The mode

Modified: myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/BaseLafRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/BaseLafRenderer.java?rev=770843&r1=770842&r2=770843&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/BaseLafRenderer.java
(original)
+++ myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/BaseLafRenderer.java
Fri May  1 22:26:23 2009
@@ -976,8 +976,12 @@
           UIXRenderingContext context
           )
   {
-    return (getAgentCapability(context, TrinidadAgent.CAP_STYLE_ATTRIBUTES) ==
-            TrinidadAgent.STYLES_EXTERNAL );
+    // STYLES_INTERNAL means that internal styles are supported, like the
+    // <style> element. This means that class attributes may be supported.
+    return ((getAgentCapability(context, TrinidadAgent.CAP_STYLE_ATTRIBUTES) ==
+            TrinidadAgent.STYLES_EXTERNAL) || 
+           (getAgentCapability(context, TrinidadAgent.CAP_STYLE_ATTRIBUTES) ==
+                TrinidadAgent.STYLES_INTERNAL));
   }
 
 

Modified: myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/BaseLafUtils.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/BaseLafUtils.java?rev=770843&r1=770842&r2=770843&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/BaseLafUtils.java
(original)
+++ myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/BaseLafUtils.java
Fri May  1 22:26:23 2009
@@ -32,6 +32,7 @@
 import javax.faces.context.ExternalContext;
 
 import org.apache.myfaces.trinidad.logging.TrinidadLogger;
+import org.apache.myfaces.trinidad.style.Style;
 import org.apache.myfaces.trinidad.util.ClassLoaderUtils;
 
 import org.apache.myfaces.trinidadinternal.share.config.Configuration;
@@ -39,9 +40,8 @@
 import org.apache.myfaces.trinidadinternal.share.url.EncoderUtils;
 import org.apache.myfaces.trinidadinternal.share.util.FastMessageFormat;
 import org.apache.myfaces.trinidadinternal.style.PropertyParseException;
-import org.apache.myfaces.trinidadinternal.style.Style;
+import org.apache.myfaces.trinidadinternal.style.CoreStyle;
 import org.apache.myfaces.trinidadinternal.style.StyleContext;
-import org.apache.myfaces.trinidadinternal.style.StyleMap;
 import org.apache.myfaces.trinidadinternal.ui.AttributeKey;
 import org.apache.myfaces.trinidadinternal.ui.MutableUINode;
 import org.apache.myfaces.trinidadinternal.ui.UIXRenderingContext;
@@ -901,7 +901,7 @@
   public static void pushStyleAttrs(
     UIXRenderingContext context,
     String           styleClass,
-    Style            inlineStyle
+    CoreStyle            inlineStyle
     )
   {
     _getStyleStack(context).push(styleClass, inlineStyle);
@@ -969,7 +969,7 @@
     // Push style attributes onto the stack
     public void push(
       String styleClass,
-      Style  inlineStyle
+      CoreStyle  inlineStyle
       )
     {
       // It really seems like it would be more efficient to
@@ -1044,6 +1044,7 @@
       // style, check the style class
       if ((background == null) && (entry.styleClass != null))
       {
+        /** =-=jmw removed StyleMap
         // We need to look up the style class in the style map
         StyleMap map = context.getStyleContext().getStyleMap();
         if (map != null)
@@ -1051,8 +1052,10 @@
           StyleContext styleContext = context.getStyleContext();
           Style style = map.getStyleByClass(styleContext, entry.styleClass);
 
-          background = _getBackground(style);
+          background = _getBackground((CoreStyle)style);
+         
         }
+         */
       }
 
 
@@ -1066,13 +1069,13 @@
     }
 
     // Gets the background color from a Style object
-    private static Color _getBackground(Style style)
+    private static Color _getBackground(CoreStyle style)
     {
       if (style != null)
       {
         try
         {
-          return (Color)style.getParsedProperty(Style.BACKGROUND_KEY);
+          return (Color)style.getParsedProperty(CoreStyle.BACKGROUND_KEY);
         }
         catch (PropertyParseException e)
         {
@@ -1089,11 +1092,11 @@
     private static class Entry
     {
       public final String styleClass;
-      public final Style  inlineStyle;
+      public final CoreStyle  inlineStyle;
       public       Color  background;
       public       Entry  next;
 
-      public Entry(String styleClass, Style inlineStyle, Entry next)
+      public Entry(String styleClass, CoreStyle inlineStyle, Entry next)
       {
         this.styleClass = styleClass;
         this.inlineStyle = inlineStyle;

Modified: myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/Icon.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/Icon.java?rev=770843&r1=770842&r2=770843&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/Icon.java
(original)
+++ myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/Icon.java
Fri May  1 22:26:23 2009
@@ -20,7 +20,7 @@
 
 import org.apache.myfaces.trinidadinternal.share.io.NameResolver;
 
-import org.apache.myfaces.trinidadinternal.style.Style;
+import org.apache.myfaces.trinidadinternal.style.CoreStyle;
 import org.apache.myfaces.trinidadinternal.ui.laf.LookAndFeel;
 
 /**
@@ -90,7 +90,7 @@
     boolean            isSymmetric,
     boolean            isTransparent,
     String             styleClass,
-    Style              inlineStyle
+    CoreStyle              inlineStyle
   )
   {
     this(gifName, isCoreColor, isSymmetric, isTransparent);
@@ -183,7 +183,7 @@
   /**
    * Returns the inline style
    */
-  public Style getInlineStyle()
+  public CoreStyle getInlineStyle()
   {
     return _inlineStyle;
   }
@@ -202,5 +202,5 @@
   private boolean _isTransparent;
 
   private String _styleClass;
-  private Style  _inlineStyle;
+  private CoreStyle  _inlineStyle;
 }

Modified: myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/desktop/ButtonRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/desktop/ButtonRenderer.java?rev=770843&r1=770842&r2=770843&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/desktop/ButtonRenderer.java
(original)
+++ myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/desktop/ButtonRenderer.java
Fri May  1 22:26:23 2009
@@ -33,7 +33,7 @@
 import org.apache.myfaces.trinidadinternal.image.ImageProviderResponse;
 import org.apache.myfaces.trinidadinternal.image.cache.CompositeButtonKey;
 import org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.SkinSelectors;
-import org.apache.myfaces.trinidadinternal.style.Style;
+import org.apache.myfaces.trinidadinternal.style.CoreStyle;
 import org.apache.myfaces.trinidadinternal.style.util.CSSUtils;
 import org.apache.myfaces.trinidadinternal.style.util.FontProxy;
 import org.apache.myfaces.trinidadinternal.style.util.MutableFontProxy;
@@ -433,9 +433,9 @@
       getBooleanAttributeValue(context, node, _END_ROUNDED_ATTR, true);
     Object name = getImageName(context, node);
     String styleName = getServerStyleName(context, node, disabled);
-    Style style = getStyle(context, node, styleName);
+    CoreStyle style = getStyle(context, node, styleName);
 
-    Style inlineStyle;
+    CoreStyle inlineStyle;
     Object inlineStyleObj = getInlineStyle(context, node);
     if (inlineStyleObj == null)
       inlineStyle = null;

Modified: myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/desktop/GeneratedImageRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/desktop/GeneratedImageRenderer.java?rev=770843&r1=770842&r2=770843&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/desktop/GeneratedImageRenderer.java
(original)
+++ myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/desktop/GeneratedImageRenderer.java
Fri May  1 22:26:23 2009
@@ -35,8 +35,7 @@
 
 import org.apache.myfaces.trinidadinternal.style.ParsedPropertyKey;
 import org.apache.myfaces.trinidadinternal.style.PropertyParseException;
-import org.apache.myfaces.trinidadinternal.style.Style;
-import org.apache.myfaces.trinidadinternal.style.StyleMap;
+import org.apache.myfaces.trinidadinternal.style.CoreStyle;
 
 import org.apache.myfaces.trinidadinternal.image.ImageConstants;
 import org.apache.myfaces.trinidadinternal.image.ImageProviderResponse;
@@ -48,6 +47,7 @@
 
 /**
  * Base class for Renderers that generate images.
+ * This class needs to be deleted. Trinidad does not generate images.
  *
  * @version $Name:  $ ($Revision: adfrt/faces/adf-faces-impl/src/main/java/oracle/adfinternal/view/faces/ui/laf/oracle/desktop/TecateRenderer.java#1
$) $Date: 11-nov-2005.14:59:38 $
  * @deprecated This class comes from the old Java 1.2 UIX codebase and should not be used
anymore.
@@ -314,20 +314,13 @@
   }
 
   // Returns the style for the specified name
-  static protected Style getStyle(
+  static protected CoreStyle getStyle(
     UIXRenderingContext context,
     UINode           node,
     String           name
     )
   {
-    if (name == null)
       return null;
-
-    StyleMap map = context.getStyleContext().getStyleMap();
-    if (map == null)
-      return null;
-
-    return map.getStyleByName(context.getStyleContext(), name);
   }
 
   // Returns the vertical alignment
@@ -339,8 +332,8 @@
   static protected int getFontStyle(
     UIXRenderingContext context,
     UINode node,
-    Style classStyle,
-    Style inlineStyle,
+    CoreStyle classStyle,
+    CoreStyle inlineStyle,
     String styleName
     )
   {
@@ -353,7 +346,7 @@
     // First, try getting font-style and font-weight from inline style
     if (inlineStyle != null)
     {
-      value = _parseValue(inlineStyle, null, Style.FONT_STYLE_KEY);
+      value = _parseValue(inlineStyle, null, CoreStyle.FONT_STYLE_KEY);
 
       if (value != null)
       {
@@ -361,7 +354,7 @@
         gotStyle = true;
       }
 
-      value = _parseValue(inlineStyle, null, Style.FONT_WEIGHT_KEY);
+      value = _parseValue(inlineStyle, null, CoreStyle.FONT_WEIGHT_KEY);
       if (value != null)
       {
         fontWeight = _getAWTFontWeight(value);
@@ -374,8 +367,7 @@
       if (!gotStyle)
       {
         value = _parseValue(classStyle,
-                            styleName,
-                            Style.FONT_STYLE_KEY);
+                            styleName, CoreStyle.FONT_STYLE_KEY);
         if (value != null)
           fontStyle = _getAWTFontStyle(value);
       }
@@ -383,8 +375,7 @@
       if (!gotWeight)
       {
         value = _parseValue(classStyle,
-                            styleName,
-                            Style.FONT_WEIGHT_KEY);
+                            styleName, CoreStyle.FONT_WEIGHT_KEY);
 
         if (value != null)
           fontWeight = _getAWTFontWeight(value);
@@ -397,8 +388,8 @@
   static protected int getFontSize(
     UIXRenderingContext context,
     UINode node,
-    Style classStyle,
-    Style inlineStyle,
+    CoreStyle classStyle,
+    CoreStyle inlineStyle,
     String styleName
     )
   {
@@ -406,8 +397,7 @@
     if (inlineStyle != null)
     {
       Object value = _parseValue(inlineStyle,
-                                 null,
-                                 Style.FONT_SIZE_KEY);
+                                 null, CoreStyle.FONT_SIZE_KEY);
 
       if (value instanceof Integer)
         return ((Integer)value).intValue();
@@ -416,8 +406,7 @@
     if (styleName != null)
     {
       Object value = _parseValue(classStyle,
-                                 styleName,
-                                 Style.FONT_SIZE_KEY);
+                                 styleName, CoreStyle.FONT_SIZE_KEY);
 
       if (value instanceof Integer)
         return ((Integer)value).intValue();
@@ -430,20 +419,20 @@
   static protected Collection<Object> getFontFamilies(
     UIXRenderingContext context,
     UINode node,
-    Style  style,
+    CoreStyle  style,
     String styleName
     )
   {
     if (style != null)
     {
-      if(_parseValue(style, null, Style.FONT_FAMILIES_KEY) instanceof Collection)
+      if(_parseValue(style, null, CoreStyle.FONT_FAMILIES_KEY) instanceof Collection)
       {
-        return  (Collection<Object>)_parseValue(style, null, Style.FONT_FAMILIES_KEY);
+        return  (Collection<Object>)_parseValue(style, null, CoreStyle.FONT_FAMILIES_KEY);
       }
       else
       {
         Collection<Object> parsedValueList = new ArrayList<Object>();
-        parsedValueList.add(_parseValue(style, null, Style.FONT_FAMILIES_KEY));
+        parsedValueList.add(_parseValue(style, null, CoreStyle.FONT_FAMILIES_KEY));
         return  parsedValueList;
       }
     }
@@ -454,45 +443,43 @@
   static protected Color getBackground(
     UIXRenderingContext context,
     UINode node,
-    Style classStyle,
-    Style inlineStyle,
+    CoreStyle classStyle,
+    CoreStyle inlineStyle,
     String styleName
     )
   {
     if (inlineStyle != null)
     {
       Color background = (Color)_parseValue(inlineStyle,
-                                            null,
-                                            Style.BACKGROUND_KEY);
+                                            null, CoreStyle.BACKGROUND_KEY);
       if (background != null)
         return background;
 
     }
 
     return (Color)
-      _parseValue(classStyle, styleName, Style.BACKGROUND_KEY);
+      _parseValue(classStyle, styleName, CoreStyle.BACKGROUND_KEY);
   }
 
   static protected Color getForeground(
     UIXRenderingContext context,
     UINode node,
-    Style classStyle,
-    Style inlineStyle,
+    CoreStyle classStyle,
+    CoreStyle inlineStyle,
     String styleName
     )
   {
     if (inlineStyle != null)
     {
       Color foreground = (Color)_parseValue(inlineStyle,
-                                            null,
-                                            Style.FOREGROUND_KEY);
+                                            null, CoreStyle.FOREGROUND_KEY);
       if (foreground != null)
         return foreground;
 
     }
 
     return (Color)
-      _parseValue(classStyle, styleName, Style.FOREGROUND_KEY);
+      _parseValue(classStyle, styleName, CoreStyle.FOREGROUND_KEY);
   }
 
   static protected Color getSurroundingColor(UIXRenderingContext context)
@@ -506,19 +493,19 @@
   static protected boolean isTextAntialiased(
     UIXRenderingContext context,
     UINode node,
-    Style classStyle,
-    Style inlineStyle
+    CoreStyle classStyle,
+    CoreStyle inlineStyle
     )
   {
     if (inlineStyle != null)
     {
-      Object value = inlineStyle.getParsedProperty(Style.TEXT_ANTIALIAS_KEY);
+      Object value = inlineStyle.getParsedProperty(CoreStyle.TEXT_ANTIALIAS_KEY);
       return Boolean.TRUE.equals(value);
     }
 
     if (classStyle != null)
     {
-      Object value = classStyle.getParsedProperty(Style.TEXT_ANTIALIAS_KEY);
+      Object value = classStyle.getParsedProperty(CoreStyle.TEXT_ANTIALIAS_KEY);
       return Boolean.TRUE.equals(value);
     }
 
@@ -526,7 +513,7 @@
   }
 
   static private Object _parseValue(
-    Style style,
+    CoreStyle style,
     String styleName,
     ParsedPropertyKey key
     )
@@ -554,7 +541,7 @@
 
   static private int _getAWTFontStyle(Object style)
   {
-    if (style == Style.ITALIC_FONT_STYLE)
+    if (style == CoreStyle.ITALIC_FONT_STYLE)
       return Font.ITALIC;
 
     return Font.PLAIN;
@@ -562,7 +549,7 @@
 
   static private int _getAWTFontWeight(Object weight)
   {
-    if (weight == Style.BOLD_FONT_WEIGHT)
+    if (weight == CoreStyle.BOLD_FONT_WEIGHT)
       return Font.BOLD;
 
     return Font.PLAIN;

Modified: myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/desktop/GlobalHeaderRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/desktop/GlobalHeaderRenderer.java?rev=770843&r1=770842&r2=770843&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/desktop/GlobalHeaderRenderer.java
(original)
+++ myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/desktop/GlobalHeaderRenderer.java
Fri May  1 22:26:23 2009
@@ -23,17 +23,17 @@
 import javax.faces.context.ResponseWriter;
 
 import org.apache.myfaces.trinidad.component.UIXNavigationLevel;
-import org.apache.myfaces.trinidadinternal.style.Style;
 import org.apache.myfaces.trinidadinternal.ui.UIXRenderingContext;
 import org.apache.myfaces.trinidadinternal.ui.UINode;
 import org.apache.myfaces.trinidadinternal.ui.laf.base.xhtml.LinkUtils;
 import org.apache.myfaces.trinidadinternal.ui.laf.base.xhtml.XhtmlLafUtils;
 import org.apache.myfaces.trinidad.skin.Icon;
+import org.apache.myfaces.trinidad.style.Style;
 
 /**
- * GlobalHeader Renderer for the desktop implementation of the 
+ * GlobalHeader Renderer for the desktop implementation of the
  * Base Look And Feel.
- * 
+ *
  * The base.desktop.GlobalHeaderRenderer exposes a single customizable
  * icon:
  * <ul>
@@ -325,11 +325,11 @@
     }
     else if (isIE(context))
     {
-      Style style = XhtmlLafUtils.getClassStyle(context, 
-                                                AF_MENU_BAR_STYLE_CLASS);
+      Style style =XhtmlLafUtils.getClassStyle(context, 
+                                              AF_MENU_BAR_STYLE_CLASS);
       if (style != null)
       {
-        String minHeight = style.getProperty("min-height");
+        String minHeight = style.getProperties().get("min-height");
         renderSpacer(context, null, minHeight);
       }
     }

Modified: myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/desktop/TabBarRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/desktop/TabBarRenderer.java?rev=770843&r1=770842&r2=770843&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/desktop/TabBarRenderer.java
(original)
+++ myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/desktop/TabBarRenderer.java
Fri May  1 22:26:23 2009
@@ -20,14 +20,14 @@
 
 import java.io.IOException;
 
+
 import javax.faces.context.ResponseWriter;
 
 import org.apache.myfaces.trinidad.component.UIXHierarchy;
 import org.apache.myfaces.trinidad.component.UIXNavigationLevel;
 
-import org.apache.myfaces.trinidadinternal.style.Style;
-import org.apache.myfaces.trinidadinternal.style.StyleContext;
-import org.apache.myfaces.trinidadinternal.style.StyleMap;
+import org.apache.myfaces.trinidad.style.Style;
+import org.apache.myfaces.trinidad.style.Styles;
 import org.apache.myfaces.trinidadinternal.ui.UIXRenderingContext;
 import org.apache.myfaces.trinidadinternal.ui.UINode;
 import org.apache.myfaces.trinidadinternal.ui.laf.base.xhtml.LinkUtils;
@@ -398,16 +398,14 @@
     // is defined
     boolean doRenderSep = false;
 
-    StyleMap styleMap = context.getStyleContext().getStyleMap();
-    if (styleMap != null)
+    Styles styles = context.getStyleContext().getStyles();
+    if (styles != null)
     {
-      StyleContext styleContext = context.getStyleContext();
-      Style style = styleMap.getStyleByClass(styleContext,
-                                             AF_MENU_TABS_SEPARATOR_STYLE_CLASS);
+      Style style = styles.getSelectorStyleMap().get(AF_MENU_TABS_SEPARATOR_STYLE_CLASS);
 
       if (style != null)
       {
-        String width = style.getProperty("width");
+        String width = style.getProperties().get("width");
 
         // As an optimization, we do not render the tabBar
         // separator if the af|menuTabs::separator's width is 0px.

Modified: myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/pda/GlobalHeaderRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/pda/GlobalHeaderRenderer.java?rev=770843&r1=770842&r2=770843&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/pda/GlobalHeaderRenderer.java
(original)
+++ myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/pda/GlobalHeaderRenderer.java
Fri May  1 22:26:23 2009
@@ -25,7 +25,8 @@
 import org.apache.myfaces.trinidad.component.UIXHierarchy;
 import org.apache.myfaces.trinidad.component.UIXNavigationLevel;
 
-import org.apache.myfaces.trinidadinternal.style.Style;
+import org.apache.myfaces.trinidad.style.Style;
+import org.apache.myfaces.trinidadinternal.style.CoreStyle;
 import org.apache.myfaces.trinidadinternal.ui.UIXRenderingContext;
 import org.apache.myfaces.trinidadinternal.ui.UINode;
 import org.apache.myfaces.trinidadinternal.ui.laf.base.desktop.BaseDesktopConstants;
@@ -157,10 +158,11 @@
       if (classStyle != null)
       {
         ResponseWriter writer = context.getResponseWriter();
+        
 
         // write the cell's background color property
         writer.writeAttribute("bgcolor",
-                              classStyle.getProperty("background-color"), null);
+                              classStyle.getProperties().get("background-color"), null);
       }
     }
     else

Modified: myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/pda/TabBarRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/pda/TabBarRenderer.java?rev=770843&r1=770842&r2=770843&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/pda/TabBarRenderer.java
(original)
+++ myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/pda/TabBarRenderer.java
Fri May  1 22:26:23 2009
@@ -25,7 +25,8 @@
 import org.apache.myfaces.trinidad.component.UIXHierarchy;
 import org.apache.myfaces.trinidad.component.UIXNavigationLevel;
 
-import org.apache.myfaces.trinidadinternal.style.Style;
+import org.apache.myfaces.trinidad.style.Style;
+import org.apache.myfaces.trinidadinternal.style.CoreStyle;
 import org.apache.myfaces.trinidadinternal.ui.UIXRenderingContext;
 import org.apache.myfaces.trinidadinternal.ui.UINode;
 import org.apache.myfaces.trinidadinternal.ui.laf.base.desktop.BaseDesktopConstants;
@@ -76,7 +77,7 @@
 
         // write the cell's background color property
         writer.writeAttribute("bgcolor",
-                              classStyle.getProperty("background-color"), null);
+                              classStyle.getProperties().get("background-color"), null);
       }
     }
     else

Modified: myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/AccentedLafIconProvider.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/AccentedLafIconProvider.java?rev=770843&r1=770842&r2=770843&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/AccentedLafIconProvider.java
(original)
+++ myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/AccentedLafIconProvider.java
Fri May  1 22:26:23 2009
@@ -32,10 +32,6 @@
 import org.apache.myfaces.trinidadinternal.image.ImageProviderRequest;
 import org.apache.myfaces.trinidadinternal.image.ImageProviderResponse;
 
-import org.apache.myfaces.trinidadinternal.style.PropertyParseException;
-import org.apache.myfaces.trinidadinternal.style.Style;
-import org.apache.myfaces.trinidadinternal.style.StyleMap;
-
 import org.apache.myfaces.trinidadinternal.ui.UIXRenderingContext;
 import org.apache.myfaces.trinidadinternal.ui.UIConstants;
 
@@ -259,18 +255,19 @@
     if (color != null)
       return color;
 
+    /***
     // If the color hasn't been stored on the RenderingContext, get it
     // from the style map.
-    StyleMap map = context.getStyleContext().getStyleMap();
+    StyleMap map =context.getStyleContext().getStyleMap();
 
     if (map != null)
     {
-      Style style = map.getStyleByClass(context.getStyleContext(), styleClass);
+      CoreStyle style = (CoreStyle)map.getStyleByClass(context.getStyleContext(), styleClass);
       if (style != null)
       {
         try
         {
-          color = (Color)style.getParsedProperty(Style.BACKGROUND_KEY);
+          color = (Color)style.getParsedProperty(CoreStyle.BACKGROUND_KEY);
         }
         catch (PropertyParseException e)
         {
@@ -279,6 +276,7 @@
         }
       }
     }
+*/
 
     if (color == null)
       color = defaultColor;

Modified: myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/XhtmlLafRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/XhtmlLafRenderer.java?rev=770843&r1=770842&r2=770843&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/XhtmlLafRenderer.java
(original)
+++ myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/XhtmlLafRenderer.java
Fri May  1 22:26:23 2009
@@ -36,10 +36,11 @@
 import org.apache.myfaces.trinidadinternal.image.ImageProviderResponse;
 import org.apache.myfaces.trinidad.context.PartialPageContext;
 import org.apache.myfaces.trinidad.context.RenderingContext;
+import org.apache.myfaces.trinidad.style.Style;
 import org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.FormRenderer;
 import org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.SkinSelectors;
 import org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.XhtmlRenderer;
-import org.apache.myfaces.trinidadinternal.style.Style;
+import org.apache.myfaces.trinidadinternal.style.CoreStyle;
 import org.apache.myfaces.trinidadinternal.ui.AttributeKey;
 import org.apache.myfaces.trinidadinternal.ui.NodeRole;
 import org.apache.myfaces.trinidadinternal.ui.NodeUtils;
@@ -493,7 +494,7 @@
         // any of the same styles as the styleClass.  This is a
         // bad assumption which may eventually break, but it makes
         // this function much, much more efficient.
-        Style inlineStyleClass = XhtmlLafUtils.getClassStyle(context,
+        CoreStyle inlineStyleClass = XhtmlLafUtils.getClassStyle(context,
                                                              styleClass);
         renderInlineStyleAttribute(context, inlineStyleClass);
 
@@ -955,7 +956,7 @@
    */
   protected final void startRenderingStyleElements(
     UIXRenderingContext context,
-    Style            inlineStyle,
+    CoreStyle            inlineStyle,
     Object           className
     ) throws IOException
   {

Modified: myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/XhtmlLafUtils.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/XhtmlLafUtils.java?rev=770843&r1=770842&r2=770843&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/XhtmlLafUtils.java
(original)
+++ myfaces/trinidad/branches/1.2.11.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/XhtmlLafUtils.java
Fri May  1 22:26:23 2009
@@ -33,6 +33,9 @@
 import org.apache.myfaces.trinidad.context.RenderingContext;
 import org.apache.myfaces.trinidad.logging.TrinidadLogger;
 import org.apache.myfaces.trinidad.skin.Icon;
+import org.apache.myfaces.trinidad.style.Selector;
+import org.apache.myfaces.trinidad.style.Style;
+import org.apache.myfaces.trinidad.style.Styles;
 import org.apache.myfaces.trinidadinternal.agent.TrinidadAgent;
 import org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.AutoSubmitUtils;
 import org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.FormRenderer;
@@ -44,8 +47,7 @@
 import org.apache.myfaces.trinidadinternal.share.data.ServletRequestParameters;
 import org.apache.myfaces.trinidadinternal.share.url.FormEncoder;
 import org.apache.myfaces.trinidadinternal.style.ParsedPropertyKey;
-import org.apache.myfaces.trinidadinternal.style.Style;
-import org.apache.myfaces.trinidadinternal.style.StyleMap;
+import org.apache.myfaces.trinidadinternal.style.CoreStyle;
 import org.apache.myfaces.trinidadinternal.style.util.StyleUtils;
 import org.apache.myfaces.trinidadinternal.ui.AttributeKey;
 import org.apache.myfaces.trinidadinternal.ui.MutableUINode;
@@ -210,18 +212,19 @@
   /**
    * Resolves the class name to the appropriate Style object
    */
-  public static Style getClassStyle(
+  public static CoreStyle getClassStyle(
     UIXRenderingContext context,
     Object           className
     )
   {
     if (className != null)
     {
-      StyleMap map = context.getStyleContext().getStyleMap();
-      if (map != null)
+      Styles styles = context.getStyleContext().getStyles();
+      if (styles != null)
       {
-        return map.getStyleByClass(context.getStyleContext(),
-                                   className.toString());
+        Map<Selector, Style> map = styles.getSelectorStyleMap();
+        if (map != null)
+          return (CoreStyle)map.get(Selector.createSelector(className.toString()));
       }
     }
 
@@ -243,7 +246,7 @@
                                        className);
       if (classStyle != null)
       {
-        return classStyle.getProperty(propertyName);
+        return classStyle.getProperties().get(propertyName);
       }
 
       return null;
@@ -375,8 +378,8 @@
    */
   public static void startRenderingStyleElements(
     UIXRenderingContext context,
-    Style            inlineStyle,
-    Style            classStyle
+    CoreStyle            inlineStyle,
+    CoreStyle            classStyle
     ) throws IOException
   {
     Stack[] styleInfo = _getStyleInfo(context);
@@ -391,19 +394,17 @@
     {
       // handle BACKGROUND_KEY
       Object fontStyle = _getParsedStyleProperty(inlineStyle,
-                                                 classStyle,
-                                                 Style.FONT_STYLE_KEY);
+                                                 classStyle, CoreStyle.FONT_STYLE_KEY);
 
-      Boolean isItalic = (Style.ITALIC_FONT_STYLE == fontStyle)
+      Boolean isItalic = (CoreStyle.ITALIC_FONT_STYLE == fontStyle)
                            ? Boolean.TRUE
                            : null;
 
 
       Object fontWeight = _getParsedStyleProperty(inlineStyle,
-                                                  classStyle,
-                                                  Style.FONT_WEIGHT_KEY);
+                                                  classStyle, CoreStyle.FONT_WEIGHT_KEY);
 
-      Boolean isBold = (Style.BOLD_FONT_WEIGHT == fontWeight)
+      Boolean isBold = (CoreStyle.BOLD_FONT_WEIGHT == fontWeight)
                          ? Boolean.TRUE
                          : null;
 
@@ -462,8 +463,7 @@
             // element
             Integer pixelSize = (Integer)_getParsedStyleProperty(
                                                inlineStyle,
-                                               classStyle,
-                                               Style.FONT_SIZE_KEY);
+                                               classStyle, CoreStyle.FONT_SIZE_KEY);
 
             if (pixelSize != null)
             {
@@ -549,8 +549,8 @@
    * Style2, if Style1 doesn't return a value.
    */
   private static Object _getParsedStyleProperty(
-    Style             style1,
-    Style             style2,
+    CoreStyle             style1,
+    CoreStyle             style2,
     ParsedPropertyKey stylePropertyKey
     )
   {
@@ -580,15 +580,18 @@
    * Style2, if Style1 doesn't return a value.
    */
   public static String getStyleProperty(
-    Style  style1,
-    Style  style2,
+    CoreStyle  style1,
+    CoreStyle  style2,
     String stylePropertyName
     )
   {
-    String value = (style1 != null)
-                     ? style1.getProperty(stylePropertyName)
-                     : null;
+    String value = null;
+    if (style1 != null)
+    {
+      value = style1.getProperties().get(stylePropertyName);
+    }
 
+    
     if (value != null)
     {
       return value;
@@ -597,7 +600,8 @@
     {
       if (style2 != null)
       {
-        return style2.getProperty(stylePropertyName);
+        
+        return style2.getProperties().get(stylePropertyName);
       }
       else
       {



Mime
View raw message