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 [1/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...

Author: lofwyr
Date: Thu Jul 16 15:22:41 2009
New Revision: 794717

URL: http://svn.apache.org/viewvc?rev=794717&view=rev
Log:
TOBAGO-606: Layout-Manager
 - add spacing functionallity: rowSpacing and columnSpacing are new attribute of tc:gridLayout
 - change call of ThemeConfig a little
 - spell fixes

Added:
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/grid/OriginCell.java   (contents, props changed)
      - copied, changed from r793477, myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/grid/RealCell.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/grid/SpanCell.java   (contents, props changed)
      - copied, changed from r793477, myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/grid/PseudoCell.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/HasSpacing.java   (contents, props changed)
      - copied, changed from r793477, myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/HasCellspacing.java
    myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/size-not-exact.xhtml
      - copied, changed from r793477, myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/position-2x2.xhtml
    myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/spacing.xhtml
      - copied, changed from r793477, myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/nested.xhtml
    myfaces/tobago/trunk/extension/facelets/src/main/java/org/apache/myfaces/tobago/facelets/GridLayoutRule.java
      - copied, changed from r793477, myfaces/tobago/trunk/extension/facelets/src/main/java/org/apache/myfaces/tobago/facelets/PageRule.java
Removed:
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/grid/PseudoCell.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/grid/RealCell.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/HasCellspacing.java
Modified:
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUIGridLayout.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/Attributes.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/Tags.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/config/ThemeConfig.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/grid/Cell.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/grid/Grid.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/math/EquationManager.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/math/PartitionEquation.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/math/SystemOfEquations.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/AbstractRendererBaseWrapper.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/InputRendererBase.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/LayoutableRendererBase.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/RendererBase.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/GridLayoutTagDeclaration.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/HasMargins.java
    myfaces/tobago/trunk/core/src/test/java/org/apache/myfaces/tobago/layout/grid/GridUnitTest.java
    myfaces/tobago/trunk/core/src/test/java/org/apache/myfaces/tobago/layout/math/EquationManagerUnitTest.java
    myfaces/tobago/trunk/core/src/test/java/org/apache/myfaces/tobago/layout/math/SystemOfEquationsUnitTest.java
    myfaces/tobago/trunk/example/demo/src/main/webapp/tobago-resource/html/standard/standard/property/overview.properties.xml
    myfaces/tobago/trunk/example/demo/src/main/webapp/tobago-resource/html/standard/standard/property/overview_de.properties.xml
    myfaces/tobago/trunk/example/test/src/main/webapp/script/test-utils.js
    myfaces/tobago/trunk/example/test/src/main/webapp/tc/cell/position-4x4-span-steps.xhtml
    myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/nested.xhtml
    myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/position-10x10-span.xhtml
    myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/position-2x2-out.xhtml
    myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/position-2x2-span-bottom.xhtml
    myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/position-2x2-span-left.xhtml
    myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/position-2x2-span-right.xhtml
    myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/position-2x2-span-top.xhtml
    myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/position-2x2.xhtml
    myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/position-4x4-span-steps.xhtml
    myfaces/tobago/trunk/extension/facelets/src/main/java/org/apache/myfaces/tobago/facelets/TobagoComponentHandler.java
    myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/html/sandbox/standard/tag/InputNumberSliderRenderer.java
    myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/msie/tag/MessageRenderer.java
    myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/BoxRenderer.java
    myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ButtonRenderer.java
    myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/DatePickerRenderer.java
    myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/GridLayoutRenderer.java
    myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/MessageRenderer.java
    myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/MessagesRenderer.java
    myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectManyListboxRenderer.java
    myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SheetRenderer.java
    myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TabGroupRenderer.java
    myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TabRenderer.java
    myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ToolBarRendererBase.java
    myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/property/tobago-theme-config.properties

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUIGridLayout.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUIGridLayout.java?rev=794717&r1=794716&r2=794717&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUIGridLayout.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUIGridLayout.java Thu Jul 16 15:22:41 2009
@@ -28,12 +28,13 @@
 import org.apache.myfaces.tobago.layout.LayoutManager;
 import org.apache.myfaces.tobago.layout.LayoutToken;
 import org.apache.myfaces.tobago.layout.LayoutTokens;
+import org.apache.myfaces.tobago.layout.Measure;
 import org.apache.myfaces.tobago.layout.PixelLayoutToken;
 import org.apache.myfaces.tobago.layout.PixelMeasure;
 import org.apache.myfaces.tobago.layout.RelativeLayoutToken;
 import org.apache.myfaces.tobago.layout.grid.Cell;
 import org.apache.myfaces.tobago.layout.grid.Grid;
-import org.apache.myfaces.tobago.layout.grid.RealCell;
+import org.apache.myfaces.tobago.layout.grid.OriginCell;
 import org.apache.myfaces.tobago.layout.math.EquationManager;
 import org.apache.myfaces.tobago.util.ComponentUtil;
 import org.apache.myfaces.tobago.util.LayoutUtils;
@@ -73,15 +74,15 @@
 
     // horizontal
     EquationManager horizontal = layoutContext.getHorizontal();
-    int[] horizontalIndices = horizontal.divide(horizontalIndex, columnTokens.getSize());
+    int[] horizontalIndices = horizontal.divide(horizontalIndex, columnTokens.getSize(), getColumnSpacing().getPixel());
 
     // vertical
     EquationManager vertical = layoutContext.getVertical();
-    int[] verticalIndices = vertical.divide(verticalIndex, rowTokens.getSize());
+    int[] verticalIndices = vertical.divide(verticalIndex, rowTokens.getSize(), getRowSpacing().getPixel());
 
     List<LayoutComponent> components = container.getComponents();
-    for (LayoutComponent component1 : components) {
-      grid.add(new RealCell(component1), component1.getColumnSpan(), component1.getRowSpan());
+    for (LayoutComponent c : components) {
+      grid.add(new OriginCell(c), c.getColumnSpan(), c.getRowSpan());
       LOG.debug("\n" + grid);
     }
 
@@ -90,17 +91,17 @@
 
     for (int j = 0; j < grid.getRowCount(); j++) {
       for (int i = 0; i < grid.getColumnCount(); i++) {
-        org.apache.myfaces.tobago.layout.grid.Cell temp = grid.get(i, j);
-        if (temp instanceof RealCell) {
-          RealCell cell = (RealCell) temp;
+        Cell temp = grid.get(i, j);
+        if (temp instanceof OriginCell) {
+          OriginCell cell = (OriginCell) temp;
           LayoutComponent component = temp.getComponent();
 
           // horizontal
-          int hIndex = horizontal.addComponent(horizontalIndices[i], cell.getColumnSpan());
+          int hIndex = horizontal.addComponent(horizontalIndices[i], cell.getColumnSpan(), getColumnSpacing().getPixel());
           cell.getComponent().setHorizontalIndex(hIndex);
 
           // vertical
-          int vIndex = vertical.addComponent(verticalIndices[j], cell.getRowSpan());
+          int vIndex = vertical.addComponent(verticalIndices[j], cell.getRowSpan(), getRowSpacing().getPixel());
           cell.getComponent().setVerticalIndex(vIndex);
 
           if (component instanceof LayoutContainer) {
@@ -124,8 +125,8 @@
     for (int j = 0; j < grid.getRowCount(); j++) {
       for (int i = 0; i < grid.getColumnCount(); i++) {
         Cell temp = grid.get(i, j);
-        if (temp instanceof RealCell) {
-          RealCell cell = (RealCell) temp;
+        if (temp instanceof OriginCell) {
+          OriginCell cell = (OriginCell) temp;
           LayoutComponent component = temp.getComponent();
 
           component.setDisplay(Display.BLOCK);
@@ -166,11 +167,14 @@
           continue; // XXX why this can happen?
         }
         LayoutComponent component = cell.getComponent();
-        if (cell instanceof RealCell) {
+        if (cell instanceof OriginCell) {
           component.setLeft(left);
         }
-        if (cell.isInFirstColumn()) {
+        if (cell.isHorizontalFirst()) {
+          // XXX subject of change: may use the width of the column, and not of the component
+          // XXX (the component may have a other size with offset or inset (scrollbars) etc.)
           left = (PixelMeasure) left.add(component.getWidth());
+          left = (PixelMeasure) left.add(getColumnSpacing());
         }
       }
     }
@@ -184,11 +188,14 @@
           continue; // XXX why this can happen?
         }
         LayoutComponent component = cell.getComponent();
-        if (cell instanceof RealCell) {
+        if (cell instanceof OriginCell) {
           component.setTop(top);
         }
-        if (cell.isInFirstRow()) {
+        if (cell.isVerticalFirst()) {
+          // XXX subject of change: may use the height of the row, and not of the component
+          // XXX (the component may have a other size with offset or inset (scrollbars) etc.)
           top = (PixelMeasure) top.add(component.getHeight());
+          top = (PixelMeasure) top.add(getRowSpacing());
         }
       }
     }
@@ -300,6 +307,9 @@
 
   public abstract String getColumns();
 
+  public abstract Measure getRowSpacing();
+
+  public abstract Measure getColumnSpacing();
 
   public Object saveState(FacesContext context) {
     clearRows();

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/Attributes.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/Attributes.java?rev=794717&r1=794716&r2=794717&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/Attributes.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/Attributes.java Thu Jul 16 15:22:41 2009
@@ -34,6 +34,7 @@
   public static final String CELLSPACING = "cellspacing";
   public static final String CLIENT_PROPERTIES = "clientProperties";
   public static final String COLUMN_SPAN = "columnSpan";
+  public static final String COLUMN_SPACING = "columnSpacing";
   public static final String COLUMNS = "columns";
   public static final String CONVERTER = "converter";
   public static final String CREATE_SPAN = "createSpan";
@@ -133,6 +134,7 @@
   public static final String RESOURCE = "resource";
   public static final String ROW_ID = "rowId";
   public static final String ROW_SPAN = "rowSpan";
+  public static final String ROW_SPACING = "rowSpacing";
   public static final String ROWS = "rows";
   public static final String SCRIPT_FILES = "scriptFiles";
   public static final String SCROLLBAR_HEIGHT = "scrollbarHeight";

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/Tags.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/Tags.java?rev=794717&r1=794716&r2=794717&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/Tags.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/Tags.java Thu Jul 16 15:22:41 2009
@@ -24,5 +24,6 @@
 
   // todo: add some tag names
 
+  public static final String GRID_LAYOUT = "gridLayout";
   public static final String GRID_LAYOUT_CONSTRAINT = "gridLayoutConstraint";
 }

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/config/ThemeConfig.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/config/ThemeConfig.java?rev=794717&r1=794716&r2=794717&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/config/ThemeConfig.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/config/ThemeConfig.java Thu Jul 16 15:22:41 2009
@@ -24,6 +24,8 @@
 import org.apache.myfaces.tobago.context.ClientProperties;
 import org.apache.myfaces.tobago.context.ResourceManager;
 import org.apache.myfaces.tobago.context.ResourceManagerFactory;
+import org.apache.myfaces.tobago.layout.Measure;
+import org.apache.myfaces.tobago.layout.PixelMeasure;
 import org.apache.myfaces.tobago.renderkit.RendererBase;
 import org.apache.myfaces.tobago.util.ComponentUtil;
 
@@ -38,12 +40,33 @@
 
   private static final Log LOG = LogFactory.getLog(ThemeConfig.class);
 
-  public static final String THEME_CONFIG_CACHE
-      = "org.apache.myfaces.tobago.config.ThemeConfig.CACHE";
+  public static final String THEME_CONFIG_CACHE = "org.apache.myfaces.tobago.config.ThemeConfig.CACHE";
 
-  public static int getValue(FacesContext facesContext, UIComponent component,
+  public static int getValue(FacesContext facesContext, UIComponent component, String name) {
+
+    try {
+      return getValue0(facesContext, component, name);
+    } catch (Exception e) {
+      LOG.error("Can't take '" + name + "' for " + component + " from configuration: " + e.getMessage(), e);
+    }
+    return 0;
+  }
+
+  public static boolean hasValue(FacesContext facesContext, UIComponent component,
       String name) {
+    try {
+      getValue0(facesContext, component, name);
+      return true;
+    } catch (NullPointerException e) {
+      return false;
+    }
+  }
 
+  public static Measure getMeasure(FacesContext facesContext, UIComponent component, String name) {
+      return new PixelMeasure(getValue(facesContext, component, name));
+  }
+
+  private static int getValue0(FacesContext facesContext, UIComponent component, String name) {
     CacheKey key = new CacheKey(facesContext.getViewRoot(), component, name);
     Map<CacheKey, Integer> cache
         = (Map<CacheKey, Integer>) facesContext.getExternalContext().getApplicationMap().get(THEME_CONFIG_CACHE);
@@ -65,16 +88,6 @@
     }
   }
 
-  public static boolean hasValue(FacesContext facesContext, UIComponent component,
-      String name) {
-    try {
-      getValue(facesContext, component, name);
-      return true;
-    } catch (NullPointerException e) {
-      return false;
-    }
-  }
-
   private static Integer createValue(FacesContext facesContext, UIComponent component, String name) {
     String family;
     String rendererType;

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/grid/Cell.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/grid/Cell.java?rev=794717&r1=794716&r2=794717&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/grid/Cell.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/grid/Cell.java Thu Jul 16 15:22:41 2009
@@ -19,13 +19,27 @@
 
 import org.apache.myfaces.tobago.layout.LayoutComponent;
 
+/**
+ * To support horizontal and vertical spans, at each position will be a cell as a represantive.
+ * Either a "origin cell" for the first position or a "span cell" for spanned other positions.
+ */
 public interface Cell {
 
   LayoutComponent getComponent();
 
-  RealCell getRealCell();
+  OriginCell getOrigin();
 
-  boolean isInFirstRow();
-
-  boolean isInFirstColumn();
+  /**
+   * Is the origin cell or span cell at the first position of the cell compound.
+   *
+   * @return If its at the first position.
+   */
+  boolean isHorizontalFirst();
+
+  /**
+   * Is the origin cell or span cell at the first position of the cell compound.
+   *
+   * @return If its at the first position.
+   */
+  boolean isVerticalFirst();
 }

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/grid/Grid.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/grid/Grid.java?rev=794717&r1=794716&r2=794717&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/grid/Grid.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/grid/Grid.java Thu Jul 16 15:22:41 2009
@@ -47,7 +47,7 @@
     rows = new PixelMeasure[rowCount];
   }
 
-  public void add(RealCell cell, int columnSpan, int rowSpan) {
+  public void add(OriginCell cell, int columnSpan, int rowSpan) {
 
     assert columnSpan > 0;
     assert rowSpan > 0;
@@ -79,7 +79,7 @@
         if (i == 0 && j == 0) {
           actualCell = cell;
         } else {
-          actualCell = new PseudoCell(cell, i == 0, j == 0);
+          actualCell = new SpanCell(cell, i == 0, j == 0);
         }
         assert grid.get(i + columnCursor, j + rowCursor) == null : "Position in the cell must be free.";
         grid.set(i + columnCursor, j + rowCursor, actualCell);
@@ -312,9 +312,9 @@
         if (hasError(i, j)) {
           builder.append("✖"); //↯
         } else {
-          if (grid.get(i, j) instanceof RealCell) {
+          if (grid.get(i, j) instanceof OriginCell) {
             builder.append("█");
-          } else if (grid.get(i, j) instanceof PseudoCell) {
+          } else if (grid.get(i, j) instanceof SpanCell) {
             if (j == 0) {
               builder.append("➞");
             } else {
@@ -389,6 +389,6 @@
     if (a == null || b == null) {
       return false;
     }
-    return a.getRealCell().equals(b.getRealCell());
+    return a.getOrigin().equals(b.getOrigin());
   }
 }

Copied: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/grid/OriginCell.java (from r793477, myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/grid/RealCell.java)
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/grid/OriginCell.java?p2=myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/grid/OriginCell.java&p1=myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/grid/RealCell.java&r1=793477&r2=794717&rev=794717&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/grid/RealCell.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/grid/OriginCell.java Thu Jul 16 15:22:41 2009
@@ -19,13 +19,13 @@
 
 import org.apache.myfaces.tobago.layout.LayoutComponent;
 
-public class RealCell implements Cell {
+public class OriginCell implements Cell {
 
   private LayoutComponent component;
   private int columnSpan;
   private int rowSpan;
 
-  public RealCell(LayoutComponent component) {
+  public OriginCell(LayoutComponent component) {
     this.component = component;
   }
 
@@ -33,15 +33,15 @@
     return component;
   }
 
-  public RealCell getRealCell() {
+  public OriginCell getOrigin() {
     return this;
   }
 
-  public boolean isInFirstRow() {
+  public boolean isVerticalFirst() {
     return true;
   }
 
-  public boolean isInFirstColumn() {
+  public boolean isHorizontalFirst() {
     return true;
   }
 

Propchange: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/grid/OriginCell.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/grid/OriginCell.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Copied: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/grid/SpanCell.java (from r793477, myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/grid/PseudoCell.java)
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/grid/SpanCell.java?p2=myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/grid/SpanCell.java&p1=myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/grid/PseudoCell.java&r1=793477&r2=794717&rev=794717&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/grid/PseudoCell.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/grid/SpanCell.java Thu Jul 16 15:22:41 2009
@@ -19,31 +19,31 @@
 
 import org.apache.myfaces.tobago.layout.LayoutComponent;
 
-public class PseudoCell implements Cell {
+public class SpanCell implements Cell {
 
-  private RealCell realCell;
-  private boolean inFirstColumn;
-  private boolean inFirstRow;
-
-  public PseudoCell(RealCell realCell, boolean inFirstColumn, boolean inFirstRow) {
-    this.realCell = realCell;
-    this.inFirstColumn = inFirstColumn;
-    this.inFirstRow = inFirstRow;
+  private OriginCell origin;
+  private boolean horizontalFirst;
+  private boolean verticalFirst;
+
+  public SpanCell(OriginCell origin, boolean horizontalFirst, boolean verticalFirst) {
+    this.origin = origin;
+    this.horizontalFirst = horizontalFirst;
+    this.verticalFirst = verticalFirst;
   }
 
   public LayoutComponent getComponent() {
-    return realCell.getComponent();
+    return origin.getComponent();
   }
 
-  public RealCell getRealCell() {
-    return realCell;
+  public OriginCell getOrigin() {
+    return origin;
   }
 
-  public boolean isInFirstColumn() {
-    return inFirstColumn;
+  public boolean isHorizontalFirst() {
+    return horizontalFirst;
   }
 
-  public boolean isInFirstRow() {
-    return inFirstRow;
+  public boolean isVerticalFirst() {
+    return verticalFirst;
   }
 }

Propchange: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/grid/SpanCell.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/grid/SpanCell.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/math/EquationManager.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/math/EquationManager.java?rev=794717&r1=794716&r2=794717&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/math/EquationManager.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/math/EquationManager.java Thu Jul 16 15:22:41 2009
@@ -40,19 +40,19 @@
     LOG.info(equations);
   }
 
-  public int[] divide(int index, int number) {
-    int[] newIndices = addSubTree(index, number, 1);
+  public int[] divide(int index, int number, int spacing) {
+    int[] newIndices = addSubTree(index, number, 1, spacing, 0);
     LOG.info(equations);
     return newIndices;
   }
 
-  public int addComponent(int index, int span) {
-    int[] newIndices = addSubTree(index, 1, span);
+  public int addComponent(int index, int span, int spacing) {
+    int[] newIndices = addSubTree(index, 1, span, 0, spacing);
     LOG.info(equations);
     return newIndices[0];
   }
 
-  private int[] addSubTree(int index, int number, int span) {
+  private int[] addSubTree(int index, int number, int span, double innerSpacing, double outerSpacing) {
 
     assert number > 0;
     assert span > 0;
@@ -62,7 +62,9 @@
         newIndices[0],
         newIndices[newIndices.length - 1] + 1,
         index,
-        span));
+        span,
+        innerSpacing,
+        outerSpacing));
     return newIndices;
   }
 

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/math/PartitionEquation.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/math/PartitionEquation.java?rev=794717&r1=794716&r2=794717&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/math/PartitionEquation.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/math/PartitionEquation.java Thu Jul 16 15:22:41 2009
@@ -29,18 +29,24 @@
   private int end;
   private int parent;
   private int span;
+  private double innerSpacing;
+  private double outerSpacing;
 
   /**
-   * @param begin  lowest index
-   * @param end    one more than the largest index
-   * @param parent parent index
-   * @param span   number of parent cells
+   * @param begin        lowest index
+   * @param end          one more than the largest index
+   * @param parent       parent index
+   * @param span         number of parent cells
+   * @param innerSpacing space between two cells between begin and end
+   * @param outerSpacing space between two cells inside the span
    */
-  public PartitionEquation(int begin, int end, int parent, int span) {
+  public PartitionEquation(int begin, int end, int parent, int span, double innerSpacing, double outerSpacing) {
     this.begin = begin;
     this.end = end;
     this.parent = parent;
     this.span = span;
+    this.innerSpacing = innerSpacing;
+    this.outerSpacing = outerSpacing;
   }
 
   public void fillRow(double[] row) {
@@ -55,9 +61,11 @@
     for (; i < end; i++) {
       row[i] = 1.0;
     }
-    for (; i < row.length; i++) {
+    for (; i < row.length - 1; i++) {
       row[i] = 0.0;
     }
+    // the last variable contains a constant, this is here the sum of spaces between cells.
+    row[row.length - 1] =  + (span - 1) * outerSpacing - (end - begin - 1) * innerSpacing;
 
     for (i = parent; i < parent + span; i++) {
       row[i] = -1.0;
@@ -67,6 +75,7 @@
   @Override
   public String toString() {
     StringBuilder builder = new StringBuilder("PartitionEquation: ");
+    // cells from parent
     builder.append(" x_");
     builder.append(parent);
     if (span > 2) {
@@ -76,6 +85,16 @@
       builder.append(" + x_");
       builder.append(parent + span - 1);
     }
+    // plus spacing
+    if (span >= 2) {
+      builder.append(" + ");
+      if (span >= 2) {
+        builder.append(span - 1);
+        builder.append(" * ");
+      }
+      builder.append(outerSpacing);
+    }
+    // sub cells
     builder.append(" = ");
     builder.append("x_");
     builder.append(begin);
@@ -86,6 +105,16 @@
       builder.append(" + x_");
       builder.append(end - 1);
     }
+    // plus spacing
+    if (end - begin >= 2) {
+      builder.append(" + ");
+      if (end - begin > 2) {
+        builder.append(end - begin - 1);
+        builder.append(" * ");
+      }
+      builder.append(innerSpacing);
+    }
+
     return builder.toString();
   }
 }

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/math/SystemOfEquations.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/math/SystemOfEquations.java?rev=794717&r1=794716&r2=794717&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/math/SystemOfEquations.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/math/SystemOfEquations.java Thu Jul 16 15:22:41 2009
@@ -140,7 +140,7 @@
     }
 
     if (numberOfVariables != equations.size()) {
-      LOG.warn("SOE have not korrekt dimensions: " + this);
+      LOG.warn("SOE have not correct dimensions: " + this);
     }
 
     data = new double[equations.size()][];
@@ -267,6 +267,12 @@
     for (int i = 0; i < numberOfVariables + 1; i++) {
       data[j][i] = data[j][i] / denominator;
     }
+    // try to fix float values
+//    double b = data[j][numberOfVariables];
+//    if (isNotZero(b - Math.round(b))) {
+//      data[j][numberOfVariables] = Math.round(b);
+//      LOG.warn("Fixing float result from " + b + " to " + data[j][numberOfVariables]);
+//    }
   }
 
   private void substractMultipleOfRowJToRowK(int j, int k) {

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/AbstractRendererBaseWrapper.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/AbstractRendererBaseWrapper.java?rev=794717&r1=794716&r2=794717&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/AbstractRendererBaseWrapper.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/AbstractRendererBaseWrapper.java Thu Jul 16 15:22:41 2009
@@ -17,13 +17,14 @@
  * limitations under the License.
  */
 
-import org.apache.myfaces.tobago.context.ResourceManagerFactory;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.myfaces.tobago.config.ThemeConfig;
+import org.apache.myfaces.tobago.context.ResourceManagerFactory;
 
-import javax.faces.context.FacesContext;
 import javax.faces.component.UIComponent;
 import javax.faces.component.UIInput;
+import javax.faces.context.FacesContext;
 import javax.faces.convert.Converter;
 import javax.faces.convert.ConverterException;
 import java.io.IOException;
@@ -61,8 +62,9 @@
     return getRenderer(FacesContext.getCurrentInstance()).getRendererName(rendererType);
   }
 
+  @Deprecated
   public final int getConfiguredValue(FacesContext facesContext, UIComponent component, String key) {
-    return getRenderer(facesContext).getConfiguredValue(facesContext, component, key);
+    return ThemeConfig.getValue(facesContext, component, key);
   }
 
   protected final Object getCurrentValueAsObject(UIInput input) {

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/InputRendererBase.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/InputRendererBase.java?rev=794717&r1=794716&r2=794717&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/InputRendererBase.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/InputRendererBase.java Thu Jul 16 15:22:41 2009
@@ -19,6 +19,7 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.myfaces.tobago.config.ThemeConfig;
 import org.apache.myfaces.tobago.util.ComponentUtil;
 
 import javax.faces.component.UIComponent;
@@ -60,7 +61,7 @@
   }
 
   public int getLabelWidth(FacesContext facesContext, UIComponent component) {
-    return getConfiguredValue(facesContext, component, "labelWidth");
+    return ThemeConfig.getValue(facesContext, component, "labelWidth");
   }
 
 }

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/LayoutableRendererBase.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/LayoutableRendererBase.java?rev=794717&r1=794716&r2=794717&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/LayoutableRendererBase.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/LayoutableRendererBase.java Thu Jul 16 15:22:41 2009
@@ -23,6 +23,7 @@
 import org.apache.myfaces.tobago.component.Cell;
 import org.apache.myfaces.tobago.component.Facets;
 import org.apache.myfaces.tobago.component.RendererTypes;
+import org.apache.myfaces.tobago.config.ThemeConfig;
 import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
 import org.apache.myfaces.tobago.renderkit.html.HtmlStyleMap;
 import org.apache.myfaces.tobago.renderkit.html.StyleClasses;
@@ -44,33 +45,33 @@
 
   public int getHeaderHeight(
       FacesContext facesContext, UIComponent component) {
-    int height = getConfiguredValue(facesContext, component, "headerHeight");
+    int height = ThemeConfig.getValue(facesContext, component, "headerHeight");
     final UIComponent menubar = component.getFacet(Facets.MENUBAR);
     if (menubar != null) {
-      height += getConfiguredValue(facesContext, menubar, "headerHeight");
+      height += ThemeConfig.getValue(facesContext, menubar, "headerHeight");
     }
     return height;
   }
 
   public int getPaddingWidth(FacesContext facesContext, UIComponent component) {
-    return getConfiguredValue(facesContext, component, "paddingWidth");
+    return ThemeConfig.getValue(facesContext, component, "paddingWidth");
   }
 
   public int getPaddingHeight(
       FacesContext facesContext, UIComponent component) {
-    return getConfiguredValue(facesContext, component, "paddingHeight");
+    return ThemeConfig.getValue(facesContext, component, "paddingHeight");
   }
 
   public int getComponentExtraWidth(
       FacesContext facesContext,
       UIComponent component) {
-    return getConfiguredValue(facesContext, component, "componentExtraWidth");
+    return ThemeConfig.getValue(facesContext, component, "componentExtraWidth");
   }
 
   public int getComponentExtraHeight(
       FacesContext facesContext,
       UIComponent component) {
-    return getConfiguredValue(facesContext, component, "componentExtraHeight");
+    return ThemeConfig.getValue(facesContext, component, "componentExtraHeight");
   }
 
   public Dimension getMinimumSize(
@@ -81,17 +82,17 @@
   }
 
   public int getMinimumHeight(FacesContext facesContext, UIComponent component) {
-    int height = getConfiguredValue(facesContext, component, "minimumHeight");
+    int height = ThemeConfig.getValue(facesContext, component, "minimumHeight");
     if (height == -1) {
-      height = getConfiguredValue(facesContext, component, "fixedHeight");
+      height = ThemeConfig.getValue(facesContext, component, "fixedHeight");
     }
     return height;
   }
 
   public int getMinimumWidth(FacesContext facesContext, UIComponent component) {
-    int width = getConfiguredValue(facesContext, component, "minimumWidth");
+    int width = ThemeConfig.getValue(facesContext, component, "minimumWidth");
     if (width == -1) {
-      width = getConfiguredValue(facesContext, component, "fixedWidth");
+      width = ThemeConfig.getValue(facesContext, component, "fixedWidth");
     }
     return width;
   }
@@ -150,7 +151,7 @@
       intSpace = (Integer) space;
     }
     if (intSpace == -1) {
-      return getConfiguredValue(facesContext, component, attrFixed);
+      return ThemeConfig.getValue(facesContext, component, attrFixed);
     } else {
       return intSpace;
     }

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/RendererBase.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/RendererBase.java?rev=794717&r1=794716&r2=794717&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/RendererBase.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/RendererBase.java Thu Jul 16 15:22:41 2009
@@ -82,15 +82,12 @@
     return name;
   }
 
-  public int getConfiguredValue(FacesContext facesContext,
-      UIComponent component, String key) {
-    try {
-      return ThemeConfig.getValue(facesContext, component, key);
-    } catch (Exception e) {
-      LOG.error("Can't take '" + key + "' for " + getClass().getName()
-          + " from config-file: " + e.getMessage(), e);
-    }
-    return 0;
+  /**
+   * @deprecated since 1.1
+   */
+  @Deprecated
+  public int getConfiguredValue(FacesContext facesContext, UIComponent component, String key) {
+    return ThemeConfig.getValue(facesContext, component, key);
   }
 
   protected Object getCurrentValueAsObject(UIInput input) {

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/GridLayoutTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/GridLayoutTagDeclaration.java?rev=794717&r1=794716&r2=794717&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/GridLayoutTagDeclaration.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/GridLayoutTagDeclaration.java Thu Jul 16 15:22:41 2009
@@ -23,12 +23,12 @@
 import org.apache.myfaces.tobago.component.RendererTypes;
 import org.apache.myfaces.tobago.taglib.decl.HasBinding;
 import org.apache.myfaces.tobago.taglib.decl.HasBorder;
-import org.apache.myfaces.tobago.taglib.decl.HasCellspacing;
 import org.apache.myfaces.tobago.taglib.decl.HasColumnLayout;
 import org.apache.myfaces.tobago.taglib.decl.HasId;
 import org.apache.myfaces.tobago.taglib.decl.HasMargin;
 import org.apache.myfaces.tobago.taglib.decl.HasMargins;
 import org.apache.myfaces.tobago.taglib.decl.HasRowLayout;
+import org.apache.myfaces.tobago.taglib.decl.HasSpacing;
 
 /*
  * Date: 14.03.2006
@@ -99,6 +99,6 @@
     rendererType = RendererTypes.GRID_LAYOUT,
     componentFamily = "org.apache.myfaces.tobago.GridLayout",
     allowedChildComponenents = "NONE", isLayout = true)
-public interface GridLayoutTagDeclaration extends HasId, HasBorder, HasCellspacing, HasMargin,
+public interface GridLayoutTagDeclaration extends HasId, HasBorder, HasSpacing, HasMargin,
     HasMargins, HasColumnLayout, HasRowLayout, HasBinding {
 }

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/HasMargins.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/HasMargins.java?rev=794717&r1=794716&r2=794717&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/HasMargins.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/HasMargins.java Thu Jul 16 15:22:41 2009
@@ -28,27 +28,27 @@
    * Top margin between container component and layouted children.
    */
   @TagAttribute
-  @UIComponentTagAttribute()
+  @UIComponentTagAttribute(defaultCode = "getMargin()")
   void setMarginTop(String margin);
 
   /**
    * Right margin between container component and layouted children.
    */
   @TagAttribute
-  @UIComponentTagAttribute()
+  @UIComponentTagAttribute(defaultCode = "getMargin()")
   void setMarginRight(String margin);
 
   /**
    * Bottom margin between container component and layouted children.
    */
   @TagAttribute
-  @UIComponentTagAttribute()
+  @UIComponentTagAttribute(defaultCode = "getMargin()")
   void setMarginBottom(String margin);
 
   /**
    * Left margin between container component and layouted children.
    */
   @TagAttribute
-  @UIComponentTagAttribute()
+  @UIComponentTagAttribute(defaultCode = "getMargin()")
   void setMarginLeft(String margin);
 }

Copied: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/HasSpacing.java (from r793477, myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/HasCellspacing.java)
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/HasSpacing.java?p2=myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/HasSpacing.java&p1=myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/HasCellspacing.java&r1=793477&r2=794717&rev=794717&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/HasCellspacing.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/HasSpacing.java Thu Jul 16 15:22:41 2009
@@ -20,14 +20,35 @@
 import org.apache.myfaces.tobago.apt.annotation.TagAttribute;
 import org.apache.myfaces.tobago.apt.annotation.UIComponentTagAttribute;
 
-/**
- * $Id$
- */
-public interface HasCellspacing {
+public interface HasSpacing {
+
   /**
-   * Spacing between component and layout cell's
+   * Spacing between component and layout cell's.
+   * Can be overwritten by columnSpacing and rowSpacing.
+   *
+   * @deprecated Use columnSpacing and/or rowSpacing instead.
    */
+  @Deprecated
   @TagAttribute
-  @UIComponentTagAttribute()
+  @UIComponentTagAttribute(
+      type = "org.apache.myfaces.tobago.layout.Measure")
   void setCellspacing(String cellspacing);
+
+  /**
+   * Spacing between the columns in the actual layout.
+   */
+  @TagAttribute
+  @UIComponentTagAttribute(
+      type = "org.apache.myfaces.tobago.layout.Measure",
+      defaultCode = "getCellspacing() != null ? getCellspacing() : org.apache.myfaces.tobago.config.ThemeConfig.getMeasure(getFacesContext(), this, \"columnSpacing\")")
+  void setColumnSpacing(String columnSpacing);
+
+  /**
+   * Spacing between the rows in the actual layout.
+   */
+  @TagAttribute
+  @UIComponentTagAttribute(
+      type = "org.apache.myfaces.tobago.layout.Measure",
+      defaultCode = "getCellspacing() != null ? getCellspacing() : org.apache.myfaces.tobago.config.ThemeConfig.getMeasure(getFacesContext(), this, \"rowSpacing\")")
+  void setRowSpacing(String rowSpacing);
 }

Propchange: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/HasSpacing.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/HasSpacing.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Modified: myfaces/tobago/trunk/core/src/test/java/org/apache/myfaces/tobago/layout/grid/GridUnitTest.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/test/java/org/apache/myfaces/tobago/layout/grid/GridUnitTest.java?rev=794717&r1=794716&r2=794717&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/test/java/org/apache/myfaces/tobago/layout/grid/GridUnitTest.java (original)
+++ myfaces/tobago/trunk/core/src/test/java/org/apache/myfaces/tobago/layout/grid/GridUnitTest.java Thu Jul 16 15:22:41 2009
@@ -33,7 +33,7 @@
         + "│◌│\n"
         + "└─┘\n", grid.toString());
 
-    grid.add(new RealCell(null), 1, 1);
+    grid.add(new OriginCell(null), 1, 1);
     Assert.assertEquals(1, grid.getColumnCount());
     Assert.assertEquals(1, grid.getRowCount());
     Assert.assertEquals(""
@@ -41,7 +41,7 @@
         + "┃█┃\n"
         + "┗━┛\n", grid.toString());
 
-    grid.add(new RealCell(null), 1, 1);
+    grid.add(new OriginCell(null), 1, 1);
     Assert.assertEquals(1, grid.getColumnCount());
     Assert.assertEquals(2, grid.getRowCount());
     Assert.assertEquals(""
@@ -51,7 +51,7 @@
         + "┃█┃\n"
         + "┗━┛\n", grid.toString());
 
-    grid.add(new RealCell(null), 1, 2);
+    grid.add(new OriginCell(null), 1, 2);
     Assert.assertEquals(1, grid.getColumnCount());
     Assert.assertEquals(4, grid.getRowCount());
     Assert.assertEquals(""
@@ -66,7 +66,7 @@
         + "┗━┛\n", grid.toString());
 
     // with warning
-    grid.add(new RealCell(null), 2, 1);
+    grid.add(new OriginCell(null), 2, 1);
     Assert.assertEquals(1, grid.getColumnCount());
     Assert.assertEquals(5, grid.getRowCount());
     Assert.assertEquals(""
@@ -94,7 +94,7 @@
         + "│◌│◌│\n"
         + "└─┴─┘\n", grid.toString());
 
-    grid.add(new RealCell(null), 1, 1);
+    grid.add(new OriginCell(null), 1, 1);
     Assert.assertEquals(2, grid.getColumnCount());
     Assert.assertEquals(1, grid.getRowCount());
     Assert.assertEquals(""
@@ -102,7 +102,7 @@
         + "┃█┃◌│\n"
         + "┗━┹─┘\n", grid.toString());
 
-    grid.add(new RealCell(null), 1, 1);
+    grid.add(new OriginCell(null), 1, 1);
     Assert.assertEquals(2, grid.getColumnCount());
     Assert.assertEquals(1, grid.getRowCount());
     Assert.assertEquals(""
@@ -110,7 +110,7 @@
         + "┃█┃█┃\n"
         + "┗━┻━┛\n", grid.toString());
 
-    grid.add(new RealCell(null), 2, 2);
+    grid.add(new OriginCell(null), 2, 2);
     Assert.assertEquals(2, grid.getColumnCount());
     Assert.assertEquals(3, grid.getRowCount());
     Assert.assertEquals(""
@@ -122,7 +122,7 @@
         + "┃⬇│⬇┃\n"
         + "┗━┷━┛\n", grid.toString());
 
-    grid.add(new RealCell(null), 1, 2);
+    grid.add(new OriginCell(null), 1, 2);
     Assert.assertEquals(2, grid.getColumnCount());
     Assert.assertEquals(5, grid.getRowCount());
     Assert.assertEquals(""
@@ -138,7 +138,7 @@
         + "┃⬇┃◌│\n"
         + "┗━┹─┘\n", grid.toString());
 
-    grid.add(new RealCell(null), 1, 1);
+    grid.add(new OriginCell(null), 1, 1);
     Assert.assertEquals(2, grid.getColumnCount());
     Assert.assertEquals(5, grid.getRowCount());
     Assert.assertEquals(""
@@ -154,7 +154,7 @@
         + "┃⬇┃◌│\n"
         + "┗━┹─┘\n", grid.toString());
 
-    grid.add(new RealCell(null), 1, 2);
+    grid.add(new OriginCell(null), 1, 2);
     Assert.assertEquals(2, grid.getColumnCount());
     Assert.assertEquals(6, grid.getRowCount());
     Assert.assertEquals(""
@@ -172,7 +172,7 @@
         + "│◌┃⬇┃\n"
         + "└─┺━┛\n", grid.toString());
 
-    grid.add(new RealCell(null), 2, 1);
+    grid.add(new OriginCell(null), 2, 1);
     // fehler
     Assert.assertEquals(2, grid.getColumnCount());
     Assert.assertEquals(6, grid.getRowCount());
@@ -197,19 +197,19 @@
         + "│◌│◌│◌│◌│◌│\n"
         + "└─┴─┴─┴─┴─┘\n", grid.toString());
 
-    grid.add(new RealCell(null), 1, 2);
-    grid.add(new RealCell(null), 1, 3);
-    grid.add(new RealCell(null), 1, 1);
-    grid.add(new RealCell(null), 2, 1);
-    grid.add(new RealCell(null), 3, 1);
-    grid.add(new RealCell(null), 1, 1);
-    grid.add(new RealCell(null), 1, 1);
-    grid.add(new RealCell(null), 1, 3);
-    grid.add(new RealCell(null), 1, 1);
-    grid.add(new RealCell(null), 3, 1);
-    grid.add(new RealCell(null), 1, 2);
-    grid.add(new RealCell(null), 2, 1);
-    grid.add(new RealCell(null), 1, 1);
+    grid.add(new OriginCell(null), 1, 2);
+    grid.add(new OriginCell(null), 1, 3);
+    grid.add(new OriginCell(null), 1, 1);
+    grid.add(new OriginCell(null), 2, 1);
+    grid.add(new OriginCell(null), 3, 1);
+    grid.add(new OriginCell(null), 1, 1);
+    grid.add(new OriginCell(null), 1, 1);
+    grid.add(new OriginCell(null), 1, 3);
+    grid.add(new OriginCell(null), 1, 1);
+    grid.add(new OriginCell(null), 3, 1);
+    grid.add(new OriginCell(null), 1, 2);
+    grid.add(new OriginCell(null), 2, 1);
+    grid.add(new OriginCell(null), 1, 1);
     Assert.assertEquals(5, grid.getColumnCount());
     Assert.assertEquals(5, grid.getRowCount());
     Assert.assertEquals(""

Modified: myfaces/tobago/trunk/core/src/test/java/org/apache/myfaces/tobago/layout/math/EquationManagerUnitTest.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/test/java/org/apache/myfaces/tobago/layout/math/EquationManagerUnitTest.java?rev=794717&r1=794716&r2=794717&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/test/java/org/apache/myfaces/tobago/layout/math/EquationManagerUnitTest.java (original)
+++ myfaces/tobago/trunk/core/src/test/java/org/apache/myfaces/tobago/layout/math/EquationManagerUnitTest.java Thu Jul 16 15:22:41 2009
@@ -33,8 +33,8 @@
 
   /**
    Horizontal model: (this example only contains information for horizontal layouting)<br/>
-   (the HTML source code from this documentation is <b>not</b> a reference for the renderer! The resulting
-   HTML of the page is totally different.)<br/>
+   (the HTML source code from this documentation is <b>not</b> a reference for the renderer implementation!
+   The resulting HTML of the page is totally different.)<br/>
    x<sub>0</sub> = 630px
    <table border="5">
      <tr>
@@ -254,51 +254,51 @@
     index = equationManager.addComponentRoot();
     Assert.assertEquals(0, index);
     equationManager.setFixedLength(index, 630);        // the first (current) index has a fix size of 600
-    indices = equationManager.divide(index, 4);                     // this index is divided into 4 parts
+    indices = equationManager.divide(index, 4, 0);                     // this index is divided into 4 parts
     Assert.assertArrayEquals(new int[]{1, 2, 3, 4}, indices);
     equationManager.setProportion(indices[2], indices[3], 1, 2);     // the value on index 2 has factor 1,
     //                                                the value on position 3 has factor 2
     {
       equationManager.setFixedLength(indices[0], 100);        // the first one has a fix size of 100
-      index = equationManager.addComponent(indices[0], 1);
+      index = equationManager.addComponent(indices[0], 1, 0);
       Assert.assertEquals(5, index);
     }
     {
       equationManager.setFixedLength(indices[1], 200);        // the second one has a fix size of 200
-      index = equationManager.addComponent(indices[1], 1);
+      index = equationManager.addComponent(indices[1], 1, 0);
       Assert.assertEquals(6, index);
 
-      index = equationManager.addComponent(indices[1], 1);
+      index = equationManager.addComponent(indices[1], 1, 0);
       Assert.assertEquals(7, index);
-      int[] i7 = equationManager.divide(7, 2);
+      int[] i7 = equationManager.divide(7, 2, 0);
       Assert.assertArrayEquals(new int[]{8, 9}, i7);
       equationManager.setProportion(i7[0], i7[1], 1, 2);
 
-      index = equationManager.addComponent(indices[1], 1);
+      index = equationManager.addComponent(indices[1], 1, 0);
       Assert.assertEquals(10, index);
-      int[] i10 = equationManager.divide(10, 2);
+      int[] i10 = equationManager.divide(10, 2, 0);
       Assert.assertArrayEquals(new int[]{11, 12}, i10);
       equationManager.setProportion(i10[0], i10[1], 4, 1);
     }
     {
-      index = equationManager.addComponent(indices[2], 1);
+      index = equationManager.addComponent(indices[2], 1, 0);
       Assert.assertEquals(13, index);
     }
     {
-      index = equationManager.addComponent(indices[3], 1);
+      index = equationManager.addComponent(indices[3], 1, 0);
       Assert.assertEquals(14, index);
-      int[] i14 = equationManager.divide(14, 2);
+      int[] i14 = equationManager.divide(14, 2, 0);
       Assert.assertArrayEquals(new int[]{15, 16}, i14);
       equationManager.setFixedLength(i14[0], 130);        // the second one has a fix size of 200
     }
     {
-      int iSpan2 = equationManager.addComponent(indices[2], 2);
+      int iSpan2 = equationManager.addComponent(indices[2], 2, 0);
       Assert.assertEquals(17, iSpan2);
     }
     {
-      int iSpan4 = equationManager.addComponent(indices[0], 4);
+      int iSpan4 = equationManager.addComponent(indices[0], 4, 0);
       Assert.assertEquals(18, iSpan4);
-      int[] i18 = equationManager.divide(18, 6);
+      int[] i18 = equationManager.divide(18, 6, 0);
       Assert.assertArrayEquals(new int[]{19, 20, 21, 22, 23, 24}, i18);
       equationManager.setProportion(i18[0], i18[1], 1, 2);
       equationManager.setProportion(i18[0], i18[2], 1, 3);
@@ -307,11 +307,11 @@
       equationManager.setProportion(i18[0], i18[5], 1, 6);
     }
     {
-      int i19_1 = equationManager.addComponent(19, 6);
+      int i19_1 = equationManager.addComponent(19, 6, 0);
       Assert.assertEquals(25, i19_1);
-      int i19_2 = equationManager.addComponent(19, 3);
+      int i19_2 = equationManager.addComponent(19, 3, 0);
       Assert.assertEquals(26, i19_2);
-      int i22 = equationManager.addComponent(22, 3);
+      int i22 = equationManager.addComponent(22, 3, 0);
       Assert.assertEquals(27, i22);
     }
 

Modified: myfaces/tobago/trunk/core/src/test/java/org/apache/myfaces/tobago/layout/math/SystemOfEquationsUnitTest.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/test/java/org/apache/myfaces/tobago/layout/math/SystemOfEquationsUnitTest.java?rev=794717&r1=794716&r2=794717&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/test/java/org/apache/myfaces/tobago/layout/math/SystemOfEquationsUnitTest.java (original)
+++ myfaces/tobago/trunk/core/src/test/java/org/apache/myfaces/tobago/layout/math/SystemOfEquationsUnitTest.java Thu Jul 16 15:22:41 2009
@@ -35,8 +35,8 @@
     long begin = System.nanoTime();
 
     SystemOfEquations system = new SystemOfEquations(3);
-    system.addEqualsEquation(new FixedEquation(0, 1000));
-    system.addEqualsEquation(new PartitionEquation(1, 3, 0, 1));
+    system.addEqualsEquation(new FixedEquation(0, 1005));
+    system.addEqualsEquation(new PartitionEquation(1, 3, 0, 1, 5, 0));
     system.addEqualsEquation(new ProportionEquation(1, 2, 2, 3));
     system.prepare();
     system.gauss();
@@ -48,7 +48,7 @@
     LOG.info("result: " + Arrays.toString(result));
     LOG.info("Duration: " + new DecimalFormat().format(end - begin) + " ns");
 
-    Assert.assertArrayEquals(new double[]{1000, 400, 600}, result, SystemOfEquations.EPSILON);
+    Assert.assertArrayEquals(new double[]{1005, 400, 600}, result, SystemOfEquations.EPSILON);
   }
 
   @Test
@@ -57,8 +57,8 @@
     long begin = System.nanoTime();
 
     SystemOfEquations system = new SystemOfEquations(5);
-    system.addEqualsEquation(new FixedEquation(0, 1000));
-    system.addEqualsEquation(new PartitionEquation(1, 5, 0, 1));
+    system.addEqualsEquation(new FixedEquation(0, 1015));
+    system.addEqualsEquation(new PartitionEquation(1, 5, 0, 1, 5, 0));
     system.addEqualsEquation(new ProportionEquation(1, 2, 1, 2));
     system.addEqualsEquation(new ProportionEquation(2, 3, 2, 3));
     system.addEqualsEquation(new ProportionEquation(3, 4, 3, 4));
@@ -72,7 +72,7 @@
     LOG.info("result: " + Arrays.toString(result));
     LOG.info("Duration: " + new DecimalFormat().format(end - begin) + " ns");
 
-    Assert.assertArrayEquals(new double[]{1000, 100, 200, 300, 400}, result, SystemOfEquations.EPSILON);
+    Assert.assertArrayEquals(new double[]{1015, 100, 200, 300, 400}, result, SystemOfEquations.EPSILON);
   }
 
   @Test
@@ -82,7 +82,7 @@
 
     SystemOfEquations system = new SystemOfEquations(11);
     system.addEqualsEquation(new FixedEquation(0, 1100));
-    system.addEqualsEquation(new PartitionEquation(1, 11, 0, 1));
+    system.addEqualsEquation(new PartitionEquation(1, 11, 0, 1, 0, 0));
     system.addEqualsEquation(new ProportionEquation(1, 2, 1, 2));
     system.addEqualsEquation(new ProportionEquation(2, 3, 2, 3));
     system.addEqualsEquation(new ProportionEquation(3, 4, 3, 4));
@@ -116,7 +116,7 @@
 
     SystemOfEquations system = new SystemOfEquations(n + 1);
     system.addEqualsEquation(new FixedEquation(0, sum));
-    system.addEqualsEquation(new PartitionEquation(1, n + 1, 0, 1));
+    system.addEqualsEquation(new PartitionEquation(1, n + 1, 0, 1, 0, 0));
     for (int i = 1; i < n; i++) {
       system.addEqualsEquation(new ProportionEquation(i, i + 1, (double) i, (double) i + 1));
     }
@@ -152,8 +152,8 @@
 
     SystemOfEquations system = new SystemOfEquations(7);
     system.addEqualsEquation(new FixedEquation(0, 900));
-    system.addEqualsEquation(new PartitionEquation(1, 4, 0, 1));
-    system.addEqualsEquation(new PartitionEquation(4, 7, 2, 2));
+    system.addEqualsEquation(new PartitionEquation(1, 4, 0, 1, 0, 0));
+    system.addEqualsEquation(new PartitionEquation(4, 7, 2, 2, 0, 0));
     system.addEqualsEquation(new ProportionEquation(1, 2, 1, 1));
     system.addEqualsEquation(new ProportionEquation(1, 3, 1, 1));
     system.addEqualsEquation(new ProportionEquation(4, 5, 1, 1));
@@ -196,8 +196,8 @@
 
     SystemOfEquations system = new SystemOfEquations(7);
 //    system.addEqualsEquation(new FixedEquation(0, 900));
-    system.addEqualsEquation(new PartitionEquation(1, 4, 0, 1));
-    system.addEqualsEquation(new PartitionEquation(4, 7, 2, 2));
+    system.addEqualsEquation(new PartitionEquation(1, 4, 0, 1, 0, 0));
+    system.addEqualsEquation(new PartitionEquation(4, 7, 2, 2, 0, 0));
     system.addEqualsEquation(new ProportionEquation(1, 2, 1, 1));
     system.addEqualsEquation(new ProportionEquation(1, 3, 1, 1));
     system.addEqualsEquation(new ProportionEquation(4, 5, 1, 1));
@@ -228,10 +228,10 @@
 
     SystemOfEquations system = new SystemOfEquations(4);
     system.addEqualsEquation(new FixedEquation(0, 100));
-    system.addEqualsEquation(new PartitionEquation(1, 3, 0, 1));
+    system.addEqualsEquation(new PartitionEquation(1, 3, 0, 1, 0, 0));
     system.addEqualsEquation(new FixedEquation(1, 50));
     system.addEqualsEquation(new FixedEquation(2, 50));
-    system.addEqualsEquation(new PartitionEquation(3, 4, 2, 1));
+    system.addEqualsEquation(new PartitionEquation(3, 4, 2, 1, 0, 0));
     system.addEqualsEquation(new FixedEquation(3, 50));
     system.prepare();
     system.gauss();
@@ -260,8 +260,8 @@
 
     SystemOfEquations system = new SystemOfEquations(7);
 //    system.addEqualsEquation(new FixedEquation(0, 900));
-    system.addEqualsEquation(new PartitionEquation(1, 4, 0, 1));
-    system.addEqualsEquation(new PartitionEquation(4, 7, 2, 2));
+    system.addEqualsEquation(new PartitionEquation(1, 4, 0, 1, 0, 0));
+    system.addEqualsEquation(new PartitionEquation(4, 7, 2, 2, 0, 0));
     system.addEqualsEquation(new ProportionEquation(1, 2, 1, 1));
     system.addEqualsEquation(new ProportionEquation(1, 3, 1, 1));
     system.addEqualsEquation(new ProportionEquation(4, 5, 1, 1));

Modified: myfaces/tobago/trunk/example/demo/src/main/webapp/tobago-resource/html/standard/standard/property/overview.properties.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/demo/src/main/webapp/tobago-resource/html/standard/standard/property/overview.properties.xml?rev=794717&r1=794716&r2=794717&view=diff
==============================================================================
--- myfaces/tobago/trunk/example/demo/src/main/webapp/tobago-resource/html/standard/standard/property/overview.properties.xml (original)
+++ myfaces/tobago/trunk/example/demo/src/main/webapp/tobago-resource/html/standard/standard/property/overview.properties.xml Thu Jul 16 15:22:41 2009
@@ -101,7 +101,7 @@
   Themes, Browser, Internationalisation.&lt;/p&gt;
 </entry>
 
-<!--  basicControlls -->
+<!--  basicControls -->
   <entry key="basic_sampleInputTitle">Basic Input Examples</entry>
   <entry key="basic_sampleSelectTitle">Basic Select Examples</entry>
   <entry key="basic_sampleLinkTitle">Basic Controls Examples</entry>

Modified: myfaces/tobago/trunk/example/demo/src/main/webapp/tobago-resource/html/standard/standard/property/overview_de.properties.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/demo/src/main/webapp/tobago-resource/html/standard/standard/property/overview_de.properties.xml?rev=794717&r1=794716&r2=794717&view=diff
==============================================================================
--- myfaces/tobago/trunk/example/demo/src/main/webapp/tobago-resource/html/standard/standard/property/overview_de.properties.xml (original)
+++ myfaces/tobago/trunk/example/demo/src/main/webapp/tobago-resource/html/standard/standard/property/overview_de.properties.xml Thu Jul 16 15:22:41 2009
@@ -76,7 +76,7 @@
     verstehen kann.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Weiteres&lt;/b&gt;&lt;br/&gt; Themes, Browser,
     Internationalisierung&lt;/p&gt;</entry>
 
-<!--  basicControlls -->
+<!--  basicControls -->
   <entry key="basic_sampleInputTitle">Eingabe Beispiele</entry>
   <entry key="basic_sampleSelectTitle">Auswahl Beispiele</entry>
   <entry key="basic_sampleLinkTitle">Steuerungs Beispiele</entry>

Modified: myfaces/tobago/trunk/example/test/src/main/webapp/script/test-utils.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/test/src/main/webapp/script/test-utils.js?rev=794717&r1=794716&r2=794717&view=diff
==============================================================================
--- myfaces/tobago/trunk/example/test/src/main/webapp/script/test-utils.js (original)
+++ myfaces/tobago/trunk/example/test/src/main/webapp/script/test-utils.js Thu Jul 16 15:22:41 2009
@@ -1,36 +1,59 @@
 /*
+ * 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.
+ */
+
+/*
  * Utilities to make client side tests easier.
  */
 
 function checkLeft(id, left) {
-  var offsetLeft = document.getElementById(id).offsetLeft;
+  var element = document.getElementById(id);
+  var offsetLeft = element.offsetLeft;
+  while (element.offsetParent != null) {
+    element = element.offsetParent;
+    offsetLeft += element.offsetLeft;
+  }
   if (offsetLeft != left) {
-    LOG.error("The element with id=" + id + " has wrong left: expected=" + left
-        + " actual=" + offsetLeft);
+    LOG.error("The element with id=" + id + " has wrong left: expected=" + left + " actual=" + offsetLeft);
   }
 }
 
 function checkTop(id, top) {
-  var offsetTop = document.getElementById(id).offsetTop;
+  var element = document.getElementById(id);
+  var offsetTop = element.offsetTop;
+  while (element.offsetParent != null) {
+    element = element.offsetParent;
+    offsetTop += element.offsetTop;
+  }
   if (offsetTop != top) {
-    LOG.error("The element with id=" + id + " has wrong top: expected=" + top
-        + " actual=" + offsetTop);
+    LOG.error("The element with id=" + id + " has wrong top: expected=" + top + " actual=" + offsetTop);
   }
 }
 
 function checkWidth(id, width) {
   var offsetWidth = document.getElementById(id).offsetWidth;
   if (offsetWidth != width) {
-    LOG.error("The element with id=" + id + " has wrong width: expected=" + width
-        + " actual=" + offsetWidth);
+    LOG.error("The element with id=" + id + " has wrong width: expected=" + width + " actual=" + offsetWidth);
   }
 }
 
 function checkHeight(id, height) {
   var offsetHeight = document.getElementById(id).offsetHeight;
   if (offsetHeight != height) {
-    LOG.error("The element with id=" + id + " has wrong height: expected=" + height
-        + " actual=" + offsetHeight);
+    LOG.error("The element with id=" + id + " has wrong height: expected=" + height + " actual=" + offsetHeight);
   }
 }
 

Modified: myfaces/tobago/trunk/example/test/src/main/webapp/tc/cell/position-4x4-span-steps.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/test/src/main/webapp/tc/cell/position-4x4-span-steps.xhtml?rev=794717&r1=794716&r2=794717&view=diff
==============================================================================
--- myfaces/tobago/trunk/example/test/src/main/webapp/tc/cell/position-4x4-span-steps.xhtml (original)
+++ myfaces/tobago/trunk/example/test/src/main/webapp/tc/cell/position-4x4-span-steps.xhtml Thu Jul 16 15:22:41 2009
@@ -11,43 +11,43 @@
     <f:facet name="layout">
       <tc:gridLayout columns="6*;9*;13*;2*" rows="4*;11*;10*;5*"/>
     </f:facet>
-    <tc:gridLayoutConstraint width="300px" height="300px"/>
+    <tc:gridLayoutConstraint width="315px" height="315px"/>
 
     <tc:in id="in-0" value="0"/>
-    <tc:cell id="cell-1" spanY="2">
-      <tc:in value="1"/>
+    <tc:cell spanY="2">
+      <tc:in id="in-1" value="1"/>
     </tc:cell>
-    <tc:cell id="cell-2" spanX="2">
-      <tc:in value="2"/>
+    <tc:cell spanX="2">
+      <tc:in id="in-2" value="2"/>
     </tc:cell>
     <tc:in id="in-3" value="3"/>
-    <tc:cell id="cell-4" spanY="2">
-      <tc:in value="4 (Note: the &lt;tc:cell&gt; is deprecated)"/>
+    <tc:cell spanY="2">
+      <tc:in id="in-4" value="4 (Note: the &lt;tc:cell&gt; is deprecated)"/>
     </tc:cell>
     <tc:in id="in-5" value="5"/>
-    <tc:cell id="cell-6" spanX="2">
-      <tc:in value="6"/>
+    <tc:cell spanX="2">
+      <tc:in  id="in-6" value="6"/>
     </tc:cell>
-    <tc:cell id="cell-7" spanY="2">
-      <tc:in value="7"/>
+    <tc:cell spanY="2">
+      <tc:in id="in-7" value="7"/>
     </tc:cell>
     <tc:in id="in-8" value="8"/>
-    <tc:cell id="cell-9" spanX="2">
-      <tc:in value="9"/>
+    <tc:cell spanX="2">
+      <tc:in id="in-9" value="9"/>
     </tc:cell>
 
     <tc:script file="script/test-utils.js"/>
 
     <tc:script onload="checkLayout('page:in-0', 0, 0, 60, 40);"/>
-    <tc:script onload="checkLayout('page:cell-1', 60, 0, 90, 150);"/>
-    <tc:script onload="checkLayout('page:cell-2', 150, 0, 150, 40);"/>
-    <tc:script onload="checkLayout('page:in-3', 0, 40, 60, 110);"/>
-    <tc:script onload="checkLayout('page:cell-4', 150, 40, 130, 210);"/>
-    <tc:script onload="checkLayout('page:in-5', 280, 40, 20, 110);"/>
-    <tc:script onload="checkLayout('page:cell-6', 0, 150, 150, 100);"/>
-    <tc:script onload="checkLayout('page:cell-7', 280, 150, 20, 150);"/>
-    <tc:script onload="checkLayout('page:in-8', 0, 250, 60, 50);"/>
-    <tc:script onload="checkLayout('page:cell-9', 60, 250, 220, 50);"/>
+    <tc:script onload="checkLayout('page:in-1', 65, 0, 90, 155);"/>
+    <tc:script onload="checkLayout('page:in-2', 160, 0, 155, 40);"/>
+    <tc:script onload="checkLayout('page:in-3', 0, 45, 60, 110);"/>
+    <tc:script onload="checkLayout('page:in-4', 160, 45, 130, 215);"/>
+    <tc:script onload="checkLayout('page:in-5', 295, 45, 20, 110);"/>
+    <tc:script onload="checkLayout('page:in-6', 0, 160, 155, 100);"/>
+    <tc:script onload="checkLayout('page:in-7', 295, 160, 20, 155);"/>
+    <tc:script onload="checkLayout('page:in-8', 0, 265, 60, 50);"/>
+    <tc:script onload="checkLayout('page:in-9', 65, 265, 225, 50);"/>
 
   </tc:page>
 </f:view>

Modified: 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/nested.xhtml?rev=794717&r1=794716&r2=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/nested.xhtml Thu Jul 16 15:22:41 2009
@@ -60,7 +60,7 @@
     <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 ...-->
+    <!--todo: test the other controls ...-->
 
   </tc:page>
 </f:view>

Modified: myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/position-10x10-span.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/position-10x10-span.xhtml?rev=794717&r1=794716&r2=794717&view=diff
==============================================================================
--- myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/position-10x10-span.xhtml (original)
+++ myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/position-10x10-span.xhtml Thu Jul 16 15:22:41 2009
@@ -11,7 +11,7 @@
     <f:facet name="layout">
       <tc:gridLayout rows="*;*;*;*;*;*;*;*;*;*" columns="*;*;*;*;*;*;*;*;*;*"/>
     </f:facet>
-    <tc:gridLayoutConstraint width="1000px" height="1000px"/>
+    <tc:gridLayoutConstraint width="1045px" height="1045px"/>
 
     <tc:in id="in-0" value="0">
         <tc:gridLayoutConstraint columnSpan="1" rowSpan="9"/>
@@ -80,27 +80,27 @@
     <tc:script file="script/test-utils.js"/>
 
     <!--todo-->
-    <tc:script onload="checkLayout('page:in-0', 0, 0, 100, 900);"/>
-    <tc:script onload="checkLayout('page:in-1', 100, 0, 900, 100);"/>
-    <tc:script onload="checkLayout('page:in-2', 100, 100, 700, 100);"/>
-    <tc:script onload="checkLayout('page:in-3', 800, 100, 100, 700);"/>
-    <tc:script onload="checkLayout('page:in-4', 900, 100, 100, 900);"/>
-    <tc:script onload="checkLayout('page:in-5', 100, 200, 100, 700);"/>
-    <tc:script onload="checkLayout('page:in-6', 200, 200, 200, 100);"/>
-    <tc:script onload="checkLayout('page:in-7', 400, 200, 100, 200);"/>
-    <tc:script onload="checkLayout('page:in-8', 500, 200, 200, 200);"/>
-    <tc:script onload="checkLayout('page:in-9', 700, 200, 100, 200);"/>
-    <tc:script onload="checkLayout('page:in-10', 200, 300, 200, 200);"/>
-    <tc:script onload="checkLayout('page:in-11', 400, 400, 200, 200);"/>
-    <tc:script onload="checkLayout('page:in-12', 600, 400, 200, 100);"/>
-    <tc:script onload="checkLayout('page:in-13', 200, 500, 200, 100);"/>
-    <tc:script onload="checkLayout('page:in-14', 600, 500, 200, 200);"/>
-    <tc:script onload="checkLayout('page:in-15', 200, 600, 100, 200);"/>
-    <tc:script onload="checkLayout('page:in-16', 300, 600, 200, 200);"/>
-    <tc:script onload="checkLayout('page:in-17', 500, 600, 100, 200);"/>
-    <tc:script onload="checkLayout('page:in-18', 600, 700, 200, 100);"/>
-    <tc:script onload="checkLayout('page:in-19', 200, 800, 700, 100);"/>
-    <tc:script onload="checkLayout('page:in-20', 0, 900, 900, 100);"/>
+    <tc:script onload="checkLayout('page:in-0', 0, 0, 100, 940);"/>
+    <tc:script onload="checkLayout('page:in-1', 105, 0, 940, 100);"/>
+    <tc:script onload="checkLayout('page:in-2', 105, 105, 730, 100);"/>
+    <tc:script onload="checkLayout('page:in-3', 840, 105, 100, 730);"/>
+    <tc:script onload="checkLayout('page:in-4', 945, 105, 100, 940);"/>
+    <tc:script onload="checkLayout('page:in-5', 105, 210, 100, 730);"/>
+    <tc:script onload="checkLayout('page:in-6', 210, 210, 205, 100);"/>
+    <tc:script onload="checkLayout('page:in-7', 420, 210, 100, 205);"/>
+    <tc:script onload="checkLayout('page:in-8', 525, 210, 205, 205);"/>
+    <tc:script onload="checkLayout('page:in-9', 735, 210, 100, 205);"/>
+    <tc:script onload="checkLayout('page:in-10', 210, 315, 205, 205);"/>
+    <tc:script onload="checkLayout('page:in-11', 420, 420, 205, 205);"/>
+    <tc:script onload="checkLayout('page:in-12', 630, 420, 205, 100);"/>
+    <tc:script onload="checkLayout('page:in-13', 210, 525, 205, 100);"/>
+    <tc:script onload="checkLayout('page:in-14', 630, 525, 205, 205);"/>
+    <tc:script onload="checkLayout('page:in-15', 210, 630, 100, 205);"/>
+    <tc:script onload="checkLayout('page:in-16', 315, 630, 205, 205);"/>
+    <tc:script onload="checkLayout('page:in-17', 525, 630, 100, 205);"/>
+    <tc:script onload="checkLayout('page:in-18', 630, 735, 205, 100);"/>
+    <tc:script onload="checkLayout('page:in-19', 210, 840, 730, 100);"/>
+    <tc:script onload="checkLayout('page:in-20', 0, 945, 940, 100);"/>
 
   </tc:page>
 </f:view>

Modified: myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/position-2x2-out.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/position-2x2-out.xhtml?rev=794717&r1=794716&r2=794717&view=diff
==============================================================================
--- myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/position-2x2-out.xhtml (original)
+++ myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/position-2x2-out.xhtml Thu Jul 16 15:22:41 2009
@@ -11,7 +11,7 @@
     <f:facet name="layout">
       <tc:gridLayout rows="2*;*" columns="2*;*"/>
     </f:facet>
-    <tc:gridLayoutConstraint width="600px" height="600px"/>
+    <tc:gridLayoutConstraint width="605px" height="605px"/>
 
     <tc:out id="out-0" value="Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Quisque consequat, libero eget porta mattis, risus velit congue magna, at posuere sem orci vitae turpis. Integer pulvinar. Cras libero. Proin vestibulum tempor urna. Nulla odio nisl, auctor vitae, faucibus pharetra, feugiat eget, justo. Suspendisse at tellus non justo dictum tincidunt."/>
     <tc:out id="out-1" value="Aenean placerat nunc id tortor. Donec mollis ornare pede. Vestibulum ut arcu et dolor auctor varius. Praesent tincidunt, eros quis vulputate facilisis, orci turpis sollicitudin justo, id faucibus nunc orci sed purus. Proin ligula erat, sollicitudin id, rhoncus eget, nonummy sit amet, risus. Aenean arcu lorem, facilisis et, posuere sed, ultrices tincidunt, nunc. Sed ac massa. Quisque lacinia. Donec quis nibh."/>
@@ -20,9 +20,9 @@
 
     <tc:script file="script/test-utils.js"/>
     <tc:script onload="checkLayout('page:out-0', 0, 0, 400, 400);"/>
-    <tc:script onload="checkLayout('page:out-1', 400, 0, 200, 400);"/>
-    <tc:script onload="checkLayout('page:out-2', 0, 400, 400, 200);"/>
-    <tc:script onload="checkLayout('page:out-3', 400, 400, 200, 200);"/>
+    <tc:script onload="checkLayout('page:out-1', 405, 0, 200, 400);"/>
+    <tc:script onload="checkLayout('page:out-2', 0, 405, 400, 200);"/>
+    <tc:script onload="checkLayout('page:out-3', 405, 405, 200, 200);"/>
     
   </tc:page>
 </f:view>

Modified: myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/position-2x2-span-bottom.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/position-2x2-span-bottom.xhtml?rev=794717&r1=794716&r2=794717&view=diff
==============================================================================
--- myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/position-2x2-span-bottom.xhtml (original)
+++ myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/position-2x2-span-bottom.xhtml Thu Jul 16 15:22:41 2009
@@ -11,7 +11,7 @@
     <f:facet name="layout">
       <tc:gridLayout rows="2*;*" columns="2*;*"/>
     </f:facet>
-    <tc:gridLayoutConstraint width="600px" height="600px"/>
+    <tc:gridLayoutConstraint width="605px" height="605px"/>
 
     <tc:in id="in-0" value="0"/>
     <tc:in id="in-1" value="1"/>
@@ -20,9 +20,10 @@
     </tc:in>
 
     <tc:script file="script/test-utils.js"/>
+    
     <tc:script onload="checkLayout('page:in-0', 0, 0, 400, 400);"/>
-    <tc:script onload="checkLayout('page:in-1', 400, 0, 200, 400);"/>
-    <tc:script onload="checkLayout('page:in-2', 0, 400, 600, 200);"/>
+    <tc:script onload="checkLayout('page:in-1', 405, 0, 200, 400);"/>
+    <tc:script onload="checkLayout('page:in-2', 0, 405, 605, 200);"/>
 
   </tc:page>
 </f:view>

Modified: myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/position-2x2-span-left.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/position-2x2-span-left.xhtml?rev=794717&r1=794716&r2=794717&view=diff
==============================================================================
--- myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/position-2x2-span-left.xhtml (original)
+++ myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/position-2x2-span-left.xhtml Thu Jul 16 15:22:41 2009
@@ -11,7 +11,7 @@
     <f:facet name="layout">
       <tc:gridLayout rows="2*;*" columns="2*;*"/>
     </f:facet>
-    <tc:gridLayoutConstraint width="600px" height="600px"/>
+    <tc:gridLayoutConstraint width="605px" height="605px"/>
 
     <tc:in id="in-0" value="0">
       <tc:gridLayoutConstraint rowSpan="2"/>
@@ -20,9 +20,9 @@
     <tc:in id="in-2" value="2"/>
 
     <tc:script file="script/test-utils.js"/>
-    <tc:script onload="checkLayout('page:in-0', 0, 0, 400, 600);"/>
-    <tc:script onload="checkLayout('page:in-1', 400, 0, 200, 400);"/>
-    <tc:script onload="checkLayout('page:in-2', 400, 400, 200, 200);"/>
+    <tc:script onload="checkLayout('page:in-0', 0, 0, 400, 605);"/>
+    <tc:script onload="checkLayout('page:in-1', 405, 0, 200, 400);"/>
+    <tc:script onload="checkLayout('page:in-2', 405, 405, 200, 200);"/>
 
   </tc:page>
 </f:view>

Modified: myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/position-2x2-span-right.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/position-2x2-span-right.xhtml?rev=794717&r1=794716&r2=794717&view=diff
==============================================================================
--- myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/position-2x2-span-right.xhtml (original)
+++ myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/position-2x2-span-right.xhtml Thu Jul 16 15:22:41 2009
@@ -11,7 +11,7 @@
     <f:facet name="layout">
       <tc:gridLayout rows="2*;*" columns="2*;*"/>
     </f:facet>
-    <tc:gridLayoutConstraint width="600px" height="600px"/>
+    <tc:gridLayoutConstraint width="605px" height="605px"/>
 
     <tc:in id="in-0" value="0"/>
     <tc:in id="in-1" value="1">
@@ -21,8 +21,8 @@
 
     <tc:script file="script/test-utils.js"/>
     <tc:script onload="checkLayout('page:in-0', 0, 0, 400, 400);"/>
-    <tc:script onload="checkLayout('page:in-1', 400, 0, 200, 600);"/>
-    <tc:script onload="checkLayout('page:in-2', 0, 400, 400, 200);"/>
+    <tc:script onload="checkLayout('page:in-1', 405, 0, 200, 605);"/>
+    <tc:script onload="checkLayout('page:in-2', 0, 405, 400, 200);"/>
 
   </tc:page>
 </f:view>

Modified: myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/position-2x2-span-top.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/position-2x2-span-top.xhtml?rev=794717&r1=794716&r2=794717&view=diff
==============================================================================
--- myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/position-2x2-span-top.xhtml (original)
+++ myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/position-2x2-span-top.xhtml Thu Jul 16 15:22:41 2009
@@ -11,7 +11,7 @@
     <f:facet name="layout">
       <tc:gridLayout rows="2*;*" columns="2*;*"/>
     </f:facet>
-    <tc:gridLayoutConstraint width="600px" height="600px"/>
+    <tc:gridLayoutConstraint width="605px" height="605px"/>
 
     <tc:in id="in-0" value="0">
         <tc:gridLayoutConstraint columnSpan="2"/>
@@ -20,9 +20,9 @@
     <tc:in id="in-2" value="2"/>
 
     <tc:script file="script/test-utils.js"/>
-    <tc:script onload="checkLayout('page:in-0', 0, 0, 600, 400);"/>
-    <tc:script onload="checkLayout('page:in-1', 0, 400, 400, 200);"/>
-    <tc:script onload="checkLayout('page:in-2', 400, 400, 200, 200);"/>
+    <tc:script onload="checkLayout('page:in-0', 0, 0, 605, 400);"/>
+    <tc:script onload="checkLayout('page:in-1', 0, 405, 400, 200);"/>
+    <tc:script onload="checkLayout('page:in-2', 405, 405, 200, 200);"/>
 
 
   </tc:page>

Modified: myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/position-2x2.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/position-2x2.xhtml?rev=794717&r1=794716&r2=794717&view=diff
==============================================================================
--- myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/position-2x2.xhtml (original)
+++ myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/position-2x2.xhtml Thu Jul 16 15:22:41 2009
@@ -9,7 +9,7 @@
 
   <tc:page id="page">
     <f:facet name="layout">
-      <tc:gridLayout rows="2*;*" columns="2*;*"/>
+      <tc:gridLayout rows="2*;*" columns="2*;*" columnSpacing="0px" rowSpacing="0px"/>
     </f:facet>
     <tc:gridLayoutConstraint width="600px" height="600px"/>
 

Modified: myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/position-4x4-span-steps.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/position-4x4-span-steps.xhtml?rev=794717&r1=794716&r2=794717&view=diff
==============================================================================
--- myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/position-4x4-span-steps.xhtml (original)
+++ myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/position-4x4-span-steps.xhtml Thu Jul 16 15:22:41 2009
@@ -11,7 +11,7 @@
     <f:facet name="layout">
       <tc:gridLayout columns="6*;9*;13*;2*" rows="4*;11*;10*;5*"/>
     </f:facet>
-    <tc:gridLayoutConstraint width="300px" height="300px"/>
+    <tc:gridLayoutConstraint width="315px" height="315px"/>
 
     <tc:in id="in-0" value="0"/>
     <tc:in id="in-1" value="1">
@@ -40,15 +40,15 @@
 
     <!--todo-->
     <tc:script onload="checkLayout('page:in-0', 0, 0, 60, 40);"/>
-    <tc:script onload="checkLayout('page:in-1', 60, 0, 90, 150);"/>
-    <tc:script onload="checkLayout('page:in-2', 150, 0, 150, 40);"/>
-    <tc:script onload="checkLayout('page:in-3', 0, 40, 60, 110);"/>
-    <tc:script onload="checkLayout('page:in-4', 150, 40, 130, 210);"/>
-    <tc:script onload="checkLayout('page:in-5', 280, 40, 20, 110);"/>
-    <tc:script onload="checkLayout('page:in-6', 0, 150, 150, 100);"/>
-    <tc:script onload="checkLayout('page:in-7', 280, 150, 20, 150);"/>
-    <tc:script onload="checkLayout('page:in-8', 0, 250, 60, 50);"/>
-    <tc:script onload="checkLayout('page:in-9', 60, 250, 220, 50);"/>
+    <tc:script onload="checkLayout('page:in-1', 65, 0, 90, 155);"/>
+    <tc:script onload="checkLayout('page:in-2', 160, 0, 155, 40);"/>
+    <tc:script onload="checkLayout('page:in-3', 0, 45, 60, 110);"/>
+    <tc:script onload="checkLayout('page:in-4', 160, 45, 130, 215);"/>
+    <tc:script onload="checkLayout('page:in-5', 295, 45, 20, 110);"/>
+    <tc:script onload="checkLayout('page:in-6', 0, 160, 155, 100);"/>
+    <tc:script onload="checkLayout('page:in-7', 295, 160, 20, 155);"/>
+    <tc:script onload="checkLayout('page:in-8', 0, 265, 60, 50);"/>
+    <tc:script onload="checkLayout('page:in-9', 65, 265, 225, 50);"/>
 
   </tc:page>
 </f:view>

Copied: myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/size-not-exact.xhtml (from r793477, myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/position-2x2.xhtml)
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/size-not-exact.xhtml?p2=myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/size-not-exact.xhtml&p1=myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/position-2x2.xhtml&r1=793477&r2=794717&rev=794717&view=diff
==============================================================================
--- myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/position-2x2.xhtml (original)
+++ myfaces/tobago/trunk/example/test/src/main/webapp/tc/gridLayout/size-not-exact.xhtml Thu Jul 16 15:22:41 2009
@@ -9,20 +9,17 @@
 
   <tc:page id="page">
     <f:facet name="layout">
-      <tc:gridLayout rows="2*;*" columns="2*;*"/>
+      <tc:gridLayout columns="*;*" columnSpacing="0px"/>
     </f:facet>
-    <tc:gridLayoutConstraint width="600px" height="600px"/>
+    <tc:gridLayoutConstraint width="201px" height="200px"/>
 
     <tc:in id="in-0" value="0"/>
     <tc:in id="in-1" value="1"/>
-    <tc:in id="in-2" value="2"/>
-    <tc:in id="in-3" value="3"/>
 
     <tc:script file="script/test-utils.js"/>
-    <tc:script onload="checkLayout('page:in-0', 0, 0, 400, 400);"/>
-    <tc:script onload="checkLayout('page:in-1', 400, 0, 200, 400);"/>
-    <tc:script onload="checkLayout('page:in-2', 0, 400, 400, 200);"/>
-    <tc:script onload="checkLayout('page:in-3', 400, 400, 200, 200);"/>
-    
+
+    <tc:script onload="checkLayout('page:in-0', 0, 0, 101, 200);"/>
+    <tc:script onload="checkLayout('page:in-1', 101, 0, 100, 200);"/>
+
   </tc:page>
 </f:view>