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/11/17 16:35:40 UTC
svn commit: r881339 - in /myfaces/tobago/trunk:
core/src/main/java/org/apache/myfaces/tobago/renderkit/
core/src/main/java/org/apache/myfaces/tobago/taglib/decl/
theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/stand...
Author: lofwyr
Date: Tue Nov 17 15:35:39 2009
New Revision: 881339
URL: http://svn.apache.org/viewvc?rev=881339&view=rev
Log:
TOBAGO-606: simplify
Added:
myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/SpacingValues.java
myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/IsGridLayoutComponentBase.java
Modified:
myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/HasSpacing.java
myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/IsGridLayoutComponent.java
myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/IsGridLayoutComponentWithDeprecatedDimension.java
myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/GridLayoutRenderer.java
myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component1.1.stg
myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component1.2.stg
Added: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/SpacingValues.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/SpacingValues.java?rev=881339&view=auto
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/SpacingValues.java (added)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/SpacingValues.java Tue Nov 17 15:35:39 2009
@@ -0,0 +1,31 @@
+package org.apache.myfaces.tobago.renderkit;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.apache.myfaces.tobago.layout.Measure;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+
+public interface SpacingValues {
+
+ public Measure getColumnSpacing(FacesContext facesContext, UIComponent component);
+
+ public Measure getRowSpacing(FacesContext facesContext, UIComponent component);
+
+}
Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/HasSpacing.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/HasSpacing.java?rev=881339&r1=881338&r2=881339&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/HasSpacing.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/HasSpacing.java Tue Nov 17 15:35:39 2009
@@ -40,9 +40,9 @@
@TagAttribute
@UIComponentTagAttribute(
type = "org.apache.myfaces.tobago.layout.Measure",
- defaultCode = "getCellspacing() != null ? getCellspacing() : "
- + "org.apache.myfaces.tobago.config.ThemeConfig.getMeasure("
- + "getFacesContext(), getRendererType(), \"columnSpacing\")")
+ defaultCode = "getCellspacing() != null\n"
+ + " ? getCellspacing()\n"
+ + " : ((SpacingValues)getRenderer(getFacesContext())).getColumnSpacing(getFacesContext(), this)")
void setColumnSpacing(String columnSpacing);
/**
@@ -51,8 +51,8 @@
@TagAttribute
@UIComponentTagAttribute(
type = "org.apache.myfaces.tobago.layout.Measure",
- defaultCode = "getCellspacing() != null ? getCellspacing() : "
- + "org.apache.myfaces.tobago.config.ThemeConfig.getMeasure("
- + "getFacesContext(), getRendererType(), \"rowSpacing\")")
+ defaultCode = "getCellspacing() != null\n"
+ + " ? getCellspacing()\n"
+ + " : ((SpacingValues)getRenderer(getFacesContext())).getRowSpacing(getFacesContext(), this)")
void setRowSpacing(String rowSpacing);
}
Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/IsGridLayoutComponent.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/IsGridLayoutComponent.java?rev=881339&r1=881338&r2=881339&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/IsGridLayoutComponent.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/IsGridLayoutComponent.java Tue Nov 17 15:35:39 2009
@@ -19,19 +19,7 @@
import org.apache.myfaces.tobago.apt.annotation.UIComponentTagAttribute;
-public interface IsGridLayoutComponent {
-
- /**
- * @param columnSpan The number of horizontal cells this component should use.
- */
- @UIComponentTagAttribute(type = "java.lang.Integer", defaultValue = "1")
- void setColumnSpan(String columnSpan);
-
- /**
- * @param rowSpan The number of vertical cells this component should use.
- */
- @UIComponentTagAttribute(type = "java.lang.Integer", defaultValue = "1")
- void setRowSpan(String rowSpan);
+public interface IsGridLayoutComponent extends IsGridLayoutComponentBase {
/**
* This value will usually be set by the layout manager.
@@ -39,8 +27,7 @@
* @param width The width for this component.
*/
@UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure",
- defaultCode = "((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)\n"
- + " getRenderer(getFacesContext())).getWidth(getFacesContext(), this)")
+ defaultCode = "((LayoutComponentRenderer)getRenderer(getFacesContext())).getWidth(getFacesContext(), this)")
void setWidth(String width);
/**
@@ -49,96 +36,7 @@
* @param height The height for this component.
*/
@UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure",
- defaultCode = "((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)\n"
- + " getRenderer(getFacesContext())).getHeight(getFacesContext(), this)")
+ defaultCode = "((LayoutComponentRenderer)getRenderer(getFacesContext())).getHeight(getFacesContext(), this)")
void setHeight(String height);
- /**
- * @param minimumWidth The minimum width for this component.
- */
- @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure",
- defaultCode = "((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)\n"
- + " getRenderer(getFacesContext())).getMinimumWidth(getFacesContext(), this)")
- void setMinimumWidth(String minimumWidth);
-
- /**
- * @param minimumHeight The minimum height for this component.
- */
- @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure",
- defaultCode = "((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)\n"
- + "getRenderer(getFacesContext())).getMinimumHeight(getFacesContext(), this)")
- void setMinimumHeight(String minimumHeight);
-
- /**
- * @param preferredWidth The preferred width for this component.
- */
- @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure",
- defaultCode = "((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)\n"
- + "getRenderer(getFacesContext())).getPreferredWidth(getFacesContext(), this)")
- void setPreferredWidth(String preferredWidth);
-
- /**
- * @param preferredHeight The preferred height for this component.
- */
- @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure",
- defaultCode = "((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)\n"
- + "getRenderer(getFacesContext())).getPreferredHeight(getFacesContext(), this)")
- void setPreferredHeight(String preferredHeight);
-
- /**
- * @param maximumWidth The maximum width for this component.
- */
- @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure",
- defaultCode = "((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)\n"
- + "getRenderer(getFacesContext())).getMaximumWidth(getFacesContext(), this)")
- void setMaximumWidth(String maximumWidth);
-
- /**
- * @param maximumHeight The maximum height for this component.
- */
- @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure",
- defaultCode = "((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)\n"
- + "getRenderer(getFacesContext())).getMaximumHeight(getFacesContext(), this)")
- void setMaximumHeight(String maximumHeight);
-
- /**
- * This value will usually be set by the layout manager.
- *
- * @param left The left position value for this component.
- */
- @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure")
- void setLeft(String left);
-
- /**
- * This value will usually be set by the layout manager.
- *
- * @param top The top position value for this component.
- */
- @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure")
- void setTop(String top);
-
- /**
- * This attribute is for internal use only.
- *
- * @param horizontalIndex The index of the component inside its container grid in horizontal direction.
- */
- @UIComponentTagAttribute(type = "java.lang.Integer")
- void setHorizontalIndex(String horizontalIndex);
-
- /**
- * This attribute is for internal use only.
- *
- * @param verticalIndex The index of the component inside its container grid in vertical direction.
- */
- @UIComponentTagAttribute(type = "java.lang.Integer")
- void setVerticalIndex(String verticalIndex);
-
- /**
- * This attribute is for internal use only.
- *
- * @param display Indicates the renderer to render the element as block or inline.
- */
- @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Display")
- void setDisplay(String display);
-
}
Added: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/IsGridLayoutComponentBase.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/IsGridLayoutComponentBase.java?rev=881339&view=auto
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/IsGridLayoutComponentBase.java (added)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/IsGridLayoutComponentBase.java Tue Nov 17 15:35:39 2009
@@ -0,0 +1,128 @@
+package org.apache.myfaces.tobago.taglib.decl;
+
+import org.apache.myfaces.tobago.apt.annotation.UIComponentTagAttribute;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @deprecated This class should not be used directly, please use IsGridLayoutComponent.
+ */
+@Deprecated
+public interface IsGridLayoutComponentBase {
+
+ /**
+ * @param columnSpan The number of horizontal cells this component should use.
+ */
+ @UIComponentTagAttribute(type = "java.lang.Integer", defaultValue = "1")
+ void setColumnSpan(String columnSpan);
+
+ /**
+ * @param rowSpan The number of vertical cells this component should use.
+ */
+ @UIComponentTagAttribute(type = "java.lang.Integer", defaultValue = "1")
+ void setRowSpan(String rowSpan);
+
+ /**
+ * @param minimumWidth The minimum width for this component.
+ */
+ @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure",
+ defaultCode = "((LayoutComponentRenderer)"
+ + "getRenderer(getFacesContext())).getMinimumWidth(getFacesContext(), this)")
+ void setMinimumWidth(String minimumWidth);
+
+ /**
+ * @param minimumHeight The minimum height for this component.
+ */
+ @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure",
+ defaultCode = "((LayoutComponentRenderer)"
+ + "getRenderer(getFacesContext())).getMinimumHeight(getFacesContext(), this)")
+ void setMinimumHeight(String minimumHeight);
+
+ /**
+ * @param preferredWidth The preferred width for this component.
+ */
+ @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure",
+ defaultCode = "((LayoutComponentRenderer)"
+ + "getRenderer(getFacesContext())).getPreferredWidth(getFacesContext(), this)")
+ void setPreferredWidth(String preferredWidth);
+
+ /**
+ * @param preferredHeight The preferred height for this component.
+ */
+ @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure",
+ defaultCode = "((LayoutComponentRenderer)"
+ + "getRenderer(getFacesContext())).getPreferredHeight(getFacesContext(), this)")
+ void setPreferredHeight(String preferredHeight);
+
+ /**
+ * @param maximumWidth The maximum width for this component.
+ */
+ @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure",
+ defaultCode = "((LayoutComponentRenderer)"
+ + "getRenderer(getFacesContext())).getMaximumWidth(getFacesContext(), this)")
+ void setMaximumWidth(String maximumWidth);
+
+ /**
+ * @param maximumHeight The maximum height for this component.
+ */
+ @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure",
+ defaultCode = "((LayoutComponentRenderer)"
+ + "getRenderer(getFacesContext())).getMaximumHeight(getFacesContext(), this)")
+ void setMaximumHeight(String maximumHeight);
+
+ /**
+ * This value will usually be set by the layout manager.
+ *
+ * @param left The left position value for this component.
+ */
+ @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure")
+ void setLeft(String left);
+
+ /**
+ * This value will usually be set by the layout manager.
+ *
+ * @param top The top position value for this component.
+ */
+ @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure")
+ void setTop(String top);
+
+ /**
+ * This attribute is for internal use only.
+ *
+ * @param horizontalIndex The index of the component inside its container grid in horizontal direction.
+ */
+ @UIComponentTagAttribute(type = "java.lang.Integer")
+ void setHorizontalIndex(String horizontalIndex);
+
+ /**
+ * This attribute is for internal use only.
+ *
+ * @param verticalIndex The index of the component inside its container grid in vertical direction.
+ */
+ @UIComponentTagAttribute(type = "java.lang.Integer")
+ void setVerticalIndex(String verticalIndex);
+
+ /**
+ * This attribute is for internal use only.
+ *
+ * @param display Indicates the renderer to render the element as block or inline.
+ */
+ @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Display")
+ void setDisplay(String display);
+
+}
Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/IsGridLayoutComponentWithDeprecatedDimension.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/IsGridLayoutComponentWithDeprecatedDimension.java?rev=881339&r1=881338&r2=881339&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/IsGridLayoutComponentWithDeprecatedDimension.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/IsGridLayoutComponentWithDeprecatedDimension.java Tue Nov 17 15:35:39 2009
@@ -20,8 +20,6 @@
import org.apache.myfaces.tobago.apt.annotation.TagAttribute;
import org.apache.myfaces.tobago.apt.annotation.UIComponentTagAttribute;
-// XXX optimize: smarter code generator
-
/**
* This interface is useful for migration. The width and height attributes can be set
* in Tobago 1.0. With this interface it can be set for compatibility.
@@ -29,19 +27,7 @@
* @see IsGridLayoutComponent
*/
@Deprecated
-public interface IsGridLayoutComponentWithDeprecatedDimension {
-
- /**
- * @param columnSpan The number of horizontal cells this component should use.
- */
- @UIComponentTagAttribute(type = "java.lang.Integer", defaultValue = "1")
- void setColumnSpan(String columnSpan);
-
- /**
- * @param rowSpan The number of vertical cells this component should use.
- */
- @UIComponentTagAttribute(type = "java.lang.Integer", defaultValue = "1")
- void setRowSpan(String rowSpan);
+public interface IsGridLayoutComponentWithDeprecatedDimension extends IsGridLayoutComponentBase {
/**
* This value will usually be set by the layout manager.
@@ -50,8 +36,7 @@
*/
@TagAttribute
@UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure",
- defaultCode = "((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)\n"
- + " getRenderer(getFacesContext())).getWidth(getFacesContext(), this)")
+ defaultCode = "((LayoutComponentRenderer)getRenderer(getFacesContext())).getWidth(getFacesContext(), this)")
void setWidth(String width);
/**
@@ -61,95 +46,7 @@
*/
@TagAttribute
@UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure",
- defaultCode = "((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)\n"
- + " getRenderer(getFacesContext())).getHeight(getFacesContext(), this)")
+ defaultCode = "((LayoutComponentRenderer)getRenderer(getFacesContext())).getHeight(getFacesContext(), this)")
void setHeight(String height);
- /**
- * @param minimumWidth The minimum width for this component.
- */
- @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure",
- defaultCode = "((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)\n"
- + " getRenderer(getFacesContext())).getMinimumWidth(getFacesContext(), this)")
- void setMinimumWidth(String minimumWidth);
-
- /**
- * @param minimumHeight The minimum height for this component.
- */
- @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure",
- defaultCode = "((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)\n"
- + "getRenderer(getFacesContext())).getMinimumHeight(getFacesContext(), this)")
- void setMinimumHeight(String minimumHeight);
-
- /**
- * @param preferredWidth The preferred width for this component.
- */
- @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure",
- defaultCode = "((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)\n"
- + "getRenderer(getFacesContext())).getPreferredWidth(getFacesContext(), this)")
- void setPreferredWidth(String preferredWidth);
-
- /**
- * @param preferredHeight The preferred height for this component.
- */
- @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure",
- defaultCode = "((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)\n"
- + "getRenderer(getFacesContext())).getPreferredHeight(getFacesContext(), this)")
- void setPreferredHeight(String preferredHeight);
-
- /**
- * @param maximumWidth The maximum width for this component.
- */
- @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure",
- defaultCode = "((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)\n"
- + "getRenderer(getFacesContext())).getMaximumWidth(getFacesContext(), this)")
- void setMaximumWidth(String maximumWidth);
-
- /**
- * @param maximumHeight The maximum height for this component.
- */
- @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure",
- defaultCode = "((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)\n"
- + "getRenderer(getFacesContext())).getMaximumHeight(getFacesContext(), this)")
- void setMaximumHeight(String maximumHeight);
-
- /**
- * This value will usually be set by the layout manager.
- *
- * @param left The left position value for this component.
- */
- @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure")
- void setLeft(String left);
-
- /**
- * This value will usually be set by the layout manager.
- *
- * @param top The top position value for this component.
- */
- @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure")
- void setTop(String top);
-
- /**
- * This attribute is for internal use only.
- *
- * @param horizontalIndex The index of the component inside its container grid in horizontal direction.
- */
- @UIComponentTagAttribute(type = "java.lang.Integer")
- void setHorizontalIndex(String horizontalIndex);
-
- /**
- * This attribute is for internal use only.
- *
- * @param verticalIndex The index of the component inside its container grid in vertical direction.
- */
- @UIComponentTagAttribute(type = "java.lang.Integer")
- void setVerticalIndex(String verticalIndex);
-
- /**
- * This attribute is for internal use only.
- *
- * @param display Indicates the renderer to render the element as block or inline.
- */
- @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Display")
- void setDisplay(String display);
}
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=881339&r1=881338&r2=881339&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 Tue Nov 17 15:35:39 2009
@@ -19,8 +19,12 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.apache.myfaces.tobago.component.Attributes;
import org.apache.myfaces.tobago.component.UIGridLayout;
+import org.apache.myfaces.tobago.config.ThemeConfig;
+import org.apache.myfaces.tobago.layout.Measure;
import org.apache.myfaces.tobago.renderkit.RendererBase;
+import org.apache.myfaces.tobago.renderkit.SpacingValues;
import org.apache.myfaces.tobago.renderkit.html.HtmlConstants;
import org.apache.myfaces.tobago.renderkit.html.util.HtmlRendererUtils;
import org.apache.myfaces.tobago.renderkit.util.RenderUtil;
@@ -30,7 +34,7 @@
import javax.faces.context.FacesContext;
import java.io.IOException;
-public class GridLayoutRenderer extends RendererBase {
+public class GridLayoutRenderer extends RendererBase implements SpacingValues {
private static final Log LOG = LogFactory.getLog(GridLayoutRenderer.class);
@@ -55,4 +59,12 @@
writer.endElement(HtmlConstants.DIV);
}
+ public Measure getColumnSpacing(FacesContext facesContext, UIComponent component) {
+ return ThemeConfig.getMeasure(facesContext, component.getRendererType(), Attributes.COLUMN_SPACING);
+ }
+
+ public Measure getRowSpacing(FacesContext facesContext, UIComponent component) {
+ return ThemeConfig.getMeasure(facesContext, component.getRendererType(), Attributes.ROW_SPACING);
+ }
+
}
Modified: myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component1.1.stg
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component1.1.stg?rev=881339&r1=881338&r2=881339&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component1.1.stg (original)
+++ myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component1.1.stg Tue Nov 17 15:35:39 2009
@@ -41,7 +41,10 @@
<componentInfo.imports:import(); separator="\n">
import org.apache.commons.lang.ArrayUtils;
+import org.apache.myfaces.tobago.config.ThemeConfig;
import org.apache.myfaces.tobago.layout.PixelMeasure;
+import org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer;
+import org.apache.myfaces.tobago.renderkit.SpacingValues;
import java.util.ArrayList;
import java.util.List;
import javax.faces.FacesMessage;
Modified: myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component1.2.stg
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component1.2.stg?rev=881339&r1=881338&r2=881339&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component1.2.stg (original)
+++ myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component1.2.stg Tue Nov 17 15:35:39 2009
@@ -44,6 +44,9 @@
import org.apache.myfaces.tobago.component.MethodBindingToMethodExpression;
import org.apache.myfaces.tobago.component.MethodExpressionToMethodBinding;
import org.apache.myfaces.tobago.layout.PixelMeasure;
+import org.apache.myfaces.tobago.config.ThemeConfig;
+import org.apache.myfaces.tobago.renderkit.SpacingValues;
+import org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer;
import javax.el.ELException;
import javax.faces.FacesException;
import java.util.ArrayList;