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 [13/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/table/TableHeader.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/table/TableHeader.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/table/TableHeader.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/table/TableHeader.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.table;
 
 import org.apache.isis.core.commons.exceptions.IsisException;
@@ -41,7 +40,6 @@ import org.apache.isis.viewer.dnd.view.b
 import org.apache.isis.viewer.dnd.view.border.ResizeDrag;
 import org.apache.isis.viewer.dnd.view.collection.CollectionContent;
 
-
 public class TableHeader extends AbstractView {
     private final TableAxis axis;
     private final int height;
@@ -78,7 +76,7 @@ public class TableHeader extends Abstrac
     }
 
     @Override
-    public Size getRequiredSize(Size availableSpace) {
+    public Size getRequiredSize(final Size availableSpace) {
         return new Size(-1, height);
     }
 
@@ -133,7 +131,7 @@ public class TableHeader extends Abstrac
             drawOrderIndicator(canvas, axis, x - 10);
         }
 
-        Color secondary1 = Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY1);
+        final Color secondary1 = Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY1);
         canvas.drawLine(0, 0, getSize().getWidth() - 1, 0, secondary1);
         canvas.drawLine(0, height - 1, getSize().getWidth() - 1, height - 1, secondary1);
         canvas.drawLine(x, 0, x, getSize().getHeight() - 1, secondary1);
@@ -144,16 +142,17 @@ public class TableHeader extends Abstrac
             if (fieldSortOrder == axis.getFieldForColumn(i)) {
                 drawOrderIndicator(canvas, axis, x + axis.getColumnWidth(i) - 10);
             }
-            
+
             canvas.drawLine(0, 0, 0, getSize().getHeight() - 1, secondary1);
             canvas.drawLine(x, 0, x, getSize().getHeight() - 1, secondary1);
             final Canvas headerCanvas = canvas.createSubcanvas(x, 0, axis.getColumnWidth(i) - 1, height);
-            headerCanvas.drawText(axis.getColumnName(i), HPADDING, y, secondary1, Toolkit.getText(ColorsAndFonts.TEXT_LABEL));
+            headerCanvas.drawText(axis.getColumnName(i), HPADDING, y, secondary1,
+                Toolkit.getText(ColorsAndFonts.TEXT_LABEL));
             x += axis.getColumnWidth(i);
         }
-  //     Color secondary2 = Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY2);
- //   canvas.drawLine(x, 0, x, getSize().getHeight() - 1, secondary2);
-  //      canvas.drawRectangle(0, height, getSize().getWidth() - 1, getSize().getHeight() - height - 1, secondary2);
+        // Color secondary2 = Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY2);
+        // canvas.drawLine(x, 0, x, getSize().getHeight() - 1, secondary2);
+        // canvas.drawRectangle(0, height, getSize().getWidth() - 1, getSize().getHeight() - height - 1, secondary2);
     }
 
     private void drawOrderIndicator(final Canvas canvas, final TableAxis axis, final int x) {
@@ -203,16 +202,14 @@ public class TableHeader extends Abstrac
             final int column = axis.getColumnBorderAt(click.getLocation().getX()) - 1;
             if (column == -1) {
                 final View[] subviews = getSubviews();
-                for (int i = 0; i < subviews.length; i++) {
-                    final View row = subviews[i];
+                for (final View row : subviews) {
                     axis.ensureOffset(((TableRowBorder) row).requiredTitleWidth());
                 }
 
             } else {
                 final View[] subviews = getSubviews();
                 int max = 0;
-                for (int i = 0; i < subviews.length; i++) {
-                    final View row = subviews[i];
+                for (final View row : subviews) {
                     final View cell = row.getSubviews()[column];
                     max = Math.max(max, cell.getRequiredSize(new Size()).getWidth());
                 }

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/table/TableRowBorder.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/table/TableRowBorder.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/table/TableRowBorder.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/table/TableRowBorder.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.table;
 
 import org.apache.isis.core.commons.debug.DebugBuilder;
@@ -47,16 +46,17 @@ import org.apache.isis.viewer.dnd.view.c
 import org.apache.isis.viewer.dnd.view.text.ObjectTitleText;
 import org.apache.isis.viewer.dnd.view.text.TitleText;
 
-
 // REVIEW can we use ObjectBorder to provide the basic functionality
 public class TableRowBorder extends AbstractBorder {
     public static class Factory implements SubviewDecorator {
-        public ViewAxis createAxis(Content content) {
-            TableAxis axis = new TableAxisImpl((CollectionContent) content);
+        @Override
+        public ViewAxis createAxis(final Content content) {
+            final TableAxis axis = new TableAxisImpl((CollectionContent) content);
             return axis;
         }
 
-        public View decorate(Axes axes, View view) {
+        @Override
+        public View decorate(final Axes axes, final View view) {
             return new TableRowBorder(axes, view);
         }
     }
@@ -66,13 +66,13 @@ public class TableRowBorder extends Abst
     private final int baseline;
     private final IconGraphic icon;
     private final TitleText title;
-    
-    private TableAxis axis;
+
+    private final TableAxis axis;
 
     public TableRowBorder(final Axes axes, final View wrappedRow) {
         super(wrappedRow);
 
-        Text text = Toolkit.getText(ColorsAndFonts.TEXT_NORMAL);
+        final Text text = Toolkit.getText(ColorsAndFonts.TEXT_NORMAL);
         icon = new IconGraphic(this, text);
         title = new ObjectTitleText(this, text);
         baseline = icon.getBaseline();
@@ -108,7 +108,7 @@ public class TableRowBorder extends Abst
     public void draw(final Canvas canvas) {
         final int baseline = getBaseline();
 
-         final int width = axis.getHeaderOffset();
+        final int width = axis.getHeaderOffset();
         final Size s = getSize();
         final Canvas subcanvas = canvas.createSubcanvas(0, 0, width, s.getHeight());
         int offset = HPADDING;
@@ -119,7 +119,7 @@ public class TableRowBorder extends Abst
         final int columns = axis.getColumnCount();
         int x = -1;
         x += axis.getHeaderOffset();
-        Color secondary1 = Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY1);
+        final Color secondary1 = Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY1);
         canvas.drawLine(x - 1, 0, x - 1, s.getHeight() - 1, secondary1);
         canvas.drawLine(x, 0, x, s.getHeight() - 1, secondary1);
         for (int i = 0; i < columns; i++) {
@@ -127,16 +127,16 @@ public class TableRowBorder extends Abst
             canvas.drawLine(x, 0, x, s.getHeight() - 1, secondary1);
         }
         canvas.drawLine(0, 0, 0, s.getHeight() - 1, secondary1);
-        
+
         final int y = s.getHeight() - 1;
-        Color secondary2 = Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY2);
-            canvas.drawLine(0, y, s.getWidth(), y, secondary2);
+        final Color secondary2 = Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY2);
+        canvas.drawLine(0, y, s.getWidth(), y, secondary2);
 
         if (getState().isObjectIdentified()) {
             final int xExtent = width - 1;
             canvas.drawLine(xExtent - BORDER, top, xExtent - BORDER, top + s.getHeight() - 1, secondary2);
-            canvas.drawSolidRectangle(xExtent - BORDER + 1, top, BORDER - 2, s.getHeight() - 2 * top - 1, Toolkit
-                    .getColor(ColorsAndFonts.COLOR_SECONDARY3));
+            canvas.drawSolidRectangle(xExtent - BORDER + 1, top, BORDER - 2, s.getHeight() - 2 * top - 1,
+                Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY3));
         }
 
         // components

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/table/TableRowLayout.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/table/TableRowLayout.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/table/TableRowLayout.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/table/TableRowLayout.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.table;
 
 import org.apache.isis.viewer.dnd.drawing.Location;
@@ -25,14 +24,14 @@ import org.apache.isis.viewer.dnd.drawin
 import org.apache.isis.viewer.dnd.view.View;
 import org.apache.isis.viewer.dnd.view.base.Layout;
 
-
 public class TableRowLayout implements Layout {
     private final TableAxis axis;
 
-    public TableRowLayout(TableAxis axis) {
+    public TableRowLayout(final TableAxis axis) {
         this.axis = axis;
     }
 
+    @Override
     public Size getRequiredSize(final View row) {
         int maxHeight = 0;
         int totalWidth = 0;
@@ -42,7 +41,8 @@ public class TableRowLayout implements L
         for (int i = 0; i < cells.length; i++) {
             totalWidth += axis.getColumnWidth(i);
 
-            final Size s = cells[i].getRequiredSize(Size.createMax());//   TODO  Need to pass in a max size (is 0 at the moment)
+            final Size s = cells[i].getRequiredSize(Size.createMax());// TODO Need to pass in a max size (is 0 at the
+                                                                      // moment)
             final int b = cells[i].getBaseline();
             final int baselineOffset = Math.max(0, maxBaseline - b);
             maxHeight = Math.max(maxHeight, s.getHeight() + baselineOffset);
@@ -51,6 +51,7 @@ public class TableRowLayout implements L
         return new Size(totalWidth, maxHeight);
     }
 
+    @Override
     public void layout(final View row, final Size maximumSize) {
         final View[] cells = row.getSubviews();
         final int maxBaseline = maxBaseline(cells);
@@ -58,7 +59,8 @@ public class TableRowLayout implements L
         int x = 0;
         for (int i = 0; i < cells.length; i++) {
             final View cell = cells[i];
-            final Size s = cell.getRequiredSize(Size.createMax());  // TODO  Need to pass in a max size (is 0 at the moment)
+            final Size s = cell.getRequiredSize(Size.createMax()); // TODO Need to pass in a max size (is 0 at the
+                                                                   // moment)
             s.setWidth(axis.getColumnWidth(i));
             cell.setSize(s);
 
@@ -72,12 +74,10 @@ public class TableRowLayout implements L
 
     private int maxBaseline(final View[] cells) {
         int maxBaseline = 0;
-        for (int i = 0; i < cells.length; i++) {
-            final View cell = cells[i];
+        for (final View cell : cells) {
             maxBaseline = Math.max(maxBaseline, cell.getBaseline());
         }
         return maxBaseline;
     }
 
 }
-

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/table/TableRowSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/table/TableRowSpecification.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/table/TableRowSpecification.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/table/TableRowSpecification.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.table;
 
 import org.apache.isis.viewer.dnd.view.Axes;
@@ -26,20 +25,22 @@ import org.apache.isis.viewer.dnd.view.V
 import org.apache.isis.viewer.dnd.view.base.Layout;
 import org.apache.isis.viewer.dnd.view.composite.CompositeViewSpecification;
 
-
 public class TableRowSpecification extends CompositeViewSpecification {
     public TableRowSpecification() {
         builder = new TableCellBuilder();
     }
 
-    public Layout createLayout(Content content, Axes axes) {
+    @Override
+    public Layout createLayout(final Content content, final Axes axes) {
         return new TableRowLayout(axes.getAxis(TableAxis.class));
     }
-    
-    public boolean canDisplay(ViewRequirement requirement) {
+
+    @Override
+    public boolean canDisplay(final ViewRequirement requirement) {
         return requirement.isObject();
     }
 
+    @Override
     public String getName() {
         return "Table Row";
     }

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/table/TypeBasedColumnWidthStrategy.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/table/TypeBasedColumnWidthStrategy.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/table/TypeBasedColumnWidthStrategy.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/table/TypeBasedColumnWidthStrategy.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.table;
 
 import java.util.Hashtable;
@@ -25,33 +24,34 @@ import java.util.Hashtable;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAssociation;
 
-
 public class TypeBasedColumnWidthStrategy implements ColumnWidthStrategy {
     private final Hashtable types = new Hashtable();
 
     public TypeBasedColumnWidthStrategy() {
-    /*
-     * ObjectSpecificationLoader loader = Isis.getSpecificationLoader();
-     * addWidth(loader.loadSpecification(Logical.class), 25); addWidth(loader.loadSpecification(Date.class),
-     * 65); addWidth(loader.loadSpecification(Time.class), 38);
-     * addWidth(loader.loadSpecification(DateTime.class), 100);
-     * addWidth(loader.loadSpecification(TextString.class), 80);
-     */
+        /*
+         * ObjectSpecificationLoader loader = Isis.getSpecificationLoader();
+         * addWidth(loader.loadSpecification(Logical.class), 25); addWidth(loader.loadSpecification(Date.class), 65);
+         * addWidth(loader.loadSpecification(Time.class), 38); addWidth(loader.loadSpecification(DateTime.class), 100);
+         * addWidth(loader.loadSpecification(TextString.class), 80);
+         */
     }
 
     public void addWidth(final ObjectSpecification specification, final int width) {
         types.put(specification, new Integer(width));
     }
 
+    @Override
     public int getMaximumWidth(final int i, final ObjectAssociation specification) {
         return 0;
     }
 
+    @Override
     public int getMinimumWidth(final int i, final ObjectAssociation specification) {
         return 15;
     }
 
     // TODO improve the width determination
+    @Override
     public int getPreferredWidth(final int i, final ObjectAssociation specification) {
         final ObjectSpecification type = specification.getSpecification();
         if (type == null) {

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/table/WindowTableSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/table/WindowTableSpecification.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/table/WindowTableSpecification.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/table/WindowTableSpecification.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.table;
 
 import org.apache.isis.viewer.dnd.view.Axes;
@@ -26,48 +25,39 @@ import org.apache.isis.viewer.dnd.view.b
 import org.apache.isis.viewer.dnd.view.composite.CompositeViewDecorator;
 import org.apache.isis.viewer.dnd.viewer.basic.TableFocusManager;
 
-
 public class WindowTableSpecification extends AbstractTableSpecification {
     public WindowTableSpecification() {
         addViewDecorator(new CompositeViewDecorator() {
-            public View decorate(View view, Axes axes) {
+            @Override
+            public View decorate(final View view, final Axes axes) {
                 final ScrollBorder scrollingView = new ScrollBorder(view);
-                View viewWithWindowBorder = scrollingView;
+                final View viewWithWindowBorder = scrollingView;
                 // note - the next call needs to be after the creation of the window border so
                 // that it exists when the header is set up
                 scrollingView.setTopHeader(new TableHeader(view.getContent(), axes.getAxis(TableAxis.class)));
                 viewWithWindowBorder.setFocusManager(new TableFocusManager(viewWithWindowBorder));
                 return viewWithWindowBorder;
-            }});
-            
-    }
-   /*
-    @Override
-    public View doCreateView(final View view, final Content content, final ViewAxis axis) {
-        if (true)
-            return view;
-
-        final ScrollBorder scrollingView = new ScrollBorder(view);
-        View viewWithWindowBorder = scrollingView;
-        // note - the next call needs to be after the creation of the window border so
-        // that it exists when the header is set up
-        scrollingView.setTopHeader(new TableHeader(content, view.getViewAxisForChildren()));
-        viewWithWindowBorder.setFocusManager(new TableFocusManager(viewWithWindowBorder));
-        return viewWithWindowBorder;
-    }
-
-    protected View decorateView(View view) {
-        super.decorateView(view);
+            }
+        });
 
-        final ScrollBorder scrollingView = new ScrollBorder(view);
-        View viewWithWindowBorder = scrollingView;
-        // note - the next call needs to be after the creation of the window border so
-        // that it exists when the header is set up
-        scrollingView.setTopHeader(new TableHeader(view.getContent(), view.getViewAxisForChildren()));
-        viewWithWindowBorder.setFocusManager(new TableFocusManager(viewWithWindowBorder));
-        return viewWithWindowBorder;
     }
-*/
+
+    /*
+     * @Override public View doCreateView(final View view, final Content content, final ViewAxis axis) { if (true)
+     * return view;
+     * 
+     * final ScrollBorder scrollingView = new ScrollBorder(view); View viewWithWindowBorder = scrollingView; // note -
+     * the next call needs to be after the creation of the window border so // that it exists when the header is set up
+     * scrollingView.setTopHeader(new TableHeader(content, view.getViewAxisForChildren()));
+     * viewWithWindowBorder.setFocusManager(new TableFocusManager(viewWithWindowBorder)); return viewWithWindowBorder; }
+     * 
+     * protected View decorateView(View view) { super.decorateView(view);
+     * 
+     * final ScrollBorder scrollingView = new ScrollBorder(view); View viewWithWindowBorder = scrollingView; // note -
+     * the next call needs to be after the creation of the window border so // that it exists when the header is set up
+     * scrollingView.setTopHeader(new TableHeader(view.getContent(), view.getViewAxisForChildren()));
+     * viewWithWindowBorder.setFocusManager(new TableFocusManager(viewWithWindowBorder)); return viewWithWindowBorder; }
+     */
     @Override
     public String getName() {
         return "Table";

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/toolbar/ToolbarView.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/toolbar/ToolbarView.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/toolbar/ToolbarView.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/toolbar/ToolbarView.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.toolbar;
 
 import org.apache.isis.viewer.dnd.drawing.Location;
@@ -29,18 +28,21 @@ import org.apache.isis.viewer.dnd.view.c
 
 public class ToolbarView extends CompositeView {
 
-    public ToolbarView(Content content, ViewSpecification specification) {
+    public ToolbarView(final Content content, final ViewSpecification specification) {
         super(content, specification);
     }
 
-    protected void buildView() {}
+    @Override
+    protected void buildView() {
+    }
 
-    protected void doLayout(Size maximumSize) {
+    @Override
+    protected void doLayout(final Size maximumSize) {
         int x = HPADDING;
         int y = 0;
         int lineHeight = 0;
-        for (View button : getSubviews()) {
-            Size buttonSize = button.getRequiredSize(Size.createMax());
+        for (final View button : getSubviews()) {
+            final Size buttonSize = button.getRequiredSize(Size.createMax());
             if (x + buttonSize.getWidth() >= maximumSize.getWidth()) {
                 x = HPADDING;
                 y += lineHeight + VPADDING;
@@ -52,13 +54,14 @@ public class ToolbarView extends Composi
             lineHeight = Math.max(lineHeight, buttonSize.getHeight());
         }
     }
-    
-    public Size requiredSize(Size availableSpace) {
+
+    @Override
+    public Size requiredSize(final Size availableSpace) {
         int lineHeight = 0;
         int lineWidth = HPADDING;
-        Size requiredSize = new Size();
-        for (View button : getSubviews()) {
-            Size buttonSize = button.getRequiredSize(availableSpace);
+        final Size requiredSize = new Size();
+        for (final View button : getSubviews()) {
+            final Size buttonSize = button.getRequiredSize(availableSpace);
             lineWidth += buttonSize.getWidth() + HPADDING;
             if (lineWidth >= availableSpace.getWidth()) {
                 lineWidth = HPADDING;
@@ -73,5 +76,3 @@ public class ToolbarView extends Composi
     }
 
 }
-
-

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/ClosedCollectionNodeSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/ClosedCollectionNodeSpecification.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/ClosedCollectionNodeSpecification.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/ClosedCollectionNodeSpecification.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.tree;
 
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
@@ -29,15 +28,15 @@ import org.apache.isis.viewer.dnd.view.V
 import org.apache.isis.viewer.dnd.view.ViewRequirement;
 import org.apache.isis.viewer.dnd.view.collection.CollectionContent;
 
-
 /**
  * Specification for a tree node that will display a closed collection as a root node or within an object.
  * 
- * @see org.apache.isis.viewer.dnd.tree.OpenCollectionNodeSpecification for displaying an open collection
- *      within an object.
+ * @see org.apache.isis.viewer.dnd.tree.OpenCollectionNodeSpecification for displaying an open collection within an
+ *      object.
  */
 public class ClosedCollectionNodeSpecification extends NodeSpecification {
-    public boolean canDisplay(ViewRequirement requirement) {
+    @Override
+    public boolean canDisplay(final ViewRequirement requirement) {
         return requirement.isCollection() && requirement.hasReference();
     }
 
@@ -53,11 +52,12 @@ public class ClosedCollectionNodeSpecifi
     }
 
     @Override
-    protected View createNodeView(final Content content, Axes axes) {
+    protected View createNodeView(final Content content, final Axes axes) {
         final View treeLeafNode = new LeafNodeView(content, this);
         return treeLeafNode;
     }
 
+    @Override
     public String getName() {
         return "Collection tree node - closed";
     }

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/ClosedObjectNodeSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/ClosedObjectNodeSpecification.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/ClosedObjectNodeSpecification.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/ClosedObjectNodeSpecification.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.tree;
 
 import java.util.List;
@@ -35,40 +34,40 @@ import org.apache.isis.viewer.dnd.view.V
 import org.apache.isis.viewer.dnd.view.ViewRequirement;
 import org.apache.isis.viewer.dnd.view.border.SelectObjectBorder;
 
-
 /**
- * Specification for a tree node that will display a closed object as a root node or within an object. This
- * will indicate that the created view can be opened if: one of it fields is a collection; it is set up to
- * show objects within objects and one of the fields is an object but it is not a lookup.
+ * Specification for a tree node that will display a closed object as a root node or within an object. This will
+ * indicate that the created view can be opened if: one of it fields is a collection; it is set up to show objects
+ * within objects and one of the fields is an object but it is not a lookup.
  * 
- * @see org.apache.isis.viewer.dnd.tree.OpenObjectNodeSpecification for displaying an open collection as
- *      part of an object.
+ * @see org.apache.isis.viewer.dnd.tree.OpenObjectNodeSpecification for displaying an open collection as part of an
+ *      object.
  */
 class ClosedObjectNodeSpecification extends NodeSpecification {
     private final boolean showObjectContents;
-    private SubviewDecorator decorator = new SelectObjectBorder.Factory();
+    private final SubviewDecorator decorator = new SelectObjectBorder.Factory();
 
     public ClosedObjectNodeSpecification(final boolean showObjectContents) {
         this.showObjectContents = showObjectContents;
     }
 
     @Override
-    public boolean canDisplay(ViewRequirement requirement) {
+    public boolean canDisplay(final ViewRequirement requirement) {
         return requirement.isObject() && requirement.hasReference();
     }
 
     @Override
     public int canOpen(final Content content) {
         final ObjectAdapter object = ((ObjectContent) content).getObject();
-        final List<ObjectAssociation> fields = object.getSpecification().getAssociations(
+        final List<ObjectAssociation> fields =
+            object.getSpecification().getAssociations(
                 ObjectAssociationFilters.dynamicallyVisible(IsisContext.getAuthenticationSession(), object));
         for (int i = 0; i < fields.size(); i++) {
             if (fields.get(i).isOneToManyAssociation()) {
                 return CAN_OPEN;
             }
 
-            if (  showObjectContents && fields.get(i).isOneToOneAssociation() &&
-                !(BoundedFacetUtils.isBoundedSet(object.getSpecification()))) {
+            if (showObjectContents && fields.get(i).isOneToOneAssociation()
+                && !(BoundedFacetUtils.isBoundedSet(object.getSpecification()))) {
                 return CAN_OPEN;
             }
         }
@@ -76,7 +75,7 @@ class ClosedObjectNodeSpecification exte
     }
 
     @Override
-    protected View createNodeView(final Content content, Axes axes) {
+    protected View createNodeView(final Content content, final Axes axes) {
         View treeLeafNode = new LeafNodeView(content, this);
         treeLeafNode = decorator.decorate(axes, treeLeafNode);
         return treeLeafNode;

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/CompositeNodeSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/CompositeNodeSpecification.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/CompositeNodeSpecification.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/CompositeNodeSpecification.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.tree;
 
 import org.apache.isis.viewer.dnd.view.Axes;
@@ -28,7 +27,6 @@ import org.apache.isis.viewer.dnd.view.b
 import org.apache.isis.viewer.dnd.view.composite.CompositeViewUsingBuilder;
 import org.apache.isis.viewer.dnd.view.composite.ViewBuilder;
 
-
 public abstract class CompositeNodeSpecification extends NodeSpecification implements CompositeViewSpecification {
     protected ViewBuilder builder;
     private NodeSpecification collectionLeafNodeSpecification;
@@ -42,27 +40,26 @@ public abstract class CompositeNodeSpeci
         this.objectLeafNodeSpecification = objectLeafNodeSpecification;
     }
 
-    public void createAxes(Content content, Axes axes) {}
-    
+    public void createAxes(final Content content, final Axes axes) {
+    }
+
     @Override
-    protected View createNodeView(final Content content, Axes axes) {
-        final CompositeViewUsingBuilder view = new CompositeViewUsingBuilder(content, this, axes, createLayout(content, axes), builder);
+    protected View createNodeView(final Content content, final Axes axes) {
+        final CompositeViewUsingBuilder view =
+            new CompositeViewUsingBuilder(content, this, axes, createLayout(content, axes), builder);
         return view;
     }
 
     protected abstract Layout createLayout(Content content, Axes axes);
 
-/*
-    public View createView(final Content content, Axes axes, int fieldNumber) {
-        ViewRequirement requirement = new ViewRequirement(content, ViewRequirement.CLOSED);
-        if (collectionLeafNodeSpecification.canDisplay(content, requirement )) {
-            return collectionLeafNodeSpecification.createView(content, axes, -1);
-        }
-
-        if (objectLeafNodeSpecification.canDisplay(content, requirement)) {
-            return objectLeafNodeSpecification.createView(content, axes, -1);
-        }
-
-        return null;
-    }*/
+    /*
+     * public View createView(final Content content, Axes axes, int fieldNumber) { ViewRequirement requirement = new
+     * ViewRequirement(content, ViewRequirement.CLOSED); if (collectionLeafNodeSpecification.canDisplay(content,
+     * requirement )) { return collectionLeafNodeSpecification.createView(content, axes, -1); }
+     * 
+     * if (objectLeafNodeSpecification.canDisplay(content, requirement)) { return
+     * objectLeafNodeSpecification.createView(content, axes, -1); }
+     * 
+     * return null; }
+     */
 }

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/EmptyNodeSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/EmptyNodeSpecification.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/EmptyNodeSpecification.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/EmptyNodeSpecification.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.tree;
 
 import org.apache.isis.viewer.dnd.view.Axes;
@@ -25,7 +24,6 @@ import org.apache.isis.viewer.dnd.view.C
 import org.apache.isis.viewer.dnd.view.View;
 import org.apache.isis.viewer.dnd.view.ViewRequirement;
 
-
 /**
  * A simple specification that always returns false when asked if it can display any content.
  * 
@@ -39,14 +37,16 @@ public class EmptyNodeSpecification exte
     }
 
     @Override
-    protected View createNodeView(final Content content, Axes axes) {
+    protected View createNodeView(final Content content, final Axes axes) {
         return null;
     }
 
-    public boolean canDisplay(ViewRequirement requirement) {
+    @Override
+    public boolean canDisplay(final ViewRequirement requirement) {
         return false;
     }
 
+    @Override
     public String getName() {
         return "Empty tree node";
     }

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/LeafNodeView.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/LeafNodeView.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/LeafNodeView.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/LeafNodeView.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.tree;
 
 import org.apache.isis.viewer.dnd.view.Content;
@@ -25,7 +24,6 @@ import org.apache.isis.viewer.dnd.view.F
 import org.apache.isis.viewer.dnd.view.ViewSpecification;
 import org.apache.isis.viewer.dnd.view.base.ObjectView;
 
-
 class LeafNodeView extends ObjectView {
 
     private FocusManager focusManager;

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/ListWithDetailSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/ListWithDetailSpecification.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/ListWithDetailSpecification.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/ListWithDetailSpecification.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.tree;
 
 import org.apache.isis.viewer.dnd.list.SimpleListSpecification;
@@ -30,45 +29,51 @@ import org.apache.isis.viewer.dnd.view.b
 import org.apache.isis.viewer.dnd.view.composite.MasterDetailPanel;
 
 public class ListWithDetailSpecification implements ViewSpecification {
-    private SimpleListSpecification leftHandSideSpecification;
+    private final SimpleListSpecification leftHandSideSpecification;
 
     public ListWithDetailSpecification() {
         leftHandSideSpecification = new SimpleListSpecification();
         leftHandSideSpecification.addSubviewDecorator(new SelectObjectBorder.Factory());
     }
 
-    public boolean canDisplay(ViewRequirement requirement) {
+    @Override
+    public boolean canDisplay(final ViewRequirement requirement) {
         return requirement.isCollection() && requirement.isOpen();
     }
- 
-    public View createView(Content content, Axes axes, int sequence) {
+
+    @Override
+    public View createView(final Content content, final Axes axes, final int sequence) {
         return new MasterDetailPanel(content, this, leftHandSideSpecification);
     }
-    
+
+    @Override
     public String getName() {
         return "List and details";
     }
 
+    @Override
     public boolean isAligned() {
         return false;
     }
 
+    @Override
     public boolean isOpen() {
         return true;
     }
 
+    @Override
     public boolean isReplaceable() {
         return true;
     }
-    
+
+    @Override
     public boolean isResizeable() {
         return false;
     }
 
+    @Override
     public boolean isSubView() {
         return false;
     }
 
 }
-
-

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/NodeSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/NodeSpecification.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/NodeSpecification.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/NodeSpecification.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.tree;
 
 import org.apache.isis.viewer.dnd.view.Axes;
@@ -26,7 +25,6 @@ import org.apache.isis.viewer.dnd.view.V
 import org.apache.isis.viewer.dnd.view.ViewSpecification;
 import org.apache.isis.viewer.dnd.viewer.basic.NullFocusManager;
 
-
 abstract class NodeSpecification implements ViewSpecification {
     public static final int CAN_OPEN = 1;
     public static final int CANT_OPEN = 2;
@@ -37,30 +35,36 @@ abstract class NodeSpecification impleme
 
     protected abstract View createNodeView(final Content content, Axes axes);
 
-    public final View createView(final Content content, Axes axes, int sequence) {
+    @Override
+    public final View createView(final Content content, final Axes axes, final int sequence) {
         final View view = createNodeView(content, axes);
         final TreeNodeBorder newView = new TreeNodeBorder(view, replacementNodeSpecification);
         newView.setFocusManager(new NullFocusManager());
-        
+
         return newView;
     }
 
+    @Override
     public boolean isAligned() {
         return false;
     }
 
+    @Override
     public boolean isOpen() {
         return false;
     }
 
+    @Override
     public boolean isReplaceable() {
         return false;
     }
-    
+
+    @Override
     public boolean isResizeable() {
         return false;
     }
 
+    @Override
     public boolean isSubView() {
         return true;
     }

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/OpenCollectionNodeSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/OpenCollectionNodeSpecification.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/OpenCollectionNodeSpecification.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/OpenCollectionNodeSpecification.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.tree;
 
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
@@ -30,18 +29,18 @@ import org.apache.isis.viewer.dnd.view.b
 import org.apache.isis.viewer.dnd.view.composite.CollectionElementBuilder;
 import org.apache.isis.viewer.dnd.view.composite.StackLayout;
 
-
 /**
  * Specification for a tree node that will display an open collection as a root node or within an object.
  * 
- * @see org.apache.isis.viewer.dnd.tree.ClosedCollectionNodeSpecification for displaying a closed
- *      collection within an object.
+ * @see org.apache.isis.viewer.dnd.tree.ClosedCollectionNodeSpecification for displaying a closed collection within an
+ *      object.
  */
 public class OpenCollectionNodeSpecification extends CompositeNodeSpecification {
     /**
      * A collection tree can only be displayed for a collection that has elements.
      */
-    public boolean canDisplay(ViewRequirement requirement) {
+    @Override
+    public boolean canDisplay(final ViewRequirement requirement) {
         final ObjectAdapter collection = requirement.getAdapter();
         if (collection == null) {
             return false;
@@ -54,8 +53,9 @@ public class OpenCollectionNodeSpecifica
     public OpenCollectionNodeSpecification() {
         builder = new CollectionElementBuilder(this);
     }
-    
-    public Layout createLayout(Content content, Axes axes) {
+
+    @Override
+    public Layout createLayout(final Content content, final Axes axes) {
         return new StackLayout();
     }
 
@@ -63,7 +63,7 @@ public class OpenCollectionNodeSpecifica
     public boolean isOpen() {
         return true;
     }
-    
+
     @Override
     public boolean isSubView() {
         return false;
@@ -74,6 +74,7 @@ public class OpenCollectionNodeSpecifica
         return CAN_OPEN;
     }
 
+    @Override
     public String getName() {
         return "Collection tree node - open";
     }

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/OpenObjectNodeSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/OpenObjectNodeSpecification.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/OpenObjectNodeSpecification.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/OpenObjectNodeSpecification.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.tree;
 
 import java.util.List;
@@ -36,34 +35,34 @@ import org.apache.isis.viewer.dnd.view.b
 import org.apache.isis.viewer.dnd.view.composite.ObjectFieldBuilder;
 import org.apache.isis.viewer.dnd.view.composite.StackLayout;
 
-
 /**
  * Specification for a tree node that will display an open object as a root node or within an object.
  * 
- * @see org.apache.isis.viewer.dnd.tree.ClosedObjectNodeSpecification for displaying a closed collection
- *      within an object.
+ * @see org.apache.isis.viewer.dnd.tree.ClosedObjectNodeSpecification for displaying a closed collection within an
+ *      object.
  */
 public class OpenObjectNodeSpecification extends CompositeNodeSpecification {
-    private SubviewDecorator decorator = new SelectObjectBorder.Factory();
+    private final SubviewDecorator decorator = new SelectObjectBorder.Factory();
 
     public OpenObjectNodeSpecification() {
         builder = new ObjectFieldBuilder(this);
     }
-    
+
     @Override
-    public Layout createLayout(Content content, Axes axes) {
+    public Layout createLayout(final Content content, final Axes axes) {
         return new StackLayout();
     }
 
     /**
-     * This is only used to control root nodes. Therefore a object tree can only be displayed for an object
-     * with fields that are collections.
+     * This is only used to control root nodes. Therefore a object tree can only be displayed for an object with fields
+     * that are collections.
      */
     @Override
-    public boolean canDisplay(ViewRequirement requirement) {
+    public boolean canDisplay(final ViewRequirement requirement) {
         if (requirement.isObject() && requirement.hasReference()) {
             final ObjectAdapter object = requirement.getAdapter();
-            final List<ObjectAssociation> fields = object.getSpecification().getAssociations(
+            final List<ObjectAssociation> fields =
+                object.getSpecification().getAssociations(
                     ObjectAssociationFilters.dynamicallyVisible(IsisContext.getAuthenticationSession(), object));
             for (int i = 0; i < fields.size(); i++) {
                 if (fields.get(i).isOneToManyAssociation()) {
@@ -74,9 +73,9 @@ public class OpenObjectNodeSpecification
 
         return false;
     }
-    
+
     @Override
-    protected View createNodeView(Content content, Axes axes) {
+    protected View createNodeView(final Content content, final Axes axes) {
         return decorator.decorate(axes, super.createNodeView(content, axes));
     }
 
@@ -89,7 +88,7 @@ public class OpenObjectNodeSpecification
     public boolean isOpen() {
         return true;
     }
-    
+
     @Override
     public boolean isSubView() {
         return false;

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/TreeDisplayRules.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/TreeDisplayRules.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/TreeDisplayRules.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/TreeDisplayRules.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.tree;
 
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
@@ -31,11 +30,11 @@ import org.apache.isis.viewer.dnd.view.U
 import org.apache.isis.viewer.dnd.view.View;
 import org.apache.isis.viewer.dnd.view.Workspace;
 
-
 public class TreeDisplayRules {
     private static boolean showCollectionsOnly = false;
 
-    private TreeDisplayRules() {}
+    private TreeDisplayRules() {
+    }
 
     public static void menuOptions(final UserActionSet options) {
         // TODO fix and remove following line
@@ -44,26 +43,32 @@ public class TreeDisplayRules {
         }
 
         final UserAction option = new UserAction() {
+            @Override
             public void execute(final Workspace workspace, final View view, final Location at) {
                 showCollectionsOnly = !showCollectionsOnly;
             }
 
+            @Override
             public String getName(final View view) {
                 return showCollectionsOnly ? "Show collections only" : "Show all references";
             }
 
+            @Override
             public Consent disabled(final View view) {
                 return Allow.DEFAULT;
             }
 
+            @Override
             public String getDescription(final View view) {
                 return "This option makes the system only show collections within the trees, and not single elements";
             }
 
+            @Override
             public ActionType getType() {
                 return ActionType.USER;
             }
 
+            @Override
             public String getHelp(final View view) {
                 return "";
             }
@@ -76,7 +81,7 @@ public class TreeDisplayRules {
     }
 
     public static boolean canDisplay(final ObjectAdapter object) {
-        boolean lookupView = object != null && BoundedFacetUtils.isBoundedSet(object.getSpecification());
+        final boolean lookupView = object != null && BoundedFacetUtils.isBoundedSet(object.getSpecification());
         final boolean showNonCollections = !TreeDisplayRules.isCollectionsOnly();
         final boolean objectView = object instanceof ObjectAdapter && showNonCollections;
         final boolean collectionView = object.getSpecification().isCollection();

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/TreeNodeBorder.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/TreeNodeBorder.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/TreeNodeBorder.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/TreeNodeBorder.java Tue May  3 07:18:19 2011
@@ -17,10 +17,8 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.tree;
 
-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.adapter.ResolveState;
@@ -58,7 +56,7 @@ import org.apache.isis.viewer.dnd.view.f
 import org.apache.isis.viewer.dnd.view.option.UserActionAbstract;
 import org.apache.isis.viewer.dnd.view.text.ObjectTitleText;
 import org.apache.isis.viewer.dnd.view.text.TitleText;
-
+import org.apache.log4j.Logger;
 
 // TODO use ObjectBorder to provide the basic border functionality
 public class TreeNodeBorder extends AbstractBorder {
@@ -124,17 +122,15 @@ public class TreeNodeBorder extends Abst
 
     @Override
     public void draw(final Canvas canvas) {
-        Color secondary1 = Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY1);
-        Color secondary2 = Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY2);
-        Color secondary3 = Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY3);
-        /* REVIEW
-        if (getViewAxis(TableAxis.class) != null) {
-            if (((SelectableViewAxis) getViewAxis(SelectableViewAxis.class)).isSelected(getView())) {
-                canvas.drawSolidRectangle(left, 0, getSize().getWidth() - left, top, Toolkit.getColor(ColorsAndFonts.COLOR_PRIMARY2));
-                secondary2 = secondary1;
-            }
-        }
-*/
+        final Color secondary1 = Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY1);
+        final Color secondary2 = Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY2);
+        final Color secondary3 = Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY3);
+        /*
+         * REVIEW if (getViewAxis(TableAxis.class) != null) { if (((SelectableViewAxis)
+         * getViewAxis(SelectableViewAxis.class)).isSelected(getView())) { canvas.drawSolidRectangle(left, 0,
+         * getSize().getWidth() - left, top, Toolkit.getColor(ColorsAndFonts.COLOR_PRIMARY2)); secondary2 = secondary1;
+         * } }
+         */
         if (getState().isObjectIdentified()) {
             canvas.drawRectangle(left, 0, getSize().getWidth() - left, top, secondary2);
 
@@ -148,19 +144,20 @@ public class TreeNodeBorder extends Abst
         final int y = top / 2;
         canvas.drawLine(x, y, x + left, y, secondary2);
 
-        boolean isOpen = getSpecification().isOpen();
+        final boolean isOpen = getSpecification().isOpen();
         final int canOpen = canOpen();
         final boolean addBox = isOpen || canOpen != NodeSpecification.CANT_OPEN;
         if (addBox) {
             x += BOX_X_OFFSET;
             canvas.drawLine(x, y, x + BOX_SIZE - 1, y, secondary3);
-            canvas.drawSolidRectangle(x, y - BOX_SIZE / 2, BOX_SIZE, BOX_SIZE, Toolkit.getColor(ColorsAndFonts.COLOR_WHITE));
+            canvas.drawSolidRectangle(x, y - BOX_SIZE / 2, BOX_SIZE, BOX_SIZE,
+                Toolkit.getColor(ColorsAndFonts.COLOR_WHITE));
             canvas.drawRectangle(x, y - BOX_SIZE / 2, BOX_SIZE, BOX_SIZE, secondary1);
 
             if (canOpen == NodeSpecification.UNKNOWN) {
 
             } else {
-                Color black = Toolkit.getColor(ColorsAndFonts.COLOR_BLACK);
+                final Color black = Toolkit.getColor(ColorsAndFonts.COLOR_BLACK);
                 canvas.drawLine(x + BOX_PADDING, y, x + BOX_SIZE - 1 - BOX_PADDING, y, black);
                 if (!isOpen) {
                     x += BOX_SIZE / 2;
@@ -181,7 +178,7 @@ public class TreeNodeBorder extends Abst
         x = left + 1;
         icon.draw(canvas, x, baseline);
         x += icon.getSize().getWidth();
-        int maxWith = getSize().getWidth() - x;
+        final int maxWith = getSize().getWidth() - x;
         text.draw(canvas, x, baseline, maxWith);
 
         if (Toolkit.debug) {
@@ -223,13 +220,10 @@ public class TreeNodeBorder extends Abst
                 final View newView = replaceWithSpecification.createView(getContent(), getViewAxes(), -1);
                 getParent().replaceView(getView(), newView);
             }
-     /*   } else if (y < top && x > left && click.button1()) {
-            if (canOpen() == NodeSpecification.UNKNOWN) {
-                resolveContent();
-                markDamaged();
-            }
-            selectNode();
-  */
+            /*
+             * } else if (y < top && x > left && click.button1()) { if (canOpen() == NodeSpecification.UNKNOWN) {
+             * resolveContent(); markDamaged(); } selectNode();
+             */
         } else {
             super.firstClick(click);
         }
@@ -300,10 +294,9 @@ public class TreeNodeBorder extends Abst
     // TODO remove
     private void selectNode() {
         /*
-        if (getViewAxis(SelectableViewAxis.class) != null) {
-            ((SelectableViewAxis) getViewAxis(SelectableViewAxis.class)).selected(getView());
-        }
-        */
+         * if (getViewAxis(SelectableViewAxis.class) != null) { ((SelectableViewAxis)
+         * getViewAxis(SelectableViewAxis.class)).selected(getView()); }
+         */
     }
 
     @Override
@@ -351,6 +344,7 @@ public class TreeNodeBorder extends Abst
     }
 
     private boolean withinBox(final int x, final int y) {
-        return x >= BOX_X_OFFSET && x <= BOX_X_OFFSET + BOX_SIZE && y >= (top - BOX_SIZE) / 2 && y <= (top + BOX_SIZE) / 2;
+        return x >= BOX_X_OFFSET && x <= BOX_X_OFFSET + BOX_SIZE && y >= (top - BOX_SIZE) / 2
+            && y <= (top + BOX_SIZE) / 2;
     }
 }

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/TreeSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/TreeSpecification.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/TreeSpecification.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/TreeSpecification.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.tree;
 
 import org.apache.isis.viewer.dnd.view.Axes;
@@ -26,17 +25,16 @@ import org.apache.isis.viewer.dnd.view.V
 import org.apache.isis.viewer.dnd.view.ViewRequirement;
 import org.apache.isis.viewer.dnd.view.ViewSpecification;
 
-
 /**
- * Specification for a tree browser frame with a tree displaying only collections and objects containing
- * collections.
+ * Specification for a tree browser frame with a tree displaying only collections and objects containing collections.
  */
 public class TreeSpecification implements ViewSpecification {
     private final OpenCollectionNodeSpecification openCollection;
     private final OpenObjectNodeSpecification openObject;
-    
+
     public TreeSpecification() {
-        final ClosedObjectNodeSpecification closedObject = new ClosedObjectNodeSpecification(false); //, new SelectObjectBorder.Factory());
+        final ClosedObjectNodeSpecification closedObject = new ClosedObjectNodeSpecification(false); // , new
+                                                                                                     // SelectObjectBorder.Factory());
         final NodeSpecification closedCollection = new ClosedCollectionNodeSpecification();
         final EmptyNodeSpecification noNode = new EmptyNodeSpecification();
 
@@ -55,13 +53,17 @@ public class TreeSpecification implement
         closedCollection.setReplacementNodeSpecification(openCollection);
     }
 
-    public boolean canDisplay(ViewRequirement requirement) {
-        return requirement.is(ViewRequirement.OPEN) && (openCollection.canDisplay(requirement) || openObject.canDisplay(requirement)) && requirement.isExpandable();
+    @Override
+    public boolean canDisplay(final ViewRequirement requirement) {
+        return requirement.is(ViewRequirement.OPEN)
+            && (openCollection.canDisplay(requirement) || openObject.canDisplay(requirement))
+            && requirement.isExpandable();
     }
 
-    public View createView(final Content content, Axes axes, int sequence) {
+    @Override
+    public View createView(final Content content, final Axes axes, final int sequence) {
         View rootNode;
-        ViewRequirement requirement = new ViewRequirement(content, ViewRequirement.CLOSED);
+        final ViewRequirement requirement = new ViewRequirement(content, ViewRequirement.CLOSED);
         if (openCollection.canDisplay(requirement)) {
             rootNode = openCollection.createView(content, axes, -1);
         } else {
@@ -70,26 +72,32 @@ public class TreeSpecification implement
         return rootNode;
     }
 
+    @Override
     public String getName() {
         return "Tree (not working)";
     }
 
+    @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;
     }

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/TreeWithDetailSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/TreeWithDetailSpecification.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/TreeWithDetailSpecification.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/TreeWithDetailSpecification.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.tree;
 
 import org.apache.isis.viewer.dnd.tree2.CollectionTreeNodeSpecification;
@@ -28,7 +27,6 @@ import org.apache.isis.viewer.dnd.view.V
 import org.apache.isis.viewer.dnd.view.ViewSpecification;
 import org.apache.isis.viewer.dnd.view.composite.MasterDetailPanel;
 
-
 public class TreeWithDetailSpecification implements ViewSpecification {
     private final ViewSpecification treeSpecification;
 
@@ -37,37 +35,44 @@ public class TreeWithDetailSpecification
         treeSpecification = CollectionTreeNodeSpecification.create()[0];
     }
 
-    public boolean canDisplay(ViewRequirement requirement) {
+    @Override
+    public boolean canDisplay(final ViewRequirement requirement) {
         return treeSpecification.canDisplay(requirement);
     }
 
-    public View createView(Content content, Axes axes, int sequence) {
+    @Override
+    public View createView(final Content content, final Axes axes, final int sequence) {
         return new MasterDetailPanel(content, this, treeSpecification);
     }
 
+    @Override
     public String getName() {
         return "Tree and details (experimental)";
     }
 
+    @Override
     public boolean isAligned() {
         return false;
     }
 
+    @Override
     public boolean isOpen() {
         return true;
     }
 
+    @Override
     public boolean isReplaceable() {
         return true;
     }
 
+    @Override
     public boolean isResizeable() {
         return true;
     }
 
+    @Override
     public boolean isSubView() {
         return false;
     }
 
 }
-

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree2/CollectionTreeNodeSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree2/CollectionTreeNodeSpecification.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree2/CollectionTreeNodeSpecification.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree2/CollectionTreeNodeSpecification.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.tree2;
 
 import org.apache.isis.viewer.dnd.drawing.ColorsAndFonts;
@@ -31,28 +30,30 @@ import org.apache.isis.viewer.dnd.view.b
 import org.apache.isis.viewer.dnd.view.border.SelectObjectBorder;
 import org.apache.isis.viewer.dnd.view.composite.AbstractCollectionViewSpecification;
 
-
 public class CollectionTreeNodeSpecification extends AbstractCollectionViewSpecification {
 
     public static ViewSpecification[] create() {
-        CollectionTreeNodeSpecification collectionNodeSpec = new CollectionTreeNodeSpecification();
-        ObjectTreeNodeSpecification objectNodeSpec = new ObjectTreeNodeSpecification();
-        SubviewIconSpecification iconSpec = new SubviewIconSpecification();
+        final CollectionTreeNodeSpecification collectionNodeSpec = new CollectionTreeNodeSpecification();
+        final ObjectTreeNodeSpecification objectNodeSpec = new ObjectTreeNodeSpecification();
+        final SubviewIconSpecification iconSpec = new SubviewIconSpecification();
 
         collectionNodeSpec.addSubviewDecorator(new SelectObjectBorder.Factory());
         collectionNodeSpec.addSubviewDecorator(new ExpandableViewBorder.Factory(iconSpec, objectNodeSpec, null));
         collectionNodeSpec.addViewDecorator(new IconBorder.Factory(Toolkit.getText(ColorsAndFonts.TEXT_NORMAL)));
         objectNodeSpec.addSubviewDecorator(new SelectObjectBorder.Factory());
-        objectNodeSpec.addSubviewDecorator(new ExpandableViewBorder.Factory(iconSpec, objectNodeSpec, collectionNodeSpec));
- //       objectNodeSpec.addSubviewDecorator(new FieldLabelsDecorator());
+        objectNodeSpec.addSubviewDecorator(new ExpandableViewBorder.Factory(iconSpec, objectNodeSpec,
+            collectionNodeSpec));
+        // objectNodeSpec.addSubviewDecorator(new FieldLabelsDecorator());
         objectNodeSpec.addViewDecorator(new IconBorder.Factory(Toolkit.getText(ColorsAndFonts.TEXT_NORMAL)));
         return new ViewSpecification[] { collectionNodeSpec, objectNodeSpec };
     }
-    
+
+    @Override
     protected ViewFactory createElementFactory() {
         return new IconElementFactory();
     }
 
+    @Override
     public String getName() {
         return "Collection tree (experimental)";
     }
@@ -60,8 +61,8 @@ public class CollectionTreeNodeSpecifica
     // TODO this should be available if an item can be given more space
     /*
      * @Override public boolean canDisplay(final Content content, ViewRequirement requirement) { return
-     * content.isCollection() && requirement.is(ViewRequirement.CLOSED) &&
-     * requirement.is(ViewRequirement.SUBVIEW) && requirement.is(ViewRequirement.SUBVIEW); }
+     * content.isCollection() && requirement.is(ViewRequirement.CLOSED) && requirement.is(ViewRequirement.SUBVIEW) &&
+     * requirement.is(ViewRequirement.SUBVIEW); }
      */
 
 }

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree2/ObjectTreeNodeSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree2/ObjectTreeNodeSpecification.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree2/ObjectTreeNodeSpecification.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree2/ObjectTreeNodeSpecification.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.tree2;
 
 import org.apache.isis.viewer.dnd.form.AbstractObjectViewSpecification;
@@ -25,17 +24,19 @@ import org.apache.isis.viewer.dnd.icon.I
 import org.apache.isis.viewer.dnd.view.ViewFactory;
 import org.apache.isis.viewer.dnd.view.ViewRequirement;
 
-
 public class ObjectTreeNodeSpecification extends AbstractObjectViewSpecification {
- 
-    public boolean canDisplay(ViewRequirement requirement) {
+
+    @Override
+    public boolean canDisplay(final ViewRequirement requirement) {
         return super.canDisplay(requirement) && requirement.isExpandable();
     }
 
+    @Override
     protected ViewFactory createFieldFactory() {
         return new IconElementFactory();
     }
-    
+
+    @Override
     public String getName() {
         return "Object tree (experimental)";
     }

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree2/TreeNodeSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree2/TreeNodeSpecification.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree2/TreeNodeSpecification.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree2/TreeNodeSpecification.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.tree2;
 
 import org.apache.isis.viewer.dnd.form.ExpandableViewBorder;
@@ -37,73 +36,87 @@ import org.apache.isis.viewer.dnd.view.c
 import org.apache.isis.viewer.dnd.view.composite.StackLayout;
 import org.apache.isis.viewer.dnd.view.composite.ViewBuilder;
 
-
 public class TreeNodeSpecification extends CompositeViewSpecification {
 
     public TreeNodeSpecification() {
         builder = new ViewBuilder() {
             ViewBuilder objectBuilder = new ObjectFieldBuilder(new ViewFactory() {
-                public View createView(Content content, Axes axes, int sequence) {
+                @Override
+                public View createView(final Content content, final Axes axes, final int sequence) {
                     if (content.isTextParseable() || content.getAdapter() == null) {
                         return null;
                     } else if (content.isObject()) {
-                        return new IconElementFactory().createView(content, axes, 0); // TreeNodeSpecification.this.createView(content, axes);
+                        return new IconElementFactory().createView(content, axes, 0); // TreeNodeSpecification.this.createView(content,
+                                                                                      // axes);
                     } else {
                         return TreeNodeSpecification.this.createView(content, axes, -1);
                     }
                 }
             });
-            
+
             ViewBuilder collectiontBuilder = new CollectionElementBuilder(new IconElementFactory());
 
             {
-                Factory decorator = new ExpandableViewBorder.Factory(null, TreeNodeSpecification.this, null);
+                final Factory decorator = new ExpandableViewBorder.Factory(null, TreeNodeSpecification.this, null);
                 objectBuilder.addSubviewDecorator(decorator);
                 collectiontBuilder.addSubviewDecorator(decorator);
 
             }
 
-            public void addSubviewDecorator(SubviewDecorator decorator) {}
+            @Override
+            public void addSubviewDecorator(final SubviewDecorator decorator) {
+            }
 
-            public void build(View view, Axes axes) {
+            @Override
+            public void build(final View view, final Axes axes) {
                 synchronized (view) {
                     (view.getContent().isCollection() ? collectiontBuilder : objectBuilder).build(view, axes);
                 }
             }
 
-            public void createAxes(Axes axes, Content content) {}
+            @Override
+            public void createAxes(final Axes axes, final Content content) {
+            }
 
+            @Override
             public boolean isOpen() {
                 return false;
             }
 
+            @Override
             public boolean isReplaceable() {
                 return true;
             }
 
+            @Override
             public boolean isSubView() {
                 return true;
             }
 
+            @Override
             public boolean canDragView() {
                 return true;
             }
-            
-            public void viewMenuOptions(UserActionSet options, View view) {}
+
+            @Override
+            public void viewMenuOptions(final UserActionSet options, final View view) {
+            }
         };
     }
 
-    public Layout createLayout(Content content, Axes axes) {
+    @Override
+    public Layout createLayout(final Content content, final Axes axes) {
         return new StackLayout();
     }
 
-    public boolean canDisplay(ViewRequirement requirement) {
+    @Override
+    public boolean canDisplay(final ViewRequirement requirement) {
         return requirement.isObject() && requirement.isExpandable();
     }
 
+    @Override
     public String getName() {
         return "Tree Node (not working)";
     }
 
 }
-

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/util/Properties.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/util/Properties.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/util/Properties.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/util/Properties.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.util;
 
 import java.util.StringTokenizer;
@@ -32,7 +31,6 @@ import org.apache.isis.viewer.dnd.drawin
 import org.apache.isis.viewer.dnd.drawing.Size;
 import org.apache.isis.viewer.dnd.view.ViewSpecification;
 
-
 public class Properties {
 
     public static final String PROPERTY_BASE = ConfigurationConstants.ROOT + "viewer.dnd.";
@@ -40,7 +38,7 @@ public class Properties {
     public static Size getSize(final String name, final Size defaultSize) {
         String initialSize = optionFor(name);
         if (initialSize == null) {
-              initialSize = IsisContext.getConfiguration().getString(name);
+            initialSize = IsisContext.getConfiguration().getString(name);
         }
         if (initialSize != null) {
             final StringTokenizer st = new StringTokenizer(initialSize, "x");
@@ -56,9 +54,9 @@ public class Properties {
         }
         return defaultSize;
     }
-    
+
     public static void saveSizeOption(final String name, final Size size) {
-        String value = size.getWidth() + "x" + size.getHeight();
+        final String value = size.getWidth() + "x" + size.getHeight();
         IsisContext.getUserProfile().getOptions().addOption(name, value);
     }
 
@@ -76,7 +74,8 @@ public class Properties {
                 y = Integer.valueOf(st.nextToken().trim()).intValue();
                 return new Location(x, y);
             } else {
-                throw new IsisConfigurationException("Location not specified correctly in " + name + ": " + initialLocation);
+                throw new IsisConfigurationException("Location not specified correctly in " + name + ": "
+                    + initialLocation);
             }
         }
         return defaultLocation;
@@ -85,74 +84,74 @@ public class Properties {
     private static String optionFor(final String name) {
         return IsisContext.inSession() ? IsisContext.getUserProfile().getOptions().getString(name) : null;
     }
-    
+
     public static void saveLocationOption(final String name, final Location location) {
-        String value = location.getX() + "," + location.getY();
+        final String value = location.getX() + "," + location.getY();
         IsisContext.getUserProfile().getOptions().addOption(name, value);
     }
 
-    public static String getString(String name) {
-        String value = optionFor(PROPERTY_BASE +name);
+    public static String getString(final String name) {
+        String value = optionFor(PROPERTY_BASE + name);
         if (value == null) {
             value = IsisContext.getConfiguration().getString(PROPERTY_BASE + name);
         }
         return value;
     }
 
-    public static void setStringOption(String name, String value) {
-        IsisContext.getUserProfile().getOptions().addOption(PROPERTY_BASE +name, value);
+    public static void setStringOption(final String name, final String value) {
+        IsisContext.getUserProfile().getOptions().addOption(PROPERTY_BASE + name, value);
     }
 
-    public static Options getOptions(String name) {
+    public static Options getOptions(final String name) {
         return IsisContext.getUserProfile().getOptions().getOptions(name);
     }
 
     public static String getDefaultIconViewOptions() {
         return getString("view.icon-default");
     }
-    
+
     public static String getDefaultObjectViewOptions() {
         return getString("view.object-default");
     }
-    
+
     public static String getDefaultCollectionViewOptions() {
         return getString("view.collection-default");
     }
-    
-    public static Options getViewConfigurationOptions(ViewSpecification specification) {
-        Options settingsOptions = getOptions("views.configuration");
-        String specificationName = specification.getName();
+
+    public static Options getViewConfigurationOptions(final ViewSpecification specification) {
+        final Options settingsOptions = getOptions("views.configuration");
+        final String specificationName = specification.getName();
         return settingsOptions.getOptions(specificationName);
     }
 
-    public static Options getDefaultViewOptions(ObjectSpecification specification) {
-        Options settingsOptions = getOptions("views.type-default");
+    public static Options getDefaultViewOptions(final ObjectSpecification specification) {
+        final Options settingsOptions = getOptions("views.type-default");
         String name;
         if (specification.isCollection()) {
             name = "collection:" + specification.getFacet(TypeOfFacet.class).valueSpec().getFullIdentifier();
         } else {
             name = specification.getFullIdentifier();
         }
-        Options viewOptions = settingsOptions.getOptions(name);
+        final Options viewOptions = settingsOptions.getOptions(name);
         return viewOptions;
     }
 
-    public static Options getUserViewSpecificationOptions(String specificationName) {
-        Options settingsOptions = getOptions("views.user-defined");
+    public static Options getUserViewSpecificationOptions(final String specificationName) {
+        final Options settingsOptions = getOptions("views.user-defined");
         return settingsOptions.getOptions(specificationName);
     }
 
-    public static Object loadClass(Options viewOptions, String name) {
-        String specificationName = viewOptions.getString(name);
+    public static Object loadClass(final Options viewOptions, final String name) {
+        final String specificationName = viewOptions.getString(name);
         if (specificationName != null) {
             try {
-                Class<?> specificationClass = Class.forName(specificationName);
+                final Class<?> specificationClass = Class.forName(specificationName);
                 return specificationClass.newInstance();
-            } catch (ClassNotFoundException e) {
+            } catch (final ClassNotFoundException e) {
                 throw new ViewerException(e);
-            } catch (InstantiationException e) {
+            } catch (final InstantiationException e) {
                 throw new ViewerException(e);
-            } catch (IllegalAccessException e) {
+            } catch (final IllegalAccessException e) {
                 throw new ViewerException(e);
             }
         }
@@ -160,4 +159,3 @@ public class Properties {
     }
 
 }
-

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/util/ViewerException.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/util/ViewerException.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/util/ViewerException.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/util/ViewerException.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.util;
 
 import org.apache.isis.core.commons.exceptions.IsisException;
@@ -25,24 +24,23 @@ import org.apache.isis.core.commons.exce
 public class ViewerException extends IsisException {
     private static final long serialVersionUID = 1L;
 
-    public ViewerException() {}
+    public ViewerException() {
+    }
 
-    public ViewerException(String message) {
+    public ViewerException(final String message) {
         super(message);
     }
 
-    public ViewerException(String messageFormat, Object... args) {
+    public ViewerException(final String messageFormat, final Object... args) {
         super(messageFormat, args);
     }
 
-    public ViewerException(String message, Throwable cause) {
+    public ViewerException(final String message, final Throwable cause) {
         super(message, cause);
     }
 
-    public ViewerException(Throwable cause) {
+    public ViewerException(final Throwable cause) {
         super(cause);
     }
 
 }
-
-

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/Axes.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/Axes.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/Axes.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/Axes.java Tue May  3 07:18:19 2011
@@ -17,29 +17,28 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.view;
 
 import java.util.HashMap;
 import java.util.Map;
 
-import org.apache.log4j.Logger;
 import org.apache.isis.core.commons.lang.ToString;
 import org.apache.isis.viewer.dnd.util.ViewerException;
+import org.apache.log4j.Logger;
 
 public class Axes {
     private static final Logger LOG = Logger.getLogger(Axes.class);
     private final Map<Class, ViewAxis> axes = new HashMap<Class, ViewAxis>();
-    
-    public void add(ViewAxis axis) {
+
+    public void add(final ViewAxis axis) {
         if (axis != null) {
-            Class<? extends ViewAxis> cls = axis.getClass();
+            final Class<? extends ViewAxis> cls = axis.getClass();
             add(axis, cls);
         }
     }
 
-    public void add(ViewAxis axis, Class<? extends ViewAxis> cls) {
-        ViewAxis previous = axes.put(cls, axis);
+    public void add(final ViewAxis axis, final Class<? extends ViewAxis> cls) {
+        final ViewAxis previous = axes.put(cls, axis);
         if (previous != null) {
             LOG.debug(axis + " replacing " + previous);
         } else {
@@ -47,30 +46,29 @@ public class Axes {
         }
     }
 
-    public <T extends ViewAxis> T getAxis(Class<T> axisClass) {
-        ViewAxis viewAxis = axes.get(axisClass);
+    public <T extends ViewAxis> T getAxis(final Class<T> axisClass) {
+        final ViewAxis viewAxis = axes.get(axisClass);
         if (viewAxis == null) {
             throw new ViewerException("No axis of type " + axisClass + " in " + this);
         }
         return (T) viewAxis;
     }
 
-    public boolean contains(Class<? extends ViewAxis> axisClass) {
+    public boolean contains(final Class<? extends ViewAxis> axisClass) {
         return axes.containsKey(axisClass);
     }
 
-    public void add(Axes axes) {
+    public void add(final Axes axes) {
         this.axes.putAll(axes.axes);
     }
-    
+
+    @Override
     public String toString() {
         // TODO provide flag to list as elements, rather than fields
-        ToString s = new ToString(this);
-        for (ViewAxis axis : axes.values()) {
+        final ToString s = new ToString(this);
+        for (final ViewAxis axis : axes.values()) {
             s.append(axis.toString());
         }
         return s.toString();
     }
 }
-
-

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

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

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/Click.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/Click.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/Click.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/Click.java Tue May  3 07:18:19 2011
@@ -17,14 +17,12 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.view;
 
 import org.apache.isis.viewer.dnd.drawing.Location;
 
+public interface Click {
 
-public interface Click{
-    
     Location getLocationWithinViewer();
 
     Location getLocation();
@@ -32,7 +30,7 @@ public interface Click{
     boolean button2();
 
     boolean button1();
-    
+
     boolean button3();
 
     boolean isAlt();
@@ -44,6 +42,5 @@ public interface Click{
     void subtract(int left, int top);
 
     void subtract(Location location);
-    
-}
 
+}

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

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

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/Content.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/Content.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/Content.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/Content.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.view;
 
 import org.apache.isis.core.commons.debug.DebugBuilder;
@@ -26,7 +25,6 @@ import org.apache.isis.core.metamodel.co
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.viewer.dnd.drawing.Image;
 
-
 public interface Content {
 
     /**

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/ContentDrag.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/ContentDrag.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/ContentDrag.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/ContentDrag.java Tue May  3 07:18:19 2011
@@ -17,12 +17,10 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.view;
 
 import org.apache.isis.viewer.dnd.drawing.Location;
 
-
 /**
  * Details a drag event that affects a view's content (as opposed to the view itself).
  */
@@ -42,6 +40,5 @@ public interface ContentDrag extends Dra
 
     // TODO rename to getSourceView
     View getSource();
-    
-}
 
+}

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/ContentFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/ContentFactory.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/ContentFactory.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/ContentFactory.java Tue May  3 07:18:19 2011
@@ -17,13 +17,11 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.view;
 
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAssociation;
 
-
 public interface ContentFactory {
 
     Content createRootContent(ObjectAdapter object);



Mime
View raw message