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 [7/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/common...
Date Tue, 03 May 2011 07:18:38 GMT
Modified: incubator/isis/trunk/viewer/bdd/concordion/src/main/java/org/apache/isis/viewer/bdd/concordion/internal/fixtures/CheckCollectionContentsForConcordion.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/bdd/concordion/src/main/java/org/apache/isis/viewer/bdd/concordion/internal/fixtures/CheckCollectionContentsForConcordion.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/bdd/concordion/src/main/java/org/apache/isis/viewer/bdd/concordion/internal/fixtures/CheckCollectionContentsForConcordion.java (original)
+++ incubator/isis/trunk/viewer/bdd/concordion/src/main/java/org/apache/isis/viewer/bdd/concordion/internal/fixtures/CheckCollectionContentsForConcordion.java Tue May  3 07:18:19 2011
@@ -16,51 +16,46 @@
  *  specific language governing permissions and limitations
  *  under the License.
  */
-package org.apache.isis.viewer.bdd.concordion.internal.fixtures;
-
-import org.apache.isis.viewer.bdd.common.AliasRegistry;
-import org.apache.isis.viewer.bdd.common.fixtures.CheckCollectionContentsPeer;
-
-public class CheckCollectionContentsForConcordion extends AbstractFixture<CheckCollectionContentsPeer> {
-
-    public CheckCollectionContentsForConcordion(final AliasRegistry aliasRegistry,
-        final String listAlias) {
-        super(new CheckCollectionContentsPeer(aliasRegistry, listAlias));
-    }
-
-    public String contains(String alias) {
-        if (!getPeer().isValidAlias(alias)) {
-            return "unknown alias '" + alias + "'";
-        }
-        boolean contains = getPeer().contains(alias);
-        return contains?"ok":"does not contain '" + alias + "'";
-    }
-
-    public String doesNotContain(String alias) {
-        if (!getPeer().isValidAlias(alias)) {
-            return "unknown alias '" + alias + "'";
-        }
-        boolean doesNotContain = getPeer().doesNotContain(alias);
-        return doesNotContain?"ok":"does contain";
-    }
-
-
-    public String isEmpty() {
-        boolean isEmpty = getPeer().isEmpty();
-        return isEmpty?"ok":"not empty";
-    }
-
-    
-    public String isNotEmpty() {
-        boolean isNotEmpty = getPeer().isNotEmpty();
-        return isNotEmpty?"ok":"empty";
-    }
-
-
-    public String assertSize(int size) {
-        boolean hasSize = getPeer().assertSize(size);
-        return hasSize?"ok":"contains " + getPeer().getSize() + " objects";
-    }
-
-}
-
+package org.apache.isis.viewer.bdd.concordion.internal.fixtures;
+
+import org.apache.isis.viewer.bdd.common.AliasRegistry;
+import org.apache.isis.viewer.bdd.common.fixtures.CheckCollectionContentsPeer;
+
+public class CheckCollectionContentsForConcordion extends AbstractFixture<CheckCollectionContentsPeer> {
+
+    public CheckCollectionContentsForConcordion(final AliasRegistry aliasRegistry, final String listAlias) {
+        super(new CheckCollectionContentsPeer(aliasRegistry, listAlias));
+    }
+
+    public String contains(final String alias) {
+        if (!getPeer().isValidAlias(alias)) {
+            return "unknown alias '" + alias + "'";
+        }
+        final boolean contains = getPeer().contains(alias);
+        return contains ? "ok" : "does not contain '" + alias + "'";
+    }
+
+    public String doesNotContain(final String alias) {
+        if (!getPeer().isValidAlias(alias)) {
+            return "unknown alias '" + alias + "'";
+        }
+        final boolean doesNotContain = getPeer().doesNotContain(alias);
+        return doesNotContain ? "ok" : "does contain";
+    }
+
+    public String isEmpty() {
+        final boolean isEmpty = getPeer().isEmpty();
+        return isEmpty ? "ok" : "not empty";
+    }
+
+    public String isNotEmpty() {
+        final boolean isNotEmpty = getPeer().isNotEmpty();
+        return isNotEmpty ? "ok" : "empty";
+    }
+
+    public String assertSize(final int size) {
+        final boolean hasSize = getPeer().assertSize(size);
+        return hasSize ? "ok" : "contains " + getPeer().getSize() + " objects";
+    }
+
+}

Modified: incubator/isis/trunk/viewer/bdd/concordion/src/main/java/org/apache/isis/viewer/bdd/concordion/internal/fixtures/CheckListForConcordion.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/bdd/concordion/src/main/java/org/apache/isis/viewer/bdd/concordion/internal/fixtures/CheckListForConcordion.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/bdd/concordion/src/main/java/org/apache/isis/viewer/bdd/concordion/internal/fixtures/CheckListForConcordion.java (original)
+++ incubator/isis/trunk/viewer/bdd/concordion/src/main/java/org/apache/isis/viewer/bdd/concordion/internal/fixtures/CheckListForConcordion.java Tue May  3 07:18:19 2011
@@ -16,57 +16,58 @@
  *  specific language governing permissions and limitations
  *  under the License.
  */
-package org.apache.isis.viewer.bdd.concordion.internal.fixtures;
-
-import org.apache.isis.viewer.bdd.common.AliasRegistry;
-import org.apache.isis.viewer.bdd.common.CellBindingDefault;
-import org.apache.isis.viewer.bdd.common.ScenarioCell;
-import org.apache.isis.viewer.bdd.common.ScenarioCellDefault;
-import org.apache.isis.viewer.bdd.common.fixtures.CheckListConstants;
-import org.apache.isis.viewer.bdd.common.fixtures.CheckListPeer;
-import org.apache.isis.viewer.bdd.common.fixtures.CheckListPeer.CheckMode;
-
-public class CheckListForConcordion extends AbstractFixture<CheckListPeer> {
-
-    public CheckListForConcordion(final AliasRegistry aliasRegistry, final String listAlias) {
-        super(new CheckListPeer(aliasRegistry, listAlias, CheckMode.NOT_EXACT, titleBinding()));
-    }
-
-    private static CellBindingDefault titleBinding() {
-        return CellBindingDefault
-            .builder(CheckListConstants.TITLE_NAME, CheckListConstants.TITLE_HEAD_SET).ditto().build();
-    }
-
-    public String executeHeader(String title) {
-        return setupHeader(title);
-    }
-
-    private String setupHeader(String title) {
-        int colNum = 0;
-        getPeer().getTitleBinding().setHeadColumn(colNum++);
-        return ""; // ok
-    }
-
-    public String executeRow(String title) {
-
-        setupHeader(title);
-
-        // capture current
-        getPeer().getTitleBinding().captureCurrent(new ScenarioCellDefault(title));
-
-        // execute
-        return checkExists();
-    }
-
-    private String checkExists() {
-        if(!getPeer().findAndAddObject()) {
-            return getTitle() + " not found";
-        }
-        return "ok";
-    }
-    private String getTitle() {
-        ScenarioCell currentCell = getPeer().getTitleBinding().getCurrentCell();
-        return currentCell!=null?currentCell.getText():"(no title provided)";
-    }
-
-}
+package org.apache.isis.viewer.bdd.concordion.internal.fixtures;
+
+import org.apache.isis.viewer.bdd.common.AliasRegistry;
+import org.apache.isis.viewer.bdd.common.CellBindingDefault;
+import org.apache.isis.viewer.bdd.common.ScenarioCell;
+import org.apache.isis.viewer.bdd.common.ScenarioCellDefault;
+import org.apache.isis.viewer.bdd.common.fixtures.CheckListConstants;
+import org.apache.isis.viewer.bdd.common.fixtures.CheckListPeer;
+import org.apache.isis.viewer.bdd.common.fixtures.CheckListPeer.CheckMode;
+
+public class CheckListForConcordion extends AbstractFixture<CheckListPeer> {
+
+    public CheckListForConcordion(final AliasRegistry aliasRegistry, final String listAlias) {
+        super(new CheckListPeer(aliasRegistry, listAlias, CheckMode.NOT_EXACT, titleBinding()));
+    }
+
+    private static CellBindingDefault titleBinding() {
+        return CellBindingDefault.builder(CheckListConstants.TITLE_NAME, CheckListConstants.TITLE_HEAD_SET).ditto()
+            .build();
+    }
+
+    public String executeHeader(final String title) {
+        return setupHeader(title);
+    }
+
+    private String setupHeader(final String title) {
+        int colNum = 0;
+        getPeer().getTitleBinding().setHeadColumn(colNum++);
+        return ""; // ok
+    }
+
+    public String executeRow(final String title) {
+
+        setupHeader(title);
+
+        // capture current
+        getPeer().getTitleBinding().captureCurrent(new ScenarioCellDefault(title));
+
+        // execute
+        return checkExists();
+    }
+
+    private String checkExists() {
+        if (!getPeer().findAndAddObject()) {
+            return getTitle() + " not found";
+        }
+        return "ok";
+    }
+
+    private String getTitle() {
+        final ScenarioCell currentCell = getPeer().getTitleBinding().getCurrentCell();
+        return currentCell != null ? currentCell.getText() : "(no title provided)";
+    }
+
+}

Modified: incubator/isis/trunk/viewer/bdd/concordion/src/main/java/org/apache/isis/viewer/bdd/concordion/internal/fixtures/SetUpObjectsForConcordion.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/bdd/concordion/src/main/java/org/apache/isis/viewer/bdd/concordion/internal/fixtures/SetUpObjectsForConcordion.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/bdd/concordion/src/main/java/org/apache/isis/viewer/bdd/concordion/internal/fixtures/SetUpObjectsForConcordion.java (original)
+++ incubator/isis/trunk/viewer/bdd/concordion/src/main/java/org/apache/isis/viewer/bdd/concordion/internal/fixtures/SetUpObjectsForConcordion.java Tue May  3 07:18:19 2011
@@ -16,60 +16,61 @@
  *  specific language governing permissions and limitations
  *  under the License.
  */
-package org.apache.isis.viewer.bdd.concordion.internal.fixtures;
-
-import org.apache.isis.viewer.bdd.common.AliasRegistry;
-import org.apache.isis.viewer.bdd.common.CellBinding;
-import org.apache.isis.viewer.bdd.common.CellBindingDefault;
-import org.apache.isis.viewer.bdd.common.IsisViewerConstants;
-import org.apache.isis.viewer.bdd.common.ScenarioBoundValueException;
-import org.apache.isis.viewer.bdd.common.fixtures.SetUpObjectsPeer;
-
-public class SetUpObjectsForConcordion extends AbstractFixture<SetUpObjectsPeer> {
-
-    public SetUpObjectsForConcordion(final AliasRegistry aliasesRegistry, final String className,
-        final SetUpObjectsPeer.Mode mode) {
-        this(aliasesRegistry, className, mode, CellBindingDefault
-            .builder(IsisViewerConstants.ALIAS_RESULT_NAME, IsisViewerConstants.ALIAS_RESULT_HEAD_SET).autoCreate().build());
-    }
-
-    private SetUpObjectsForConcordion(final AliasRegistry storyFixture, final String className,
-        final SetUpObjectsPeer.Mode mode, final CellBinding aliasBinding) {
-        super(new SetUpObjectsPeer(storyFixture, className, mode, aliasBinding));
-    }
-
-    public String executeHeader(String alias, String... propertyNames) {
-
-        // create bindings (there's only one)
-        getPeer().getAliasBinding().setHeadColumn(0);
-
-        // define properties and the alias column
-        int colNum = 0;
-        getPeer().definePropertyOrAlias(alias, colNum++);
-
-        for (String propertyName : propertyNames) {
-            getPeer().definePropertyOrAlias(propertyName, colNum++);
-        }
-
-        return ""; // ok
-    }
-
-    public String executeRow(String alias, String... propertyValues) {
-
-        // set property values and the alis
-        getPeer().addPropertyValueOrAlias(alias);
-        for (String propertyValue : propertyValues) {
-            getPeer().addPropertyValueOrAlias(propertyValue);
-        }
-
-        // create the object
-        try {
-            getPeer().createObject();
-            return "ok";
-        } catch (ScenarioBoundValueException ex) {
-            return ex.toString();
-        }
-
-    }
-
-}
+package org.apache.isis.viewer.bdd.concordion.internal.fixtures;
+
+import org.apache.isis.viewer.bdd.common.AliasRegistry;
+import org.apache.isis.viewer.bdd.common.CellBinding;
+import org.apache.isis.viewer.bdd.common.CellBindingDefault;
+import org.apache.isis.viewer.bdd.common.IsisViewerConstants;
+import org.apache.isis.viewer.bdd.common.ScenarioBoundValueException;
+import org.apache.isis.viewer.bdd.common.fixtures.SetUpObjectsPeer;
+
+public class SetUpObjectsForConcordion extends AbstractFixture<SetUpObjectsPeer> {
+
+    public SetUpObjectsForConcordion(final AliasRegistry aliasesRegistry, final String className,
+        final SetUpObjectsPeer.Mode mode) {
+        this(aliasesRegistry, className, mode, CellBindingDefault
+            .builder(IsisViewerConstants.ALIAS_RESULT_NAME, IsisViewerConstants.ALIAS_RESULT_HEAD_SET).autoCreate()
+            .build());
+    }
+
+    private SetUpObjectsForConcordion(final AliasRegistry storyFixture, final String className,
+        final SetUpObjectsPeer.Mode mode, final CellBinding aliasBinding) {
+        super(new SetUpObjectsPeer(storyFixture, className, mode, aliasBinding));
+    }
+
+    public String executeHeader(final String alias, final String... propertyNames) {
+
+        // create bindings (there's only one)
+        getPeer().getAliasBinding().setHeadColumn(0);
+
+        // define properties and the alias column
+        int colNum = 0;
+        getPeer().definePropertyOrAlias(alias, colNum++);
+
+        for (final String propertyName : propertyNames) {
+            getPeer().definePropertyOrAlias(propertyName, colNum++);
+        }
+
+        return ""; // ok
+    }
+
+    public String executeRow(final String alias, final String... propertyValues) {
+
+        // set property values and the alis
+        getPeer().addPropertyValueOrAlias(alias);
+        for (final String propertyValue : propertyValues) {
+            getPeer().addPropertyValueOrAlias(propertyValue);
+        }
+
+        // create the object
+        try {
+            getPeer().createObject();
+            return "ok";
+        } catch (final ScenarioBoundValueException ex) {
+            return ex.toString();
+        }
+
+    }
+
+}

Modified: incubator/isis/trunk/viewer/bdd/concordion/src/main/java/org/apache/isis/viewer/bdd/concordion/internal/fixtures/UsingIsisViewerForConcordion.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/bdd/concordion/src/main/java/org/apache/isis/viewer/bdd/concordion/internal/fixtures/UsingIsisViewerForConcordion.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/bdd/concordion/src/main/java/org/apache/isis/viewer/bdd/concordion/internal/fixtures/UsingIsisViewerForConcordion.java (original)
+++ incubator/isis/trunk/viewer/bdd/concordion/src/main/java/org/apache/isis/viewer/bdd/concordion/internal/fixtures/UsingIsisViewerForConcordion.java Tue May  3 07:18:19 2011
@@ -16,148 +16,128 @@
  *  specific language governing permissions and limitations
  *  under the License.
  */
-package org.apache.isis.viewer.bdd.concordion.internal.fixtures;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.spec.feature.ObjectMember;
-import org.apache.isis.runtimes.dflt.runtime.system.DeploymentType;
-import org.apache.isis.viewer.bdd.common.AliasRegistry;
-import org.apache.isis.viewer.bdd.common.CellBinding;
-import org.apache.isis.viewer.bdd.common.CellBindingDefault;
-import org.apache.isis.viewer.bdd.common.IsisViewerConstants;
-import org.apache.isis.viewer.bdd.common.ScenarioBoundValueException;
-import org.apache.isis.viewer.bdd.common.ScenarioCell;
-import org.apache.isis.viewer.bdd.common.ScenarioCellDefault;
-import org.apache.isis.viewer.bdd.common.fixtures.UsingIsisViewerPeer;
-import org.apache.isis.viewer.bdd.common.fixtures.perform.Perform;
-import org.apache.isis.viewer.bdd.common.parsers.DateParser;
-
-import com.google.common.collect.Lists;
-
-public class UsingIsisViewerForConcordion extends
-		AbstractFixture<UsingIsisViewerPeer> {
-
-
-	public UsingIsisViewerForConcordion(
-			final AliasRegistry aliasesRegistry,
-			final DeploymentType deploymentType,
-			final DateParser dateParser, final Perform.Mode mode) {
-		this(aliasesRegistry, deploymentType, dateParser, mode, 
-				CellBindingDefault.builder(
-				        IsisViewerConstants.ON_OBJECT_NAME, IsisViewerConstants.ON_OBJECT_HEAD_SET)
-						.ditto().build(),
-				CellBindingDefault.builder(
-				        IsisViewerConstants.ALIAS_RESULT_NAME, IsisViewerConstants.ALIAS_RESULT_HEAD_SET)
-						.optional().build(), 
-				CellBindingDefault.builder(
-				        IsisViewerConstants.PERFORM_NAME, IsisViewerConstants.PERFORM_HEAD_SET)
-						.ditto().build(), 
-				CellBindingDefault.builder(
-				        IsisViewerConstants.ON_MEMBER_NAME, IsisViewerConstants.ON_MEMBER_HEAD_SET)
-						.optional().build(),
-				CellBindingDefault.builder(
-						IsisViewerConstants.THAT_IT_NAME, IsisViewerConstants.THAT_IT_HEAD_SET)
-						.ditto().optional().build(), 
-				CellBindingDefault.builder(
-				        IsisViewerConstants.WITH_ARGUMENTS_NAME, IsisViewerConstants.WITH_ARGUMENTS_HEAD_SET)
-						.optional().build());
-	}
-
-	private UsingIsisViewerForConcordion(
-			final AliasRegistry aliasesRegistry,
-			final DeploymentType deploymentType,
-			final DateParser dateParser, 
-			final Perform.Mode mode,
-			final CellBinding onObjectBinding,
-			final CellBinding aliasResultAsBinding,
-			final CellBinding performBinding,
-			final CellBinding onMemberBinding, final CellBinding thatItBinding,
-			final CellBinding arg0Binding) {
-		super(new UsingIsisViewerPeer(aliasesRegistry, deploymentType, dateParser, mode,
-				onObjectBinding, aliasResultAsBinding, performBinding,
-				onMemberBinding, thatItBinding, arg0Binding));
-	}
-
-	public String executeHeader(String onObject, String aliasResultAs,
-			String perform, String usingMember, String thatIt, String arg0, String... remainingArgs) {
-
-		return setupHeader(onObject, aliasResultAs, perform, usingMember,
-				thatIt, arg0);
-	}
-
-	private String setupHeader(String onObject, String aliasResultAs,
-			String perform, String usingMember, String thatIt, String arg0) {
-		int colNum = 0;
-		getPeer().getOnObjectBinding().setHeadColumn(colNum++);
-		getPeer().getAliasResultAsBinding().setHeadColumn(colNum++);
-		getPeer().getPerformBinding().setHeadColumn(colNum++);
-		getPeer().getOnMemberBinding().setHeadColumn(colNum++);
-		if (thatIt != null) {
-			getPeer().getThatItBinding().setHeadColumn(colNum++);
-		}
-		if (arg0 != null) {
-			getPeer().getArg0Binding().setHeadColumn(colNum++);
-		}
-		
-		return ""; // ok
-	}
-
-	public String executeRow(String onObject, String aliasResultAs,
-			String perform, String usingMember, String thatIt, String arg0, String... remainingArgs) {
-
-		setupHeader(onObject, aliasResultAs, perform, usingMember,
-				thatIt, arg0);
-
-	    final List<String> argumentCells = new ArrayList<String>();
-
-		// capture current
-		getPeer().getOnObjectBinding().captureCurrent(new ScenarioCellDefault(onObject));
-		getPeer().getAliasResultAsBinding().captureCurrent(new ScenarioCellDefault(aliasResultAs));
-		getPeer().getPerformBinding().captureCurrent(new ScenarioCellDefault(perform));
-		getPeer().getOnMemberBinding().captureCurrent(new ScenarioCellDefault(usingMember));
-		if (getPeer().getThatItBinding().isFound()) {
-			getPeer().getThatItBinding().captureCurrent(new ScenarioCellDefault(thatIt));
-		}
-		if (getPeer().getArg0Binding().isFound()) {
-			getPeer().getArg0Binding().captureCurrent(new ScenarioCellDefault(arg0));
-			argumentCells.add(arg0);
-		}
-		for (String arg: remainingArgs) {
-			argumentCells.add(arg);
-		}
-		
-		// execute
-		try {
-			execute(argumentCells);
-		} catch (ScenarioBoundValueException ex) {
-			return ex.getMessage();
-		}
-		
-		return "ok";
-	}
-
-	private void execute(final List<String> argumentCells) throws ScenarioBoundValueException {
-
-		ObjectAdapter onAdapter = getPeer().validateOnObject();
-		String aliasAs = getPeer().validateAliasAs();
-		Perform performCommand = getPeer().validatePerform();
-		
-		ObjectMember objectMember = null;
-		if (performCommand.requiresMember()) {
-			objectMember = getPeer().validateOnMember(onAdapter);
-		}
-
-		getPeer().performCommand(onAdapter, aliasAs, objectMember, performCommand, asValues(argumentCells));
-	}
-
-	private static List<ScenarioCell> asValues(List<String> argumentCells) {
-		List<ScenarioCell> storyValues = Lists.newArrayList();
-		for (String arg : argumentCells) {
-			storyValues.add(new ScenarioCellDefault(arg));
-		}
-		return storyValues;
-	}
-}
+package org.apache.isis.viewer.bdd.concordion.internal.fixtures;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.spec.feature.ObjectMember;
+import org.apache.isis.runtimes.dflt.runtime.system.DeploymentType;
+import org.apache.isis.viewer.bdd.common.AliasRegistry;
+import org.apache.isis.viewer.bdd.common.CellBinding;
+import org.apache.isis.viewer.bdd.common.CellBindingDefault;
+import org.apache.isis.viewer.bdd.common.IsisViewerConstants;
+import org.apache.isis.viewer.bdd.common.ScenarioBoundValueException;
+import org.apache.isis.viewer.bdd.common.ScenarioCell;
+import org.apache.isis.viewer.bdd.common.ScenarioCellDefault;
+import org.apache.isis.viewer.bdd.common.fixtures.UsingIsisViewerPeer;
+import org.apache.isis.viewer.bdd.common.fixtures.perform.Perform;
+import org.apache.isis.viewer.bdd.common.parsers.DateParser;
+
+import com.google.common.collect.Lists;
+
+public class UsingIsisViewerForConcordion extends AbstractFixture<UsingIsisViewerPeer> {
+
+    public UsingIsisViewerForConcordion(final AliasRegistry aliasesRegistry, final DeploymentType deploymentType,
+        final DateParser dateParser, final Perform.Mode mode) {
+        this(aliasesRegistry, deploymentType, dateParser, mode, CellBindingDefault
+            .builder(IsisViewerConstants.ON_OBJECT_NAME, IsisViewerConstants.ON_OBJECT_HEAD_SET).ditto().build(),
+            CellBindingDefault
+                .builder(IsisViewerConstants.ALIAS_RESULT_NAME, IsisViewerConstants.ALIAS_RESULT_HEAD_SET).optional()
+                .build(), CellBindingDefault
+                .builder(IsisViewerConstants.PERFORM_NAME, IsisViewerConstants.PERFORM_HEAD_SET).ditto().build(),
+            CellBindingDefault.builder(IsisViewerConstants.ON_MEMBER_NAME, IsisViewerConstants.ON_MEMBER_HEAD_SET)
+                .optional().build(), CellBindingDefault
+                .builder(IsisViewerConstants.THAT_IT_NAME, IsisViewerConstants.THAT_IT_HEAD_SET).ditto().optional()
+                .build(), CellBindingDefault
+                .builder(IsisViewerConstants.WITH_ARGUMENTS_NAME, IsisViewerConstants.WITH_ARGUMENTS_HEAD_SET)
+                .optional().build());
+    }
+
+    private UsingIsisViewerForConcordion(final AliasRegistry aliasesRegistry, final DeploymentType deploymentType,
+        final DateParser dateParser, final Perform.Mode mode, final CellBinding onObjectBinding,
+        final CellBinding aliasResultAsBinding, final CellBinding performBinding, final CellBinding onMemberBinding,
+        final CellBinding thatItBinding, final CellBinding arg0Binding) {
+        super(new UsingIsisViewerPeer(aliasesRegistry, deploymentType, dateParser, mode, onObjectBinding,
+            aliasResultAsBinding, performBinding, onMemberBinding, thatItBinding, arg0Binding));
+    }
+
+    public String executeHeader(final String onObject, final String aliasResultAs, final String perform,
+        final String usingMember, final String thatIt, final String arg0, final String... remainingArgs) {
+
+        return setupHeader(onObject, aliasResultAs, perform, usingMember, thatIt, arg0);
+    }
+
+    private String setupHeader(final String onObject, final String aliasResultAs, final String perform,
+        final String usingMember, final String thatIt, final String arg0) {
+        int colNum = 0;
+        getPeer().getOnObjectBinding().setHeadColumn(colNum++);
+        getPeer().getAliasResultAsBinding().setHeadColumn(colNum++);
+        getPeer().getPerformBinding().setHeadColumn(colNum++);
+        getPeer().getOnMemberBinding().setHeadColumn(colNum++);
+        if (thatIt != null) {
+            getPeer().getThatItBinding().setHeadColumn(colNum++);
+        }
+        if (arg0 != null) {
+            getPeer().getArg0Binding().setHeadColumn(colNum++);
+        }
+
+        return ""; // ok
+    }
+
+    public String executeRow(final String onObject, final String aliasResultAs, final String perform,
+        final String usingMember, final String thatIt, final String arg0, final String... remainingArgs) {
+
+        setupHeader(onObject, aliasResultAs, perform, usingMember, thatIt, arg0);
+
+        final List<String> argumentCells = new ArrayList<String>();
+
+        // capture current
+        getPeer().getOnObjectBinding().captureCurrent(new ScenarioCellDefault(onObject));
+        getPeer().getAliasResultAsBinding().captureCurrent(new ScenarioCellDefault(aliasResultAs));
+        getPeer().getPerformBinding().captureCurrent(new ScenarioCellDefault(perform));
+        getPeer().getOnMemberBinding().captureCurrent(new ScenarioCellDefault(usingMember));
+        if (getPeer().getThatItBinding().isFound()) {
+            getPeer().getThatItBinding().captureCurrent(new ScenarioCellDefault(thatIt));
+        }
+        if (getPeer().getArg0Binding().isFound()) {
+            getPeer().getArg0Binding().captureCurrent(new ScenarioCellDefault(arg0));
+            argumentCells.add(arg0);
+        }
+        for (final String arg : remainingArgs) {
+            argumentCells.add(arg);
+        }
+
+        // execute
+        try {
+            execute(argumentCells);
+        } catch (final ScenarioBoundValueException ex) {
+            return ex.getMessage();
+        }
+
+        return "ok";
+    }
+
+    private void execute(final List<String> argumentCells) throws ScenarioBoundValueException {
+
+        final ObjectAdapter onAdapter = getPeer().validateOnObject();
+        final String aliasAs = getPeer().validateAliasAs();
+        final Perform performCommand = getPeer().validatePerform();
+
+        ObjectMember objectMember = null;
+        if (performCommand.requiresMember()) {
+            objectMember = getPeer().validateOnMember(onAdapter);
+        }
+
+        getPeer().performCommand(onAdapter, aliasAs, objectMember, performCommand, asValues(argumentCells));
+    }
+
+    private static List<ScenarioCell> asValues(final List<String> argumentCells) {
+        final List<ScenarioCell> storyValues = Lists.newArrayList();
+        for (final String arg : argumentCells) {
+            storyValues.add(new ScenarioCellDefault(arg));
+        }
+        return storyValues;
+    }
+}

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/DndViewer.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/DndViewer.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/DndViewer.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/DndViewer.java Tue May  3 07:18:19 2011
@@ -17,14 +17,11 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd;
 
 import java.awt.Dimension;
 import java.util.StringTokenizer;
 
-import org.apache.log4j.Logger;
-
 import org.apache.isis.core.commons.authentication.AuthenticationSession;
 import org.apache.isis.core.commons.config.IsisConfigurationException;
 import org.apache.isis.core.commons.exceptions.IsisException;
@@ -98,10 +95,10 @@ import org.apache.isis.viewer.dnd.viewer
 import org.apache.isis.viewer.dnd.viewer.basic.InnerWorkspaceSpecification;
 import org.apache.isis.viewer.dnd.viewer.basic.RootWorkspaceSpecification;
 import org.apache.isis.viewer.dnd.viewer.basic.WrappedTextFieldSpecification;
-
+import org.apache.log4j.Logger;
 
 public class DndViewer extends IsisViewerAbstract {
-    
+
     private static final Logger LOG = Logger.getLogger(DndViewer.class);
     private static final String SPECIFICATION_BASE = Properties.PROPERTY_BASE + "specification.";
     private ViewUpdateNotifier updateNotifier;
@@ -112,7 +109,6 @@ public class DndViewer extends IsisViewe
     private HelpViewer helpViewer;
     private boolean acceptingLogIns = true;
 
-
     // ////////////////////////////////////
     // shutdown
     // ////////////////////////////////////
@@ -122,7 +118,6 @@ public class DndViewer extends IsisViewe
         System.exit(0);
     }
 
-
     private Bounds calculateInitialWindowSize(final Dimension screenSize) {
         int maxWidth = screenSize.width;
         final int maxHeight = screenSize.height;
@@ -137,12 +132,13 @@ public class DndViewer extends IsisViewe
         final int x = 40;
         final int y = 40;
 
-        Size defaultWindowSize = new Size(width, height);
+        final Size defaultWindowSize = new Size(width, height);
         defaultWindowSize.limitWidth(800);
         defaultWindowSize.limitHeight(600);
-        
+
         final Size size = Properties.getSize(Properties.PROPERTY_BASE + "initial.size", defaultWindowSize);
-        final Location location = Properties.getLocation(Properties.PROPERTY_BASE + "initial.location", new Location(x, y));
+        final Location location =
+            Properties.getLocation(Properties.PROPERTY_BASE + "initial.location", new Location(x, y));
         return new Bounds(location, size);
     }
 
@@ -165,15 +161,15 @@ public class DndViewer extends IsisViewe
         viewer.close();
         notify();
     }
-    
+
     private void saveDesktop() {
-    	if (!IsisContext.inSession()) {
-    		// can't do anything
-    		return;
-    	} 
-    	viewer.saveOpenObjects();
+        if (!IsisContext.inSession()) {
+            // can't do anything
+            return;
+        }
+        viewer.saveOpenObjects();
     }
-    
+
     protected void quit() {
         LOG.info("user quit");
         saveDesktop();
@@ -183,16 +179,18 @@ public class DndViewer extends IsisViewe
 
     @Override
     public synchronized void init() {
-    	super.init();
-    	
+        super.init();
+
         new AwtImageFactory(IsisContext.getTemplateImageLoader());
         new AwtToolkit();
 
         setShutdownListener(new ShutdownListener() {
+            @Override
             public void logOut() {
                 DndViewer.this.logOut();
             }
 
+            @Override
             public void quit() {
                 DndViewer.this.quit();
             }
@@ -212,7 +210,8 @@ public class DndViewer extends IsisViewe
                 openViewer();
                 try {
                     wait();
-                } catch (final InterruptedException e) {}
+                } catch (final InterruptedException e) {
+                }
             } else {
                 quit();
             }
@@ -223,21 +222,20 @@ public class DndViewer extends IsisViewe
     // login
     // ////////////////////////////////////
 
-    
-	// TODO: nasty
+    // TODO: nasty
     private boolean loggedInUsingLogonFixture = false;
-    
+
     /**
-     * TODO: there is similar code in <tt>AuthenticationSessionLookupStrategyDefault</tt>;
-     * should try to combine somehow... 
+     * TODO: there is similar code in <tt>AuthenticationSessionLookupStrategyDefault</tt>; should try to combine
+     * somehow...
      */
     private boolean login() {
-        AuthenticationRequest request = determineRequestIfPossible();
+        final AuthenticationRequest request = determineRequestIfPossible();
 
         // we may have enough to get a session
         AuthenticationSession session = getAuthenticationManager().authenticate(request);
         clearAuthenticationRequestViaArgs();
-        
+
         if (session == null) {
             session = loginDialogPrompt(request);
         }
@@ -249,8 +247,7 @@ public class DndViewer extends IsisViewe
         }
     }
 
-
-    private AuthenticationSession loginDialogPrompt(AuthenticationRequest request) {
+    private AuthenticationSession loginDialogPrompt(final AuthenticationRequest request) {
         AuthenticationSession session;
         final LoginDialog dialog = new LoginDialog(getAuthenticationManager());
         if (request != null) {
@@ -265,24 +262,24 @@ public class DndViewer extends IsisViewe
         return session;
     }
 
-	private AuthenticationRequest determineRequestIfPossible() {
-		AuthenticationRequest request;
-		// command line args
+    private AuthenticationRequest determineRequestIfPossible() {
+        AuthenticationRequest request;
+        // command line args
         request = getAuthenticationRequestViaArgs();
-        
+
         // exploration
         if (request == null && getDeploymentType().isExploring()) {
-        	request = new AuthenticationRequestExploration(getLogonFixture());
+            request = new AuthenticationRequestExploration(getLogonFixture());
         }
-        
+
         // logon fixture provided
-		if (request == null && getLogonFixture() != null && !loggedInUsingLogonFixture) {
-			loggedInUsingLogonFixture = true;
-			request = new AuthenticationRequestLogonFixture(getLogonFixture());
-		}
-		return request;
-	}
-	
+        if (request == null && getLogonFixture() != null && !loggedInUsingLogonFixture) {
+            loggedInUsingLogonFixture = true;
+            request = new AuthenticationRequestLogonFixture(getLogonFixture());
+        }
+        return request;
+    }
+
     private void openViewer() {
         frame = new ViewerFrame();
 
@@ -311,7 +308,7 @@ public class DndViewer extends IsisViewe
         if (currentSession == null) {
             throw new NullPointerException("No session for " + this);
         }
-        
+
         setupViewFactory();
 
         final UserProfile userProfiler = IsisContext.getUserProfile();
@@ -395,31 +392,29 @@ public class DndViewer extends IsisViewe
             viewFactory.addSpecification(new InternalListSpecification());
             viewFactory.addSpecification(new SimpleListSpecification());
             viewFactory.addSpecification(new GridSpecification());
-            // TBA             viewFactory.addSpecification(new ListWithExpandableElementsSpecification());
+            // TBA viewFactory.addSpecification(new ListWithExpandableElementsSpecification());
             // TBA
             viewFactory.addSpecification(new CalendarSpecification());
             viewFactory.addSpecification(new ListWithDetailSpecification());
             viewFactory.addSpecification(new HistogramSpecification());
-              
+
             viewFactory.addSpecification(new TreeWithDetailSpecification());
             viewFactory.addSpecification(new FormSpecification());
             viewFactory.addSpecification(new FormWithTableSpecification());
             viewFactory.addSpecification(new WindowTableSpecification());
-            // TBA 
+            // TBA
             viewFactory.addSpecification(new ExpandableFormSpecification());
             viewFactory.addSpecification(new InternalFormSpecification());
             viewFactory.addSpecification(new TwoPartViewSpecification());
-            // TBA 
+            // TBA
             viewFactory.addSpecification(new FormWithDetailSpecification());
-            
+
             viewFactory.addSpecification(new SummaryFormSpecification());
-            
-            
-            
+
             viewFactory.addSpecification(new TreeSpecification());
-            // TODO allow window form to be used for objects with limited number of collections 
+            // TODO allow window form to be used for objects with limited number of collections
             // viewFactory.addSpecification(new TreeWithDetailSpecification(0, 3));
-            
+
             viewFactory.addDesignSpecification(new GridListSpecification());
             viewFactory.addDesignSpecification(new ConfigurableObjectViewSpecification());
             viewFactory.addDesignSpecification(new PanelViewSpecification());
@@ -429,9 +424,6 @@ public class DndViewer extends IsisViewe
         viewFactory.addSpecification(new MessageDialogSpecification());
         viewFactory.addSpecification(new DetailedMessageViewSpecification());
 
-        
-
-        
         viewFactory.addEmptyFieldSpecification(loadSpecification("field.empty", EmptyField.Specification.class));
 
         viewFactory.addSpecification(loadSpecification("icon.object", RootIconSpecification.class));
@@ -443,7 +435,7 @@ public class DndViewer extends IsisViewe
         viewFactory.setDragContentSpecification(loadSpecification("drag-content", DragContentSpecification.class));
 
         // TODO remove or move to better position
-        ViewSpecification[] specifications = CollectionTreeNodeSpecification.create();
+        final ViewSpecification[] specifications = CollectionTreeNodeSpecification.create();
         viewFactory.addSpecification(specifications[0]);
         viewFactory.addSpecification(specifications[1]);
         viewFactory.addSpecification(new TreeNodeSpecification());
@@ -453,7 +445,6 @@ public class DndViewer extends IsisViewe
         viewFactory.loadUserViewSpecifications();
     }
 
-
     private void installSpecsFromConfiguration(final SkylarkViewFactory viewFactory) {
         final String viewParams = IsisContext.getConfiguration().getString(SPECIFICATION_BASE + "view");
         if (viewParams != null) {
@@ -461,7 +452,7 @@ public class DndViewer extends IsisViewe
             while (st.hasMoreTokens()) {
                 final String specName = st.nextToken().trim();
                 if (specName != null && !specName.trim().equals("")) {
-                   viewFactory.addSpecification(specName);
+                    viewFactory.addSpecification(specName);
                 }
             }
         }

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/DndViewerInstaller.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/DndViewerInstaller.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/DndViewerInstaller.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/DndViewerInstaller.java Tue May  3 07:18:19 2011
@@ -17,24 +17,20 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd;
 
 import org.apache.isis.runtimes.dflt.runtime.installerregistry.installerapi.IsisViewerInstallerAbstract;
 import org.apache.isis.runtimes.dflt.runtime.viewer.IsisViewer;
 
-
 public class DndViewerInstaller extends IsisViewerInstallerAbstract {
 
-	public DndViewerInstaller() {
-		super("dnd");
-	}
+    public DndViewerInstaller() {
+        super("dnd");
+    }
 
-	@Override
-	public IsisViewer doCreateViewer() {
+    @Override
+    public IsisViewer doCreateViewer() {
         return new DndViewer();
     }
 
-
 }
-

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/awt/AWTUtilities.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/awt/AWTUtilities.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/awt/AWTUtilities.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/awt/AWTUtilities.java Tue May  3 07:18:19 2011
@@ -17,15 +17,12 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.awt;
 
 import java.awt.Frame;
 import java.awt.Image;
 import java.net.URL;
 
-
-
 public class AWTUtilities {
 
     public static void addWindowIcon(final Frame window, final String file) {
@@ -38,4 +35,3 @@ public class AWTUtilities {
         }
     }
 }
-

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/awt/AwtCanvas.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/awt/AwtCanvas.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/awt/AwtCanvas.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/awt/AwtCanvas.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.awt;
 
 import java.awt.Font;
@@ -38,19 +37,19 @@ import org.apache.isis.viewer.dnd.drawin
 import org.apache.isis.viewer.dnd.view.Toolkit;
 import org.apache.isis.viewer.dnd.view.base.AwtImage;
 
-
 public class AwtCanvas implements Canvas {
     private java.awt.Color color;
     private Font font;
     private final Graphics graphics;
     private final RenderingArea renderingArea;
 
-    private AwtCanvas(final Graphics graphics, RenderingArea renderingArea) {
+    private AwtCanvas(final Graphics graphics, final RenderingArea renderingArea) {
         this.graphics = graphics;
         this.renderingArea = renderingArea;
     }
 
-    public AwtCanvas(final Graphics bufferGraphic, final RenderingArea renderingArea, final int x, final int y, final int width, final int height) {
+    public AwtCanvas(final Graphics bufferGraphic, final RenderingArea renderingArea, final int x, final int y,
+        final int width, final int height) {
         graphics = bufferGraphic;
         this.renderingArea = renderingArea;
         graphics.clipRect(x, y, width, height);
@@ -70,14 +69,17 @@ public class AwtCanvas implements Canvas
         return p;
     }
 
+    @Override
     public Canvas createSubcanvas() {
         return new AwtCanvas(graphics.create(), renderingArea);
     }
 
+    @Override
     public Canvas createSubcanvas(final Bounds bounds) {
         return createSubcanvas(bounds.getX(), bounds.getY(), bounds.getWidth(), bounds.getHeight());
     }
 
+    @Override
     public Canvas createSubcanvas(final int x, final int y, final int width, final int height) {
         final Graphics g = graphics.create();
         // this form of clipping must go here!
@@ -85,17 +87,14 @@ public class AwtCanvas implements Canvas
         return new AwtCanvas(g, renderingArea, 0, 0, width, height);
     }
 
-    public void draw3DRectangle(
-            final int x,
-            final int y,
-            final int width,
-            final int height,
-            final Color color,
-            final boolean raised) {
+    @Override
+    public void draw3DRectangle(final int x, final int y, final int width, final int height, final Color color,
+        final boolean raised) {
         useColor(color);
         graphics.draw3DRect(x, y, width - 1, height - 1, raised);
     }
 
+    @Override
     public void drawDebugOutline(final Bounds bounds, final int baseline, final Color color) {
         final int width = bounds.getWidth();
         final int height = bounds.getHeight();
@@ -103,94 +102,107 @@ public class AwtCanvas implements Canvas
         final int midpoint = bounds.getY() + height / 2;
         drawLine(bounds.getX(), midpoint, width - 2, midpoint, color);
         if (baseline > 0) {
-            drawLine(bounds.getX(), baseline, width - 1, baseline, Toolkit.getColor(ColorsAndFonts.COLOR_DEBUG_BASELINE));
+            drawLine(bounds.getX(), baseline, width - 1, baseline,
+                Toolkit.getColor(ColorsAndFonts.COLOR_DEBUG_BASELINE));
         }
     }
 
+    @Override
     public void drawImage(final Image image, final int x, final int y) {
         graphics.drawImage(((AwtImage) image).getAwtImage(), x, y, (ImageObserver) renderingArea);
     }
 
+    @Override
     public void drawImage(final Image image, final int x, final int y, final int width, final int height) {
-        graphics.drawImage(((AwtImage) image).getAwtImage(), x, y, width - 1, height - 1, (ImageObserver) renderingArea);
+        graphics
+            .drawImage(((AwtImage) image).getAwtImage(), x, y, width - 1, height - 1, (ImageObserver) renderingArea);
     }
 
+    @Override
     public void drawLine(final int x, final int y, final int x2, final int y2, final Color color) {
         useColor(color);
         graphics.drawLine(x, y, x2, y2);
     }
 
+    @Override
     public void drawLine(final Location start, final int xExtent, final int yExtent, final Color color) {
         drawLine(start.getX(), start.getY(), start.getX() + xExtent, start.getY() + yExtent, color);
     }
 
+    @Override
     public void drawOval(final int x, final int y, final int width, final int height, final Color color) {
         useColor(color);
         final Polygon p = createOval(x, y, width - 1, height - 1);
         graphics.drawPolygon(p);
     }
 
+    @Override
     public void drawRectangle(final int x, final int y, final int width, final int height, final Color color) {
         useColor(color);
         graphics.drawRect(x, y, width - 1, height - 1);
     }
 
+    @Override
     public void drawRectangleAround(final Bounds bounds, final Color color) {
         drawRectangle(0, 0, bounds.getWidth(), bounds.getHeight(), color);
     }
 
-    public void drawRoundedRectangle(
-            final int x,
-            final int y,
-            final int width,
-            final int height,
-            final int arcWidth,
-            final int arcHeight,
-            final Color color) {
+    @Override
+    public void drawRoundedRectangle(final int x, final int y, final int width, final int height, final int arcWidth,
+        final int arcHeight, final Color color) {
         useColor(color);
         graphics.drawRoundRect(x, y, width - 1, height - 1, arcWidth, arcHeight);
     }
 
+    @Override
     public void drawShape(final Shape shape, final Color color) {
         useColor(color);
         graphics.drawPolygon(shape.getX(), shape.getY(), shape.count());
     }
 
+    @Override
     public void drawShape(final Shape shape, final int x, final int y, final Color color) {
         final Shape copy = new Shape(shape);
         copy.translate(x, y);
         drawShape(copy, color);
     }
 
+    @Override
     public void drawSolidOval(final int x, final int y, final int width, final int height, final Color color) {
         useColor(color);
         final Polygon p = createOval(x, y, width, height);
         graphics.fillPolygon(p);
     }
 
+    @Override
     public void drawSolidRectangle(final int x, final int y, final int width, final int height, final Color color) {
         useColor(color);
         graphics.fillRect(x, y, width, height);
     }
 
+    @Override
     public void drawSolidShape(final Shape shape, final Color color) {
         useColor(color);
         graphics.fillPolygon(shape.getX(), shape.getY(), shape.count());
     }
 
+    @Override
     public void drawSolidShape(final Shape shape, final int x, final int y, final Color color) {
         final Shape copy = new Shape(shape);
         copy.translate(x, y);
         drawSolidShape(copy, color);
     }
 
+    @Override
     public void drawText(final String text, final int x, final int y, final Color color, final Text style) {
         useColor(color);
         useFont(style);
         graphics.drawString(text, x, y);
     }
 
-    public void drawText(final String text, final int x, final int y, final int maxWidth, final Color color, final Text style) {
+    @Override
+    public void drawText(final String text, final int x, final int y, final int maxWidth, final Color color,
+        final Text style) {
         useColor(color);
         useFont(style);
 
@@ -220,10 +232,12 @@ public class AwtCanvas implements Canvas
         }
     }
 
+    @Override
     public void offset(final int x, final int y) {
         graphics.translate(x, y);
     }
 
+    @Override
     public boolean overlaps(final Bounds bounds) {
         final Rectangle clip = graphics.getClipBounds();
         final Bounds activeArea = new Bounds(clip.x, clip.y, clip.width, clip.height);
@@ -233,7 +247,8 @@ public class AwtCanvas implements Canvas
     @Override
     public String toString() {
         final Rectangle cb = graphics.getClipBounds();
-        return "Canvas [area=" + cb.x + "," + cb.y + " " + cb.width + "x" + cb.height + ",color=" + color + ",font=" + font + "]";
+        return "Canvas [area=" + cb.x + "," + cb.y + " " + cb.width + "x" + cb.height + ",color=" + color + ",font="
+            + font + "]";
     }
 
     private void useColor(final Color color) {

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/awt/AwtColor.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/awt/AwtColor.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/awt/AwtColor.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/awt/AwtColor.java Tue May  3 07:18:19 2011
@@ -17,14 +17,12 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.awt;
 
 import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
 import org.apache.isis.viewer.dnd.drawing.Color;
 import org.apache.isis.viewer.dnd.util.Properties;
 
-
 public class AwtColor implements Color {
     public static final AwtColor DEBUG_BASELINE = new AwtColor(java.awt.Color.magenta);
     public static final AwtColor DEBUG_DRAW_BOUNDS = new AwtColor(java.awt.Color.cyan);
@@ -58,8 +56,8 @@ public class AwtColor implements Color {
 
     public AwtColor(final String propertyName, final String defaultColor) {
         this.name = propertyName;
-        color = IsisContext.getConfiguration()
-                .getColor(PROPERTY_STEM + propertyName, java.awt.Color.decode(defaultColor));
+        color =
+            IsisContext.getConfiguration().getColor(PROPERTY_STEM + propertyName, java.awt.Color.decode(defaultColor));
     }
 
     public AwtColor(final String propertyName, final AwtColor defaultColor) {
@@ -67,10 +65,12 @@ public class AwtColor implements Color {
         color = IsisContext.getConfiguration().getColor(PROPERTY_STEM + propertyName, defaultColor.getAwtColor());
     }
 
+    @Override
     public Color brighter() {
         return new AwtColor(color.brighter());
     }
 
+    @Override
     public Color darker() {
         return new AwtColor(color.darker());
     }
@@ -84,8 +84,8 @@ public class AwtColor implements Color {
         return name + " (" + "#" + Integer.toHexString(color.getRGB()) + ")";
     }
 
+    @Override
     public String getName() {
         return name;
     }
 }
-

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/awt/AwtColorsAndFonts.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/awt/AwtColorsAndFonts.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/awt/AwtColorsAndFonts.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/awt/AwtColorsAndFonts.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.awt;
 
 import java.util.Hashtable;
@@ -27,13 +26,13 @@ import org.apache.isis.viewer.dnd.drawin
 import org.apache.isis.viewer.dnd.drawing.Text;
 import org.apache.isis.viewer.dnd.view.View;
 
-
 public class AwtColorsAndFonts implements ColorsAndFonts {
     private final Hashtable colors = new Hashtable();
     private int defaultBaseline;
     private int defaultFieldHeight;
     private final Hashtable fonts = new Hashtable();
 
+    @Override
     public int defaultBaseline() {
         if (defaultBaseline == 0) {
             final int iconSize = getText(TEXT_NORMAL).getAscent();
@@ -42,6 +41,7 @@ public class AwtColorsAndFonts implement
         return defaultBaseline;
     }
 
+    @Override
     public int defaultFieldHeight() {
         if (defaultFieldHeight == 0) {
             defaultFieldHeight = getText(TEXT_NORMAL).getTextHeight();
@@ -49,6 +49,7 @@ public class AwtColorsAndFonts implement
         return defaultFieldHeight;
     }
 
+    @Override
     public Color getColor(final String name) {
         Color color = (Color) colors.get(name);
         if (color == null && name.startsWith(COLOR_WINDOW + ".")) {
@@ -59,14 +60,17 @@ public class AwtColorsAndFonts implement
 
     }
 
+    @Override
     public Color getColor(final int rgbColor) {
         return new AwtColor(rgbColor);
     }
 
+    @Override
     public Text getText(final String name) {
         return (Text) fonts.get(name);
     }
 
+    @Override
     public void init() {
         // core color scheme
         setColor(COLOR_BLACK, "#000000");
@@ -95,7 +99,7 @@ public class AwtColorsAndFonts implement
         setColor(COLOR_LABEL_MANDATORY, getColor(COLOR_BLACK));
         setColor(COLOR_LABEL, getColor(COLOR_SECONDARY1));
         setColor(COLOR_LABEL_DISABLED, getColor(COLOR_SECONDARY2));
-        
+
         // state colors
         setColor(COLOR_IDENTIFIED, getColor(COLOR_PRIMARY1)); // "#0099ff");
         setColor(COLOR_VALID, "#32CD32");
@@ -118,13 +122,13 @@ public class AwtColorsAndFonts implement
         setColor(COLOR_DEBUG_BOUNDS_VIEW, AwtColor.DEBUG_VIEW_BOUNDS);
 
         // fonts
-        String defaultFontFamily = AwtText.defaultFontFamily();
-        int defaultFontSizeSmall = AwtText.defaultFontSizeSmall();
-        int defaultFontSizeMedium = AwtText.defaultFontSizeMedium();
-        int defaultFontSizeLarge = AwtText.defaultFontSizeLarge();
+        final String defaultFontFamily = AwtText.defaultFontFamily();
+        final int defaultFontSizeSmall = AwtText.defaultFontSizeSmall();
+        final int defaultFontSizeMedium = AwtText.defaultFontSizeMedium();
+        final int defaultFontSizeLarge = AwtText.defaultFontSizeLarge();
 
         setText(TEXT_TITLE, defaultFontFamily + "-bold-" + defaultFontSizeLarge);
-        
+
         setText(TEXT_TITLE_SMALL, defaultFontFamily + "-bold-" + defaultFontSizeMedium);
         setText(TEXT_NORMAL, defaultFontFamily + "-plain-" + defaultFontSizeMedium);
         setText(TEXT_CONTROL, defaultFontFamily + "-bold-" + defaultFontSizeMedium);
@@ -162,4 +166,3 @@ public class AwtColorsAndFonts implement
         }
     }
 }
-

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/awt/AwtImageFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/awt/AwtImageFactory.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/awt/AwtImageFactory.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/awt/AwtImageFactory.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.awt;
 
 import java.awt.Toolkit;
@@ -31,7 +30,6 @@ import org.apache.isis.viewer.dnd.drawin
 import org.apache.isis.viewer.dnd.drawing.ImageFactory;
 import org.apache.isis.viewer.dnd.view.base.AwtImage;
 
-
 public class AwtImageFactory extends ImageFactory {
 
     private static class Filter extends RGBImageFilter {
@@ -43,13 +41,14 @@ public class AwtImageFactory extends Ima
 
     private final TemplateImageLoader loader;
 
-    public AwtImageFactory(TemplateImageLoader imageLoader) {
+    public AwtImageFactory(final TemplateImageLoader imageLoader) {
         loader = imageLoader;
     }
 
     /**
      * Load an image with the given name.
      */
+    @Override
     public Image loadImage(final String path) {
         final TemplateImage template = templateImage(path);
         if (template == null) {
@@ -58,6 +57,7 @@ public class AwtImageFactory extends Ima
         return new AwtImage(template.getImage());
     }
 
+    @Override
     protected Image loadImage(final String name, final int height, final Color tint) {
         final TemplateImage template = templateImage(name);
         if (template == null) {
@@ -81,4 +81,3 @@ public class AwtImageFactory extends Ima
     }
 
 }
-

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/awt/AwtText.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/awt/AwtText.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/awt/AwtText.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/awt/AwtText.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.awt;
 
 import java.awt.Font;
@@ -25,14 +24,12 @@ import java.awt.FontMetrics;
 import java.awt.Frame;
 import java.util.StringTokenizer;
 
-import org.apache.log4j.Logger;
-
 import org.apache.isis.core.commons.config.IsisConfiguration;
 import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
 import org.apache.isis.viewer.dnd.drawing.ColorsAndFonts;
 import org.apache.isis.viewer.dnd.drawing.Text;
 import org.apache.isis.viewer.dnd.util.Properties;
-
+import org.apache.log4j.Logger;
 
 public class AwtText implements Text {
     private static final String ASCENT_ADJUST = Properties.PROPERTY_BASE + "ascent-adjust";
@@ -69,14 +66,16 @@ public class AwtText implements Text {
 
         ascentAdjust = cfg.getBoolean(ASCENT_ADJUST, false);
 
-        LOG.debug("font " + propertyName + " height=" + metrics.getHeight() + ", leading=" + metrics.getLeading() + ", ascent="
-                + metrics.getAscent() + ", descent=" + metrics.getDescent() + ", line spacing=" + lineSpacing);
+        LOG.debug("font " + propertyName + " height=" + metrics.getHeight() + ", leading=" + metrics.getLeading()
+            + ", ascent=" + metrics.getAscent() + ", descent=" + metrics.getDescent() + ", line spacing=" + lineSpacing);
     }
 
+    @Override
     public int charWidth(final char c) {
         return metrics.charWidth(c);
     }
 
+    @Override
     public int getAscent() {
         return metrics.getAscent() - (ascentAdjust ? metrics.getDescent() : 0);
     }
@@ -90,30 +89,37 @@ public class AwtText implements Text {
         return font;
     }
 
+    @Override
     public int getDescent() {
         return metrics.getDescent();
     }
 
+    @Override
     public int getLineHeight() {
         return metrics.getHeight() + getLineSpacing();
     }
 
+    @Override
     public int getLineSpacing() {
         return lineSpacing;
     }
 
+    @Override
     public String getName() {
         return propertyName;
     }
 
+    @Override
     public int getMidPoint() {
         return getAscent() / 2;
     }
 
+    @Override
     public int getTextHeight() {
         return metrics.getHeight() - (ascentAdjust ? metrics.getDescent() : 0);
     }
 
+    @Override
     public int stringHeight(final String text, final int maxWidth) {
         int noLines = 0;
         final StringTokenizer lines = new StringTokenizer(text, "\n\r");
@@ -140,6 +146,7 @@ public class AwtText implements Text {
         return noLines * getLineHeight();
     }
 
+    @Override
     public int stringWidth(final String text, final int maxWidth) {
         int width = 0;
         final StringTokenizer lines = new StringTokenizer(text, "\n\r");
@@ -172,6 +179,7 @@ public class AwtText implements Text {
     private final java.util.Hashtable stringWidthByString = new java.util.Hashtable();
 
     // DKH 20060404: new implementation that caches
+    @Override
     public int stringWidth(final String text) {
         int[] cachedStringWidth = (int[]) stringWidthByString.get(text);
         if (cachedStringWidth == null) {
@@ -187,8 +195,8 @@ public class AwtText implements Text {
         if (stringWidth > text.length() * maxCharWidth) {
             LOG.debug("spurious width of string; calculating manually: " + stringWidth + " for " + this + ": " + text);
             /*
-             * This fixes an intermittent bug in .NET where stringWidth() returns a ridiculous number is
-             * returned for the width.
+             * This fixes an intermittent bug in .NET where stringWidth() returns a ridiculous number is returned for
+             * the width.
              * 
              * TODO don't do this when running Java
              */
@@ -219,12 +227,12 @@ public class AwtText implements Text {
     public static int defaultFontSizeSmall() {
         final IsisConfiguration cfg = IsisContext.getConfiguration();
         return cfg.getInteger(FONT_PROPERTY_STEM + "size.small", 10);
-     }
+    }
 
     public static int defaultFontSizeMedium() {
         final IsisConfiguration cfg = IsisContext.getConfiguration();
         return cfg.getInteger(FONT_PROPERTY_STEM + "size.medium", 11);
-     }
+    }
 
     public static int defaultFontSizeLarge() {
         final IsisConfiguration cfg = IsisContext.getConfiguration();

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/awt/AwtToolkit.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/awt/AwtToolkit.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/awt/AwtToolkit.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/awt/AwtToolkit.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.awt;
 
 import org.apache.isis.viewer.dnd.view.Toolkit;
@@ -25,7 +24,6 @@ import org.apache.isis.viewer.dnd.viewer
 import org.apache.isis.viewer.dnd.viewer.SkylarkViewFactory;
 import org.apache.isis.viewer.dnd.viewer.basic.LogoBackground;
 
-
 public class AwtToolkit extends Toolkit {
     @Override
     protected void init() {

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/awt/DebugFrame.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/awt/DebugFrame.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/awt/DebugFrame.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/awt/DebugFrame.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.awt;
 
 import java.awt.BorderLayout;
@@ -44,11 +43,10 @@ import java.awt.event.WindowEvent;
 import java.net.URL;
 import java.util.Vector;
 
-import org.apache.log4j.Logger;
-import org.apache.isis.core.commons.debug.DebuggableWithTitle;
 import org.apache.isis.core.commons.debug.DebugString;
+import org.apache.isis.core.commons.debug.DebuggableWithTitle;
 import org.apache.isis.viewer.dnd.view.debug.DebugOutput;
-
+import org.apache.log4j.Logger;
 
 /**
  * A specialised frame for displaying the details of an object and its display mechanisms.
@@ -70,8 +68,8 @@ public abstract class DebugFrame extends
             f[i] = (Frame) frames.elementAt(i);
         }
 
-        for (int i = 0; i < f.length; i++) {
-            f[i].dispose();
+        for (final Frame element : f) {
+            element.dispose();
         }
     }
 
@@ -135,6 +133,7 @@ public abstract class DebugFrame extends
 
         buttons.add(b);
         b.addActionListener(new java.awt.event.ActionListener() {
+            @Override
             public void actionPerformed(final ActionEvent e) {
                 showDebugForPane();
             }
@@ -145,6 +144,7 @@ public abstract class DebugFrame extends
 
         buttons.add(b);
         b.addActionListener(new java.awt.event.ActionListener() {
+            @Override
             public void actionPerformed(final ActionEvent e) {
                 DebugOutput.print("Debug " + tabPane.getName(), field.getText());
             }
@@ -155,6 +155,7 @@ public abstract class DebugFrame extends
 
         buttons.add(b);
         b.addActionListener(new java.awt.event.ActionListener() {
+            @Override
             public void actionPerformed(final ActionEvent e) {
                 DebugOutput.saveToFile("Save details", "Debug " + tabPane.getName(), field.getText());
             }
@@ -165,6 +166,7 @@ public abstract class DebugFrame extends
 
         buttons.add(b);
         b.addActionListener(new java.awt.event.ActionListener() {
+            @Override
             public void actionPerformed(final ActionEvent e) {
                 DebugOutput.saveToClipboard(field.getText());
             }
@@ -175,6 +177,7 @@ public abstract class DebugFrame extends
 
         buttons.add(b);
         b.addActionListener(new java.awt.event.ActionListener() {
+            @Override
             public void actionPerformed(final ActionEvent e) {
                 closeDialog();
             }
@@ -199,7 +202,8 @@ public abstract class DebugFrame extends
         dispose();
     }
 
-    public void dialogClosing() {}
+    public void dialogClosing() {
+    }
 
     @Override
     public void dispose() {
@@ -217,9 +221,8 @@ public abstract class DebugFrame extends
      */
     public void show(final int x, final int y) {
         /*
-         * WARNING - When refresh button is pressed it is in the AWT thread; if the repository
-         * is thread based then the wrong set of components will be used giving strange results, particularly
-         * in the object persistor.
+         * WARNING - When refresh button is pressed it is in the AWT thread; if the repository is thread based then the
+         * wrong set of components will be used giving strange results, particularly in the object persistor.
          */
         // TODO run in correct thread
         refresh();

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/awt/DebugOptions.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/awt/DebugOptions.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/awt/DebugOptions.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/awt/DebugOptions.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.awt;
 
 import java.io.ByteArrayOutputStream;
@@ -36,7 +35,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 DebugOptions implements MenuOptions {
     private final XViewer viewer;
 
@@ -44,8 +42,10 @@ public class DebugOptions implements Men
         this.viewer = viewer;
     }
 
+    @Override
     public void menuOptions(final UserActionSet options) {
-        final String showExplorationMenu = "Always show exploration menu " + (viewer.showExplorationMenuByDefault ? "off" : "on");
+        final String showExplorationMenu =
+            "Always show exploration menu " + (viewer.showExplorationMenuByDefault ? "off" : "on");
         options.add(new UserActionAbstract(showExplorationMenu, ActionType.DEBUG) {
             @Override
             public void execute(final Workspace workspace, final View view, final Location at) {
@@ -82,37 +82,38 @@ public class DebugOptions implements Men
 
         // I've commented this out because in the new design we should close the ExecutionContext
         // and then re-login.
-//        options.add(new AbstractUserAction("Restart object loader/persistor", UserAction.DEBUG) {
-//            @Override
-//            public void execute(final Workspace workspace, final View view, final Location at) {
-//                IsisContext.getObjectPersistor().reset();
-//            }
-//        });
-        
+        // options.add(new AbstractUserAction("Restart object loader/persistor", UserAction.DEBUG) {
+        // @Override
+        // public void execute(final Workspace workspace, final View view, final Location at) {
+        // IsisContext.getObjectPersistor().reset();
+        // }
+        // });
+
         options.add(new UserActionAbstract("Diagnostics...", ActionType.DEBUG) {
             @Override
             public void execute(final Workspace workspace, final View view, final Location at) {
                 final InfoDebugFrame f = new InfoDebugFrame();
-                DebuggableWithTitle info = new DebuggableWithTitle() {
+                final DebuggableWithTitle info = new DebuggableWithTitle() {
 
-                    public void debugData(DebugBuilder debug) {
-                        ByteArrayOutputStream out2 = new ByteArrayOutputStream();
-                        PrintStream out = new PrintStream(out2);
+                    @Override
+                    public void debugData(final DebugBuilder debug) {
+                        final ByteArrayOutputStream out2 = new ByteArrayOutputStream();
+                        final PrintStream out = new PrintStream(out2);
                         new SystemPrinter(out).printDiagnostics();
                         debug.append(out2.toString());
                     }
 
+                    @Override
                     public String debugTitle() {
                         return "Diagnostics";
                     }
-                    
+
                 };
                 f.setInfo(info);
                 f.show(at.getX() + 50, workspace.getBounds().getY() + 6);
             }
         });
 
-
         options.add(new UserActionAbstract("Debug system...", ActionType.DEBUG) {
             @Override
             public void execute(final Workspace workspace, final View view, final Location at) {
@@ -123,7 +124,6 @@ public class DebugOptions implements Men
             }
         });
 
-
         options.add(new UserActionAbstract("Debug session...", ActionType.DEBUG) {
             @Override
             public void execute(final Workspace workspace, final View view, final Location at) {
@@ -154,4 +154,3 @@ public class DebugOptions implements Men
     }
 
 }
-

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/awt/InfoDebugFrame.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/awt/InfoDebugFrame.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/awt/InfoDebugFrame.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/awt/InfoDebugFrame.java Tue May  3 07:18:19 2011
@@ -17,12 +17,10 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.awt;
 
 import org.apache.isis.core.commons.debug.DebuggableWithTitle;
 
-
 public class InfoDebugFrame extends DebugFrame {
     private static final long serialVersionUID = 1L;
     private DebuggableWithTitle[] info;

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/awt/InteractionHandler.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/awt/InteractionHandler.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/awt/InteractionHandler.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/awt/InteractionHandler.java Tue May  3 07:18:19 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.awt;
 
 import java.awt.Point;
@@ -28,7 +27,6 @@ import java.awt.event.MouseEvent;
 import java.awt.event.MouseListener;
 import java.awt.event.MouseMotionListener;
 
-import org.apache.log4j.Logger;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.viewer.dnd.drawing.Location;
 import org.apache.isis.viewer.dnd.interaction.ClickImpl;
@@ -42,7 +40,7 @@ import org.apache.isis.viewer.dnd.view.V
 import org.apache.isis.viewer.dnd.view.ViewAreaType;
 import org.apache.isis.viewer.dnd.view.base.AbstractView;
 import org.apache.isis.viewer.dnd.view.content.NullContent;
-
+import org.apache.log4j.Logger;
 
 public class InteractionHandler implements MouseMotionListener, MouseListener, KeyListener {
     private static final Logger LOG = Logger.getLogger(InteractionHandler.class);
@@ -61,11 +59,8 @@ public class InteractionHandler implemen
     private View draggedView;
     private final XFeedbackManager feedbackManager;
 
-    public InteractionHandler(
-            final XViewer viewer,
-            final XFeedbackManager feedbackManager,
-            final KeyboardManager keyboardManager,
-            final InteractionSpy spy) {
+    public InteractionHandler(final XViewer viewer, final XFeedbackManager feedbackManager,
+        final KeyboardManager keyboardManager, final InteractionSpy spy) {
         this.viewer = viewer;
         this.feedbackManager = feedbackManager;
         this.spy = spy;
@@ -119,11 +114,12 @@ public class InteractionHandler implemen
     }
 
     /**
-     * Listener for key presses. Cancels popup and drags, and forwards key presses to the view that has the
-     * keyboard focus.
+     * Listener for key presses. Cancels popup and drags, and forwards key presses to the view that has the keyboard
+     * focus.
      * 
      * @see java.awt.event.KeyListener#keyPressed(KeyEvent)
      */
+    @Override
     public void keyPressed(final KeyEvent ke) {
         if (isBusy(identifiedView)) {
             return;
@@ -140,7 +136,9 @@ public class InteractionHandler implemen
             } else if (ke.getKeyCode() == KeyEvent.VK_F5) {
                 draggedView = identifiedView;
             } else if (draggedView != null && ke.getKeyCode() == KeyEvent.VK_F6) {
-                final ContentDrag content = new ContentDragImpl(draggedView, new Location(), new AbstractView(new NullContent()) {});
+                final ContentDrag content =
+                    new ContentDragImpl(draggedView, new Location(), new AbstractView(new NullContent()) {
+                    });
                 if (identifiedView != null) {
                     identifiedView.drop(content);
                 }
@@ -162,6 +160,7 @@ public class InteractionHandler implemen
      * 
      * @see java.awt.event.KeyListener#keyReleased(KeyEvent)
      */
+    @Override
     public void keyReleased(final KeyEvent ke) {
         if (isBusy(identifiedView)) {
             return;
@@ -170,7 +169,7 @@ public class InteractionHandler implemen
 
         try {
             if (lastTyped == null && ke.getKeyCode() != KeyEvent.VK_SHIFT && ke.getKeyCode() != KeyEvent.VK_ALT
-                    && ke.getKeyCode() != KeyEvent.VK_CONTROL) {
+                && ke.getKeyCode() != KeyEvent.VK_CONTROL) {
                 if (ke.getKeyCode() >= KeyEvent.VK_0 && ke.getKeyCode() <= KeyEvent.VK_DIVIDE) {
                     LOG.error("no type event for '" + KeyEvent.getKeyText(ke.getKeyCode()) + "':  " + ke);
                 }
@@ -186,11 +185,12 @@ public class InteractionHandler implemen
     }
 
     /**
-     * Listener for key press, and subsequent release, and forward it as one event to the view that has the
-     * keyboard focus.
+     * Listener for key press, and subsequent release, and forward it as one event to the view that has the keyboard
+     * focus.
      * 
      * @see java.awt.event.KeyListener#keyTyped(KeyEvent)
      */
+    @Override
     public void keyTyped(final KeyEvent ke) {
         if (isBusy(identifiedView)) {
             return;
@@ -219,6 +219,7 @@ public class InteractionHandler implemen
      * 
      * @see java.awt.event.MouseListener#mouseClicked(MouseEvent)
      */
+    @Override
     public void mouseClicked(final MouseEvent me) {
         if (isBusy(identifiedView)) {
             return;
@@ -244,7 +245,8 @@ public class InteractionHandler implemen
     private void overlayClick(final Click click) {
         final View overlayView = viewer.getOverlayView();
         if (overlayView == identifiedView
-                || (identifiedView != null && identifiedView.getParent() != null && overlayView == identifiedView.getParent())) {
+            || (identifiedView != null && identifiedView.getParent() != null && overlayView == identifiedView
+                .getParent())) {
             viewer.firstClick(click);
         } else {
             viewer.clearAction();
@@ -269,29 +271,29 @@ public class InteractionHandler implemen
         viewer.setKeyboardFocus(identifiedView);
 
         switch (clickCount) {
-        case 1:
-            viewer.firstClick(click);
-            break;
+            case 1:
+                viewer.firstClick(click);
+                break;
 
-        case 2:
-            viewer.secondClick(click);
-            break;
+            case 2:
+                viewer.secondClick(click);
+                break;
 
-        case 3:
-            viewer.thirdClick(click);
-            break;
+            case 3:
+                viewer.thirdClick(click);
+                break;
 
-        default:
-            break;
+            default:
+                break;
         }
     }
 
     /**
-     * Responds to mouse dragged according to the button used. If the left button then identified view is
-     * moved.
+     * Responds to mouse dragged according to the button used. If the left button then identified view is moved.
      * 
      * @see java.awt.event.MouseMotionListener#mouseDragged(MouseEvent)
      */
+    @Override
     public void mouseDragged(final MouseEvent me) {
         if (isBusy(identifiedView)) {
             return;
@@ -329,22 +331,27 @@ public class InteractionHandler implemen
      * 
      * @see java.awt.event.MouseListener#mouseEntered(MouseEvent)
      */
-    public void mouseEntered(final MouseEvent arg0) {}
+    @Override
+    public void mouseEntered(final MouseEvent arg0) {
+    }
 
     /**
      * event ignored
      * 
      * @see java.awt.event.MouseListener#mouseExited(MouseEvent)
      */
-    public void mouseExited(final MouseEvent arg0) {}
+    @Override
+    public void mouseExited(final MouseEvent arg0) {
+    }
 
     /**
-     * responds to mouse moved event by setting the view found underneath the mouse as the idetified view.
-     * Views normally respond by changing the colour of themselves so they are visual distinct and hence shows
-     * itself as special compared to the rest.
+     * responds to mouse moved event by setting the view found underneath the mouse as the idetified view. Views
+     * normally respond by changing the colour of themselves so they are visual distinct and hence shows itself as
+     * special compared to the rest.
      * 
      * @see java.awt.event.MouseMotionListener#mouseMoved(MouseEvent)
      */
+    @Override
     public void mouseMoved(final MouseEvent me) {
         try {
             if (drag == null) {
@@ -398,12 +405,12 @@ public class InteractionHandler implemen
     }
 
     /**
-     * Responds to the mouse pressed event (with the left button pressed) by initiating a drag. This sets up
-     * the <code>View</code>'s dragging state to the view that the mouse was over when the button was
-     * pressed.
+     * Responds to the mouse pressed event (with the left button pressed) by initiating a drag. This sets up the
+     * <code>View</code>'s dragging state to the view that the mouse was over when the button was pressed.
      * 
      * @see java.awt.event.MouseListener#mousePressed(MouseEvent)
      */
+    @Override
     public void mousePressed(final MouseEvent me) {
         try {
             if (isBusy(identifiedView)) {
@@ -443,13 +450,14 @@ public class InteractionHandler implemen
     }
 
     /**
-     * Responds to the mouse released event (with the left button pressed) by telling the identified view (the
-     * drop zone) that the dragged object is being dropped on it (via the views <code>drop</code> method).
-     * If the drop takes place outside of all of the other views then the <code>workspaceDrop</code> method
-     * is called instead to indicate a drop onto the workspace.
+     * Responds to the mouse released event (with the left button pressed) by telling the identified view (the drop
+     * zone) that the dragged object is being dropped on it (via the views <code>drop</code> method). If the drop takes
+     * place outside of all of the other views then the <code>workspaceDrop</code> method is called instead to indicate
+     * a drop onto the workspace.
      * 
      * @see java.awt.event.MouseListener#mouseReleased(MouseEvent)
      */
+    @Override
     public void mouseReleased(final MouseEvent me) {
         if (isBusy(identifiedView) || downAt == null) {
             return;

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/awt/KeyboardManager.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/awt/KeyboardManager.java?rev=1098945&r1=1098944&r2=1098945&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/awt/KeyboardManager.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/awt/KeyboardManager.java Tue May  3 07:18:19 2011
@@ -17,20 +17,18 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.dnd.awt;
 
 import java.awt.event.InputEvent;
 import java.awt.event.KeyEvent;
 
-import org.apache.log4j.Logger;
 import org.apache.isis.core.commons.exceptions.IsisException;
 import org.apache.isis.viewer.dnd.drawing.Location;
 import org.apache.isis.viewer.dnd.interaction.KeyboardActionImpl;
 import org.apache.isis.viewer.dnd.view.FocusManager;
 import org.apache.isis.viewer.dnd.view.KeyboardAction;
 import org.apache.isis.viewer.dnd.view.View;
-
+import org.apache.log4j.Logger;
 
 public class KeyboardManager {
     private static final Logger LOG = Logger.getLogger(KeyboardManager.class);
@@ -95,10 +93,10 @@ public class KeyboardManager {
             return;
         }
         /*
-         * if(keyCode == KeyEvent.VK_ENTER) { //viewer.firstClick(new Click(keyboardFocus,
-         * keyboardFocus.getLocation(), modifiers)); Location location = keyboardFocus.getAbsoluteLocation();
-         * location.add(1, 1); viewer.secondClick(new Click(keyboardFocus, location, modifiers));
-         * //viewer.thirdClick(new Click(keyboardFocus, keyboardFocus.getLocation(), modifiers)); return; }
+         * if(keyCode == KeyEvent.VK_ENTER) { //viewer.firstClick(new Click(keyboardFocus, keyboardFocus.getLocation(),
+         * modifiers)); Location location = keyboardFocus.getAbsoluteLocation(); location.add(1, 1);
+         * viewer.secondClick(new Click(keyboardFocus, location, modifiers)); //viewer.thirdClick(new
+         * Click(keyboardFocus, keyboardFocus.getLocation(), modifiers)); return; }
          */
 
         if (keyCode == KeyEvent.VK_F4 && (modifiers & InputEvent.CTRL_MASK) == InputEvent.CTRL_MASK) {
@@ -144,21 +142,21 @@ public class KeyboardManager {
         }
 
         switch (action) {
-        case KeyboardAction.NEXT_VIEW:
-            focusManager.focusNextView();
-            // focusNextSubview(keyboardFocus);
-            break;
-        case KeyboardAction.PREVIOUS_VIEW:
-            focusManager.focusPreviousView();
-            // focusPreviousSubview(keyboardFocus);
-            break;
-        case KeyboardAction.NEXT_WINDOW:
-            focusManager.focusParentView();
-            // focusNextRootView(keyboardFocus);
-            break;
-        case KeyboardAction.PREVIOUS_WINDOW:
-            focusManager.focusFirstChildView();
-            break;
+            case KeyboardAction.NEXT_VIEW:
+                focusManager.focusNextView();
+                // focusNextSubview(keyboardFocus);
+                break;
+            case KeyboardAction.PREVIOUS_VIEW:
+                focusManager.focusPreviousView();
+                // focusPreviousSubview(keyboardFocus);
+                break;
+            case KeyboardAction.NEXT_WINDOW:
+                focusManager.focusParentView();
+                // focusNextRootView(keyboardFocus);
+                break;
+            case KeyboardAction.PREVIOUS_WINDOW:
+                focusManager.focusFirstChildView();
+                break;
         }
     }
 



Mime
View raw message