incubator-isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danhayw...@apache.org
Subject svn commit: r1098945 [21/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/message/ExceptionMessageContent.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/message/ExceptionMessageContent.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/message/ExceptionMessageContent.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/message/ExceptionMessageContent.java Tue May  3 07:18:19 2011
@@ -17,9 +17,8 @@
  *  under the License.
  */
 
+package org.apache.isis.viewer.dnd.view.message;
 
-package org.apache.isis.viewer.dnd.view.message;
-
 import org.apache.isis.core.commons.debug.DebugBuilder;
 import org.apache.isis.core.commons.exceptions.IsisApplicationException;
 import org.apache.isis.core.commons.lang.NameUtils;
@@ -32,135 +31,161 @@ import org.apache.isis.runtimes.dflt.run
 import org.apache.isis.viewer.dnd.drawing.Image;
 import org.apache.isis.viewer.dnd.view.Content;
 import org.apache.isis.viewer.dnd.view.UserActionSet;
-
-
-public class ExceptionMessageContent implements MessageContent {
-
-    protected String message;
-    protected String name;
-    protected String trace;
-    protected String title;
-    private final String icon;
-
-    public ExceptionMessageContent(final Throwable error) {
-        String fullName = error.getClass().getName();
-        fullName = fullName.substring(fullName.lastIndexOf('.') + 1);
-        name = NameUtils.naturalName(fullName);
-        message = error.getMessage();
-        trace = ThrowableUtils.stackTraceFor(error);
-        if (trace.indexOf("\tat") != -1) {
-            trace = trace.substring(trace.indexOf("\tat"));
-        }
-
-        if (name == null) {
-            name = "";
-        }
-        if (message == null) {
-            message = "";
-        }
-        if (trace == null) {
-            trace = "";
-        }
-
-        if (error instanceof IsisApplicationException) {
-            title = "Application Error";
-            icon = "application-error";
-        } else if (error instanceof ConcurrencyException) {
-            title = "Concurrency Error";
-            icon = "concurrency-error";
-        } else {
-            title = "System Error";
-            icon = "system-error";
-        }
-
-    }
-
-    public String getMessage() {
-        return message;
-    }
-
-    public String getDetail() {
-        return trace;
-    }
-
-    public String getIconName() {
-        return icon;
-    }
-
-    public Consent canDrop(final Content sourceContent) {
-        return Veto.DEFAULT;
-    }
-
-    public void contentMenuOptions(final UserActionSet options) {}
-
-    public void debugDetails(final DebugBuilder debug) {}
-
-    public ObjectAdapter drop(final Content sourceContent) {
-        return null;
-    }
-
-    public String getDescription() {
-        return name;
-    }
-
-    public String getHelp() {
-        return "";
-    }
-
-    public Image getIconPicture(final int iconHeight) {
-        return null;
-    }
-
-    public String getId() {
-        return "message-exception";
-    }
-
-    public ObjectAdapter getAdapter() {
-        return null;
-    }
-
-    public ObjectAdapter[] getOptions() {
-        return null;
-    }
-
-    public ObjectSpecification getSpecification() {
-        return null;
-    }
-
-    public boolean isCollection() {
-        return false;
-    }
-
-    public boolean isObject() {
-        return false;
-    }
-
-    public boolean isOptionEnabled() {
-        return false;
-    }
-
-    public boolean isPersistable() {
-        return false;
-    }
-
-    public boolean isTransient() {
-        return false;
-    }
-
-    public boolean isTextParseable() {
-        return false;
-    }
-
-    public void parseTextEntry(final String entryText) {}
-
-    public String title() {
-        return name;
-    }
-
-    public void viewMenuOptions(final UserActionSet options) {}
-
-    public String windowTitle() {
-        return title;
-    }
-
-}
+
+public class ExceptionMessageContent implements MessageContent {
+
+    protected String message;
+    protected String name;
+    protected String trace;
+    protected String title;
+    private final String icon;
+
+    public ExceptionMessageContent(final Throwable error) {
+        String fullName = error.getClass().getName();
+        fullName = fullName.substring(fullName.lastIndexOf('.') + 1);
+        name = NameUtils.naturalName(fullName);
+        message = error.getMessage();
+        trace = ThrowableUtils.stackTraceFor(error);
+        if (trace.indexOf("\tat") != -1) {
+            trace = trace.substring(trace.indexOf("\tat"));
+        }
+
+        if (name == null) {
+            name = "";
+        }
+        if (message == null) {
+            message = "";
+        }
+        if (trace == null) {
+            trace = "";
+        }
+
+        if (error instanceof IsisApplicationException) {
+            title = "Application Error";
+            icon = "application-error";
+        } else if (error instanceof ConcurrencyException) {
+            title = "Concurrency Error";
+            icon = "concurrency-error";
+        } else {
+            title = "System Error";
+            icon = "system-error";
+        }
+
+    }
+
+    @Override
+    public String getMessage() {
+        return message;
+    }
+
+    @Override
+    public String getDetail() {
+        return trace;
+    }
+
+    @Override
+    public String getIconName() {
+        return icon;
+    }
+
+    @Override
+    public Consent canDrop(final Content sourceContent) {
+        return Veto.DEFAULT;
+    }
+
+    @Override
+    public void contentMenuOptions(final UserActionSet options) {
+    }
+
+    @Override
+    public void debugDetails(final DebugBuilder debug) {
+    }
+
+    @Override
+    public ObjectAdapter drop(final Content sourceContent) {
+        return null;
+    }
+
+    @Override
+    public String getDescription() {
+        return name;
+    }
+
+    @Override
+    public String getHelp() {
+        return "";
+    }
+
+    @Override
+    public Image getIconPicture(final int iconHeight) {
+        return null;
+    }
+
+    @Override
+    public String getId() {
+        return "message-exception";
+    }
+
+    @Override
+    public ObjectAdapter getAdapter() {
+        return null;
+    }
+
+    @Override
+    public ObjectAdapter[] getOptions() {
+        return null;
+    }
+
+    @Override
+    public ObjectSpecification getSpecification() {
+        return null;
+    }
+
+    @Override
+    public boolean isCollection() {
+        return false;
+    }
+
+    @Override
+    public boolean isObject() {
+        return false;
+    }
+
+    @Override
+    public boolean isOptionEnabled() {
+        return false;
+    }
+
+    @Override
+    public boolean isPersistable() {
+        return false;
+    }
+
+    @Override
+    public boolean isTransient() {
+        return false;
+    }
+
+    @Override
+    public boolean isTextParseable() {
+        return false;
+    }
+
+    public void parseTextEntry(final String entryText) {
+    }
+
+    @Override
+    public String title() {
+        return name;
+    }
+
+    @Override
+    public void viewMenuOptions(final UserActionSet options) {
+    }
+
+    @Override
+    public String windowTitle() {
+        return title;
+    }
+
+}

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/message/MessageContent.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/message/MessageContent.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/message/MessageContent.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/message/MessageContent.java Tue May  3 07:18:19 2011
@@ -17,14 +17,12 @@
  *  under the License.
  */
 
+package org.apache.isis.viewer.dnd.view.message;
 
-package org.apache.isis.viewer.dnd.view.message;
-
 import org.apache.isis.viewer.dnd.view.Content;
-
-
-public interface MessageContent extends Content {
-    String getMessage();
-
-    String getDetail();
-}
+
+public interface MessageContent extends Content {
+    String getMessage();
+
+    String getDetail();
+}

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/message/MessageDialogSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/message/MessageDialogSpecification.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/message/MessageDialogSpecification.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/message/MessageDialogSpecification.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.view.message;
 
 import org.apache.isis.viewer.dnd.drawing.Canvas;
@@ -44,41 +43,48 @@ import org.apache.isis.viewer.dnd.view.b
 import org.apache.isis.viewer.dnd.view.control.AbstractButtonAction;
 import org.apache.isis.viewer.dnd.view.window.SubviewFocusManager;
 
-
 public class MessageDialogSpecification implements ViewSpecification {
 
-    public boolean canDisplay(ViewRequirement requirement) {
+    @Override
+    public boolean canDisplay(final ViewRequirement requirement) {
         return requirement.getContent() instanceof MessageContent;
     }
 
+    @Override
     public String getName() {
         return "Message Dialog";
     }
 
-    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 CloseViewAction() };
-        MessageView messageView = new MessageView((MessageContent) content, this);
+        final MessageView messageView = new MessageView((MessageContent) content, this);
         final View dialogView = new ButtonBorder(actions, new ScrollBorder(messageView));
         dialogView.setFocusManager(new SubviewFocusManager(dialogView));
         return dialogView;
     }
 
+    @Override
     public boolean isAligned() {
         return false;
     }
 
+    @Override
     public boolean isOpen() {
         return true;
     }
 
+    @Override
     public boolean isReplaceable() {
         return false;
     }
-    
+
+    @Override
     public boolean isResizeable() {
         return true;
     }
 
+    @Override
     public boolean isSubView() {
         return false;
     }
@@ -88,6 +94,7 @@ public class MessageDialogSpecification 
             super("Close");
         }
 
+        @Override
         public void execute(final Workspace workspace, final View view, final Location at) {
             view.dispose();
         }
@@ -113,15 +120,15 @@ class MessageView extends AbstractView {
     }
 
     @Override
-    public Size getRequiredSize(Size availableSpace) {
+    public Size getRequiredSize(final Size availableSpace) {
         final Size size = new Size();
 
         final String message = ((MessageContent) getContent()).getMessage();
         final String heading = ((MessageContent) getContent()).title();
 
         size.ensureHeight(errorIcon.getHeight());
-        Text text = Toolkit.getText(ColorsAndFonts.TEXT_NORMAL);
-        Text titleText = Toolkit.getText(ColorsAndFonts.TEXT_TITLE);
+        final Text text = Toolkit.getText(ColorsAndFonts.TEXT_NORMAL);
+        final Text titleText = Toolkit.getText(ColorsAndFonts.TEXT_TITLE);
         size.extendWidth(text.stringWidth(message, MAX_TEXT_WIDTH));
         int textHeight = titleText.getLineHeight();
         textHeight += text.stringHeight(message, MAX_TEXT_WIDTH);
@@ -149,9 +156,9 @@ class MessageView extends AbstractView {
 
         final int x = LEFT + errorIcon.getWidth() + PADDING;
         int y = TOP + 3 + Toolkit.getText(ColorsAndFonts.TEXT_NORMAL).getAscent();
-        Color black = Toolkit.getColor(ColorsAndFonts.COLOR_BLACK);
+        final Color black = Toolkit.getColor(ColorsAndFonts.COLOR_BLACK);
         if (!heading.equals("")) {
-            Text title = Toolkit.getText(ColorsAndFonts.TEXT_TITLE);
+            final Text title = Toolkit.getText(ColorsAndFonts.TEXT_TITLE);
             canvas.drawText(heading, x, y, black, title);
             y += title.getLineHeight();
         }

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/message/TextMessageContent.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/message/TextMessageContent.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/message/TextMessageContent.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/message/TextMessageContent.java Tue May  3 07:18:19 2011
@@ -17,9 +17,8 @@
  *  under the License.
  */
 
+package org.apache.isis.viewer.dnd.view.message;
 
-package org.apache.isis.viewer.dnd.view.message;
-
 import org.apache.isis.core.commons.debug.DebugBuilder;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.consent.Consent;
@@ -28,113 +27,139 @@ import org.apache.isis.core.metamodel.sp
 import org.apache.isis.viewer.dnd.drawing.Image;
 import org.apache.isis.viewer.dnd.view.Content;
 import org.apache.isis.viewer.dnd.view.UserActionSet;
-
-
-public class TextMessageContent implements MessageContent {
-    protected final String message;
-    protected final String heading;
-    protected final String detail;
-    protected final String title;
-
-    public TextMessageContent(final String title, final String message) {
-        final int pos = message.indexOf(':');
-        if (pos > 2) {
-            this.heading = message.substring(0, pos).trim();
-            this.message = message.substring(pos + 1).trim();
-        } else {
-            this.heading = "";
-            this.message = message;
-        }
-        this.title = title;
-        this.detail = null;
-    }
-
-    public String getMessage() {
-        return message;
-    }
-
-    public String getDetail() {
-        return detail;
-    }
-
-    public Consent canDrop(final Content sourceContent) {
-        return Veto.DEFAULT;
-    }
-
-    public void contentMenuOptions(final UserActionSet options) {}
-
-    public void debugDetails(final DebugBuilder debug) {}
-
-    public ObjectAdapter drop(final Content sourceContent) {
-        return null;
-    }
-
-    public String getDescription() {
-        return title;
-    }
-
-    public String getHelp() {
-        return "";
-    }
-
-    public String getIconName() {
-        return "message";
-    }
-
-    public Image getIconPicture(final int iconHeight) {
-        return null;
-    }
-
-    public String getId() {
-        return "message-exception";
-    }
-
-    public ObjectAdapter getAdapter() {
-        return null;
-    }
-
-    public ObjectAdapter[] getOptions() {
-        return null;
-    }
-
-    public ObjectSpecification getSpecification() {
-        return null;
-    }
-
-    public boolean isCollection() {
-        return false;
-    }
-
-    public boolean isObject() {
-        return false;
-    }
-
-    public boolean isPersistable() {
-        return false;
-    }
-
-    public boolean isOptionEnabled() {
-        return false;
-    }
-
-    public boolean isTransient() {
-        return false;
-    }
-
-    public boolean isTextParseable() {
-        return false;
-    }
-
-    public void parseTextEntry(final String entryText) {}
-
-    public String title() {
-        return heading;
-    }
-
-    public void viewMenuOptions(final UserActionSet options) {}
-
-    public String windowTitle() {
-        return title;
-    }
-
-}
+
+public class TextMessageContent implements MessageContent {
+    protected final String message;
+    protected final String heading;
+    protected final String detail;
+    protected final String title;
+
+    public TextMessageContent(final String title, final String message) {
+        final int pos = message.indexOf(':');
+        if (pos > 2) {
+            this.heading = message.substring(0, pos).trim();
+            this.message = message.substring(pos + 1).trim();
+        } else {
+            this.heading = "";
+            this.message = message;
+        }
+        this.title = title;
+        this.detail = null;
+    }
+
+    @Override
+    public String getMessage() {
+        return message;
+    }
+
+    @Override
+    public String getDetail() {
+        return detail;
+    }
+
+    @Override
+    public Consent canDrop(final Content sourceContent) {
+        return Veto.DEFAULT;
+    }
+
+    @Override
+    public void contentMenuOptions(final UserActionSet options) {
+    }
+
+    @Override
+    public void debugDetails(final DebugBuilder debug) {
+    }
+
+    @Override
+    public ObjectAdapter drop(final Content sourceContent) {
+        return null;
+    }
+
+    @Override
+    public String getDescription() {
+        return title;
+    }
+
+    @Override
+    public String getHelp() {
+        return "";
+    }
+
+    @Override
+    public String getIconName() {
+        return "message";
+    }
+
+    @Override
+    public Image getIconPicture(final int iconHeight) {
+        return null;
+    }
+
+    @Override
+    public String getId() {
+        return "message-exception";
+    }
+
+    @Override
+    public ObjectAdapter getAdapter() {
+        return null;
+    }
+
+    @Override
+    public ObjectAdapter[] getOptions() {
+        return null;
+    }
+
+    @Override
+    public ObjectSpecification getSpecification() {
+        return null;
+    }
+
+    @Override
+    public boolean isCollection() {
+        return false;
+    }
+
+    @Override
+    public boolean isObject() {
+        return false;
+    }
+
+    @Override
+    public boolean isPersistable() {
+        return false;
+    }
+
+    @Override
+    public boolean isOptionEnabled() {
+        return false;
+    }
+
+    @Override
+    public boolean isTransient() {
+        return false;
+    }
+
+    @Override
+    public boolean isTextParseable() {
+        return false;
+    }
+
+    public void parseTextEntry(final String entryText) {
+    }
+
+    @Override
+    public String title() {
+        return heading;
+    }
+
+    @Override
+    public void viewMenuOptions(final UserActionSet options) {
+    }
+
+    @Override
+    public String windowTitle() {
+        return title;
+    }
+
+}

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/option/CloseAllViewsForObjectOption.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/option/CloseAllViewsForObjectOption.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/option/CloseAllViewsForObjectOption.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/option/CloseAllViewsForObjectOption.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.view.option;
 
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
@@ -25,7 +24,6 @@ import org.apache.isis.viewer.dnd.drawin
 import org.apache.isis.viewer.dnd.view.View;
 import org.apache.isis.viewer.dnd.view.Workspace;
 
-
 public class CloseAllViewsForObjectOption extends UserActionAbstract {
     public CloseAllViewsForObjectOption() {
         super("Close all views for this object");
@@ -33,9 +31,9 @@ public class CloseAllViewsForObjectOptio
 
     @Override
     public void execute(final Workspace workspace, final View view, final Location at) {
-        ObjectAdapter object = view.getContent().getAdapter();
+        final ObjectAdapter object = view.getContent().getAdapter();
         final View views[] = workspace.getSubviews();
-        for (View v : views) {
+        for (final View v : views) {
             if (v.getContent().getAdapter() == object) {
                 v.dispose();
             }

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/option/CloseAllViewsOption.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/option/CloseAllViewsOption.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/option/CloseAllViewsOption.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/option/CloseAllViewsOption.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.view.option;
 
 import org.apache.isis.core.commons.lang.ToString;
@@ -25,7 +24,6 @@ import org.apache.isis.viewer.dnd.drawin
 import org.apache.isis.viewer.dnd.view.View;
 import org.apache.isis.viewer.dnd.view.Workspace;
 
-
 public class CloseAllViewsOption extends UserActionAbstract {
     public CloseAllViewsOption() {
         super("Close all others");
@@ -35,8 +33,7 @@ public class CloseAllViewsOption extends
     public void execute(final Workspace workspace, final View view, final Location at) {
         final View views[] = view.getWorkspace().getSubviews();
 
-        for (int i = 0; i < views.length; i++) {
-            final View otherView = views[i];
+        for (final View otherView : views) {
             if (otherView.getSpecification().isOpen() && otherView != view) {
                 otherView.dispose();
             }

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/option/CloseOtherViewsForObjectOption.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/option/CloseOtherViewsForObjectOption.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/option/CloseOtherViewsForObjectOption.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/option/CloseOtherViewsForObjectOption.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.view.option;
 
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
@@ -25,7 +24,6 @@ import org.apache.isis.viewer.dnd.drawin
 import org.apache.isis.viewer.dnd.view.View;
 import org.apache.isis.viewer.dnd.view.Workspace;
 
-
 public class CloseOtherViewsForObjectOption extends UserActionAbstract {
     public CloseOtherViewsForObjectOption() {
         super("Close other views for this object");
@@ -33,9 +31,9 @@ public class CloseOtherViewsForObjectOpt
 
     @Override
     public void execute(final Workspace workspace, final View view, final Location at) {
-        ObjectAdapter object = view.getContent().getAdapter();
+        final ObjectAdapter object = view.getContent().getAdapter();
         final View views[] = workspace.getSubviews();
-        for (View v : views) {
+        for (final View v : views) {
             if (view != v && v.getContent().getAdapter() == object) {
                 v.dispose();
             }

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/option/CloseViewOption.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/option/CloseViewOption.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/option/CloseViewOption.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/option/CloseViewOption.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.view.option;
 
 import org.apache.isis.core.commons.lang.ToString;
@@ -25,7 +24,6 @@ import org.apache.isis.viewer.dnd.drawin
 import org.apache.isis.viewer.dnd.view.View;
 import org.apache.isis.viewer.dnd.view.Workspace;
 
-
 public class CloseViewOption extends UserActionAbstract {
     public CloseViewOption() {
         super("Close");

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/option/DisposeObjectOption.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/option/DisposeObjectOption.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/option/DisposeObjectOption.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/option/DisposeObjectOption.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.view.option;
 
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
@@ -33,7 +32,6 @@ import org.apache.isis.viewer.dnd.view.O
 import org.apache.isis.viewer.dnd.view.View;
 import org.apache.isis.viewer.dnd.view.Workspace;
 
-
 /**
  * Destroy this object
  */
@@ -80,7 +78,7 @@ public class DisposeObjectOption extends
         // getTransactionManager().startTransaction();
 
         getPersistenceSession().destroyObject(object);
-        
+
         // getTransactionManager().endTransaction();
 
         getUpdateNotifier().addDisposedObject(object);
@@ -88,15 +86,14 @@ public class DisposeObjectOption extends
         view.getFeedbackManager().showMessagesAndWarnings();
     }
 
-
-    ///////////////////////////////////////////////////////
+    // /////////////////////////////////////////////////////
     // Dependencies (from context)
-    ///////////////////////////////////////////////////////
+    // /////////////////////////////////////////////////////
 
     private static PersistenceSession getPersistenceSession() {
         return IsisContext.getPersistenceSession();
     }
-        
+
     private static UpdateNotifier getUpdateNotifier() {
         return IsisContext.getUpdateNotifier();
     }

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/option/IconizeViewOption.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/option/IconizeViewOption.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/option/IconizeViewOption.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/option/IconizeViewOption.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.view.option;
 
 import org.apache.isis.core.metamodel.consent.Allow;
@@ -27,7 +26,6 @@ import org.apache.isis.viewer.dnd.view.T
 import org.apache.isis.viewer.dnd.view.View;
 import org.apache.isis.viewer.dnd.view.Workspace;
 
-
 public class IconizeViewOption extends UserActionAbstract {
     public IconizeViewOption() {
         super("Iconize");
@@ -43,8 +41,8 @@ public class IconizeViewOption extends U
         final View minimizedView = Toolkit.getViewFactory().createMinimizedView(view);
         minimizedView.setLocation(view.getLocation());
         final View[] views = workspace.getSubviews();
-        for (int i = 0; i < views.length; i++) {
-            if (views[i] == view) {
+        for (final View view2 : views) {
+            if (view2 == view) {
                 workspace.removeView(view);
                 workspace.addView(minimizedView);
                 workspace.invalidateLayout();
@@ -53,8 +51,8 @@ public class IconizeViewOption extends U
         }
 
         /*
-         * // TODO change so that an iconized version of the window is created and displayed, which holds the
-         * original view. View iconView = new RootIconSpecification().createView(view.getContent(), null);
+         * // TODO change so that an iconized version of the window is created and displayed, which holds the original
+         * view. View iconView = new RootIconSpecification().createView(view.getContent(), null);
          * iconView.setLocation(view.getLocation()); workspace.replaceView(view, iconView);
          */
     }

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/option/OpenViewOption.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/option/OpenViewOption.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/option/OpenViewOption.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/option/OpenViewOption.java Tue May  3 07:18:19 2011
@@ -17,10 +17,8 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.view.option;
 
-import org.apache.log4j.Logger;
 import org.apache.isis.viewer.dnd.drawing.Location;
 import org.apache.isis.viewer.dnd.view.Content;
 import org.apache.isis.viewer.dnd.view.Placement;
@@ -29,7 +27,7 @@ import org.apache.isis.viewer.dnd.view.V
 import org.apache.isis.viewer.dnd.view.ViewSpecification;
 import org.apache.isis.viewer.dnd.view.Workspace;
 import org.apache.isis.viewer.dnd.view.content.FieldContent;
-
+import org.apache.log4j.Logger;
 
 public class OpenViewOption extends UserActionAbstract {
     private static final Logger LOG = Logger.getLogger(OpenViewOption.class);

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/option/ReplaceViewOption.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/option/ReplaceViewOption.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/option/ReplaceViewOption.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/option/ReplaceViewOption.java Tue May  3 07:18:19 2011
@@ -17,16 +17,14 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.view.option;
 
-import org.apache.log4j.Logger;
 import org.apache.isis.viewer.dnd.drawing.Location;
 import org.apache.isis.viewer.dnd.view.Axes;
 import org.apache.isis.viewer.dnd.view.View;
 import org.apache.isis.viewer.dnd.view.ViewSpecification;
 import org.apache.isis.viewer.dnd.view.Workspace;
-
+import org.apache.log4j.Logger;
 
 public class ReplaceViewOption extends UserActionAbstract {
     private static final Logger LOG = Logger.getLogger(ReplaceViewOption.class);
@@ -39,7 +37,8 @@ public class ReplaceViewOption extends U
 
     @Override
     public String getDescription(final View view) {
-        return "Replace this " + view.getSpecification().getName() + " view with a " + specification.getName() + " view";
+        return "Replace this " + view.getSpecification().getName() + " view with a " + specification.getName()
+            + " view";
     }
 
     @Override
@@ -49,8 +48,8 @@ public class ReplaceViewOption extends U
         replace(view, replacement);
     }
 
-    protected void replace(View view, View withReplacement) {
-        View existingView = view.getView();
+    protected void replace(final View view, final View withReplacement) {
+        final View existingView = view.getView();
         view.getParent().replaceView(existingView, withReplacement);
     }
 

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/option/UserActionAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/option/UserActionAbstract.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/option/UserActionAbstract.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/option/UserActionAbstract.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.view.option;
 
 import org.apache.isis.core.commons.lang.ToString;
@@ -29,13 +28,13 @@ import org.apache.isis.viewer.dnd.view.U
 import org.apache.isis.viewer.dnd.view.View;
 import org.apache.isis.viewer.dnd.view.Workspace;
 
-
 /**
- * Each option that a user is shown in an objects popup menu a MenuOption. A MenuOption details: the name of
- * an option (in the users language);
+ * Each option that a user is shown in an objects popup menu a MenuOption. A MenuOption details: the name of an option
+ * (in the users language);
  * <ul>
  * the type of object that might result when requesting this option
- * </ul>; a way to determine whether a user can select this option on the current object.
+ * </ul>
+ * ; a way to determine whether a user can select this option on the current object.
  */
 public abstract class UserActionAbstract implements UserAction {
     private String description;
@@ -51,16 +50,20 @@ public abstract class UserActionAbstract
         this.type = type;
     }
 
+    @Override
     public Consent disabled(final View view) {
         return Allow.DEFAULT;
     }
 
+    @Override
     public abstract void execute(final Workspace workspace, final View view, final Location at);
 
+    @Override
     public String getDescription(final View view) {
         return description;
     }
 
+    @Override
     public String getHelp(final View view) {
         return "No help available for user action";
     }
@@ -68,10 +71,12 @@ public abstract class UserActionAbstract
     /**
      * Returns the stored name of the menu option.
      */
+    @Override
     public String getName(final View view) {
         return name;
     }
 
+    @Override
     public ActionType getType() {
         return type;
     }

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/text/CursorPosition.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/text/CursorPosition.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/text/CursorPosition.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/text/CursorPosition.java Tue May  3 07:18:19 2011
@@ -17,16 +17,14 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.view.text;
 
 import org.apache.isis.viewer.dnd.drawing.Location;
 
-
 /**
- * Represents the position of a line cursor within a TextContent. The character position for a line extends
- * from zero to text.length + 1. Where 0 means the cursor is to the left of the first character, and 1 is to
- * right of the first character and to the left of the second character.
+ * Represents the position of a line cursor within a TextContent. The character position for a line extends from zero to
+ * text.length + 1. Where 0 means the cursor is to the left of the first character, and 1 is to right of the first
+ * character and to the left of the second character.
  */
 public class CursorPosition {
     private int character;
@@ -257,6 +255,7 @@ public class CursorPosition {
     }
 
     public boolean isBefore(final CursorPosition positionToCompare) {
-        return line < positionToCompare.line || (line == positionToCompare.line && character < positionToCompare.character);
+        return line < positionToCompare.line
+            || (line == positionToCompare.line && character < positionToCompare.character);
     }
 }

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/text/ObjectTitleText.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/text/ObjectTitleText.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/text/ObjectTitleText.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/text/ObjectTitleText.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.view.text;
 
 import org.apache.isis.viewer.dnd.drawing.ColorsAndFonts;
@@ -26,7 +25,6 @@ import org.apache.isis.viewer.dnd.view.C
 import org.apache.isis.viewer.dnd.view.Toolkit;
 import org.apache.isis.viewer.dnd.view.View;
 
-
 public class ObjectTitleText extends TitleText {
     private final Content content;
 

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/text/TextBlock.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/text/TextBlock.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/text/TextBlock.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/text/TextBlock.java Tue May  3 07:18:19 2011
@@ -17,12 +17,10 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.view.text;
 
 import org.apache.log4j.Logger;
 
-
 class TextBlock {
     private static final Logger LOG = Logger.getLogger(TextBlock.class);
     private static final Logger UI_LOG = Logger.getLogger("ui." + TextBlock.class.getName());
@@ -180,8 +178,8 @@ class TextBlock {
     }
 
     /**
-     * breaks a block at the cursor position by truncating this block and creating a new block and adding the
-     * removed text.
+     * breaks a block at the cursor position by truncating this block and creating a new block and adding the removed
+     * text.
      */
     public TextBlock splitAt(final int line, final int character) {
         format();

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

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/text/TextContent.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/text/TextContent.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/text/TextContent.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/text/TextContent.java Tue May  3 07:18:19 2011
@@ -17,18 +17,16 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.view.text;
 
 import java.util.Enumeration;
 import java.util.Vector;
 
-import org.apache.log4j.Logger;
 import org.apache.isis.core.commons.ensure.Assert;
 import org.apache.isis.core.commons.exceptions.IsisException;
 import org.apache.isis.core.commons.lang.ToString;
 import org.apache.isis.viewer.dnd.drawing.Location;
-
+import org.apache.log4j.Logger;
 
 public class TextContent {
     private static final Logger LOG = Logger.getLogger(TextContent.class);
@@ -39,8 +37,8 @@ public class TextContent {
     private final TextBlockTarget target;
     private int displayFromLine;
     private int availableDisplayLines;
-    private boolean useEmptyLines;
-    private final int wrap;    
+    private final boolean useEmptyLines;
+    private final int wrap;
 
     public TextContent(final TextBlockTarget target, final int noLines, final int wrapStyle) {
         this(target, noLines, wrapStyle, false);
@@ -64,8 +62,8 @@ public class TextContent {
     }
 
     /**
-     * Returns the number of lines that this field will display the content. This can be smaller than the
-     * actual number of lines of content, but will be at least one.
+     * Returns the number of lines that this field will display the content. This can be smaller than the actual number
+     * of lines of content, but will be at least one.
      */
     public int getNoDisplayLines() {
         return availableDisplayLines;
@@ -183,8 +181,7 @@ public class TextContent {
     }
 
     /**
-     * returns the entire text of the content, with a newline between each block (but not after the final
-     * block.
+     * returns the entire text of the content, with a newline between each block (but not after the final block.
      */
     public String getText() {
         final StringBuffer content = new StringBuffer();
@@ -264,8 +261,7 @@ public class TextContent {
             addBlock("");
         } else {
             final String[] tokens = text.split("\\n");
-            for (int i = 0; i < tokens.length; i++) {
-                String token = tokens[i];
+            for (final String token : tokens) {
                 if (useEmptyLines || token.length() > 0) {
                     addBlock(token);
                 }
@@ -350,8 +346,8 @@ public class TextContent {
         }
 
         /*
-         * slightly offsetting mouse helps the user position the cursor between characters near the pointer
-         * rather than always after the pointer
+         * slightly offsetting mouse helps the user position the cursor between characters near the pointer rather than
+         * always after the pointer
          */
         final int x = atLocation.getX() - 3;
 

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/text/TextSelection.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/text/TextSelection.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/text/TextSelection.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/text/TextSelection.java Tue May  3 07:18:19 2011
@@ -17,12 +17,10 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.view.text;
 
 import org.apache.isis.viewer.dnd.drawing.Location;
 
-
 public class TextSelection {
     private final CursorPosition cursor;
     private final CursorPosition start;
@@ -33,8 +31,7 @@ public class TextSelection {
     }
 
     /**
-     * Determine if the selection is back to front. Returns true if the cursor position is before the start
-     * position.
+     * Determine if the selection is back to front. Returns true if the cursor position is before the start position.
      */
     private boolean backwardSelection() {
         return cursor.isBefore(start);
@@ -65,8 +62,7 @@ public class TextSelection {
     }
 
     /**
-     * clears the selection so nothing is selected. The start and end points are set to the same values as the
-     * cursor.
+     * clears the selection so nothing is selected. The start and end points are set to the same values as the cursor.
      */
     public void resetTo(final CursorPosition pos) {
         start.asFor(pos);
@@ -96,6 +92,6 @@ public class TextSelection {
     @Override
     public String toString() {
         return "Selection [from=" + start.getLine() + ":" + start.getCharacter() + ",to=" + cursor.getLine() + ":"
-                + cursor.getCharacter() + "]";
+            + cursor.getCharacter() + "]";
     }
 }

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/text/TextUtils.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/text/TextUtils.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/text/TextUtils.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/text/TextUtils.java Tue May  3 07:18:19 2011
@@ -17,18 +17,18 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.view.text;
 
 import org.apache.isis.viewer.dnd.drawing.Text;
 
 public class TextUtils {
-    
-    private TextUtils() {}
-    
+
+    private TextUtils() {
+    }
+
     public static String limitText(final String xtext, final Text style, final int maxWidth) {
         String text = xtext;
-        int ellipsisWidth = style.stringWidth("...");
+        final int ellipsisWidth = style.stringWidth("...");
         if (maxWidth > 0 && style.stringWidth(text) > maxWidth) {
             int lastCharacterWithinAllowedWidth = 0;
             for (int textWidth = ellipsisWidth; textWidth <= maxWidth;) {
@@ -61,5 +61,3 @@ public class TextUtils {
     }
 
 }
-
-

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/text/TitleText.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/text/TitleText.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/text/TitleText.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/text/TitleText.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.view.text;
 
 import org.apache.isis.core.commons.lang.ToString;
@@ -32,10 +31,9 @@ import org.apache.isis.viewer.dnd.view.T
 import org.apache.isis.viewer.dnd.view.View;
 import org.apache.isis.viewer.dnd.view.ViewState;
 
-
 /**
- * TitleText draws the text derived from the subclass within a view. The text is properly truncated if longer
- * than the specified maximum width.
+ * TitleText draws the text derived from the subclass within a view. The text is properly truncated if longer than the
+ * specified maximum width.
  */
 public abstract class TitleText {
     private static final int NO_MAX_WIDTH = -1;
@@ -58,8 +56,8 @@ public abstract class TitleText {
     }
 
     /**
-     * Draw this TitleText's text stating from the specified x coordination and on the specified baseline. If
-     * a maximum width is specified (ie it is positive) then the text drawn will not extend past that width.
+     * Draw this TitleText's text stating from the specified x coordination and on the specified baseline. If a maximum
+     * width is specified (ie it is positive) then the text drawn will not extend past that width.
      * 
      * @param maxWidth
      *            the maximum width to display the text within; if negative no limit is imposed
@@ -79,19 +77,19 @@ public abstract class TitleText {
             color = this.color;
         }
 
-        String text = TextUtils.limitText(getTitle(), style, maxWidth);
-        
+        final String text = TextUtils.limitText(getTitle(), style, maxWidth);
+
         final int xt = x;
         final int yt = baseline;
 
         if (Toolkit.debug) {
             final int x2 = style.stringWidth(text);
-            canvas.drawDebugOutline(new Bounds(xt, yt - style.getAscent(), x2, style.getTextHeight()), baseline, Toolkit
-                    .getColor(ColorsAndFonts.COLOR_DEBUG_BOUNDS_DRAW));
+            canvas.drawDebugOutline(new Bounds(xt, yt - style.getAscent(), x2, style.getTextHeight()), baseline,
+                Toolkit.getColor(ColorsAndFonts.COLOR_DEBUG_BOUNDS_DRAW));
         }
         canvas.drawText(text, xt, yt, color, style);
     }
- 
+
     public Size getSize() {
         final int height = style.getTextHeight();
         final int width = style.stringWidth(getTitle());

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/undo/AssociateCommand.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/undo/AssociateCommand.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/undo/AssociateCommand.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/undo/AssociateCommand.java Tue May  3 07:18:19 2011
@@ -17,14 +17,12 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.view.undo;
 
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.spec.feature.OneToOneAssociation;
 import org.apache.isis.viewer.dnd.view.Command;
 
-
 public class AssociateCommand implements Command {
     private final String description;
     private final OneToOneAssociation field;
@@ -32,7 +30,8 @@ public class AssociateCommand implements
     private final ObjectAdapter associatedObject;
     private final String name;
 
-    public AssociateCommand(final ObjectAdapter object, final ObjectAdapter associatedObject, final OneToOneAssociation field) {
+    public AssociateCommand(final ObjectAdapter object, final ObjectAdapter associatedObject,
+        final OneToOneAssociation field) {
         this.description = "Clear association of " + associatedObject.titleString();
         this.name = "associate " + associatedObject.titleString();
         this.object = object;
@@ -40,18 +39,22 @@ public class AssociateCommand implements
         this.field = field;
     }
 
+    @Override
     public String getDescription() {
         return description;
     }
 
+    @Override
     public String getName() {
         return name;
     }
 
+    @Override
     public void undo() {
         field.clearAssociation(object);
     }
 
+    @Override
     public void execute() {
         field.setAssociation(object, associatedObject);
     }

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/undo/SetValueCommand.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/undo/SetValueCommand.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/undo/SetValueCommand.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/undo/SetValueCommand.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.view.undo;
 
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
@@ -28,7 +27,6 @@ import org.apache.isis.runtimes.dflt.run
 import org.apache.isis.runtimes.dflt.runtime.system.persistence.PersistenceSession;
 import org.apache.isis.viewer.dnd.view.Command;
 
-
 public class SetValueCommand implements Command {
     private final String description;
     private final OneToOneAssociation value;
@@ -44,28 +42,32 @@ public class SetValueCommand implements 
         this.description = "reset the value to " + oldValue;
     }
 
+    @Override
     public String getDescription() {
         return description;
     }
 
+    @Override
     public void undo() {
         final EncodableFacet facet = value.getFacet(EncodableFacet.class);
         final Object obj = facet.fromEncodedString(oldValue);
         final ObjectAdapter adapter = getAdapterManager().adapterFor(obj);
         value.setAssociation(object, adapter);
         // have commented this out because it isn't needed; the transaction manager will do this
-        // for us on endTransaction.  Still, if I'm wrong and it is needed, hopefully this
+        // for us on endTransaction. Still, if I'm wrong and it is needed, hopefully this
         // comment will help...
         // IsisContext.getObjectPersistor().objectChangedAllDirty();
     }
 
-    public void execute() {}
+    @Override
+    public void execute() {
+    }
 
+    @Override
     public String getName() {
         return "entry";
     }
-    
-    
+
     // //////////////////////////////////////////////////////////////////
     // Dependencies (from context)
     // //////////////////////////////////////////////////////////////////
@@ -78,5 +80,4 @@ public class SetValueCommand implements 
         return getPersistenceSession().getAdapterManager();
     }
 
-
 }

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/window/AbstractWindowBorder.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/window/AbstractWindowBorder.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/window/AbstractWindowBorder.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/window/AbstractWindowBorder.java Tue May  3 07:18:19 2011
@@ -17,9 +17,8 @@
  *  under the License.
  */
 
+package org.apache.isis.viewer.dnd.view.window;
 
-package org.apache.isis.viewer.dnd.view.window;
-
 import org.apache.isis.core.commons.debug.DebugBuilder;
 import org.apache.isis.viewer.dnd.drawing.Bounds;
 import org.apache.isis.viewer.dnd.drawing.Canvas;
@@ -38,176 +37,175 @@ import org.apache.isis.viewer.dnd.view.V
 import org.apache.isis.viewer.dnd.view.Workspace;
 import org.apache.isis.viewer.dnd.view.base.AbstractBorder;
 import org.apache.isis.viewer.dnd.view.border.BorderDrawing;
-
-
-public abstract class AbstractWindowBorder extends AbstractBorder {
-    protected static BorderDrawing borderRender;
-    protected WindowControl controls[];
-    private WindowControl overControl;
-
-    public static void setBorderRenderer(BorderDrawing borderRender) {
-        AbstractWindowBorder.borderRender = borderRender;
-    }
-    
-    public AbstractWindowBorder(final View enclosedView) {
-        super(enclosedView);
-        left = borderRender.getLeft();
-        right = borderRender.getRight();
-        top = borderRender.getTop();
-        bottom = borderRender.getBottom();
-    }
-
-    @Override
-    public void debugDetails(final DebugBuilder debug) {
-        super.debugDetails(debug);
-        borderRender.debugDetails(debug);
-        if (controls.length > 0) {
-            debug.appendln("controls:-");
-            debug.indent();
-            for (WindowControl control : controls) {
-                debug.append(control);
-                debug.appendln();
-            }
-            debug.unindent();
-        }
-    }
-
-    @Override
-    public DragEvent dragStart(final DragStart drag) {
-        if (overBorder(drag.getLocation())) {
-            final Location location = drag.getLocation();
-            final View dragOverlay = Toolkit.getViewFactory().createDragViewOutline(getView());
-            return new ViewDragImpl(this, new Offset(location.getX(), location.getY()), dragOverlay);
-        } else {
-            return super.dragStart(drag);
-        }
-    }
-
-    protected void setControls(final WindowControl[] controls) {
-        this.controls = controls;
-    }
-
-    @Override
-    public void setSize(final Size size) {
-        super.setSize(size);
-        layoutControls(size);
-    }
-
-    @Override
-    public void setBounds(final Bounds bounds) {
-        super.setBounds(bounds);
-        layoutControls(bounds.getSize());
-    }
-
-    private void layoutControls(final Size size) {
-        left = borderRender.getLeft();
-        right = borderRender.getRight();
-        top = borderRender.getTop();
-        bottom = borderRender.getBottom();
-
-        borderRender.layoutControls(size, controls);
-    }
-
-    @Override
-    public void draw(final Canvas canvas) {
-        // blank background
-        final Bounds bounds = getBounds();
-        Color color = Toolkit.getColor(ColorsAndFonts.COLOR_WINDOW + "." + getSpecification().getName());
-        canvas.drawSolidRectangle(1, 1, bounds.getWidth() - 2, bounds.getHeight() - 2, color);
-
-        final boolean hasFocus = containsFocus();
-        final ViewState state = getState();
-        borderRender.draw(canvas, getSize(), hasFocus, state, controls, title() + " (" + getSpecification().getName() + ")");
-//        canvas.drawRectangle(0, 0, getSize().getWidth(), borderRender.getTop(), Toolkit.getColor(0xfff));
-        
-        // controls
-        for (int i = 0; controls != null && i < controls.length; i++) {
-            final Canvas controlCanvas = canvas.createSubcanvas(controls[i].getBounds());
-            controls[i].draw(controlCanvas);
-        }
-
-        super.draw(canvas);
-    }
-
-    protected abstract String title();
-
-    @Override
-    public Size getRequiredSize(final Size maximumSize) {
-        left = borderRender.getLeft();
-        right = borderRender.getRight();
-        top = borderRender.getTop();
-        bottom = borderRender.getBottom();
-        
-        final Size size = super.getRequiredSize(maximumSize);
-        borderRender.getRequiredSize(size, title(), controls);
-        return size;
-    }
-
-    @Override
-    public void secondClick(final Click click) {
-        final View control = overControl(click.getLocation());
-        if (control == null) {
-            super.secondClick(click);
-        }
-    }
-
-    @Override
-    public void thirdClick(final Click click) {
-        final View control = overControl(click.getLocation());
-        if (control == null) {
-            super.thirdClick(click);
-        }
-    }
-
-    @Override
-    public void firstClick(final Click click) {
-        final View control = overControl(click.getLocation());
-        if (control == null) {
-            if (overBorder(click.getLocation())) {
-                final Workspace workspace = getWorkspace();
-                if (workspace != null) {
-                    if (click.button2()) {
-                        workspace.lower(getView());
-                    } else if (click.button1()) {
-                        workspace.raise(getView());
-                    }
-                }
-            } else {
-                super.firstClick(click);
-            }
-
-        } else {
-            control.firstClick(click);
-        }
-    }
-    
-    @Override
-    public void mouseMoved(Location at) {
-        final WindowControl control = (WindowControl) overControl(at);
-        if (control != null) {
-            if (control != overControl) {
-                control.entered();
-                overControl = control;
-                return;
-            }
-        } else {
-            if (control != overControl) {
-                overControl.exited();
-                overControl = null;
-                return;
-            }
-        }
-        super.mouseMoved(at);
-    }
-
-    private View overControl(final Location location) {
-        for (int i = 0; i < controls.length; i++) {
-            final WindowControl control = controls[i];
-            if (control.getBounds().contains(location)) {
-                return control;
-            }
-        }
-        return null;
-    }
-
-}
+
+public abstract class AbstractWindowBorder extends AbstractBorder {
+    protected static BorderDrawing borderRender;
+    protected WindowControl controls[];
+    private WindowControl overControl;
+
+    public static void setBorderRenderer(final BorderDrawing borderRender) {
+        AbstractWindowBorder.borderRender = borderRender;
+    }
+
+    public AbstractWindowBorder(final View enclosedView) {
+        super(enclosedView);
+        left = borderRender.getLeft();
+        right = borderRender.getRight();
+        top = borderRender.getTop();
+        bottom = borderRender.getBottom();
+    }
+
+    @Override
+    public void debugDetails(final DebugBuilder debug) {
+        super.debugDetails(debug);
+        borderRender.debugDetails(debug);
+        if (controls.length > 0) {
+            debug.appendln("controls:-");
+            debug.indent();
+            for (final WindowControl control : controls) {
+                debug.append(control);
+                debug.appendln();
+            }
+            debug.unindent();
+        }
+    }
+
+    @Override
+    public DragEvent dragStart(final DragStart drag) {
+        if (overBorder(drag.getLocation())) {
+            final Location location = drag.getLocation();
+            final View dragOverlay = Toolkit.getViewFactory().createDragViewOutline(getView());
+            return new ViewDragImpl(this, new Offset(location.getX(), location.getY()), dragOverlay);
+        } else {
+            return super.dragStart(drag);
+        }
+    }
+
+    protected void setControls(final WindowControl[] controls) {
+        this.controls = controls;
+    }
+
+    @Override
+    public void setSize(final Size size) {
+        super.setSize(size);
+        layoutControls(size);
+    }
+
+    @Override
+    public void setBounds(final Bounds bounds) {
+        super.setBounds(bounds);
+        layoutControls(bounds.getSize());
+    }
+
+    private void layoutControls(final Size size) {
+        left = borderRender.getLeft();
+        right = borderRender.getRight();
+        top = borderRender.getTop();
+        bottom = borderRender.getBottom();
+
+        borderRender.layoutControls(size, controls);
+    }
+
+    @Override
+    public void draw(final Canvas canvas) {
+        // blank background
+        final Bounds bounds = getBounds();
+        final Color color = Toolkit.getColor(ColorsAndFonts.COLOR_WINDOW + "." + getSpecification().getName());
+        canvas.drawSolidRectangle(1, 1, bounds.getWidth() - 2, bounds.getHeight() - 2, color);
+
+        final boolean hasFocus = containsFocus();
+        final ViewState state = getState();
+        borderRender.draw(canvas, getSize(), hasFocus, state, controls, title() + " (" + getSpecification().getName()
+            + ")");
+        // canvas.drawRectangle(0, 0, getSize().getWidth(), borderRender.getTop(), Toolkit.getColor(0xfff));
+
+        // controls
+        for (int i = 0; controls != null && i < controls.length; i++) {
+            final Canvas controlCanvas = canvas.createSubcanvas(controls[i].getBounds());
+            controls[i].draw(controlCanvas);
+        }
+
+        super.draw(canvas);
+    }
+
+    protected abstract String title();
+
+    @Override
+    public Size getRequiredSize(final Size maximumSize) {
+        left = borderRender.getLeft();
+        right = borderRender.getRight();
+        top = borderRender.getTop();
+        bottom = borderRender.getBottom();
+
+        final Size size = super.getRequiredSize(maximumSize);
+        borderRender.getRequiredSize(size, title(), controls);
+        return size;
+    }
+
+    @Override
+    public void secondClick(final Click click) {
+        final View control = overControl(click.getLocation());
+        if (control == null) {
+            super.secondClick(click);
+        }
+    }
+
+    @Override
+    public void thirdClick(final Click click) {
+        final View control = overControl(click.getLocation());
+        if (control == null) {
+            super.thirdClick(click);
+        }
+    }
+
+    @Override
+    public void firstClick(final Click click) {
+        final View control = overControl(click.getLocation());
+        if (control == null) {
+            if (overBorder(click.getLocation())) {
+                final Workspace workspace = getWorkspace();
+                if (workspace != null) {
+                    if (click.button2()) {
+                        workspace.lower(getView());
+                    } else if (click.button1()) {
+                        workspace.raise(getView());
+                    }
+                }
+            } else {
+                super.firstClick(click);
+            }
+
+        } else {
+            control.firstClick(click);
+        }
+    }
+
+    @Override
+    public void mouseMoved(final Location at) {
+        final WindowControl control = (WindowControl) overControl(at);
+        if (control != null) {
+            if (control != overControl) {
+                control.entered();
+                overControl = control;
+                return;
+            }
+        } else {
+            if (control != overControl) {
+                overControl.exited();
+                overControl = null;
+                return;
+            }
+        }
+        super.mouseMoved(at);
+    }
+
+    private View overControl(final Location location) {
+        for (final WindowControl control : controls) {
+            if (control.getBounds().contains(location)) {
+                return control;
+            }
+        }
+        return null;
+    }
+
+}

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/window/CloseWindowControl.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/window/CloseWindowControl.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/window/CloseWindowControl.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/window/CloseWindowControl.java Tue May  3 07:18:19 2011
@@ -17,27 +17,25 @@
  *  under the License.
  */
 
+package org.apache.isis.viewer.dnd.view.window;
 
-package org.apache.isis.viewer.dnd.view.window;
-
 import org.apache.isis.viewer.dnd.drawing.Canvas;
 import org.apache.isis.viewer.dnd.view.View;
 import org.apache.isis.viewer.dnd.view.option.CloseViewOption;
-
-
-public class CloseWindowControl extends WindowControl {
-    private static CloseWindowRender render;
-    
-    public static void setRender(CloseWindowRender render) {
-        CloseWindowControl.render = render;
-    }
-
-    public CloseWindowControl(final View target) {
-        super(new CloseViewOption(), target);
-    }
-
-    @Override
-    public void draw(final Canvas canvas) {
-        render.draw(canvas, WIDTH, HEIGHT, action.disabled(this).isVetoed(), isOver(), isPressed());
-    }
-}
+
+public class CloseWindowControl extends WindowControl {
+    private static CloseWindowRender render;
+
+    public static void setRender(final CloseWindowRender render) {
+        CloseWindowControl.render = render;
+    }
+
+    public CloseWindowControl(final View target) {
+        super(new CloseViewOption(), target);
+    }
+
+    @Override
+    public void draw(final Canvas canvas) {
+        render.draw(canvas, WIDTH, HEIGHT, action.disabled(this).isVetoed(), isOver(), isPressed());
+    }
+}

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/window/CloseWindowRender.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/window/CloseWindowRender.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/window/CloseWindowRender.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/window/CloseWindowRender.java Tue May  3 07:18:19 2011
@@ -17,15 +17,12 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.view.window;
 
 import org.apache.isis.viewer.dnd.drawing.Canvas;
 
-
 public interface CloseWindowRender {
 
     void draw(Canvas canvas, int width, int height, boolean isDisabled, boolean isOver, boolean isPressed);
 
 }
-

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/window/DialogBorder.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/window/DialogBorder.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/window/DialogBorder.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/window/DialogBorder.java Tue May  3 07:18:19 2011
@@ -17,13 +17,11 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.view.window;
 
 import org.apache.isis.viewer.dnd.view.View;
 import org.apache.isis.viewer.dnd.view.border.ScrollBorder;
 
-
 public class DialogBorder extends AbstractWindowBorder {
 
     public DialogBorder(final View wrappedView, final boolean scrollable) {

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/window/IconizeWindowControl.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/window/IconizeWindowControl.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/window/IconizeWindowControl.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/window/IconizeWindowControl.java Tue May  3 07:18:19 2011
@@ -17,28 +17,26 @@
  *  under the License.
  */
 
+package org.apache.isis.viewer.dnd.view.window;
 
-package org.apache.isis.viewer.dnd.view.window;
-
 import org.apache.isis.viewer.dnd.drawing.Canvas;
 import org.apache.isis.viewer.dnd.view.View;
 import org.apache.isis.viewer.dnd.view.option.IconizeViewOption;
-
-
-public class IconizeWindowControl extends WindowControl {
-    private static IconizeWindowRender render;
-    
-    public static void setRender(IconizeWindowRender render) {
-        IconizeWindowControl.render = render;
-    }
-    
-    public IconizeWindowControl(final View target) {
-        super(new IconizeViewOption(), target);
-    }
-
-    @Override
-    public void draw(final Canvas canvas) {
-        render.draw(canvas, WIDTH, HEIGHT, false, isOver(), isPressed());
-    }
-    
-}
+
+public class IconizeWindowControl extends WindowControl {
+    private static IconizeWindowRender render;
+
+    public static void setRender(final IconizeWindowRender render) {
+        IconizeWindowControl.render = render;
+    }
+
+    public IconizeWindowControl(final View target) {
+        super(new IconizeViewOption(), target);
+    }
+
+    @Override
+    public void draw(final Canvas canvas) {
+        render.draw(canvas, WIDTH, HEIGHT, false, isOver(), isPressed());
+    }
+
+}

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/window/IconizeWindowRender.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/window/IconizeWindowRender.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/window/IconizeWindowRender.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/window/IconizeWindowRender.java Tue May  3 07:18:19 2011
@@ -17,15 +17,12 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.view.window;
 
 import org.apache.isis.viewer.dnd.drawing.Canvas;
 
-
 public interface IconizeWindowRender {
 
     void draw(Canvas canvas, int width, int height, boolean isDisabled, boolean isOver, boolean isPressed);
 
 }
-

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/window/ResizeWindowControl.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/window/ResizeWindowControl.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/window/ResizeWindowControl.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/window/ResizeWindowControl.java Tue May  3 07:18:19 2011
@@ -17,9 +17,8 @@
  *  under the License.
  */
 
+package org.apache.isis.viewer.dnd.view.window;
 
-package org.apache.isis.viewer.dnd.view.window;
-
 import org.apache.isis.core.metamodel.consent.Consent;
 import org.apache.isis.core.metamodel.consent.Veto;
 import org.apache.isis.core.metamodel.spec.ActionType;
@@ -28,45 +27,51 @@ import org.apache.isis.viewer.dnd.drawin
 import org.apache.isis.viewer.dnd.view.UserAction;
 import org.apache.isis.viewer.dnd.view.View;
 import org.apache.isis.viewer.dnd.view.Workspace;
-
-
-public class ResizeWindowControl extends WindowControl {
-    private static ResizeWindowRender render;
-    
-    public static void setRender(ResizeWindowRender render) {
-        ResizeWindowControl.render = render;
-    }
-    
-    public ResizeWindowControl(final View target) {
-        super(new UserAction() {
-
-            public Consent disabled(final View view) {
-                return Veto.DEFAULT;
-            }
-
-            public void execute(final Workspace workspace, final View view, final Location at) {}
-
-            public String getDescription(final View view) {
-                return "";
-            }
-
-            public String getHelp(final View view) {
-                return "";
-            }
-
-            public ActionType getType() {
-                return ActionType.USER;
-            }
-
-            public String getName(final View view) {
-                return "Resize";
-            }
-        }, target);
-
-    }
-
-    @Override
-    public void draw(final Canvas canvas) {
-       render.draw(canvas, WIDTH, HEIGHT, action.disabled(this).isVetoed(), isOver(), isPressed());
-    }
-}
+
+public class ResizeWindowControl extends WindowControl {
+    private static ResizeWindowRender render;
+
+    public static void setRender(final ResizeWindowRender render) {
+        ResizeWindowControl.render = render;
+    }
+
+    public ResizeWindowControl(final View target) {
+        super(new UserAction() {
+
+            @Override
+            public Consent disabled(final View view) {
+                return Veto.DEFAULT;
+            }
+
+            @Override
+            public void execute(final Workspace workspace, final View view, final Location at) {
+            }
+
+            @Override
+            public String getDescription(final View view) {
+                return "";
+            }
+
+            @Override
+            public String getHelp(final View view) {
+                return "";
+            }
+
+            @Override
+            public ActionType getType() {
+                return ActionType.USER;
+            }
+
+            @Override
+            public String getName(final View view) {
+                return "Resize";
+            }
+        }, target);
+
+    }
+
+    @Override
+    public void draw(final Canvas canvas) {
+        render.draw(canvas, WIDTH, HEIGHT, action.disabled(this).isVetoed(), isOver(), isPressed());
+    }
+}

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/window/ResizeWindowRender.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/window/ResizeWindowRender.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/window/ResizeWindowRender.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/window/ResizeWindowRender.java Tue May  3 07:18:19 2011
@@ -17,15 +17,12 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.view.window;
 
 import org.apache.isis.viewer.dnd.drawing.Canvas;
 
-
 public interface ResizeWindowRender {
 
     void draw(Canvas canvas, int width, int height, boolean isDisabled, boolean isOver, boolean isPressed);
 
 }
-

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/window/SubviewFocusManager.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/window/SubviewFocusManager.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/window/SubviewFocusManager.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/window/SubviewFocusManager.java Tue May  3 07:18:19 2011
@@ -17,39 +17,38 @@
  *  under the License.
  */
 
+package org.apache.isis.viewer.dnd.view.window;
 
-package org.apache.isis.viewer.dnd.view.window;
-
 import org.apache.isis.viewer.dnd.view.View;
 import org.apache.isis.viewer.dnd.view.base.AbstractFocusManager;
-
-public class SubviewFocusManager extends AbstractFocusManager {
-    private final WindowBorder windowBorder;
-
-    public SubviewFocusManager(final WindowBorder container) {
-        super(container);
-        windowBorder = container;
-    }
-
-    public SubviewFocusManager(final View container) {
-        super(container);
-        windowBorder = null;
-    }
-
-    public SubviewFocusManager(final View container, final View initalFocus) {
-        super(container, initalFocus);
-        windowBorder = null;
-    }
-
-    @Override
-    protected View[] getChildViews() {
-        final View[] subviews = container.getSubviews();
-        final View[] buttons = windowBorder == null ? new View[0] : windowBorder.getButtons();
-
-        final View[] views = new View[subviews.length + buttons.length];
-        System.arraycopy(subviews, 0, views, 0, subviews.length);
-        System.arraycopy(buttons, 0, views, subviews.length, buttons.length);
-        return views;
-    }
-
-}
+
+public class SubviewFocusManager extends AbstractFocusManager {
+    private final WindowBorder windowBorder;
+
+    public SubviewFocusManager(final WindowBorder container) {
+        super(container);
+        windowBorder = container;
+    }
+
+    public SubviewFocusManager(final View container) {
+        super(container);
+        windowBorder = null;
+    }
+
+    public SubviewFocusManager(final View container, final View initalFocus) {
+        super(container, initalFocus);
+        windowBorder = null;
+    }
+
+    @Override
+    protected View[] getChildViews() {
+        final View[] subviews = container.getSubviews();
+        final View[] buttons = windowBorder == null ? new View[0] : windowBorder.getButtons();
+
+        final View[] views = new View[subviews.length + buttons.length];
+        System.arraycopy(subviews, 0, views, 0, subviews.length);
+        System.arraycopy(buttons, 0, views, subviews.length, buttons.length);
+        return views;
+    }
+
+}

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/window/WindowBorder.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/window/WindowBorder.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/window/WindowBorder.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/window/WindowBorder.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.view.window;
 
 import java.util.Enumeration;
@@ -41,7 +40,6 @@ import org.apache.isis.viewer.dnd.view.o
 import org.apache.isis.viewer.dnd.view.option.IconizeViewOption;
 import org.apache.isis.viewer.dnd.view.option.ReplaceViewOption;
 
-
 public class WindowBorder extends AbstractWindowBorder {
     private static final UserAction CLOSE_ALL_OPTION = new CloseAllViewsOption();
     private static final UserAction CLOSE_OPTION = new CloseViewOption();
@@ -56,7 +54,7 @@ public class WindowBorder extends Abstra
             setControls(new WindowControl[] { new CloseWindowControl(this) });
         } else {
             setControls(new WindowControl[] { new IconizeWindowControl(this), new ResizeWindowControl(this),
-                    new CloseWindowControl(this) });
+                new CloseWindowControl(this) });
         }
     }
 
@@ -100,11 +98,13 @@ public class WindowBorder extends Abstra
         menuOptions.add(CLOSE_OTHER_VIEWS_FOR_OBJECT);
 
         super.viewMenuOptions(menuOptions);
-        
-        Content content = getContent(); 
-        UserActionSet suboptions = menuOptions.addNewActionSet("Replace with");
-        replaceOptions(Toolkit.getViewFactory().availableViews(new ViewRequirement(content, ViewRequirement.OPEN)), suboptions);
-        replaceOptions(Toolkit.getViewFactory().availableViews(new ViewRequirement(content, ViewRequirement.CLOSED)), suboptions);
+
+        final Content content = getContent();
+        final UserActionSet suboptions = menuOptions.addNewActionSet("Replace with");
+        replaceOptions(Toolkit.getViewFactory().availableViews(new ViewRequirement(content, ViewRequirement.OPEN)),
+            suboptions);
+        replaceOptions(Toolkit.getViewFactory().availableViews(new ViewRequirement(content, ViewRequirement.CLOSED)),
+            suboptions);
     }
 
     protected void replaceOptions(final Enumeration possibleViews, final UserActionSet options) {

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/window/WindowControl.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/window/WindowControl.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/window/WindowControl.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/window/WindowControl.java Tue May  3 07:18:19 2011
@@ -17,25 +17,24 @@
  *  under the License.
  */
 
+package org.apache.isis.viewer.dnd.view.window;
 
-package org.apache.isis.viewer.dnd.view.window;
-
 import org.apache.isis.viewer.dnd.drawing.Size;
 import org.apache.isis.viewer.dnd.view.UserAction;
 import org.apache.isis.viewer.dnd.view.View;
 import org.apache.isis.viewer.dnd.view.control.AbstractControlView;
-
-
-public abstract class WindowControl extends AbstractControlView {
-    public final static int HEIGHT = 13;
-    public final static int WIDTH = HEIGHT + 2;
-
-    protected WindowControl(final UserAction action, final View target) {
-        super(action, target);
-    }
-
-    public Size getRequiredSize(Size availableSpace) {
-        return new Size(WIDTH, HEIGHT);
-    }
-
-}
+
+public abstract class WindowControl extends AbstractControlView {
+    public final static int HEIGHT = 13;
+    public final static int WIDTH = HEIGHT + 2;
+
+    protected WindowControl(final UserAction action, final View target) {
+        super(action, target);
+    }
+
+    @Override
+    public Size getRequiredSize(final Size availableSpace) {
+        return new Size(WIDTH, HEIGHT);
+    }
+
+}

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/viewer/ApplicationOptions.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/viewer/ApplicationOptions.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/viewer/ApplicationOptions.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/viewer/ApplicationOptions.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.viewer;
 
 import org.apache.isis.core.metamodel.consent.Allow;
@@ -34,7 +33,6 @@ import org.apache.isis.viewer.dnd.view.V
 import org.apache.isis.viewer.dnd.view.Workspace;
 import org.apache.isis.viewer.dnd.view.option.UserActionAbstract;
 
-
 public class ApplicationOptions implements MenuOptions {
     private final ShutdownListener listener;
 
@@ -42,11 +40,12 @@ public class ApplicationOptions implemen
         this.listener = listener;
     }
 
+    @Override
     public void menuOptions(final UserActionSet options) {
         options.add(new UserActionAbstract("About...") {
             @Override
             public void execute(final Workspace workspace, final View view, final Location at) {
-                AboutView dialogView = new AboutView();
+                final AboutView dialogView = new AboutView();
                 final Size windowSize = dialogView.getRequiredSize(new Size());
                 final Size workspaceSize = workspace.getSize();
                 final int x = workspaceSize.getWidth() / 2 - windowSize.getWidth() / 2;
@@ -82,4 +81,3 @@ public class ApplicationOptions implemen
 
     }
 }
-



Mime
View raw message