isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danhayw...@apache.org
Subject svn commit: r1098945 [20/25] - in /incubator/isis/trunk/viewer: bdd/common/src/main/java/org/apache/isis/viewer/bdd/common/ bdd/common/src/main/java/org/apache/isis/viewer/bdd/common/components/ bdd/common/src/main/java/org/apache/isis/viewer/bdd/commo...
Date Tue, 03 May 2011 07:18:38 GMT
Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/look/simple/SimpleStyleWindowBorder.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/look/simple/SimpleStyleWindowBorder.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/look/simple/SimpleStyleWindowBorder.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/look/simple/SimpleStyleWindowBorder.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.view.look.simple;
 
 import org.apache.isis.core.commons.debug.DebugBuilder;
@@ -36,88 +35,94 @@ import org.apache.isis.viewer.dnd.view.b
 import org.apache.isis.viewer.dnd.view.text.TextUtils;
 import org.apache.isis.viewer.dnd.view.window.WindowControl;
 
-
-public class SimpleStyleWindowBorder  implements BorderDrawing {
+public class SimpleStyleWindowBorder implements BorderDrawing {
     final protected static int LINE_THICKNESS = 4;
     private final static Text TITLE_STYLE = Toolkit.getText(ColorsAndFonts.TEXT_TITLE_SMALL);
 
-    int titlebarHeight = Math.max(WindowControl.HEIGHT + View.VPADDING + TITLE_STYLE.getDescent(), TITLE_STYLE.getTextHeight());
+    int titlebarHeight = Math.max(WindowControl.HEIGHT + View.VPADDING + TITLE_STYLE.getDescent(),
+        TITLE_STYLE.getTextHeight());
     int baseline = LINE_THICKNESS + WindowControl.HEIGHT;
     int left = LINE_THICKNESS;
     int right = LINE_THICKNESS;
     int top = LINE_THICKNESS + titlebarHeight;
     int bottom = LINE_THICKNESS;
 
+    @Override
     public void debugDetails(final DebugBuilder debug) {
-        debug.append("titlebar " , top - titlebarHeight);
+        debug.append("titlebar ", top - titlebarHeight);
     }
 
-    public void layoutControls(final Size size, View[] controls) {
-        int x = left + View.HPADDING; //size.getWidth() - right - (WindowControl.WIDTH + View.HPADDING) * controls.length;
+    @Override
+    public void layoutControls(final Size size, final View[] controls) {
+        int x = left + View.HPADDING; // size.getWidth() - right - (WindowControl.WIDTH + View.HPADDING) *
+                                      // controls.length;
         final int y = LINE_THICKNESS + View.VPADDING;
 
-        for (int i = 0; i < controls.length; i++) {
-            controls[i].setSize(controls[i].getRequiredSize(new Size()));
-            controls[i].setLocation(new Location(x, y));
-            x += controls[i].getSize().getWidth();
+        for (final View control : controls) {
+            control.setSize(control.getRequiredSize(new Size()));
+            control.setLocation(new Location(x, y));
+            x += control.getSize().getWidth();
         }
     }
 
-    public void draw(final Canvas canvas, Size s, boolean hasFocus, final ViewState state, View[] controls, String title) {
+    @Override
+    public void draw(final Canvas canvas, final Size s, final boolean hasFocus, final ViewState state,
+        final View[] controls, final String title) {
         final int x = left;
         final int width = s.getWidth();
         final int height = s.getHeight();
 
-        final Color borderColor = hasFocus ? Toolkit.getColor(ColorsAndFonts.COLOR_PRIMARY1) : Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY1);
+        final Color borderColor =
+            hasFocus ? Toolkit.getColor(ColorsAndFonts.COLOR_PRIMARY1) : Toolkit
+                .getColor(ColorsAndFonts.COLOR_SECONDARY1);
         canvas.drawRoundedRectangle(0, 0, width, height, 8, 8, borderColor);
-        canvas.drawRectangle(LINE_THICKNESS - 1, LINE_THICKNESS - 1, width - LINE_THICKNESS * 2 + 2, height - LINE_THICKNESS * 2 + 2, borderColor);
-        
-        final Color titleBarTextColor = hasFocus ? Toolkit.getColor(ColorsAndFonts.COLOR_BLACK) : Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY1);
-        final Color titleBarBackgroundColor = hasFocus ? Toolkit.getColor(ColorsAndFonts.COLOR_PRIMARY3) : Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY3);
-/*       
-        final Color insetColorLight = hasFocus ? Toolkit.getColor("primary2") : Toolkit.getColor("secondary2");
-        final Color insetColorDark = hasFocus ? Toolkit.getColor("black") : Toolkit.getColor("black");
-
-        
-        // slightly rounded grey border
-        canvas.drawRectangle(1, 0, width - 2, height, borderColor);
-        canvas.drawRectangle(0, 1, width, height - 2, borderColor);
-
-        for (int i = 2; i < left; i++) {
-            canvas.drawRectangle(i, i, width - 2 * i, height - 2 * i, borderColor);
-        }
+        canvas.drawRectangle(LINE_THICKNESS - 1, LINE_THICKNESS - 1, width - LINE_THICKNESS * 2 + 2, height
+            - LINE_THICKNESS * 2 + 2, borderColor);
 
-        if (state.isActive()) {
-            final int i = left;
-            canvas.drawRectangle(i, top, width - 2 * i, height - 2 * i - top, Toolkit.getColor("active"));
-        }
-
-*/
+        final Color titleBarTextColor =
+            hasFocus ? Toolkit.getColor(ColorsAndFonts.COLOR_BLACK) : Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY1);
+        final Color titleBarBackgroundColor =
+            hasFocus ? Toolkit.getColor(ColorsAndFonts.COLOR_PRIMARY3) : Toolkit
+                .getColor(ColorsAndFonts.COLOR_SECONDARY3);
+        /*
+         * final Color insetColorLight = hasFocus ? Toolkit.getColor("primary2") : Toolkit.getColor("secondary2"); final
+         * Color insetColorDark = hasFocus ? Toolkit.getColor("black") : Toolkit.getColor("black");
+         * 
+         * 
+         * // slightly rounded grey border canvas.drawRectangle(1, 0, width - 2, height, borderColor);
+         * canvas.drawRectangle(0, 1, width, height - 2, borderColor);
+         * 
+         * for (int i = 2; i < left; i++) { canvas.drawRectangle(i, i, width - 2 * i, height - 2 * i, borderColor); }
+         * 
+         * if (state.isActive()) { final int i = left; canvas.drawRectangle(i, top, width - 2 * i, height - 2 * i - top,
+         * Toolkit.getColor("active")); }
+         */
         // title bar
-        canvas.drawSolidRectangle(left + 1, LINE_THICKNESS + 1, width - LINE_THICKNESS * 2 - 1, titlebarHeight - 1, titleBarBackgroundColor);
+        canvas.drawSolidRectangle(left + 1, LINE_THICKNESS + 1, width - LINE_THICKNESS * 2 - 1, titlebarHeight - 1,
+            titleBarBackgroundColor);
         final int y = LINE_THICKNESS + titlebarHeight;
         canvas.drawLine(LINE_THICKNESS, y, width - LINE_THICKNESS - 1, y, borderColor);
-       
-        int controlWidth = View.HPADDING + (WindowControl.WIDTH + View.HPADDING) * controls.length;
-        String text = TextUtils.limitText(title, TITLE_STYLE, width - controlWidth - LINE_THICKNESS * 2 - 2);
+
+        final int controlWidth = View.HPADDING + (WindowControl.WIDTH + View.HPADDING) * controls.length;
+        final String text = TextUtils.limitText(title, TITLE_STYLE, width - controlWidth - LINE_THICKNESS * 2 - 2);
         canvas.drawText(text, x + controlWidth, baseline, titleBarTextColor, TITLE_STYLE);
-    //    canvas.drawRectangle(x, 3, width, 20, titleBarTextColor);
-/*
-        final Color white = Toolkit.getColor("white");
-        final int hatchX = View.HPADDING + TITLE_STYLE.stringWidth(title) + 10;
-        final int hatchWidth = controls[0].getBounds().getX() - hatchX - 10;
-        final int hatchY = LINE_THICKNESS + 2;
-        final int hatchHeight = titlebarHeight - 6;
-        DrawingUtil.drawHatching(canvas, hatchX, hatchY, hatchWidth, hatchHeight, borderColor, white);
-*/
+        // canvas.drawRectangle(x, 3, width, 20, titleBarTextColor);
+        /*
+         * final Color white = Toolkit.getColor("white"); final int hatchX = View.HPADDING +
+         * TITLE_STYLE.stringWidth(title) + 10; final int hatchWidth = controls[0].getBounds().getX() - hatchX - 10;
+         * final int hatchY = LINE_THICKNESS + 2; final int hatchHeight = titlebarHeight - 6;
+         * DrawingUtil.drawHatching(canvas, hatchX, hatchY, hatchWidth, hatchHeight, borderColor, white);
+         */
     }
 
-    public void drawTransientMarker(Canvas canvas, Size size) {
+    @Override
+    public void drawTransientMarker(final Canvas canvas, final Size size) {
         final int height = top - LINE_THICKNESS - 2;
         final int x = size.getWidth() - 50;
         final Image icon = ImageFactory.getInstance().loadIcon("transient", height, null);
         if (icon == null) {
-            canvas.drawText("*", x, baseline, Toolkit.getColor(ColorsAndFonts.COLOR_BLACK), Toolkit.getText(ColorsAndFonts.TEXT_NORMAL));
+            canvas.drawText("*", x, baseline, Toolkit.getColor(ColorsAndFonts.COLOR_BLACK),
+                Toolkit.getText(ColorsAndFonts.TEXT_NORMAL));
         } else {
             canvas.drawImage(icon, x, LINE_THICKNESS + 1, height, height);
             // canvas.drawRectangle(x, LINE_THICKNESS + 1, height, height, Color.RED);
@@ -125,27 +130,32 @@ public class SimpleStyleWindowBorder  im
 
     }
 
-    public void getRequiredSize(Size size, String title, View[] controls) {
-        final int width = left + View.HPADDING + TITLE_STYLE.stringWidth(title) + View.HPADDING + controls.length
+    @Override
+    public void getRequiredSize(final Size size, final String title, final View[] controls) {
+        final int width =
+            left + View.HPADDING + TITLE_STYLE.stringWidth(title) + View.HPADDING + controls.length
                 * (WindowControl.WIDTH + View.HPADDING) + View.HPADDING + right;
         size.ensureWidth(width);
     }
 
+    @Override
     public int getLeft() {
         return left;
     }
 
+    @Override
     public int getRight() {
         return right;
     }
 
+    @Override
     public int getTop() {
         return top;
     }
 
+    @Override
     public int getBottom() {
         return bottom;
     }
 
 }
-

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/look/swing/Button3DStyleRender.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/look/swing/Button3DStyleRender.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/look/swing/Button3DStyleRender.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/look/swing/Button3DStyleRender.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.view.look.swing;
 
 import org.apache.isis.viewer.dnd.drawing.Canvas;
@@ -33,21 +32,32 @@ public class Button3DStyleRender impleme
     private static final Text style = Toolkit.getText(ColorsAndFonts.TEXT_CONTROL);
     private final int buttonHeight;
 
-    public Button3DStyleRender() {     
+    public Button3DStyleRender() {
         this.buttonHeight = 4 + style.getTextHeight() + 4;
     }
-    
-    public void draw(Canvas canvas, Size size, boolean isDisabled, boolean isDefault, boolean hasFocus, boolean isOver, boolean isPressed, String text) {
+
+    @Override
+    public void draw(final Canvas canvas, final Size size, final boolean isDisabled, final boolean isDefault,
+        final boolean hasFocus, final boolean isOver, final boolean isPressed, final String text) {
         final int x = 0;
         final int y = 0;
-        
+
         final int buttonWidth = TEXT_PADDING + style.stringWidth(text) + TEXT_PADDING;
 
-        canvas.drawSolidRectangle(x, y, buttonWidth, buttonHeight,  Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY3));
+        canvas.drawSolidRectangle(x, y, buttonWidth, buttonHeight, Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY3));
 
-        final Color color = isDisabled ? Toolkit.getColor(ColorsAndFonts.COLOR_MENU_DISABLED) : Toolkit.getColor(ColorsAndFonts.COLOR_BLACK);
-        final Color border = isDisabled ? Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY3) : Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY2);
-        canvas.drawRectangle(x, y, buttonWidth, buttonHeight, isOver & !isDisabled ? Toolkit.getColor(ColorsAndFonts.COLOR_PRIMARY1) : Toolkit
+        final Color color =
+            isDisabled ? Toolkit.getColor(ColorsAndFonts.COLOR_MENU_DISABLED) : Toolkit
+                .getColor(ColorsAndFonts.COLOR_BLACK);
+        final Color border =
+            isDisabled ? Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY3) : Toolkit
+                .getColor(ColorsAndFonts.COLOR_SECONDARY2);
+        canvas.drawRectangle(
+            x,
+            y,
+            buttonWidth,
+            buttonHeight,
+            isOver & !isDisabled ? Toolkit.getColor(ColorsAndFonts.COLOR_PRIMARY1) : Toolkit
                 .getColor(ColorsAndFonts.COLOR_BLACK));
         canvas.draw3DRectangle(x + 1, y + 1, buttonWidth - 2, buttonHeight - 2, border, !isPressed);
         canvas.draw3DRectangle(x + 2, y + 2, buttonWidth - 4, buttonHeight - 4, border, !isPressed);
@@ -55,15 +65,16 @@ public class Button3DStyleRender impleme
             canvas.drawRectangle(x + 3, y + 3, buttonWidth - 6, buttonHeight - 6, border);
         }
         if (hasFocus) {
-            canvas.drawRectangle(x + 3, y + 3, buttonWidth - 6, buttonHeight - 6, Toolkit.getColor(ColorsAndFonts.COLOR_WHITE));
+            canvas.drawRectangle(x + 3, y + 3, buttonWidth - 6, buttonHeight - 6,
+                Toolkit.getColor(ColorsAndFonts.COLOR_WHITE));
         }
         canvas.drawText(text, x + TEXT_PADDING, y + buttonHeight / 2 + style.getMidPoint(), color, style);
     }
 
-    public Size getMaximumSize(String text) {
-        final int buttonWidth = TEXT_PADDING + Toolkit.getText(ColorsAndFonts.TEXT_CONTROL).stringWidth(text) + TEXT_PADDING;
+    @Override
+    public Size getMaximumSize(final String text) {
+        final int buttonWidth =
+            TEXT_PADDING + Toolkit.getText(ColorsAndFonts.TEXT_CONTROL).stringWidth(text) + TEXT_PADDING;
         return new Size(buttonWidth, buttonHeight);
     }
 }
-
-

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/look/swing/CloseWindow3DRender.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/look/swing/CloseWindow3DRender.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/look/swing/CloseWindow3DRender.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/look/swing/CloseWindow3DRender.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.view.look.swing;
 
 import org.apache.isis.viewer.dnd.drawing.Canvas;
@@ -28,7 +27,9 @@ import org.apache.isis.viewer.dnd.view.w
 
 public class CloseWindow3DRender implements CloseWindowRender {
 
-    public void draw(Canvas canvas, int width, int height, boolean isDisabled, boolean isOver, boolean isPressed) {
+    @Override
+    public void draw(final Canvas canvas, final int width, final int height, final boolean isDisabled,
+        final boolean isOver, final boolean isPressed) {
         final int x = 0;
         final int y = 0;
 
@@ -43,5 +44,3 @@ public class CloseWindow3DRender impleme
     }
 
 }
-
-

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/look/swing/IconizeWindow3DRender.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/look/swing/IconizeWindow3DRender.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/look/swing/IconizeWindow3DRender.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/look/swing/IconizeWindow3DRender.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.view.look.swing;
 
 import org.apache.isis.viewer.dnd.drawing.Canvas;
@@ -25,10 +24,11 @@ import org.apache.isis.viewer.dnd.drawin
 import org.apache.isis.viewer.dnd.view.Toolkit;
 import org.apache.isis.viewer.dnd.view.window.IconizeWindowRender;
 
-
 public class IconizeWindow3DRender implements IconizeWindowRender {
 
-    public void draw(Canvas canvas, int width, int height, boolean isDisabled, boolean isOver, boolean isPressed) {
+    @Override
+    public void draw(final Canvas canvas, final int width, final int height, final boolean isDisabled,
+        final boolean isOver, final boolean isPressed) {
         final int x = 0;
         final int y = 0;
 
@@ -38,4 +38,3 @@ public class IconizeWindow3DRender imple
         canvas.drawLine(x + 3, y + 9, x + 8, y + 9, Toolkit.getColor(ColorsAndFonts.COLOR_BLACK));
     }
 }
-

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/look/swing/ResizeView3DRender.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/look/swing/ResizeView3DRender.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/look/swing/ResizeView3DRender.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/look/swing/ResizeView3DRender.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.view.look.swing;
 
 import org.apache.isis.viewer.dnd.drawing.Canvas;
@@ -29,12 +28,14 @@ import org.apache.isis.viewer.dnd.view.b
 
 public class ResizeView3DRender implements ResizeViewRender {
 
-    public void draw(Canvas canvas, int x, int width, int height, boolean hasFocus) {
-        final Color borderColor = hasFocus ? Toolkit.getColor(ColorsAndFonts.COLOR_PRIMARY3) : Toolkit
+    @Override
+    public void draw(final Canvas canvas, final int x, final int width, final int height, final boolean hasFocus) {
+        final Color borderColor =
+            hasFocus ? Toolkit.getColor(ColorsAndFonts.COLOR_PRIMARY3) : Toolkit
                 .getColor(ColorsAndFonts.COLOR_SECONDARY3);
         canvas.drawSolidRectangle(x, 0, width, height, borderColor);
 
-        Color secondary2 = Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY2);
+        final Color secondary2 = Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY2);
         canvas.drawRectangle(x, -1, width, height + 2, secondary2);
 
         int h1 = 30;
@@ -50,5 +51,3 @@ public class ResizeView3DRender implemen
     }
 
 }
-
-

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/look/swing/ResizeWindow3DRender.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/look/swing/ResizeWindow3DRender.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/look/swing/ResizeWindow3DRender.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/look/swing/ResizeWindow3DRender.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.view.look.swing;
 
 import org.apache.isis.viewer.dnd.drawing.Canvas;
@@ -27,7 +26,9 @@ import org.apache.isis.viewer.dnd.view.w
 
 public class ResizeWindow3DRender implements ResizeWindowRender {
 
-    public void draw(Canvas canvas, int width, int height, boolean isDisabled, boolean isOver, boolean isPressed) {
+    @Override
+    public void draw(final Canvas canvas, final int width, final int height, final boolean isDisabled,
+        final boolean isOver, final boolean isPressed) {
         final int x = 0;
         final int y = 0;
 
@@ -38,5 +39,3 @@ public class ResizeWindow3DRender implem
     }
 
 }
-
-

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/look/swing/ScrollBar3DRender.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/look/swing/ScrollBar3DRender.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/look/swing/ScrollBar3DRender.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/look/swing/ScrollBar3DRender.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.view.look.swing;
 
 import org.apache.isis.viewer.dnd.drawing.Canvas;
@@ -29,10 +28,13 @@ import org.apache.isis.viewer.dnd.view.b
 
 public class ScrollBar3DRender implements ScrollBarRender {
 
-    public void draw(Canvas canvas, boolean isHorizontal, int x, int y, int width, int height, int scrollPosition, int visibleAmount) {
+    @Override
+    public void draw(final Canvas canvas, final boolean isHorizontal, final int x, final int y, final int width,
+        final int height, final int scrollPosition, final int visibleAmount) {
         final Color thumbColor = Toolkit.getColor(ColorsAndFonts.COLOR_PRIMARY2);
 
-  //     canvas.drawSolidRectangle(x + 1, y + 1, width - 2, height - 2, Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY3));
+        // canvas.drawSolidRectangle(x + 1, y + 1, width - 2, height - 2,
+        // Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY3));
         canvas.drawSolidRectangle(x + 1, y + 1, width - 2, height, Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY3));
         int x2 = x;
         int y2 = y;
@@ -45,13 +47,12 @@ public class ScrollBar3DRender implement
             y2 += scrollPosition;
             scrollHeight = visibleAmount;
         }
-        canvas.drawSolidRectangle(x2 + 1, y2, scrollWidth - 2,scrollHeight, thumbColor);
-        canvas.drawRectangle(x2 + 1, y2, scrollWidth - 2, scrollHeight, Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY1));
-        DrawingUtil.drawHatching(canvas, x2 + 3, y2 + 4, scrollWidth - 6,
-                scrollHeight - 8, Toolkit.getColor(ColorsAndFonts.COLOR_PRIMARY1), Toolkit.getColor(ColorsAndFonts.COLOR_PRIMARY3));
+        canvas.drawSolidRectangle(x2 + 1, y2, scrollWidth - 2, scrollHeight, thumbColor);
+        canvas.drawRectangle(x2 + 1, y2, scrollWidth - 2, scrollHeight,
+            Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY1));
+        DrawingUtil.drawHatching(canvas, x2 + 3, y2 + 4, scrollWidth - 6, scrollHeight - 8,
+            Toolkit.getColor(ColorsAndFonts.COLOR_PRIMARY1), Toolkit.getColor(ColorsAndFonts.COLOR_PRIMARY3));
         canvas.drawRectangle(x, y, width, height, Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY2));
     }
 
 }
-
-

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/look/swing/SwingLook.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/look/swing/SwingLook.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/look/swing/SwingLook.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/look/swing/SwingLook.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.view.look.swing;
 
 import org.apache.isis.viewer.dnd.view.Look;
@@ -31,6 +30,7 @@ import org.apache.isis.viewer.dnd.view.w
 
 public class SwingLook implements Look {
 
+    @Override
     public void install() {
         Button.setButtonRender(new Button3DStyleRender());
         AbstractWindowBorder.setBorderRenderer(new SwingStyleWindowBorder());
@@ -41,10 +41,9 @@ public class SwingLook implements Look {
         ScrollBorder.setRender(new ScrollBar3DRender());
     }
 
+    @Override
     public String getName() {
         return "Swing";
     }
 
 }
-
-

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/look/swing/SwingStyleWindowBorder.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/look/swing/SwingStyleWindowBorder.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/look/swing/SwingStyleWindowBorder.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/look/swing/SwingStyleWindowBorder.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.view.look.swing;
 
 import org.apache.isis.core.commons.debug.DebugBuilder;
@@ -37,48 +36,55 @@ import org.apache.isis.viewer.dnd.view.b
 import org.apache.isis.viewer.dnd.view.text.TextUtils;
 import org.apache.isis.viewer.dnd.view.window.WindowControl;
 
-
 public class SwingStyleWindowBorder implements BorderDrawing {
     final protected static int LINE_THICKNESS = 5;
     private final static Text TITLE_STYLE = Toolkit.getText(ColorsAndFonts.TEXT_TITLE_SMALL);
 
-    int titlebarHeight = Math.max(WindowControl.HEIGHT + View.VPADDING + TITLE_STYLE.getDescent(), TITLE_STYLE.getTextHeight());
+    int titlebarHeight = Math.max(WindowControl.HEIGHT + View.VPADDING + TITLE_STYLE.getDescent(),
+        TITLE_STYLE.getTextHeight());
     int baseline = LINE_THICKNESS + WindowControl.HEIGHT;
     int left = LINE_THICKNESS;
     int right = LINE_THICKNESS;
     int top = LINE_THICKNESS + titlebarHeight;
     int bottom = LINE_THICKNESS;
 
+    @Override
     public void debugDetails(final DebugBuilder debug) {
         debug.appendln("titlebar ", top - titlebarHeight);
     }
 
-    public void layoutControls(final Size size, View[] controls) {
+    @Override
+    public void layoutControls(final Size size, final View[] controls) {
         int x = size.getWidth() - right - (WindowControl.WIDTH + View.HPADDING) * controls.length;
         final int y = LINE_THICKNESS + View.VPADDING;
 
-        for (int i = 0; i < controls.length; i++) {
-            controls[i].setSize(controls[i].getRequiredSize(new Size()));
-            controls[i].setLocation(new Location(x, y));
-            x += controls[i].getSize().getWidth() + View.HPADDING;
+        for (final View control : controls) {
+            control.setSize(control.getRequiredSize(new Size()));
+            control.setLocation(new Location(x, y));
+            x += control.getSize().getWidth() + View.HPADDING;
         }
     }
 
-    public void draw(final Canvas canvas, Size s, boolean hasFocus, final ViewState state, View[] controls, String title) {
+    @Override
+    public void draw(final Canvas canvas, final Size s, final boolean hasFocus, final ViewState state,
+        final View[] controls, final String title) {
         final int x = left;
         final int width = s.getWidth();
         final int height = s.getHeight();
 
-        final Color titleBarBackgroundColor = hasFocus ? Toolkit.getColor(ColorsAndFonts.COLOR_PRIMARY3) : Toolkit
+        final Color titleBarBackgroundColor =
+            hasFocus ? Toolkit.getColor(ColorsAndFonts.COLOR_PRIMARY3) : Toolkit
                 .getColor(ColorsAndFonts.COLOR_SECONDARY3);
-        final Color titleBarTextColor = hasFocus ? Toolkit.getColor(ColorsAndFonts.COLOR_BLACK) : Toolkit
+        final Color titleBarTextColor =
+            hasFocus ? Toolkit.getColor(ColorsAndFonts.COLOR_BLACK) : Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY1);
+        final Color borderColor =
+            hasFocus ? Toolkit.getColor(ColorsAndFonts.COLOR_PRIMARY1) : Toolkit
                 .getColor(ColorsAndFonts.COLOR_SECONDARY1);
-        final Color borderColor = hasFocus ? Toolkit.getColor(ColorsAndFonts.COLOR_PRIMARY1) : Toolkit
-                .getColor(ColorsAndFonts.COLOR_SECONDARY1);
-        final Color insetColorLight = hasFocus ? Toolkit.getColor(ColorsAndFonts.COLOR_PRIMARY2) : Toolkit
+        final Color insetColorLight =
+            hasFocus ? Toolkit.getColor(ColorsAndFonts.COLOR_PRIMARY2) : Toolkit
                 .getColor(ColorsAndFonts.COLOR_SECONDARY2);
-        final Color insetColorDark = hasFocus ? Toolkit.getColor(ColorsAndFonts.COLOR_BLACK) : Toolkit
-                .getColor(ColorsAndFonts.COLOR_BLACK);
+        final Color insetColorDark =
+            hasFocus ? Toolkit.getColor(ColorsAndFonts.COLOR_BLACK) : Toolkit.getColor(ColorsAndFonts.COLOR_BLACK);
 
         // slightly rounded grey border
         canvas.drawRectangle(1, 0, width - 2, height, borderColor);
@@ -93,7 +99,7 @@ public class SwingStyleWindowBorder impl
             // canvas.drawRectangle(i, top, width - 2 * i, height - 2 * i - top,
             // Toolkit.getColor(ColorsAndFonts.COLOR_ACTIVE));
 
-            Image busyImage = ImageFactory.getInstance().loadIcon("busy", 16, null);
+            final Image busyImage = ImageFactory.getInstance().loadIcon("busy", 16, null);
             canvas.drawImage(busyImage, width - right - 16 - 4, top + 4);
         }
 
@@ -114,8 +120,8 @@ public class SwingStyleWindowBorder impl
         final int y = LINE_THICKNESS + titlebarHeight - 1;
         canvas.drawLine(x, y, width - right - 1, y, borderColor);
 
-        int controlWidth = View.HPADDING + (WindowControl.WIDTH + View.HPADDING) * controls.length;
-        String text = TextUtils.limitText(title, TITLE_STYLE, width - controlWidth - LINE_THICKNESS * 2 - 2);
+        final int controlWidth = View.HPADDING + (WindowControl.WIDTH + View.HPADDING) * controls.length;
+        final String text = TextUtils.limitText(title, TITLE_STYLE, width - controlWidth - LINE_THICKNESS * 2 - 2);
         canvas.drawText(text, x + View.HPADDING, baseline, titleBarTextColor, TITLE_STYLE);
 
         final Color white = Toolkit.getColor(ColorsAndFonts.COLOR_WHITE);
@@ -127,41 +133,47 @@ public class SwingStyleWindowBorder impl
 
     }
 
-    public void drawTransientMarker(Canvas canvas, Size size) {
+    @Override
+    public void drawTransientMarker(final Canvas canvas, final Size size) {
         final int height = top - LINE_THICKNESS - 2;
         final int x = size.getWidth() - 50;
         final Image icon = ImageFactory.getInstance().loadIcon("transient", height, null);
         if (icon == null) {
-            canvas.drawText("*", x, baseline, Toolkit.getColor(ColorsAndFonts.COLOR_BLACK), Toolkit
-                    .getText(ColorsAndFonts.TEXT_NORMAL));
+            canvas.drawText("*", x, baseline, Toolkit.getColor(ColorsAndFonts.COLOR_BLACK),
+                Toolkit.getText(ColorsAndFonts.TEXT_NORMAL));
         } else {
             canvas.drawImage(icon, x, LINE_THICKNESS + 1, height, height);
         }
 
     }
 
-    public void getRequiredSize(Size size, String title, View[] controls) {
-        final int width = left + View.HPADDING + TITLE_STYLE.stringWidth(title) + View.HPADDING + controls.length
+    @Override
+    public void getRequiredSize(final Size size, final String title, final View[] controls) {
+        final int width =
+            left + View.HPADDING + TITLE_STYLE.stringWidth(title) + View.HPADDING + controls.length
                 * (WindowControl.WIDTH + View.HPADDING) + View.HPADDING + right;
-     //   size.extendWidth(getLeft() + getRight());
+        // size.extendWidth(getLeft() + getRight());
         size.ensureWidth(width);
     }
 
+    @Override
     public int getLeft() {
         return left;
     }
 
+    @Override
     public int getRight() {
         return right;
     }
 
+    @Override
     public int getTop() {
         return top;
     }
 
+    @Override
     public int getBottom() {
         return bottom;
     }
 
 }
-

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/lookup/DisposeOverlay.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/lookup/DisposeOverlay.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/lookup/DisposeOverlay.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/lookup/DisposeOverlay.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.view.lookup;
 
 import java.awt.event.KeyEvent;
@@ -28,11 +27,10 @@ import org.apache.isis.viewer.dnd.view.V
 import org.apache.isis.viewer.dnd.view.Workspace;
 import org.apache.isis.viewer.dnd.view.base.AbstractViewDecorator;
 
-
 public class DisposeOverlay extends AbstractViewDecorator {
     private final SelectionListAxis axis;
 
-    public DisposeOverlay(final View wrappedView, SelectionListAxis axis) {
+    public DisposeOverlay(final View wrappedView, final SelectionListAxis axis) {
         super(wrappedView);
         this.axis = axis;
     }

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/lookup/OpenDropDownBorder.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/lookup/OpenDropDownBorder.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/lookup/OpenDropDownBorder.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/lookup/OpenDropDownBorder.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.view.lookup;
 
 import java.awt.event.KeyEvent;
@@ -36,7 +35,6 @@ import org.apache.isis.viewer.dnd.view.V
 import org.apache.isis.viewer.dnd.view.action.BackgroundWork;
 import org.apache.isis.viewer.dnd.view.base.AbstractBorder;
 
-
 /**
  * Field border that provides a drop-down selector.
  */
@@ -49,7 +47,7 @@ public abstract class OpenDropDownBorder
     }
 
     protected abstract View createDropDownView();
-    
+
     @Override
     public void draw(final Canvas canvas) {
         final Size size = getSize();
@@ -63,7 +61,9 @@ public abstract class OpenDropDownBorder
 
             canvas.drawShape(triangle, x, y, Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY3));
             if (over) {
-                final Color color = over ? Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY1) : Toolkit.getColor(ColorsAndFonts.COLOR_PRIMARY2);
+                final Color color =
+                    over ? Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY1) : Toolkit
+                        .getColor(ColorsAndFonts.COLOR_PRIMARY2);
                 canvas.drawSolidShape(triangle, x, y, color);
             }
         }
@@ -138,6 +138,7 @@ public abstract class OpenDropDownBorder
 
     private void open() {
         BackgroundWork.runTaskInBackground(this, new BackgroundTask() {
+            @Override
             public void execute() {
                 final View overlay = createDropDownView();
                 final Location location = getView().getAbsoluteLocation();
@@ -146,16 +147,18 @@ public abstract class OpenDropDownBorder
                 getViewManager().setOverlayView(overlay);
             }
 
+            @Override
             public String getDescription() {
                 return "";
             }
 
+            @Override
             public String getName() {
                 return "Opening selector";
             }
         });
     }
 
-    // TODO move into abstract subclass for selection list 
+    // TODO move into abstract subclass for selection list
     protected abstract void setSelection(OptionContent selectedContent);
 }

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/lookup/OpenObjectDropDownBorder.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/lookup/OpenObjectDropDownBorder.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/lookup/OpenObjectDropDownBorder.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/lookup/OpenObjectDropDownBorder.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.view.lookup;
 
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
@@ -29,21 +28,22 @@ import org.apache.isis.viewer.dnd.view.V
 import org.apache.isis.viewer.dnd.view.action.ParameterContent;
 import org.apache.isis.viewer.dnd.view.field.OneToOneField;
 
-
 public class OpenObjectDropDownBorder extends OpenDropDownBorder {
-    private final SelectionListSpecification listSpecification; 
+    private final SelectionListSpecification listSpecification;
 
     public OpenObjectDropDownBorder(final View wrappedView, final ViewSpecification spec) {
         super(wrappedView);
         listSpecification = new SelectionListSpecification() {
-            protected View createElementView(Content content) {
+            @Override
+            protected View createElementView(final Content content) {
                 return spec.createView(content, null, 0);
             }
         };
     }
 
+    @Override
     protected View createDropDownView() {
-        Axes viewAxes = getViewAxes();
+        final Axes viewAxes = getViewAxes();
         viewAxes.add(new SelectionListAxis(this), SelectionListAxis.class);
         return listSpecification.createView(getContent(), viewAxes, -1);
     }
@@ -62,7 +62,8 @@ public class OpenObjectDropDownBorder ex
 
     }
 
-    protected void setSelection(OptionContent selectedContent) {
+    @Override
+    protected void setSelection(final OptionContent selectedContent) {
         final ObjectAdapter option = selectedContent.getAdapter();
         ((ObjectContent) getContent()).setObject(option);
     }

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/lookup/OpenValueDropDownBorder.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/lookup/OpenValueDropDownBorder.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/lookup/OpenValueDropDownBorder.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/lookup/OpenValueDropDownBorder.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.view.lookup;
 
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
@@ -29,10 +28,10 @@ import org.apache.isis.viewer.dnd.view.b
 import org.apache.isis.viewer.dnd.view.content.TextParseableContent;
 import org.apache.isis.viewer.dnd.view.field.TextParseableField;
 
-
 public class OpenValueDropDownBorder extends OpenDropDownBorder {
     private static final SelectionListSpecification spec = new SelectionListSpecification() {
-        protected View createElementView(Content content) {
+        @Override
+        protected View createElementView(final Content content) {
             return new TextView(content, this);
         }
     };
@@ -41,8 +40,9 @@ public class OpenValueDropDownBorder ext
         super(wrappedView);
     }
 
+    @Override
     protected View createDropDownView() {
-        Axes viewAxes = getViewAxes();
+        final Axes viewAxes = getViewAxes();
         viewAxes.add(new SelectionListAxis(this), SelectionListAxis.class);
         return spec.createView(getContent(), viewAxes, -1);
     }
@@ -61,9 +61,10 @@ public class OpenValueDropDownBorder ext
 
     }
 
-    protected void setSelection(OptionContent selectedContent) {
+    @Override
+    protected void setSelection(final OptionContent selectedContent) {
         final ObjectAdapter option = selectedContent.getAdapter();
-        TextParseableContent content = (TextParseableContent) getContent();
+        final TextParseableContent content = (TextParseableContent) getContent();
         content.parseTextEntry(option.titleString());
         content.entryComplete();
     }

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/lookup/OptionContent.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/lookup/OptionContent.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/lookup/OptionContent.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/lookup/OptionContent.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.view.lookup;
 
 import org.apache.isis.core.commons.debug.DebugBuilder;
@@ -30,7 +29,6 @@ import org.apache.isis.viewer.dnd.drawin
 import org.apache.isis.viewer.dnd.view.Content;
 import org.apache.isis.viewer.dnd.view.content.AbstractContent;
 
-
 public class OptionContent extends AbstractContent {
     private final ObjectAdapter adapter;
 
@@ -38,28 +36,36 @@ public class OptionContent extends Abstr
         this.adapter = adapter;
     }
 
+    @Override
     public Consent canDrop(final Content sourceContent) {
         return Veto.DEFAULT;
     }
 
-    public void debugDetails(final DebugBuilder debug) {}
+    @Override
+    public void debugDetails(final DebugBuilder debug) {
+    }
 
+    @Override
     public ObjectAdapter drop(final Content sourceContent) {
         return null;
     }
 
+    @Override
     public String getDescription() {
         return null;
     }
 
+    @Override
     public String getHelp() {
         return null;
     }
 
+    @Override
     public String getIconName() {
         return adapter.getIconName();
     }
 
+    @Override
     public Image getIconPicture(final int iconHeight) {
         if (adapter instanceof ObjectAdapter) {
             final ObjectAdapter adapter = this.adapter;
@@ -77,34 +83,41 @@ public class OptionContent extends Abstr
         }
     }
 
+    @Override
     public String getId() {
         return "OptionContent " + adapter;
     }
 
+    @Override
     public ObjectAdapter getAdapter() {
         return adapter;
     }
 
+    @Override
     public ObjectAdapter[] getOptions() {
         return null;
     }
 
+    @Override
     public ObjectSpecification getSpecification() {
         return adapter.getSpecification();
     }
 
+    @Override
     public boolean isOptionEnabled() {
         return false;
     }
 
+    @Override
     public boolean isTransient() {
         return false;
     }
 
-    public void parseTextEntry(final String entryText) {}
+    public void parseTextEntry(final String entryText) {
+    }
 
+    @Override
     public String title() {
         return adapter.titleString();
     }
 }
-

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/lookup/SelectionItemSelector.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/lookup/SelectionItemSelector.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/lookup/SelectionItemSelector.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/lookup/SelectionItemSelector.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.view.lookup;
 
 import org.apache.isis.viewer.dnd.drawing.Bounds;
@@ -30,7 +29,6 @@ import org.apache.isis.viewer.dnd.view.T
 import org.apache.isis.viewer.dnd.view.View;
 import org.apache.isis.viewer.dnd.view.base.AbstractViewDecorator;
 
-
 class SelectionItemSelector extends AbstractViewDecorator {
 
     private final SelectionListAxis axis;

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/lookup/SelectionListAxis.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/lookup/SelectionListAxis.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/lookup/SelectionListAxis.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/lookup/SelectionListAxis.java Tue May  3 07:18:19 2011
@@ -17,12 +17,10 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.view.lookup;
 
 import org.apache.isis.viewer.dnd.view.ViewAxis;
 
-
 public class SelectionListAxis implements ViewAxis {
     private final OpenDropDownBorder view;
 

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/lookup/SelectionListBuilder.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/lookup/SelectionListBuilder.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/lookup/SelectionListBuilder.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/lookup/SelectionListBuilder.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.view.lookup;
 
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
@@ -27,7 +26,6 @@ import org.apache.isis.viewer.dnd.view.V
 import org.apache.isis.viewer.dnd.view.ViewFactory;
 import org.apache.isis.viewer.dnd.view.composite.AbstractViewBuilder;
 
-
 public class SelectionListBuilder extends AbstractViewBuilder {
     private final ViewFactory subviewSpecification;
 
@@ -36,7 +34,7 @@ public class SelectionListBuilder extend
     }
 
     @Override
-    public void build(final View view, Axes axes) {
+    public void build(final View view, final Axes axes) {
         final Content content = view.getContent();
         final ObjectAdapter[] options = content.getOptions();
 
@@ -54,4 +52,3 @@ public class SelectionListBuilder extend
     }
 
 }
-

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/lookup/SelectionListFocusBorder.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/lookup/SelectionListFocusBorder.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/lookup/SelectionListFocusBorder.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/lookup/SelectionListFocusBorder.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.view.lookup;
 
 import java.awt.event.InputEvent;
@@ -27,11 +26,10 @@ import org.apache.isis.viewer.dnd.view.K
 import org.apache.isis.viewer.dnd.view.View;
 import org.apache.isis.viewer.dnd.view.base.AbstractBorder;
 
-
 // TODO incorporate this big hack into the rewrite of the focus mechanism
 class SelectionListFocusBorder extends AbstractBorder {
     final SelectionListAxis axis;
-    
+
     protected SelectionListFocusBorder(final View view, final SelectionListAxis axis) {
         super(view);
         this.axis = axis;
@@ -74,9 +72,9 @@ class SelectionListFocusBorder extends A
 
     private void selectOption() {
         final View[] subviews = getSubviews();
-        for (int i = 0; i < subviews.length; i++) {
-            if (subviews[i].getState().isViewIdentified()) {
-                axis.setSelection((OptionContent) subviews[i].getContent());
+        for (final View subview : subviews) {
+            if (subview.getState().isViewIdentified()) {
+                axis.setSelection((OptionContent) subview.getContent());
                 final View view = axis.getOriginalView();
                 final View parentView = view.getParent();
 
@@ -100,7 +98,7 @@ class SelectionListFocusBorder extends A
     }
 
     @Override
-    public void keyTyped(KeyboardAction action) {
+    public void keyTyped(final KeyboardAction action) {
         final View[] subviews = getSubviews();
         int i;
         int old = 0;

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/lookup/SelectionListSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/lookup/SelectionListSpecification.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/lookup/SelectionListSpecification.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/lookup/SelectionListSpecification.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.view.lookup;
 
 import org.apache.isis.core.commons.exceptions.UnexpectedCallException;
@@ -34,23 +33,24 @@ import org.apache.isis.viewer.dnd.view.c
 import org.apache.isis.viewer.dnd.view.composite.CompositeViewSpecification;
 import org.apache.isis.viewer.dnd.view.composite.StackLayout;
 
-
 public abstract class SelectionListSpecification extends CompositeViewSpecification {
 
     public SelectionListSpecification() {
         builder = new SelectionListBuilder(new ViewFactory() {
+            @Override
             public View createView(final Content content, final Axes axes, final int fieldNumber) {
-                View elementView = createElementView(content);
-                final SelectionListAxis axis = (SelectionListAxis) axes.getAxis(SelectionListAxis.class);
+                final View elementView = createElementView(content);
+                final SelectionListAxis axis = axes.getAxis(SelectionListAxis.class);
                 axes.add(axis);
                 return new SelectionItemSelector(elementView, axis);
             }
 
         });
         addViewDecorator(new CompositeViewDecorator() {
-            public View decorate(View view, Axes axes) {
+            @Override
+            public View decorate(final View view, final Axes axes) {
                 final SelectionListAxis axis = axes.getAxis(SelectionListAxis.class);
-                View list = new SelectionListFocusBorder(view, axis);
+                final View list = new SelectionListFocusBorder(view, axis);
                 return new DisposeOverlay(new BackgroundBorder(new LineBorder(new ScrollBorder(list))), axis);
             }
         });
@@ -58,17 +58,19 @@ public abstract class SelectionListSpeci
 
     protected abstract View createElementView(Content content);
 
-    public Layout createLayout(Content content, Axes axes) {
+    @Override
+    public Layout createLayout(final Content content, final Axes axes) {
         return new StackLayout(true);
     }
 
-    public boolean canDisplay(ViewRequirement requirement) {
+    @Override
+    public boolean canDisplay(final ViewRequirement requirement) {
         throw new UnexpectedCallException();
     }
 
+    @Override
     public String getName() {
         return "Object Drop Down Overlay";
     }
 
 }
-

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/menu/PopupMenu.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/menu/PopupMenu.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/menu/PopupMenu.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/menu/PopupMenu.java Tue May  3 07:18:19 2011
@@ -17,13 +17,11 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.view.menu;
 
 import java.awt.event.KeyEvent;
 import java.util.Vector;
 
-import org.apache.log4j.Logger;
 import org.apache.isis.core.commons.debug.DebugBuilder;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.consent.Consent;
@@ -56,7 +54,7 @@ import org.apache.isis.viewer.dnd.view.b
 import org.apache.isis.viewer.dnd.view.content.AbstractContent;
 import org.apache.isis.viewer.dnd.view.content.NullContent;
 import org.apache.isis.viewer.dnd.view.window.SubviewFocusManager;
-
+import org.apache.log4j.Logger;
 
 public class PopupMenu extends AbstractView {
 
@@ -73,7 +71,8 @@ public class PopupMenu extends AbstractV
             return item;
         }
 
-        public static Item createOption(final UserAction action, final Object object, final View view, final Location location) {
+        public static Item createOption(final UserAction action, final Object object, final View view,
+            final Location location) {
             final Item item = new Item();
             if (action == null) {
                 item.isBlank = true;
@@ -98,7 +97,8 @@ public class PopupMenu extends AbstractV
         String reasonDisabled;
         View view;
 
-        private Item() {}
+        private Item() {
+        }
 
         public String getHelp() {
             return action.getHelp(view);
@@ -112,110 +112,135 @@ public class PopupMenu extends AbstractV
 
     private class PopupContent extends AbstractContent {
 
-        public PopupContent() {}
+        public PopupContent() {
+        }
 
+        @Override
         public Consent canDrop(final Content sourceContent) {
             return Veto.DEFAULT;
         }
 
-        public void debugDetails(final DebugBuilder debug) {}
+        @Override
+        public void debugDetails(final DebugBuilder debug) {
+        }
 
+        @Override
         public ObjectAdapter drop(final Content sourceContent) {
             return null;
         }
 
+        @Override
         public String getDescription() {
             final int optionNo = getOption();
             return items[optionNo].description;
         }
 
+        @Override
         public String getHelp() {
             final int optionNo = getOption();
             return items[optionNo].getHelp();
         }
 
+        @Override
         public String getIconName() {
             return null;
         }
 
+        @Override
         public Image getIconPicture(final int iconHeight) {
             return null;
         }
 
+        @Override
         public String getId() {
             return null;
         }
 
+        @Override
         public ObjectAdapter getAdapter() {
             return null;
         }
 
+        @Override
         public boolean isOptionEnabled() {
             return false;
         }
 
+        @Override
         public ObjectSpecification getSpecification() {
             return null;
         }
 
+        @Override
         public boolean isTransient() {
             return false;
         }
 
-        public void parseTextEntry(final String entryText) {}
+        public void parseTextEntry(final String entryText) {
+        }
 
+        @Override
         public String title() {
             final int optionNo = getOption();
             return items[optionNo].name;
         }
 
+        @Override
         public ObjectAdapter[] getOptions() {
             return null;
         }
     }
 
     private static class PopupSpecification implements ViewSpecification {
-        public boolean canDisplay(ViewRequirement requirement) {
+        @Override
+        public boolean canDisplay(final ViewRequirement requirement) {
             return false;
         }
 
-        public View createView(final Content content, Axes axes, int sequence) {
+        @Override
+        public View createView(final Content content, final Axes axes, final int sequence) {
             return null;
         }
 
+        @Override
         public String getName() {
             return "Popup Menu";
         }
 
+        @Override
         public boolean isAligned() {
             return false;
         }
 
+        @Override
         public boolean isOpen() {
             return true;
         }
 
+        @Override
         public boolean isReplaceable() {
             return false;
         }
-        
+
+        @Override
         public boolean isResizeable() {
             return false;
         }
 
+        @Override
         public boolean isSubView() {
             return false;
         }
     }
 
-     private static final Logger LOG = Logger.getLogger(PopupMenu.class);
+    private static final Logger LOG = Logger.getLogger(PopupMenu.class);
     private Color backgroundColor;
     private View forView;
     private Item[] items = new Item[0];
     private int optionIdentified;
     private final FocusManager simpleFocusManager;
 
-    public PopupMenu(PopupMenuContainer parent) {
+    public PopupMenu(final PopupMenuContainer parent) {
         super(new NullContent(), new PopupSpecification());
         // REVIEW should this content be used as param 1 above?
         setContent(new PopupContent());
@@ -223,12 +248,8 @@ public class PopupMenu extends AbstractV
         simpleFocusManager = new SubviewFocusManager(this);
     }
 
-    private void addItems(
-            final View target,
-            final UserAction[] options,
-            final int len,
-            final Vector list,
-            final ActionType type) {
+    private void addItems(final View target, final UserAction[] options, final int len, final Vector list,
+        final ActionType type) {
         final int initialSize = list.size();
         for (int i = 0; i < len; i++) {
             if (options[i].getType() == type) {
@@ -265,7 +286,7 @@ public class PopupMenu extends AbstractV
      */
     @Override
     public void draw(final Canvas canvas) {
-        Size coreSize = getSize();
+        final Size coreSize = getSize();
         final int width = coreSize.getWidth();
         final int height = coreSize.getHeight();
         canvas.drawSolidRectangle(0, 0, width, height, backgroundColor);
@@ -308,7 +329,7 @@ public class PopupMenu extends AbstractV
             baseLine += itemHeight;
         }
 
-//        canvas.drawRectangleAround(this, Toolkit.getColor(ColorsAndFonts.COLOR_DEBUG_BOUNDS_VIEW));
+        // canvas.drawRectangleAround(this, Toolkit.getColor(ColorsAndFonts.COLOR_DEBUG_BOUNDS_VIEW));
     }
 
     @Override
@@ -320,10 +341,12 @@ public class PopupMenu extends AbstractV
     }
 
     @Override
-    public void focusLost() {}
+    public void focusLost() {
+    }
 
     @Override
-    public void focusReceived() {}
+    public void focusReceived() {
+    }
 
     @Override
     public FocusManager getFocusManager() {
@@ -331,11 +354,11 @@ public class PopupMenu extends AbstractV
     }
 
     @Override
-    public Size getRequiredSize(Size availableSpace) {
+    public Size getRequiredSize(final Size availableSpace) {
         final Size size = new Size();
 
-        for (int i = 0; i < items.length; i++) {
-            final int itemWidth = items[i].isBlank ? 0 : style().stringWidth(items[i].name);
+        for (final Item item : items) {
+            final int itemWidth = item.isBlank ? 0 : style().stringWidth(item.name);
             size.ensureWidth(itemWidth);
             size.extendHeight(style().getLineHeight() + VPADDING);
         }
@@ -348,7 +371,7 @@ public class PopupMenu extends AbstractV
     public int getOption() {
         return optionIdentified;
     }
-    
+
     public int getOptionPostion() {
         final int itemHeight = style().getLineHeight() + VPADDING;
         return itemHeight * getOption();
@@ -386,7 +409,7 @@ public class PopupMenu extends AbstractV
             return;
 
         } else if (item.action instanceof UserActionSet) {
-            UserAction[] menuOptions = ((UserActionSet) item.action).getUserActions();
+            final UserAction[] menuOptions = ((UserActionSet) item.action).getUserActions();
             ((PopupMenuContainer) getParent()).openSubmenu(menuOptions);
         } else {
             final Workspace workspace = getWorkspace();
@@ -395,11 +418,11 @@ public class PopupMenu extends AbstractV
             location.subtract(workspace.getView().getAbsoluteLocation());
             final Padding padding = workspace.getView().getPadding();
             location.move(-padding.getLeft(), -padding.getTop());
-            
+
             final int itemHeight = style().getLineHeight() + VPADDING;
-            int baseLine = itemHeight * option;
+            final int baseLine = itemHeight * option;
             location.add(0, baseLine);
-            
+
             getParent().dispose();
             LOG.debug("execute " + item.name + " on " + forView + " in " + workspace);
             item.action.execute(workspace, forView, location);
@@ -413,7 +436,7 @@ public class PopupMenu extends AbstractV
         if (keyCode == KeyEvent.VK_ESCAPE) {
             if (getParent() == null) {
                 dispose();
-            } 
+            }
 
             key.consume();
 
@@ -459,35 +482,28 @@ public class PopupMenu extends AbstractV
                 break;
             }
         }
-    
+
     }
 
     @Override
-    public void keyReleased(KeyboardAction action) {}
+    public void keyReleased(final KeyboardAction action) {
+    }
 
     @Override
-    public void keyTyped(KeyboardAction action) {}
-/*
-    @Override
-    public void layout(final Size maximumSize) {
-        coreSize = new Bounds(getCoreRequiredSize());
-
-        final int option = getOption();
-        final int itemHeight = style().getLineHeight() + VPADDING;
-        int menuWidth = coreSize.getWidth();
-   //     Location menuLocation = new Location(menuWidth - 4, itemHeight * option);
-        Location menuLocation = new Location(0, itemHeight * option);
-        
-        if (submenu != null) {
-            submenu.layout(maximumSize);
-            submenu.setLocation(menuLocation);
-            
-            //coreSize.setX(submenu.getSize().getWidth() - 4);
-            //getLocation()
-        }
-        setSize(getMaximumSize());
+    public void keyTyped(final KeyboardAction action) {
     }
-*/
+
+    /*
+     * @Override public void layout(final Size maximumSize) { coreSize = new Bounds(getCoreRequiredSize());
+     * 
+     * final int option = getOption(); final int itemHeight = style().getLineHeight() + VPADDING; int menuWidth =
+     * coreSize.getWidth(); // Location menuLocation = new Location(menuWidth - 4, itemHeight * option); Location
+     * menuLocation = new Location(0, itemHeight * option);
+     * 
+     * if (submenu != null) { submenu.layout(maximumSize); submenu.setLocation(menuLocation);
+     * 
+     * //coreSize.setX(submenu.getSize().getWidth() - 4); //getLocation() } setSize(getMaximumSize()); }
+     */
     public View makeView(final ObjectAdapter object, final ObjectAssociation field) throws CloneNotSupportedException {
         throw new RuntimeException();
     }
@@ -508,7 +524,7 @@ public class PopupMenu extends AbstractV
         option = Math.max(option, 0);
         option = Math.min(option, items.length - 1);
         if (option >= 0 && optionIdentified != option) {
-            //LOG.debug("mouse over option " + option + " " + this);
+            // LOG.debug("mouse over option " + option + " " + this);
             setOption(option);
             markDamaged();
         }
@@ -541,7 +557,7 @@ public class PopupMenu extends AbstractV
         }
     }
 
-    private boolean isEmpty(String str) {
+    private boolean isEmpty(final String str) {
         return str == null || str.length() == 0;
     }
 
@@ -574,7 +590,7 @@ public class PopupMenu extends AbstractV
     @Override
     public String toString() {
         return "PopupMenu [location=" + getLocation() + ",item=" + optionIdentified + ",itemCount="
-                + (items == null ? 0 : items.length) + "]";
+            + (items == null ? 0 : items.length) + "]";
     }
 
     protected boolean transparentBackground() {

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/menu/PopupMenuContainer.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/menu/PopupMenuContainer.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/menu/PopupMenuContainer.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/menu/PopupMenuContainer.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.view.menu;
 
 import java.awt.event.KeyEvent;
@@ -49,12 +48,12 @@ public class PopupMenuContainer extends 
     private PopupMenu menu;
     private PopupMenu submenu;
     private Color backgroundColor;
-    private View target;
+    private final View target;
     private final Vector options = new Vector();
     private final Location at;
     private boolean isLayoutInvalid;
-    
-    public PopupMenuContainer(View target, Location at) {
+
+    public PopupMenuContainer(final View target, final Location at) {
         super(new NullContent());
         this.target = target;
         this.at = at;
@@ -62,8 +61,6 @@ public class PopupMenuContainer extends 
         isLayoutInvalid = true;
     }
 
-
-
     @Override
     public void debug(final DebugBuilder debug) {
         super.debug(debug);
@@ -83,7 +80,7 @@ public class PopupMenuContainer extends 
     }
 
     @Override
-    public Size getRequiredSize(Size availableSpace) {
+    public Size getRequiredSize(final Size availableSpace) {
         final Size size = menu.getRequiredSize(Size.createMax());
         if (submenu != null) {
             final Size subviewSize = submenu.getRequiredSize(Size.createMax());
@@ -92,46 +89,47 @@ public class PopupMenuContainer extends 
         }
         return size;
     }
-    
+
     @Override
     public void layout() {
         if (isLayoutInvalid) {
             menu.layout();
-            Size menuSize = menu.getRequiredSize(Size.createMax());
+            final Size menuSize = menu.getRequiredSize(Size.createMax());
             menu.setSize(menuSize);
-            menu.setLocation(new Location(0,0));
-            
-            Location containerLocation = new Location(at);
-            Size bounds = getViewManager().getOverlaySize();
+            menu.setLocation(new Location(0, 0));
+
+            final Location containerLocation = new Location(at);
+            final Size bounds = getViewManager().getOverlaySize();
             if (containerLocation.getX() < 0) {
                 containerLocation.setX(0);
             } else if (containerLocation.getX() + menuSize.getWidth() > bounds.getWidth()) {
-                containerLocation.setX(bounds.getWidth() -  menuSize.getWidth());
+                containerLocation.setX(bounds.getWidth() - menuSize.getWidth());
             }
-            
+
             if (containerLocation.getY() < 0) {
                 containerLocation.setY(0);
             } else if (containerLocation.getY() + menuSize.getHeight() > bounds.getHeight()) {
-                containerLocation.setY(bounds.getHeight() -  menuSize.getHeight());
+                containerLocation.setY(bounds.getHeight() - menuSize.getHeight());
             }
-            
+
             if (submenu != null) {
                 submenu.layout();
-                Size submenuSize = submenu.getRequiredSize(Size.createMax());
+                final Size submenuSize = submenu.getRequiredSize(Size.createMax());
                 submenu.setSize(submenuSize);
 
-                
                 int submenuOffset = submenuOffset();
-                Location menuLocation = new Location();
-                
-                int containerBottom = containerLocation.getY() + submenuOffset + submenuSize.getHeight();
+                final Location menuLocation = new Location();
+
+                final int containerBottom = containerLocation.getY() + submenuOffset + submenuSize.getHeight();
                 if (containerBottom > bounds.getHeight()) {
-                    int overstretch = containerBottom - bounds.getHeight();
-                    submenuOffset  -= overstretch;
+                    final int overstretch = containerBottom - bounds.getHeight();
+                    submenuOffset -= overstretch;
                 }
-                Location submenuLocation = new Location(0, submenuOffset);
+                final Location submenuLocation = new Location(0, submenuOffset);
 
-                boolean placeToLeft = at.getX() + menuSize.getWidth() + submenuSize.getWidth() < getViewManager().getOverlaySize().getWidth();
+                final boolean placeToLeft =
+                    at.getX() + menuSize.getWidth() + submenuSize.getWidth() < getViewManager().getOverlaySize()
+                        .getWidth();
                 if (placeToLeft) {
                     submenuLocation.setX(menuSize.getWidth() - MENU_OVERLAP);
                 } else {
@@ -140,45 +138,41 @@ public class PopupMenuContainer extends 
                 }
 
                 if (containerLocation.getY() + menuSize.getHeight() > bounds.getHeight()) {
-                    containerLocation.setY(bounds.getHeight() -  menuSize.getHeight());
+                    containerLocation.setY(bounds.getHeight() - menuSize.getHeight());
                 }
-                
-                
-                submenu.setLocation(submenuLocation); //// !
-                menu.setLocation(menuLocation); /// !
-
-            }           
-            
-            
+
+                submenu.setLocation(submenuLocation); // // !
+                menu.setLocation(menuLocation); // / !
+
+            }
+
             setLocation(containerLocation);
 
         }
     }
 
-
-
     private int submenuOffset() {
         return menu.getOptionPostion();
-    }  
+    }
 
     @Override
     public void mouseMoved(final Location at) {
         if (menu.getBounds().contains(at)) {
             at.subtract(menu.getLocation());
             menu.mouseMoved(at);
-        } else  if (submenu  != null && submenu.getBounds().contains(at)) {
-             at.subtract(submenu.getLocation());
+        } else if (submenu != null && submenu.getBounds().contains(at)) {
+            at.subtract(submenu.getLocation());
             submenu.mouseMoved(at);
         }
     }
 
-
-    public void show(final boolean forView, final boolean includeDebug, final boolean includeExploration, final boolean includePrototype) {
+    public void show(final boolean forView, final boolean includeDebug, final boolean includeExploration,
+        final boolean includePrototype) {
         final boolean withExploration = getViewManager().isRunningAsExploration() && includeExploration;
         final boolean withPrototype = getViewManager().isRunningAsPrototype() && includePrototype;
-        
 
-        final UserActionSet optionSet = new UserActionSetImpl(withExploration, withPrototype, includeDebug, ActionType.USER);
+        final UserActionSet optionSet =
+            new UserActionSetImpl(withExploration, withPrototype, includeDebug, ActionType.USER);
         if (forView) {
             target.viewMenuOptions(optionSet);
         } else {
@@ -192,23 +186,19 @@ public class PopupMenuContainer extends 
         }
 
         menu = new PopupMenu(this);
-        
+
         backgroundColor = optionSet.getColor();
         menu.show(target, optionSet.getUserActions(), backgroundColor);
         getViewManager().setOverlayView(this);
- 
+
         if (target != null) {
             final String status = changeStatus(target, forView, withExploration, includeDebug);
             getFeedbackManager().setViewDetail(status);
         }
     }
 
-
-    private String changeStatus(
-            final View over,
-            final boolean forView,
-            final boolean includeExploration,
-            final boolean includeDebug) {
+    private String changeStatus(final View over, final boolean forView, final boolean includeExploration,
+        final boolean includeDebug) {
         final StringBuffer status = new StringBuffer("Menu for ");
         if (forView) {
             status.append("view ");
@@ -239,7 +229,6 @@ public class PopupMenuContainer extends 
         return status.toString();
     }
 
-
     public void addMenuOptions(final MenuOptions options) {
         this.options.addElement(options);
     }
@@ -254,16 +243,12 @@ public class PopupMenuContainer extends 
         final Size size = getRequiredSize(Size.createMax());
         setSize(size);
         layout();
-        
+
         isLayoutInvalid = false;
 
-        
-        
         markDamaged();
     }
 
-    
-
     @Override
     public void keyPressed(final KeyboardAction key) {
         if (submenu != null) {
@@ -286,12 +271,14 @@ public class PopupMenuContainer extends 
             menu.keyPressed(key);
         }
     }
-    
+
+    @Override
     public void invalidateLayout() {
         isLayoutInvalid = true;
     }
-    
-    public void draw(Canvas canvas) {
+
+    @Override
+    public void draw(final Canvas canvas) {
         super.draw(canvas);
         if (menu != null) {
             final Canvas menuCanvas = canvas.createSubcanvas(menu.getBounds());
@@ -306,10 +293,10 @@ public class PopupMenuContainer extends 
             canvas.drawRectangleAround(getBounds(), Toolkit.getColor(ColorsAndFonts.COLOR_DEBUG_BOUNDS_VIEW));
         }
     }
-    
+
     @Override
     public void firstClick(final Click click) {
-        Location location = click.getLocation();
+        final Location location = click.getLocation();
         if (menu.getBounds().contains(location)) {
             click.subtract(menu.getLocation());
             menu.firstClick(click);
@@ -320,5 +307,3 @@ public class PopupMenuContainer extends 
     }
 
 }
-
-

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/menu/UserActionSetImpl.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/menu/UserActionSetImpl.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/menu/UserActionSetImpl.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/menu/UserActionSetImpl.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.view.menu;
 
 import java.util.Vector;
@@ -38,31 +37,34 @@ import org.apache.isis.viewer.dnd.view.V
 import org.apache.isis.viewer.dnd.view.Workspace;
 import org.apache.isis.viewer.dnd.view.action.OptionFactory;
 
-
 public class UserActionSetImpl implements UserActionSet {
 
-	private Color backgroundColor;
+    private Color backgroundColor;
 
-	private final String groupName;
+    private final String groupName;
     private final boolean includeDebug;
     private final boolean includeExploration;
     private final boolean includePrototype;
     private final Vector options = new Vector();
     private final ActionType type;
 
-    public UserActionSetImpl(final boolean includeExploration, final boolean includePrototype, final boolean includeDebug, final ActionType type) {
-    	this("", type, includeExploration, includePrototype, includeDebug, Toolkit.getColor(ColorsAndFonts.COLOR_DEBUG_BASELINE)); 
+    public UserActionSetImpl(final boolean includeExploration, final boolean includePrototype,
+        final boolean includeDebug, final ActionType type) {
+        this("", type, includeExploration, includePrototype, includeDebug, Toolkit
+            .getColor(ColorsAndFonts.COLOR_DEBUG_BASELINE));
     }
 
     private UserActionSetImpl(final String groupName, final UserActionSetImpl parent) {
-    	this(groupName, parent, parent.getType());
+        this(groupName, parent, parent.getType());
     }
 
     private UserActionSetImpl(final String groupName, final UserActionSetImpl parent, final ActionType type) {
-    	this(groupName, type, parent.includeExploration, parent.includePrototype, parent.includeDebug, parent.getColor());
+        this(groupName, type, parent.includeExploration, parent.includePrototype, parent.includeDebug, parent
+            .getColor());
     }
 
-    private UserActionSetImpl(final String groupName, final ActionType type, final boolean includeExploration, final boolean includePrototype, final boolean includeDebug, final Color backgroundColor) {
+    private UserActionSetImpl(final String groupName, final ActionType type, final boolean includeExploration,
+        final boolean includePrototype, final boolean includeDebug, final Color backgroundColor) {
         this.groupName = groupName;
         this.type = type;
         this.includeExploration = includeExploration;
@@ -71,52 +73,60 @@ public class UserActionSetImpl implement
         this.backgroundColor = backgroundColor;
     }
 
-    public UserActionSet addNewActionSet(String name) {
-        UserActionSetImpl set = new UserActionSetImpl(name, this);
+    @Override
+    public UserActionSet addNewActionSet(final String name) {
+        final UserActionSetImpl set = new UserActionSetImpl(name, this);
         add(set);
         return set;
     }
 
-    public UserActionSet addNewActionSet(String name, ActionType type) {
-        UserActionSetImpl set = new UserActionSetImpl(name, this, type);
+    @Override
+    public UserActionSet addNewActionSet(final String name, final ActionType type) {
+        final UserActionSetImpl set = new UserActionSetImpl(name, this, type);
         add(set);
         return set;
     }
-    
+
     /**
      * Add the specified option if it is of the right type for this menu.
      */
+    @Override
     public void add(final UserAction option) {
         final ActionType section = option.getType();
-        if (section == ActionType.USER || 
-        	(includeExploration && section == ActionType.EXPLORATION) || 
-        	(includePrototype && section == ActionType.PROTOTYPE) || 
-        	(includeDebug && section == ActionType.DEBUG)) {
+        if (section == ActionType.USER || (includeExploration && section == ActionType.EXPLORATION)
+            || (includePrototype && section == ActionType.PROTOTYPE) || (includeDebug && section == ActionType.DEBUG)) {
             options.addElement(option);
         }
     }
 
+    @Override
     public Consent disabled(final View view) {
         return Allow.DEFAULT;
     }
 
-    public void execute(final Workspace workspace, final View view, final Location at) {}
+    @Override
+    public void execute(final Workspace workspace, final View view, final Location at) {
+    }
 
     /**
      * Returns the background colour for the menu
      */
+    @Override
     public Color getColor() {
         return backgroundColor;
     }
 
+    @Override
     public String getDescription(final View view) {
         return "";
     }
 
+    @Override
     public String getHelp(final View view) {
         return "";
     }
 
+    @Override
     public UserAction[] getUserActions() {
         final UserAction[] v = new UserAction[options.size()];
         for (int i = 0; i < v.length; i++) {
@@ -125,10 +135,12 @@ public class UserActionSetImpl implement
         return v;
     }
 
+    @Override
     public String getName(final View view) {
         return groupName;
     }
 
+    @Override
     public ActionType getType() {
         return type;
     }
@@ -136,6 +148,7 @@ public class UserActionSetImpl implement
     /**
      * Specifies the background colour for the menu
      */
+    @Override
     public void setColor(final Color color) {
         backgroundColor = color;
     }
@@ -150,11 +163,13 @@ public class UserActionSetImpl implement
         return str.toString();
     }
 
-    public void addCreateOptions(ObjectSpecification specification) {
+    @Override
+    public void addCreateOptions(final ObjectSpecification specification) {
         OptionFactory.addCreateOptions(specification, this);
     }
 
-    public void addObjectMenuOptions(ObjectAdapter object) {
+    @Override
+    public void addObjectMenuOptions(final ObjectAdapter object) {
         OptionFactory.addObjectMenuOptions(object, this);
     }
 }

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/message/DetailedMessageViewSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/message/DetailedMessageViewSpecification.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/message/DetailedMessageViewSpecification.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/message/DetailedMessageViewSpecification.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.view.message;
 
 import java.util.StringTokenizer;
@@ -45,36 +44,41 @@ import org.apache.isis.viewer.dnd.view.c
 import org.apache.isis.viewer.dnd.view.control.CancelAction;
 import org.apache.isis.viewer.dnd.view.debug.DebugOutput;
 
-
 public class DetailedMessageViewSpecification implements ViewSpecification {
 
-    public boolean canDisplay(ViewRequirement requirement) {
-        Content content = requirement.getContent();
+    @Override
+    public boolean canDisplay(final ViewRequirement requirement) {
+        final Content content = requirement.getContent();
         return content instanceof MessageContent && ((MessageContent) content).getDetail() != null;
     }
 
+    @Override
     public String getName() {
         return "Detailed Message";
     }
 
-    public View createView(final Content content, Axes axes, int sequence) {
+    @Override
+    public View createView(final Content content, final Axes axes, final int sequence) {
         final ButtonAction actions[] = new ButtonAction[] { new AbstractButtonAction("Print...") {
+            @Override
             public void execute(final Workspace workspace, final View view, final Location at) {
                 DebugOutput.print("Print exception", extract(view));
             }
         }, new AbstractButtonAction("Save...") {
+            @Override
             public void execute(final Workspace workspace, final View view, final Location at) {
                 DebugOutput.saveToFile("Save exception", "Exception", extract(view));
             }
         }, new AbstractButtonAction("Copy") {
+            @Override
             public void execute(final Workspace workspace, final View view, final Location at) {
                 DebugOutput.saveToClipboard(extract(view));
             }
         }, new CancelAction(),
 
         };
-        
-        DetailedMessageView messageView = new DetailedMessageView(content, this);
+
+        final DetailedMessageView messageView = new DetailedMessageView(content, this);
         return new ButtonBorder(actions, new ScrollBorder(messageView));
     }
 
@@ -94,22 +98,27 @@ public class DetailedMessageViewSpecific
         return text.toString();
     }
 
+    @Override
     public boolean isAligned() {
         return false;
     }
 
+    @Override
     public boolean isOpen() {
         return true;
     }
 
+    @Override
     public boolean isReplaceable() {
         return false;
     }
 
+    @Override
     public boolean isSubView() {
         return false;
     }
-    
+
+    @Override
     public boolean isResizeable() {
         return true;
     }
@@ -121,7 +130,7 @@ class DetailedMessageView extends Abstra
     }
 
     @Override
-    public Size getRequiredSize(Size availableSpace) {
+    public Size getRequiredSize(final Size availableSpace) {
         final Size size = new Size();
         size.extendHeight(Toolkit.getText(ColorsAndFonts.TEXT_TITLE).getTextHeight());
         size.extendHeight(30);
@@ -135,7 +144,7 @@ class DetailedMessageView extends Abstra
         final StringTokenizer st = new StringTokenizer(detail, "\n\r");
         while (st.hasMoreTokens()) {
             final String line = st.nextToken();
-            Text text = Toolkit.getText(ColorsAndFonts.TEXT_NORMAL);
+            final Text text = Toolkit.getText(ColorsAndFonts.TEXT_NORMAL);
             size.ensureWidth((line.startsWith("\t") ? 20 : 0) + text.stringWidth(line));
             size.extendHeight(text.getTextHeight());
         }
@@ -149,16 +158,16 @@ class DetailedMessageView extends Abstra
         super.draw(canvas);
 
         final int left = 10;
-        Text title = Toolkit.getText(ColorsAndFonts.TEXT_TITLE);
+        final Text title = Toolkit.getText(ColorsAndFonts.TEXT_TITLE);
         int y = 10 + title.getAscent();
         final String message = ((MessageContent) getContent()).getMessage();
         final String heading = ((MessageContent) getContent()).title();
         final String detail = ((MessageContent) getContent()).getDetail();
 
-        Color black = Toolkit.getColor(ColorsAndFonts.COLOR_BLACK);
+        final Color black = Toolkit.getColor(ColorsAndFonts.COLOR_BLACK);
         canvas.drawText(heading, left, y, black, title);
         y += title.getTextHeight();
-        Text text = Toolkit.getText(ColorsAndFonts.TEXT_NORMAL);
+        final Text text = Toolkit.getText(ColorsAndFonts.TEXT_NORMAL);
         canvas.drawText(message, left, y, 500, black, text);
 
         y += text.stringHeight(message, 500);



Mime
View raw message