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/10/01 15:39:43 UTC

svn commit: r820654 - in /myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl: IsGridLayoutComponent.java IsGridLayoutComponentWithDeprecatedDimension.java

Author: lofwyr
Date: Thu Oct  1 13:39:43 2009
New Revision: 820654

URL: http://svn.apache.org/viewvc?rev=820654&view=rev
Log:
TOBAGO-606: Layout-Manager
 - simplify generated code for getter of the layout contraints

Modified:
    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

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=820654&r1=820653&r2=820654&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 Thu Oct  1 13:39:43 2009
@@ -39,13 +39,8 @@
    * @param width The width for this component.
    */
   @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure",
-      defaultCode = "(getRenderer(getFacesContext()) instanceof "
-          + "org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)\n"
-          + "        ? ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer) "
-          + "getRenderer(getFacesContext()))\n"
-          + "        .getWidth(getFacesContext(), this)\n"
-          + "        : org.apache.myfaces.tobago.config.ThemeConfig.getMeasure("
-          + "getFacesContext(), this, \"width\")")
+      defaultCode = "((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)\n"
+          + "      getRenderer(getFacesContext())).getWidth(getFacesContext(), this)")
   void setWidth(String width);
 
   /**
@@ -54,91 +49,56 @@
    * @param height The height for this component.
    */
   @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure",
-      defaultCode = "(getRenderer(getFacesContext()) instanceof "
-          + "org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)\n"
-          + "        ? ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer) "
-          + "getRenderer(getFacesContext()))\n"
-          + "        .getHeight(getFacesContext(), this)\n"
-          + "        : org.apache.myfaces.tobago.config.ThemeConfig.getMeasure("
-          + "getFacesContext(), this, \"height\")")
+      defaultCode = "((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)\n"
+          + "      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 = "(getRenderer(getFacesContext()) instanceof "
-          + "org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)\n"
-          + "        ? ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer) "
-          + "getRenderer(getFacesContext()))\n"
-          + "        .getMinimumWidth(getFacesContext(), this)\n"
-          + "        : org.apache.myfaces.tobago.config.ThemeConfig.getMeasure("
-          + "getFacesContext(), this, \"minimumWidth\")")
+      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 = "(getRenderer(getFacesContext()) instanceof "
-          + "org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)\n"
-          + "        ? ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer) "
-          + "getRenderer(getFacesContext()))\n"
-          + "        .getMinimumHeight(getFacesContext(), this)\n"
-          + "        : org.apache.myfaces.tobago.config.ThemeConfig.getMeasure("
-          + "getFacesContext(), this, \"minimumHeight\")")
+      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 = "(getRenderer(getFacesContext()) instanceof "
-          + "org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)\n"
-          + "        ? ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer) "
-          + "getRenderer(getFacesContext()))\n"
-          + "        .getPreferredWidth(getFacesContext(), this)\n"
-          + "        : org.apache.myfaces.tobago.config.ThemeConfig.getMeasure("
-          + "getFacesContext(), this, \"preferredWidth\")")
+      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 = "(getRenderer(getFacesContext()) instanceof "
-          + "org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)\n"
-          + "        ? ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer) "
-          + "getRenderer(getFacesContext()))\n"
-          + "        .getPreferredHeight(getFacesContext(), this)\n"
-          + "        : org.apache.myfaces.tobago.config.ThemeConfig.getMeasure("
-          + "getFacesContext(), this, \"preferredHeight\")")
+      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 = "(getRenderer(getFacesContext()) instanceof "
-          + "org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)\n"
-          + "        ? ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer) "
-          + "getRenderer(getFacesContext()))\n"
-          + "        .getMaximumWidth(getFacesContext(), this)\n"
-          + "        : org.apache.myfaces.tobago.config.ThemeConfig.getMeasure("
-          + "getFacesContext(), this, \"maximumWidth\")")
+      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 = "(getRenderer(getFacesContext()) instanceof "
-          + "org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)\n"
-          + "        ? ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer) "
-          + "getRenderer(getFacesContext()))\n"
-          + "        .getMaximumHeight(getFacesContext(), this)\n"
-          + "        : org.apache.myfaces.tobago.config.ThemeConfig.getMeasure("
-          + "getFacesContext(), this, \"maximumHeight\")")
+      defaultCode = "((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)\n"
+          + "getRenderer(getFacesContext())).getMaximumHeight(getFacesContext(), this)")
   void setMaximumHeight(String maximumHeight);
 
   /**

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=820654&r1=820653&r2=820654&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 Thu Oct  1 13:39:43 2009
@@ -45,62 +45,77 @@
 
   /**
    * This value will usually be set by the layout manager.
+   *
    * @param width The width for this component.
    */
   @TagAttribute
-  @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure")
+  @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure",
+      defaultCode = "((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)\n"
+          + "      getRenderer(getFacesContext())).getWidth(getFacesContext(), this)")
   void setWidth(String width);
 
   /**
    * This value will usually be set by the layout manager.
+   *
    * @param height The height for this component.
    */
   @TagAttribute
-  @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure")
+  @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure",
+      defaultCode = "((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)\n"
+          + "      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")
+  @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")
+  @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.config.ThemeConfig.getMeasure("
-          + "getFacesContext(), this, \"preferredWidth\")")
+      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.config.ThemeConfig.getMeasure("
-          + "getFacesContext(), this, \"preferredHeight\")")
+      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")
+  @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")
+  @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")
@@ -108,6 +123,7 @@
 
   /**
    * 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")
@@ -115,6 +131,7 @@
 
   /**
    * 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")
@@ -122,6 +139,7 @@
 
   /**
    * 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")
@@ -129,6 +147,7 @@
 
   /**
    * 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")
@@ -137,6 +156,7 @@
   /**
    * This attribute is for internal use only.
    * TODO: this attribute es for containers only
+   *
    * @param leftOffset The left offset which is needed by some containers (e. g. a box).
    */
   @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure",
@@ -147,6 +167,7 @@
   /**
    * This attribute is for internal use only.
    * TODO: this attribute es for containers only
+   *
    * @param rightOffset The right offset which is needed by some containers (e. g. a box).
    */
   @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure",
@@ -157,6 +178,7 @@
   /**
    * This attribute is for internal use only.
    * TODO: this attribute es for containers only
+   *
    * @param topOffset The top offset which is needed by some containers (e. g. a box).
    */
   @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure",
@@ -167,6 +189,7 @@
   /**
    * This attribute is for internal use only.
    * TODO: this attribute es for containers only
+   *
    * @param bottomOffset The bottom offset which is needed by some containers (e. g. a box).
    */
   @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure",