You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2009/07/16 17:22:42 UTC

svn commit: r794717 [2/2] - in /myfaces/tobago/trunk: core/src/main/java/org/apache/myfaces/tobago/component/ core/src/main/java/org/apache/myfaces/tobago/config/ core/src/main/java/org/apache/myfaces/tobago/layout/grid/ core/src/main/java/org/apache/m...

Copied: myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/spacing.xhtml (from r793477, myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/nested.xhtml)
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/spacing.xhtml?p2=myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/spacing.xhtml&p1=myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/nested.xhtml&r1=793477&r2=794717&rev=794717&view=diff
==============================================================================
--- myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/nested.xhtml (original)
+++ myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/spacing.xhtml Thu Jul 16 15:22:41 2009
@@ -7,60 +7,102 @@
     xmlns:ui="http://java.sun.com/jsf/facelets"
     xmlns:f="http://java.sun.com/jsf/core">
 
-  <tc:page id="page">
+  <!--
+  Test page for spacing:
+  1. spacing attributes
+  2. theme defaults
+  3. only columnSpacing
+  4. only rowSpacing
+  -->
+
+  <tc:page id="page" label="Spacing Test">
+    <tc:gridLayoutConstraint width="670px" height="670px"/>
     <f:facet name="layout">
-      <tc:gridLayout columns="100px;200px;*;2*" rows="*;*;*;2*"/>
+      <tc:gridLayout columns="*;*" rows="*;*" columnSpacing="50px" rowSpacing="50px"/>
     </f:facet>
-    <tc:gridLayoutConstraint width="630px" height="500px"/>
-
-    <tc:in id="x_5" value="x_5">
-      <tc:gridLayoutConstraint rowSpan="3"/>
-    </tc:in>
 
-    <tc:in id="x_6" value="x_6"/>
+    <tc:panel>
+      <f:facet name="layout">
+        <tc:gridLayout columns="*;*;*" rows="*;*;*" columnSpacing="5px" rowSpacing="5px"/>
+      </f:facet>
 
-    <tc:in id="x_13" value="x_13">
-      <tc:gridLayoutConstraint rowSpan="2"/>
-    </tc:in>
+      <tc:in id="a_NW" value="NW"/>
+      <tc:in id="a_N" value="N"/>
+      <tc:in id="a_NE" value="NE"/>
+      <tc:in id="a_W" value="W"/>
+      <tc:in id="a_C" value="C"/>
+      <tc:in id="a_E" value="E"/>
+      <tc:in id="a_SW" value="SW"/>
+      <tc:in id="a_S" value="S"/>
+      <tc:in id="a_SE" value="SE"/>
+    </tc:panel>
 
-    <tc:panel id="x_14">
-      <tc:gridLayoutConstraint rowSpan="2"/>
+    <tc:panel>
       <f:facet name="layout">
-        <tc:gridLayout columns="130px;*"/>
+        <tc:gridLayout columns="*;*;*" rows="*;*;*"/>
       </f:facet>
-      <tc:in id="x_14_a" value="x_14_a"/>
-      <tc:in id="x_14_b" value="x_14_b"/>
+
+      <tc:in id="b_NW" value="NW"/>
+      <tc:in id="b_N" value="N"/>
+      <tc:in id="b_NE" value="NE"/>
+      <tc:in id="b_W" value="W"/>
+      <tc:in id="b_C" value="C"/>
+      <tc:in id="b_E" value="E"/>
+      <tc:in id="b_SW" value="SW"/>
+      <tc:in id="b_S" value="S"/>
+      <tc:in id="b_SE" value="SE"/>
     </tc:panel>
 
-    <tc:panel id="x_7">
+    <tc:panel>
       <f:facet name="layout">
-        <tc:gridLayout columns="*;2*"/>
+        <tc:gridLayout columns="*;*" rows="*;*" columnSpacing="0px"/>
       </f:facet>
-      <tc:in id="x_7_a" value="x_7_a"/>
-      <tc:in id="x_7_b" value="x_7_b"/>
+
+      <tc:in id="c_NW" value="NW"/>
+      <tc:in id="c_NE" value="NE"/>
+      <tc:in id="c_SW" value="SW"/>
+      <tc:in id="c_SE" value="SE"/>
     </tc:panel>
 
-    <tc:panel id="x_10">
+    <tc:panel>
       <f:facet name="layout">
-        <tc:gridLayout columns="4*;*"/>
+        <tc:gridLayout columns="*;*" rows="*;*" rowSpacing="0px"/>
       </f:facet>
-      <tc:in id="x_10_a" value="x_10_a"/>
-      <tc:in id="x_10_b" value="x_10_b"/>
-    </tc:panel>
 
-    <tc:in id="x_17" value="x_17">
-      <tc:gridLayoutConstraint columnSpan="2"/>
-    </tc:in>
+      <tc:in id="d_NW" value="NW"/>
+      <tc:in id="d_NE" value="NE"/>
+      <tc:in id="d_SW" value="SW"/>
+      <tc:in id="d_SE" value="SE"/>
+    </tc:panel>
 
     <tc:script file="script/test-utils.js"/>
 
-    <tc:script onload="checkLayout('page:x_5', 0, 0, 100, 300);"/>
-    <tc:script onload="checkLayout('page:x_6', 100, 0, 200, 100);"/>
-    <tc:script onload="checkLayout('page:x_13', 300, 0, 110, 200);"/>
-    <tc:script onload="checkLayout('page:x_14', 410, 0, 220, 200);"/>
-    <tc:script onload="checkLayout('page:x_14_a', 0, 0, 130, 200);"/>
-    <tc:script onload="checkLayout('page:x_14_b', 130, 0, 90, 200);"/>
-    <!--todo: test the other controlls ...-->
+    <tc:script onload="checkLayout('page:a_NW', 0, 0, 100, 100);"/>
+    <tc:script onload="checkLayout('page:a_N', 105, 0, 100, 100);"/>
+    <tc:script onload="checkLayout('page:a_NE', 210, 0, 100, 100);"/>
+    <tc:script onload="checkLayout('page:a_W', 0, 105, 100, 100);"/>
+    <tc:script onload="checkLayout('page:a_C', 105, 105, 100, 100);"/>
+    <tc:script onload="checkLayout('page:a_E', 210, 105, 100, 100);"/>
+    <tc:script onload="checkLayout('page:a_SW', 0, 210, 100, 100);"/>
+    <tc:script onload="checkLayout('page:a_S', 105, 210, 100, 100);"/>
+    <tc:script onload="checkLayout('page:a_SE', 210, 210, 100, 100);"/>
+
+    <tc:script onload="checkLayout('page:b_NW', 360, 0, 100, 100);"/>
+    <tc:script onload="checkLayout('page:b_N', 465, 0, 100, 100);"/>
+    <tc:script onload="checkLayout('page:b_NE', 570, 0, 100, 100);"/>
+    <tc:script onload="checkLayout('page:b_W', 360, 105, 100, 100);"/>
+    <tc:script onload="checkLayout('page:b_C', 465, 105, 100, 100);"/>
+    <tc:script onload="checkLayout('page:b_E', 570, 105, 100, 100);"/>
+    <tc:script onload="checkLayout('page:b_SW', 360, 210, 100, 100);"/>
+    <tc:script onload="checkLayout('page:b_S', 465, 210, 100, 100);"/>
+    <tc:script onload="checkLayout('page:b_SE', 570, 210, 100, 100);"/>
+
+    <tc:script onload="checkLayout('page:c_NW', 0, 360, 155, 152);"/>
+    <tc:script onload="checkLayout('page:c_NE', 155, 360, 155, 153);"/>
+    <tc:script onload="checkLayout('page:c_SW', 0, 517, 155, 152);"/>
+    <tc:script onload="checkLayout('page:c_SE', 155, 517, 155, 153);"/>
+
+    <!--todo: test the other controls ...-->
 
   </tc:page>
 </f:view>

Copied: myfaces/tobago/trunk/extension/facelets/src/main/java/org/apache/myfaces/tobago/facelets/GridLayoutRule.java (from r793477, myfaces/tobago/trunk/extension/facelets/src/main/java/org/apache/myfaces/tobago/facelets/PageRule.java)
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/extension/facelets/src/main/java/org/apache/myfaces/tobago/facelets/GridLayoutRule.java?p2=myfaces/tobago/trunk/extension/facelets/src/main/java/org/apache/myfaces/tobago/facelets/GridLayoutRule.java&p1=myfaces/tobago/trunk/extension/facelets/src/main/java/org/apache/myfaces/tobago/facelets/PageRule.java&r1=793477&r2=794717&rev=794717&view=diff
==============================================================================
--- myfaces/tobago/trunk/extension/facelets/src/main/java/org/apache/myfaces/tobago/facelets/PageRule.java (original)
+++ myfaces/tobago/trunk/extension/facelets/src/main/java/org/apache/myfaces/tobago/facelets/GridLayoutRule.java Thu Jul 16 15:22:41 2009
@@ -23,68 +23,50 @@
 import com.sun.facelets.tag.MetadataTarget;
 import com.sun.facelets.tag.TagAttribute;
 import org.apache.myfaces.tobago.component.Attributes;
-import org.apache.myfaces.tobago.component.UIPage;
+import org.apache.myfaces.tobago.component.UIGridLayout;
 import org.apache.myfaces.tobago.layout.Measure;
 
-public class PageRule extends MetaRule {
-  public static final PageRule INSTANCE = new PageRule();
+public class GridLayoutRule extends MetaRule {
 
-  public Metadata applyRule(String name, TagAttribute attribute,
-      MetadataTarget metadataTarget) {
-    if (metadataTarget.isTargetInstanceOf(UIPage.class)) {
+  public static final GridLayoutRule INSTANCE = new GridLayoutRule();
+
+  public Metadata applyRule(String name, TagAttribute attribute, MetadataTarget metadataTarget) {
+    if (metadataTarget.isTargetInstanceOf(UIGridLayout.class)) {
       if (attribute.isLiteral()) {
-        if (Attributes.WIDTH.equals(name)) {
-          return new PageWidthMapper(attribute);
+        if (Attributes.COLUMN_SPACING.equals(name)) {
+          return new ColumnSpacingMapper(attribute);
         }
-        if (Attributes.HEIGHT.equals(name)) {
-          return new PageHeightMapper(attribute);
+        if (Attributes.ROW_SPACING.equals(name)) {
+          return new RowSpacingMapper(attribute);
         }
       }
     }
     return null;
   }
 
-  // TODO remove this
-/*
-  static final class PageDimensionExpression extends Metadata {
-    private final String name;
-    private final TagAttribute attr;
-    private final Class type;
-
-    PageDimensionExpression(String name, Class type, TagAttribute attr) {
-      this.name = name;
-      this.attr = attr;
-      this.type = type;
-    }
-
-    public void applyMetadata(FaceletContext ctx, Object instance) {
-      ((UIComponent) instance).setValueBinding(name, new LegacyValueBinding(attr.getValueExpression(ctx, type)));
-    }
-  }
-*/
-  static final class PageWidthMapper extends Metadata {
+  static final class ColumnSpacingMapper extends Metadata {
     private final TagAttribute attribute;
 
-    PageWidthMapper(TagAttribute attribute) {
+    ColumnSpacingMapper(TagAttribute attribute) {
       this.attribute = attribute;
     }
 
     public void applyMetadata(FaceletContext ctx, Object instance) {
-      UIPage page = (UIPage) instance;
-      page.setWidth(Measure.parse(attribute.getValue()));
+      UIGridLayout gridLayout = (UIGridLayout) instance;
+      gridLayout.setColumnSpacing(Measure.parse(attribute.getValue()));
     }
   }
 
-  static final class PageHeightMapper extends Metadata {
+  static final class RowSpacingMapper extends Metadata {
     private final TagAttribute attribute;
 
-    PageHeightMapper(TagAttribute attribute) {
+    RowSpacingMapper(TagAttribute attribute) {
       this.attribute = attribute;
     }
 
     public void applyMetadata(FaceletContext ctx, Object instance) {
-      UIPage page = (UIPage) instance;
-      page.setHeight(Measure.parse(attribute.getValue()));
+      UIGridLayout gridLayout = (UIGridLayout) instance;
+      gridLayout.setRowSpacing(Measure.parse(attribute.getValue()));
     }
   }
-}
+}
\ No newline at end of file

Modified: myfaces/tobago/trunk/extension/facelets/src/main/java/org/apache/myfaces/tobago/facelets/TobagoComponentHandler.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/extension/facelets/src/main/java/org/apache/myfaces/tobago/facelets/TobagoComponentHandler.java?rev=794717&r1=794716&r2=794717&view=diff
==============================================================================
--- myfaces/tobago/trunk/extension/facelets/src/main/java/org/apache/myfaces/tobago/facelets/TobagoComponentHandler.java (original)
+++ myfaces/tobago/trunk/extension/facelets/src/main/java/org/apache/myfaces/tobago/facelets/TobagoComponentHandler.java Thu Jul 16 15:22:41 2009
@@ -22,6 +22,7 @@
 import com.sun.facelets.tag.jsf.ComponentConfig;
 import com.sun.facelets.tag.jsf.ComponentHandler;
 import org.apache.myfaces.tobago.OnComponentCreated;
+import org.apache.myfaces.tobago.component.AbstractUIGridLayout;
 import org.apache.myfaces.tobago.component.AbstractUIPage;
 import org.apache.myfaces.tobago.component.InputSuggest;
 import org.apache.myfaces.tobago.component.SupportsMarkup;
@@ -45,6 +46,9 @@
     if (AbstractUIPage.class.isAssignableFrom(aClass)) {
       metaRuleset.addRule(PageRule.INSTANCE);
     }
+    if (AbstractUIGridLayout.class.isAssignableFrom(aClass)) {
+      metaRuleset.addRule(GridLayoutRule.INSTANCE);
+    }
     if (TabChangeSource.class.isAssignableFrom(aClass)) {
       metaRuleset.addRule(TabChangeSourceRule.INSTANCE);
     }

Modified: myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/html/sandbox/standard/tag/InputNumberSliderRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/html/sandbox/standard/tag/InputNumberSliderRenderer.java?rev=794717&r1=794716&r2=794717&view=diff
==============================================================================
--- myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/html/sandbox/standard/tag/InputNumberSliderRenderer.java (original)
+++ myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/html/sandbox/standard/tag/InputNumberSliderRenderer.java Thu Jul 16 15:22:41 2009
@@ -66,7 +66,7 @@
     int width = -1;
     int sliderWidthPerc = 33;
     if (ThemeConfig.hasValue(facesContext, component, SLIDER_WIDTH_PERCENT)) {
-      sliderWidthPerc = getConfiguredValue(facesContext, component, SLIDER_WIDTH_PERCENT);
+      sliderWidthPerc = ThemeConfig.getValue(facesContext, component, SLIDER_WIDTH_PERCENT);
       if (sliderWidthPerc <= 25) {
         sliderWidthPerc = 25;
       }

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/msie/tag/MessageRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/msie/tag/MessageRenderer.java?rev=794717&r1=794716&r2=794717&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/msie/tag/MessageRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/msie/tag/MessageRenderer.java Thu Jul 16 15:22:41 2009
@@ -25,6 +25,7 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.myfaces.tobago.component.Attributes;
+import org.apache.myfaces.tobago.config.ThemeConfig;
 import org.apache.myfaces.tobago.context.ResourceManagerUtil;
 import org.apache.myfaces.tobago.renderkit.MessageRendererBase;
 import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
@@ -65,7 +66,7 @@
     }
 
     if (count != 0) {
-      return count * getConfiguredValue(facesContext, component, "messageHeight");
+      return count * ThemeConfig.getValue(facesContext, component, "messageHeight");
     } else {
       return 1;
     }

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/BoxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/BoxRenderer.java?rev=794717&r1=794716&r2=794717&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/BoxRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/BoxRenderer.java Thu Jul 16 15:22:41 2009
@@ -25,6 +25,7 @@
 
 import org.apache.myfaces.tobago.component.Attributes;
 import org.apache.myfaces.tobago.component.Facets;
+import org.apache.myfaces.tobago.config.ThemeConfig;
 import org.apache.myfaces.tobago.context.ClientProperties;
 import org.apache.myfaces.tobago.renderkit.BoxRendererBase;
 import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
@@ -52,7 +53,7 @@
         = (String) component.getAttributes().get(Attributes.LABEL);
     UIPanel toolbar = (UIPanel) component.getFacet(Facets.TOOL_BAR);
     if (toolbar != null) {
-      final int padding = getConfiguredValue(facesContext, component, "paddingTopWhenToolbar");
+      final int padding = ThemeConfig.getValue(facesContext, component, "paddingTopWhenToolbar");
       HtmlRendererUtil.replaceStyleAttribute(component, getAttrStyleKey(), "padding-top", padding);
       HtmlRendererUtil.replaceStyleAttribute(component, getAttrStyleKey(), "padding-bottom", 0);
     }
@@ -119,7 +120,6 @@
   }
 
   private int getExtraPadding(FacesContext facesContext, UIComponent component) {
-    return getConfiguredValue(facesContext, component,
-        "extraPaddingHeightWhenToolbar");
+    return ThemeConfig.getValue(facesContext, component, "extraPaddingHeightWhenToolbar");
   }
 }

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ButtonRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ButtonRenderer.java?rev=794717&r1=794716&r2=794717&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ButtonRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ButtonRenderer.java Thu Jul 16 15:22:41 2009
@@ -27,6 +27,7 @@
 import org.apache.myfaces.tobago.component.AbstractUICommand;
 import org.apache.myfaces.tobago.component.Attributes;
 import org.apache.myfaces.tobago.component.UIButtonCommand;
+import org.apache.myfaces.tobago.config.ThemeConfig;
 import org.apache.myfaces.tobago.renderkit.CommandRendererBase;
 import org.apache.myfaces.tobago.renderkit.LabelWithAccessKey;
 import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
@@ -142,14 +143,14 @@
     int width = 0;
     String imageName = (String) component.getAttributes().get(Attributes.IMAGE);
     if (imageName != null) {
-      width = getConfiguredValue(facesContext, component, "imageWidth");
+      width = ThemeConfig.getValue(facesContext, component, "imageWidth");
     }
     LabelWithAccessKey label = new LabelWithAccessKey(component);
 
     if (label.getText() != null) {
       width += RenderUtil.calculateStringWidth(facesContext, component, label.getText());
     }
-    int padding = getConfiguredValue(facesContext, component, "paddingWidth");
+    int padding = ThemeConfig.getValue(facesContext, component, "paddingWidth");
     width += 2 * padding;
     if (imageName != null && label.getText() != null) {
       width += padding;

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/DatePickerRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/DatePickerRenderer.java?rev=794717&r1=794716&r2=794717&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/DatePickerRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/DatePickerRenderer.java Thu Jul 16 15:22:41 2009
@@ -185,7 +185,7 @@
 
 
   public void prepareRender(FacesContext facesContext, UIComponent component) throws IOException {
-    component.getAttributes().put(Attributes.LAYOUT_WIDTH, getConfiguredValue(facesContext, component, "pickerWidth"));
+    component.getAttributes().put(Attributes.LAYOUT_WIDTH, ThemeConfig.getValue(facesContext, component, "pickerWidth"));
     if (facesContext instanceof TobagoFacesContext) {
       UIPopup popup = (UIPopup) component.getFacets().get(Facets.PICKER_POPUP);
       if (popup != null) {

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/GridLayoutRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/GridLayoutRenderer.java?rev=794717&r1=794716&r2=794717&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/GridLayoutRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/GridLayoutRenderer.java Thu Jul 16 15:22:41 2009
@@ -30,6 +30,7 @@
 import org.apache.myfaces.tobago.component.UICell;
 import org.apache.myfaces.tobago.component.UIGridLayout;
 import org.apache.myfaces.tobago.component.UILayout;
+import org.apache.myfaces.tobago.config.ThemeConfig;
 import org.apache.myfaces.tobago.layout.FixedLayoutToken;
 import org.apache.myfaces.tobago.layout.HideLayoutToken;
 import org.apache.myfaces.tobago.layout.LayoutToken;
@@ -506,7 +507,7 @@
         // ignore and return defaut value
       }
     }
-    return getConfiguredValue(facesContext,  component, "cellSpacing");
+    return ThemeConfig.getValue(facesContext, component, "cellSpacing");
   }
 
   public void layoutEnd(FacesContext facesContext, UIComponent component) {
@@ -536,7 +537,7 @@
     if (innerWidth != null && innerWidth.intValue() != -1) {
       int value = innerWidth.intValue();
       if (needVerticalScroolbar) {
-        value -= getConfiguredValue(facesContext, component, "scrollbarWidth");
+        value -= ThemeConfig.getValue(facesContext, component, "scrollbarWidth");
         HtmlRendererUtil.replaceStyleAttribute(layout, "width", value);
       }
       layoutWidth(Integer.valueOf(value), layout, facesContext);

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/MessageRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/MessageRenderer.java?rev=794717&r1=794716&r2=794717&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/MessageRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/MessageRenderer.java Thu Jul 16 15:22:41 2009
@@ -25,6 +25,7 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.myfaces.tobago.component.Attributes;
+import org.apache.myfaces.tobago.config.ThemeConfig;
 import org.apache.myfaces.tobago.renderkit.MessageRendererBase;
 import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
 import org.apache.myfaces.tobago.renderkit.html.HtmlConstants;
@@ -62,7 +63,7 @@
     if (LOG.isDebugEnabled()) {
       LOG.debug("here are " + count + " messages");
     }
-    return count * getConfiguredValue(facesContext, component, "messageHeight");
+    return count * ThemeConfig.getValue(facesContext, component, "messageHeight");
   }
 
   public void encodeEnd(FacesContext facesContext,

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/MessagesRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/MessagesRenderer.java?rev=794717&r1=794716&r2=794717&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/MessagesRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/MessagesRenderer.java Thu Jul 16 15:22:41 2009
@@ -37,6 +37,7 @@
 import org.apache.myfaces.tobago.component.UIMessages;
 import org.apache.myfaces.tobago.component.UIPanel;
 import org.apache.myfaces.tobago.component.UIPopup;
+import org.apache.myfaces.tobago.config.ThemeConfig;
 import org.apache.myfaces.tobago.context.ResourceManagerUtil;
 import org.apache.myfaces.tobago.context.TobagoFacesContext;
 import org.apache.myfaces.tobago.layout.PixelMeasure;
@@ -73,8 +74,8 @@
       LOG.debug("here are " + count + " messages");
     }
     return (count > 0)
-        ? count * getConfiguredValue(facesContext, component, "messageHeight")
-        : getConfiguredValue(facesContext, component, "fixedHeight");
+        ? count * ThemeConfig.getValue(facesContext, component, "messageHeight")
+        : ThemeConfig.getValue(facesContext, component, "fixedHeight");
   }
 
   @Override

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectManyListboxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectManyListboxRenderer.java?rev=794717&r1=794716&r2=794717&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectManyListboxRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectManyListboxRenderer.java Thu Jul 16 15:22:41 2009
@@ -26,6 +26,7 @@
 import org.apache.commons.logging.LogFactory;
 import org.apache.myfaces.tobago.component.Attributes;
 import org.apache.myfaces.tobago.component.UISelectManyListbox;
+import org.apache.myfaces.tobago.config.ThemeConfig;
 import org.apache.myfaces.tobago.renderkit.SelectManyRendererBase;
 import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
 import org.apache.myfaces.tobago.renderkit.html.HtmlConstants;
@@ -54,7 +55,7 @@
   }
 
   public int getLabelWidth(FacesContext facesContext, UIComponent component) {
-    return getConfiguredValue(facesContext, component, "labelWidth");
+    return ThemeConfig.getValue(facesContext, component, "labelWidth");
   }
 
   public int getFixedHeight(FacesContext facesContext, UIComponent component) {

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SheetRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SheetRenderer.java?rev=794717&r1=794716&r2=794717&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SheetRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SheetRenderer.java Thu Jul 16 15:22:41 2009
@@ -39,6 +39,7 @@
 import org.apache.myfaces.tobago.component.UIMenu;
 import org.apache.myfaces.tobago.component.UIMenuCommand;
 import org.apache.myfaces.tobago.component.UIReload;
+import org.apache.myfaces.tobago.config.ThemeConfig;
 import org.apache.myfaces.tobago.config.TobagoConfig;
 import org.apache.myfaces.tobago.context.ResourceManager;
 import org.apache.myfaces.tobago.context.ResourceManagerFactory;
@@ -659,12 +660,12 @@
   }
 
   private int getRowPadding(FacesContext facesContext, UIComponent component) {
-    return getConfiguredValue(facesContext, component, "rowPadding");
+    return ThemeConfig.getValue(facesContext, component, "rowPadding");
   }
 
   public int getScrollbarWidth(FacesContext facesContext,
       UIComponent component) {
-    return getConfiguredValue(facesContext, component, "scrollbarWidth");
+    return ThemeConfig.getValue(facesContext, component, "scrollbarWidth");
   }
 
   private void storeFooterHeight(FacesContext facesContext,
@@ -679,7 +680,7 @@
         || isValidPagingAttribute((UIData) component, Attributes.SHOW_PAGE_RANGE)
         || isValidPagingAttribute((UIData) component, Attributes.SHOW_DIRECT_LINKS)) {
       footerHeight =
-          getConfiguredValue(facesContext, component, "footerHeight");
+          ThemeConfig.getValue(facesContext, component, "footerHeight");
     } else {
       footerHeight = 0;
     }
@@ -710,7 +711,7 @@
 
   private int getAscendingMarkerWidth(FacesContext facesContext,
       UIComponent component) {
-    return getConfiguredValue(facesContext, component, "ascendingMarkerWidth");
+    return ThemeConfig.getValue(facesContext, component, "ascendingMarkerWidth");
   }
 
   public boolean getRendersChildren() {
@@ -1085,7 +1086,7 @@
   }
 
   public int getContentBorder(FacesContext facesContext, UIData data) {
-    return getConfiguredValue(facesContext, data, "contentBorder");
+    return ThemeConfig.getValue(facesContext, data, "contentBorder");
   }
 
   public void encodeAjax(FacesContext facesContext, UIComponent component)
@@ -1129,7 +1130,7 @@
     int headerHeight = getHeaderHeight(facesContext, component);
     int footerHeight = getFooterHeight(facesContext, component);
 
-    int rowHeight = getConfiguredValue(facesContext, component, "rowHeight");
+    int rowHeight = ThemeConfig.getValue(facesContext, component, "rowHeight");
 
     int rows = data.getRows();
 
@@ -1282,7 +1283,7 @@
          if (!(column instanceof UIColumnSelector)) {
            if (column.getChildCount() == 1) {
              UIComponent child = (UIComponent) column.getChildren().get(0);
-             int cellPaddingWidth = getConfiguredValue(facesContext, data, "cellPaddingWidth");
+             int cellPaddingWidth = ThemeConfig.getValue(facesContext, data, "cellPaddingWidth");
              child.getAttributes().put(
                  Attributes.LAYOUT_WIDTH, width - cellPaddingWidth);
              child.getAttributes().remove(Attributes.INNER_WIDTH);

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TabGroupRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TabGroupRenderer.java?rev=794717&r1=794716&r2=794717&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TabGroupRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TabGroupRenderer.java Thu Jul 16 15:22:41 2009
@@ -36,6 +36,7 @@
 import static org.apache.myfaces.tobago.component.UITabGroup.SWITCH_TYPE_CLIENT;
 import static org.apache.myfaces.tobago.component.UITabGroup.SWITCH_TYPE_RELOAD_TAB;
 import org.apache.myfaces.tobago.component.UIToolBar;
+import org.apache.myfaces.tobago.config.ThemeConfig;
 import org.apache.myfaces.tobago.config.TobagoConfig;
 import org.apache.myfaces.tobago.context.ResourceManagerUtil;
 import org.apache.myfaces.tobago.context.TobagoFacesContext;
@@ -136,7 +137,7 @@
     int virtualTab = 0;
     int currentWidth = 0;
 
-    int navigationBarWidth = getConfiguredValue(facesContext, component, "navigationBarWidth");
+    int navigationBarWidth = ThemeConfig.getValue(facesContext, component, "navigationBarWidth");
     for (UIComponent tab : (List<UIComponent>) component.getChildren()) {
       if (tab instanceof UIPanelBase) {
         if (tab.isRendered()) {
@@ -191,7 +192,7 @@
   private TabList getTabList(FacesContext facesContext, UITabGroup component) {
     TabList tabs = new TabList();
     int index = 0;
-    int tabLabelExtraWidth = getConfiguredValue(facesContext, component, "tabLabelExtraWidth");
+    int tabLabelExtraWidth = ThemeConfig.getValue(facesContext, component, "tabLabelExtraWidth");
 
     boolean first = true;
     for (UIComponent child : (List<UIComponent>) component.getChildren()) {
@@ -533,7 +534,7 @@
         (UITabGroup) component, index,
         (HtmlStyleMap) component.getAttributes().get(Attributes.STYLE), SWITCH_TYPE_RELOAD_TAB,
         ResourceManagerUtil.getImageWithPath(context, "image/1x1.gif"),
-        getConfiguredValue(context, component, "navigationBarWidth"), currentWidth, tabList);
+        ThemeConfig.getValue(context, component, "navigationBarWidth"), currentWidth, tabList);
   }
 
   public int getFixedHeight(FacesContext facesContext, UIComponent uiComponent) {
@@ -553,8 +554,8 @@
               = Math.max(fixedHeight, renderer.getFixedHeight(facesContext, tab));
         }
       }
-      fixedHeight += getConfiguredValue(facesContext, component, "headerHeight");
-      fixedHeight += getConfiguredValue(facesContext, component, "paddingHeight");
+      fixedHeight += ThemeConfig.getValue(facesContext, component, "headerHeight");
+      fixedHeight += ThemeConfig.getValue(facesContext, component, "paddingHeight");
     }
     return fixedHeight;
   }

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TabRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TabRenderer.java?rev=794717&r1=794716&r2=794717&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TabRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TabRenderer.java Thu Jul 16 15:22:41 2009
@@ -25,6 +25,7 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.myfaces.tobago.component.Attributes;
+import org.apache.myfaces.tobago.config.ThemeConfig;
 import org.apache.myfaces.tobago.renderkit.LayoutableRendererBase;
 import org.apache.myfaces.tobago.util.ComponentUtil;
 
@@ -42,7 +43,7 @@
 
     if (height == -1) {
       height = PanelRenderer.getFixedHeightForPanel(component, facesContext);
-      height += getConfiguredValue(facesContext, component, "paddingHeight");
+      height += ThemeConfig.getValue(facesContext, component, "paddingHeight");
     }
     return height;
   }

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ToolBarRendererBase.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ToolBarRendererBase.java?rev=794717&r1=794716&r2=794717&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ToolBarRendererBase.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ToolBarRendererBase.java Thu Jul 16 15:22:41 2009
@@ -30,6 +30,7 @@
 import org.apache.myfaces.tobago.component.UISelectBooleanCommand;
 import org.apache.myfaces.tobago.component.UISelectOneCommand;
 import org.apache.myfaces.tobago.component.UIToolBar;
+import org.apache.myfaces.tobago.config.ThemeConfig;
 import org.apache.myfaces.tobago.context.ResourceManager;
 import org.apache.myfaces.tobago.context.ResourceManagerFactory;
 import org.apache.myfaces.tobago.context.ResourceManagerUtil;
@@ -483,7 +484,7 @@
     final String labelPosition = getLabelPosition(component);
     final String iconSize = getIconSize(component);
     final String key = iconSize + "_" + labelPosition + "_Height";
-    return getConfiguredValue(facesContext, component, key);
+    return ThemeConfig.getValue(facesContext, component, key);
   }
 
   public void encodeChildren(FacesContext facesContext, UIComponent component)

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/property/tobago-theme-config.properties
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/property/tobago-theme-config.properties?rev=794717&r1=794716&r2=794717&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/property/tobago-theme-config.properties (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/property/tobago-theme-config.properties Thu Jul 16 15:22:41 2009
@@ -38,7 +38,10 @@
 
 DatePicker.fixedWidth=16
 
+#deprecated
 GridLayout.cellSpacing=5
+GridLayout.columnSpacing=5
+GridLayout.rowSpacing=5
 
 Box.paddingWidth=0
 Box.paddingHeight=31