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

svn commit: r832772 - in /myfaces/tobago/trunk: core/src/main/java/org/apache/myfaces/tobago/component/ core/src/main/java/org/apache/myfaces/tobago/layout/ core/src/main/java/org/apache/myfaces/tobago/renderkit/html/ core/src/main/java/org/apache/myfa...

Author: lofwyr
Date: Wed Nov  4 15:41:57 2009
New Revision: 832772

URL: http://svn.apache.org/viewvc?rev=832772&view=rev
Log:
TOBAGO-606: Layout Manager
 - fix spelling

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/AbstractUISheetLayout.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUITabGroupLayout.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/Measure.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/PixelMeasure.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlStyleMap.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoResponseWriterImpl.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoResponseWriterWrapper.java
    myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SheetRenderer.java

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=832772&r1=832771&r2=832772&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 Wed Nov  4 15:41:57 2009
@@ -172,14 +172,14 @@
       Measure available = LayoutUtils.getSize(orientation, container);
       if (available != null) {
         for (PixelMeasure value : grid.getSizes(orientation)) {
-          available = available.substractNotNegative(value);
+          available = available.subtractNotNegative(value);
         }
         PixelMeasure spacing = new PixelMeasure(
             getSpacing(orientation).getPixel() * (grid.getSizes(orientation).length - 1));
-        available = available.substractNotNegative(spacing);
+        available = available.subtractNotNegative(spacing);
 
-        available = available.substractNotNegative(LayoutUtils.getBeginOffset(orientation, container));
-        available = available.substractNotNegative(LayoutUtils.getEndOffset(orientation, container));
+        available = available.subtractNotNegative(LayoutUtils.getBeginOffset(orientation, container));
+        available = available.subtractNotNegative(LayoutUtils.getEndOffset(orientation, container));
 
         List<Measure> partition = list.partition(available);
 

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUISheetLayout.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUISheetLayout.java?rev=832772&r1=832771&r2=832772&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUISheetLayout.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUISheetLayout.java Wed Nov  4 15:41:57 2009
@@ -91,8 +91,8 @@
       LayoutContainer container = getLayoutContainer();
       Measure available = LayoutUtils.getSize(orientation, container);
       if (available != null) {
-        available = available.substractNotNegative(LayoutUtils.getBeginOffset(orientation, container));
-        available = available.substractNotNegative(LayoutUtils.getEndOffset(orientation, container));
+        available = available.subtractNotNegative(LayoutUtils.getBeginOffset(orientation, container));
+        available = available.subtractNotNegative(LayoutUtils.getEndOffset(orientation, container));
 
         for (LayoutComponent component : getLayoutContainer().getComponents()) {
 

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUITabGroupLayout.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUITabGroupLayout.java?rev=832772&r1=832771&r2=832772&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUITabGroupLayout.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUITabGroupLayout.java Wed Nov  4 15:41:57 2009
@@ -91,8 +91,8 @@
       LayoutContainer container = getLayoutContainer();
       Measure available = LayoutUtils.getSize(orientation, container);
       if (available != null) {
-        available = available.substractNotNegative(LayoutUtils.getBeginOffset(orientation, container));
-        available = available.substractNotNegative(LayoutUtils.getEndOffset(orientation, container));
+        available = available.subtractNotNegative(LayoutUtils.getBeginOffset(orientation, container));
+        available = available.subtractNotNegative(LayoutUtils.getEndOffset(orientation, container));
 
         for (LayoutComponent component : getLayoutContainer().getComponents()) {
 

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/Measure.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/Measure.java?rev=832772&r1=832771&r2=832772&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/Measure.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/Measure.java Wed Nov  4 15:41:57 2009
@@ -51,7 +51,15 @@
 
   public abstract Measure multiply(int times);
 
-  public abstract Measure substractNotNegative(Measure m);
+  /**
+   * @deprecated since 1.5.0, please use subtractNotNegative
+   */
+  @Deprecated
+  public Measure substractNotNegative(Measure m) {
+    return subtractNotNegative(m);
+  }
+
+  public abstract Measure subtractNotNegative(Measure m);
 
   public abstract Measure subtract(Measure m);
   

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/PixelMeasure.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/PixelMeasure.java?rev=832772&r1=832771&r2=832772&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/PixelMeasure.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/PixelMeasure.java Wed Nov  4 15:41:57 2009
@@ -51,7 +51,7 @@
     return new PixelMeasure(pixel * times);
   }
 
-  public Measure substractNotNegative(Measure m) {
+  public Measure subtractNotNegative(Measure m) {
     if (m == null) {
       return new PixelMeasure(this);
     } else if (m.getPixel() > pixel) {

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlStyleMap.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlStyleMap.java?rev=832772&r1=832771&r2=832772&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlStyleMap.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlStyleMap.java Wed Nov  4 15:41:57 2009
@@ -69,18 +69,18 @@
     width = layout.getWidth();
     if (width != null) {
       // TODO: Make configurable: this is needed if the box-sizing is border-box, not content-box (see CSS3)
-      width = width.substractNotNegative(ThemeConfig.getMeasure(facesContext, rendererType, "css.border-left-width"));
-      width = width.substractNotNegative(ThemeConfig.getMeasure(facesContext, rendererType, "css.padding-left"));
-      width = width.substractNotNegative(ThemeConfig.getMeasure(facesContext, rendererType, "css.padding-right"));
-      width = width.substractNotNegative(ThemeConfig.getMeasure(facesContext, rendererType, "css.border-right-width"));
+      width = width.subtractNotNegative(ThemeConfig.getMeasure(facesContext, rendererType, "css.border-left-width"));
+      width = width.subtractNotNegative(ThemeConfig.getMeasure(facesContext, rendererType, "css.padding-left"));
+      width = width.subtractNotNegative(ThemeConfig.getMeasure(facesContext, rendererType, "css.padding-right"));
+      width = width.subtractNotNegative(ThemeConfig.getMeasure(facesContext, rendererType, "css.border-right-width"));
     }
     height = layout.getHeight();
     if (height != null) {
       // TODO: Make configurable: this is needed if the box-sizing is border-box, not content-box (see CSS3)
-      height = height.substractNotNegative(ThemeConfig.getMeasure(facesContext, rendererType, "css.border-top-width"));
-      height = height.substractNotNegative(ThemeConfig.getMeasure(facesContext, rendererType, "css.padding-top"));
-      height = height.substractNotNegative(ThemeConfig.getMeasure(facesContext, rendererType, "css.padding-bottom"));
-      height = height.substractNotNegative(ThemeConfig.getMeasure(facesContext, rendererType, "css.border-bottom-width"));
+      height = height.subtractNotNegative(ThemeConfig.getMeasure(facesContext, rendererType, "css.border-top-width"));
+      height = height.subtractNotNegative(ThemeConfig.getMeasure(facesContext, rendererType, "css.padding-top"));
+      height = height.subtractNotNegative(ThemeConfig.getMeasure(facesContext, rendererType, "css.padding-bottom"));
+      height = height.subtractNotNegative(ThemeConfig.getMeasure(facesContext, rendererType, "css.border-bottom-width"));
     }
     this.left = layout.getLeft();
     this.top = layout.getTop();

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoResponseWriterImpl.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoResponseWriterImpl.java?rev=832772&r1=832771&r2=832772&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoResponseWriterImpl.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoResponseWriterImpl.java Wed Nov  4 15:41:57 2009
@@ -420,21 +420,21 @@
       Measure width = layoutComponent.getWidth();
       if (width != null) {
         // TODO: Make configurable: this is needed if the box-sizing is border-box, not content-box (see CSS3)
-        width = width.substractNotNegative(ThemeConfig.getMeasure(facesContext, component, "css.border-left-width"));
-        width = width.substractNotNegative(ThemeConfig.getMeasure(facesContext, component, "css.padding-left"));
-        width = width.substractNotNegative(ThemeConfig.getMeasure(facesContext, component, "css.padding-right"));
-        width = width.substractNotNegative(ThemeConfig.getMeasure(facesContext, component, "css.border-right-width"));
+        width = width.subtractNotNegative(ThemeConfig.getMeasure(facesContext, component, "css.border-left-width"));
+        width = width.subtractNotNegative(ThemeConfig.getMeasure(facesContext, component, "css.padding-left"));
+        width = width.subtractNotNegative(ThemeConfig.getMeasure(facesContext, component, "css.padding-right"));
+        width = width.subtractNotNegative(ThemeConfig.getMeasure(facesContext, component, "css.border-right-width"));
         styles = ensureHtmlStyleMap(component, styles);
         styles.setWidth(width);
       }
       Measure height = layoutComponent.getHeight();
       if (height != null) {
         // TODO: Make configurable: this is needed if the box-sizing is border-box, not content-box (see CSS3)
-        height = height.substractNotNegative(ThemeConfig.getMeasure(facesContext, component, "css.border-top-width"));
-        height = height.substractNotNegative(ThemeConfig.getMeasure(facesContext, component, "css.padding-top"));
-        height = height.substractNotNegative(ThemeConfig.getMeasure(facesContext, component, "css.padding-bottom"));
+        height = height.subtractNotNegative(ThemeConfig.getMeasure(facesContext, component, "css.border-top-width"));
+        height = height.subtractNotNegative(ThemeConfig.getMeasure(facesContext, component, "css.padding-top"));
+        height = height.subtractNotNegative(ThemeConfig.getMeasure(facesContext, component, "css.padding-bottom"));
         height
-            = height.substractNotNegative(ThemeConfig.getMeasure(facesContext, component, "css.border-bottom-width"));
+            = height.subtractNotNegative(ThemeConfig.getMeasure(facesContext, component, "css.border-bottom-width"));
         styles = ensureHtmlStyleMap(component, styles);
         styles.setHeight(height);
       }

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoResponseWriterWrapper.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoResponseWriterWrapper.java?rev=832772&r1=832771&r2=832772&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoResponseWriterWrapper.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoResponseWriterWrapper.java Wed Nov  4 15:41:57 2009
@@ -81,6 +81,7 @@
     responseWriter.writeAttribute(HtmlAttributes.CLASS, null, Attributes.STYLE_CLASS);
   }
 
+  @Deprecated
   public void writeStyleAttribute() throws IOException {
     responseWriter.writeAttribute(HtmlAttributes.STYLE, null, Attributes.STYLE);
   }

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SheetRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SheetRenderer.java?rev=832772&r1=832771&r2=832772&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SheetRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SheetRenderer.java Wed Nov  4 15:41:57 2009
@@ -293,9 +293,9 @@
     if (bodyStyle.getWidth() != null) {
 //      intSpace -= columnWidths.get(columnWidths.size() - 1);
       Measure space = bodyStyle.getWidth();
-      space.substractNotNegative(getContentBorder(facesContext, data));
+      space.subtractNotNegative(getContentBorder(facesContext, data));
       if (needVerticalScrollbar(facesContext, data)) {
-        space.substractNotNegative(getScrollbarWidth(facesContext, data));
+        space.subtractNotNegative(getScrollbarWidth(facesContext, data));
       }
       sheetBodyStyle.setWidth(space);
     }
@@ -1165,9 +1165,9 @@
       }
 
       Measure space = data.getWidth();
-      space.substractNotNegative(getContentBorder(facesContext, data));
+      space.subtractNotNegative(getContentBorder(facesContext, data));
       if (needVerticalScrollbar(facesContext, data)) {
-        space.substractNotNegative(getScrollbarWidth(facesContext, data));
+        space.subtractNotNegative(getScrollbarWidth(facesContext, data));
       }
       LayoutInfo layoutInfo =
           new LayoutInfo(newTokens.getSize(), space.getPixel(), newTokens, data.getClientId(facesContext), false);