myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lof...@apache.org
Subject svn commit: r803017 - in /myfaces/tobago/trunk/core/src: main/java/org/apache/myfaces/tobago/layout/math/EquationManager.java test/java/org/apache/myfaces/tobago/layout/math/EquationManagerUnitTest.java
Date Tue, 11 Aug 2009 07:50:37 GMT
Author: lofwyr
Date: Tue Aug 11 07:50:36 2009
New Revision: 803017

URL: http://svn.apache.org/viewvc?rev=803017&view=rev
Log:
TOBAGO-606: Layout-Manager
 - remove unused code

Modified:
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/math/EquationManager.java
    myfaces/tobago/trunk/core/src/test/java/org/apache/myfaces/tobago/layout/math/EquationManagerUnitTest.java

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=803017&r1=803016&r2=803017&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
Tue Aug 11 07:50:36 2009
@@ -20,7 +20,6 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.myfaces.tobago.layout.Measure;
-import org.apache.myfaces.tobago.layout.PixelMeasure;
 
 /**
  * Manages the relation between the Tree of LayoutManagers and the Linear System of Equations
@@ -41,11 +40,6 @@
     equations.addEqualsEquation(new FixedEquation(index, length, component));
   }
 
-  public int[] partition(int index, int number, Measure spacing, String component) {
-    // TODO
-    return partition(index, number, spacing, PixelMeasure.ZERO, PixelMeasure.ZERO, component);
-  }
-
   public int[] partition(
       int index, int number, Measure spacing, Measure beginOffset, Measure endOffset, String
component) {
 
@@ -82,9 +76,6 @@
   }
 
   public void solve() {
-
-    LOG.info("solve:\n" + equations);
-
     result = equations.solve();
   }
 

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=803017&r1=803016&r2=803017&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
Tue Aug 11 07:50:36 2009
@@ -256,7 +256,7 @@
     index = equationManager.addComponentRoot();
     Assert.assertEquals(0, index);
     equationManager.setFixedLength(index, new PixelMeasure(630), "test");        // the first
(current) index has a fix size of 600
-    indices = equationManager.partition(index, 4, PixelMeasure.ZERO, "test");           
         // this index is divided into 4 parts
+    indices = equationManager.partition(index, 4, PixelMeasure.ZERO, PixelMeasure.ZERO, PixelMeasure.ZERO,
"test"); // this index is divided into 4 parts
     Assert.assertArrayEquals(new int[]{1, 2, 3, 4, 5}, indices);
     equationManager.proportionate(indices[2], indices[3], 1, 2, "test");     // the value
on index 2 has factor 1,
     //                                                the value on position 3 has factor
2
@@ -272,13 +272,13 @@
 
       index = equationManager.combine(indices[1], 1, PixelMeasure.ZERO, "test");
       Assert.assertEquals(8, index);
-      int[] i7 = equationManager.partition(8, 2, PixelMeasure.ZERO, "test");
+      int[] i7 = equationManager.partition(8, 2, PixelMeasure.ZERO, PixelMeasure.ZERO, PixelMeasure.ZERO,
"test");
       Assert.assertArrayEquals(new int[]{9, 10,11}, i7);
       equationManager.proportionate(i7[0], i7[1], 1, 2, "test");
 
       index = equationManager.combine(indices[1], 1, PixelMeasure.ZERO, "test");
       Assert.assertEquals(12, index);
-      int[] i10 = equationManager.partition(12, 2, PixelMeasure.ZERO, "test");
+      int[] i10 = equationManager.partition(12, 2, PixelMeasure.ZERO, PixelMeasure.ZERO,
PixelMeasure.ZERO, "test");
       Assert.assertArrayEquals(new int[]{13, 14, 15}, i10);
       equationManager.proportionate(i10[0], i10[1], 4, 1, "test");
     }
@@ -289,7 +289,7 @@
     {
       index = equationManager.combine(indices[3], 1, PixelMeasure.ZERO, "test");
       Assert.assertEquals(17, index);
-      int[] i14 = equationManager.partition(17, 2, PixelMeasure.ZERO, "test");
+      int[] i14 = equationManager.partition(17, 2, PixelMeasure.ZERO, PixelMeasure.ZERO,
PixelMeasure.ZERO, "test");
       Assert.assertArrayEquals(new int[]{18, 19, 20}, i14);
       equationManager.setFixedLength(i14[0], new PixelMeasure(130), "test");        // the
second one has a fix size of 200
     }
@@ -300,7 +300,7 @@
     {
       int iSpan4 = equationManager.combine(indices[0], 4, PixelMeasure.ZERO, "test");
       Assert.assertEquals(22, iSpan4);
-      int[] i18 = equationManager.partition(22, 6, PixelMeasure.ZERO, "test");
+      int[] i18 = equationManager.partition(22, 6, PixelMeasure.ZERO, PixelMeasure.ZERO,
PixelMeasure.ZERO, "test");
       Assert.assertArrayEquals(new int[]{23, 24, 25, 26, 27, 28, 29}, i18);
       equationManager.proportionate(i18[0], i18[1], 1, 2, "test");
       equationManager.proportionate(i18[0], i18[2], 1, 3, "test");



Mime
View raw message