isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danhayw...@apache.org
Subject svn commit: r1331744 [2/2] - in /incubator/isis/branches/0.3.0-incubating-NEW-OIDs/viewer/dnd: ./ src/main/java/org/apache/isis/viewer/dnd/awt/ src/main/java/org/apache/isis/viewer/dnd/calendar/ src/main/java/org/apache/isis/viewer/dnd/field/ src/main/...
Date Sat, 28 Apr 2012 10:45:30 GMT
Modified: incubator/isis/branches/0.3.0-incubating-NEW-OIDs/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/toolbar/ToolbarTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/branches/0.3.0-incubating-NEW-OIDs/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/toolbar/ToolbarTest.java?rev=1331744&r1=1331743&r2=1331744&view=diff
==============================================================================
--- incubator/isis/branches/0.3.0-incubating-NEW-OIDs/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/toolbar/ToolbarTest.java
(original)
+++ incubator/isis/branches/0.3.0-incubating-NEW-OIDs/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/toolbar/ToolbarTest.java
Sat Apr 28 10:45:28 2012
@@ -32,7 +32,7 @@ import org.apache.isis.viewer.dnd.DummyV
 import org.apache.isis.viewer.dnd.TestToolkit;
 import org.apache.isis.viewer.dnd.drawing.Location;
 import org.apache.isis.viewer.dnd.drawing.Size;
-import org.apache.isis.viewer.dnd.view.View;
+import org.apache.isis.viewer.dnd.view.ViewConstants;
 import org.apache.isis.viewer.dnd.view.content.NullContent;
 import org.apache.isis.viewer.dnd.view.look.LookFactory;
 
@@ -74,26 +74,26 @@ public class ToolbarTest {
     @Test
     public void requiredSizeForButtonsLessThanMaximumWidth() throws Exception {
         final Size size = toolbar.getRequiredSize(Size.createMax());
-        assertEquals(new Size(View.HPADDING + (100 + View.HPADDING) * 3, 10 + View.VPADDING),
size);
+        assertEquals(new Size(ViewConstants.HPADDING + (100 + ViewConstants.HPADDING) * 3,
10 + ViewConstants.VPADDING), size);
     }
 
     @Test
     public void requiredSizeForButtonsGreaterThanMaximumWidth() throws Exception {
         final Size size = toolbar.getRequiredSize(new Size(250, 100));
-        assertEquals(new Size(View.HPADDING * 3 + 220, (10 + View.VPADDING) * 2), size);
+        assertEquals(new Size(ViewConstants.HPADDING * 3 + 220, (10 + ViewConstants.VPADDING)
* 2), size);
     }
 
     @Test
     public void requiredSizeForButtonsJustGreaterThanMaximumWidth() throws Exception {
-        final int width = View.HPADDING + (100 + View.HPADDING) * 3;
+        final int width = ViewConstants.HPADDING + (100 + ViewConstants.HPADDING) * 3;
         final Size size = toolbar.getRequiredSize(new Size(width + 1, 100));
-        assertEquals(new Size(width, 10 + View.VPADDING), size);
+        assertEquals(new Size(width, 10 + ViewConstants.VPADDING), size);
     }
 
     @Test
     public void requiredSizeForButtonsSameAsMaximumWidth() throws Exception {
-        final Size size = toolbar.getRequiredSize(new Size(View.HPADDING + (100 + View.HPADDING)
* 3, 100));
-        assertEquals(new Size(View.HPADDING * 3 + 220, (10 + View.VPADDING) * 2), size);
+        final Size size = toolbar.getRequiredSize(new Size(ViewConstants.HPADDING + (100
+ ViewConstants.HPADDING) * 3, 100));
+        assertEquals(new Size(ViewConstants.HPADDING * 3 + 220, (10 + ViewConstants.VPADDING)
* 2), size);
     }
 
     @Test
@@ -107,16 +107,16 @@ public class ToolbarTest {
     @Test
     public void layoutLocationForButtonsLessThanMaximumWidth() throws Exception {
         toolbar.doLayout(Size.createMax());
-        assertEquals(new Location(View.HPADDING, 0), button1.getLocation());
-        assertEquals(new Location(View.HPADDING * 2 + 120, 0), button2.getLocation());
-        assertEquals(new Location(View.HPADDING * 3 + 220, 0), button3.getLocation());
+        assertEquals(new Location(ViewConstants.HPADDING, 0), button1.getLocation());
+        assertEquals(new Location(ViewConstants.HPADDING * 2 + 120, 0), button2.getLocation());
+        assertEquals(new Location(ViewConstants.HPADDING * 3 + 220, 0), button3.getLocation());
     }
 
     @Test
     public void layoutLocationForButtonsGreaterThanMaximumWidth() throws Exception {
         toolbar.doLayout(new Size(250, 100));
-        assertEquals(new Location(View.HPADDING, 0), button1.getLocation());
-        assertEquals(new Location(View.HPADDING * 2 + 120, 0), button2.getLocation());
-        assertEquals(new Location(View.HPADDING, 13), button3.getLocation());
+        assertEquals(new Location(ViewConstants.HPADDING, 0), button1.getLocation());
+        assertEquals(new Location(ViewConstants.HPADDING * 2 + 120, 0), button2.getLocation());
+        assertEquals(new Location(ViewConstants.HPADDING, 13), button3.getLocation());
     }
 }



Mime
View raw message