You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2016/05/21 07:10:17 UTC
[16/56] [abbrv] [partial] isis git commit: ISIS-1335: deleting the
mothballed directory.
http://git-wip-us.apache.org/repos/asf/isis/blob/a43dbdd9/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/GlobalViewFactory.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/GlobalViewFactory.java b/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/GlobalViewFactory.java
deleted file mode 100644
index 6d52c9f..0000000
--- a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/GlobalViewFactory.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.viewer.dnd.view;
-
-import java.util.Enumeration;
-
-import org.apache.isis.core.commons.debug.DebuggableWithTitle;
-import org.apache.isis.viewer.dnd.drawing.Location;
-
-/*
- * TODO this factory should always create views, not provide specifications; alternatively, this should be
- * called something else and always return the specification The caller would then need to call the create
- * method to create the object. The only case that would be slightly different would be the DragOutline one as
- * the Axis is never used.
- */
-public interface GlobalViewFactory extends DebuggableWithTitle {
-
- void addSpecification(ViewSpecification spec);
-
- Enumeration<ViewSpecification> availableViews(ViewRequirement viewRequirement);
-
- Enumeration<ViewSpecification> availableDesigns(ViewRequirement viewRequirement);
-
- View createDragViewOutline(View view);
-
- DragEvent createDragContentOutline(View view, Location location);
-
- View createMinimizedView(View view);
-
- View createDialog(Content content);
-
- View createView(ViewRequirement requirement);
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/a43dbdd9/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/InteractionSpy.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/InteractionSpy.java b/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/InteractionSpy.java
deleted file mode 100644
index 34e6d98..0000000
--- a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/InteractionSpy.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.viewer.dnd.view;
-
-import org.apache.isis.viewer.dnd.drawing.Bounds;
-import org.apache.isis.viewer.dnd.drawing.Location;
-
-public class InteractionSpy {
- private int actionCount;
- private String damagedArea;
- private int event;
- private final String label[][] = new String[2][20];
- private final InteractionSpyWindow spyWindow;
- private final String[] trace = new String[60];
- private int traceIndex;
- private boolean isVisible;
-
- public InteractionSpy(final InteractionSpyWindow spyWindow) {
- this.spyWindow = spyWindow;
- }
-
- public void addAction(final String action) {
- if (isVisible) {
- set(actionCount++, "Action", action);
- }
- }
-
- public void addDamagedArea(final Bounds bounds) {
- if (isVisible) {
- damagedArea += bounds + "; ";
- set(7, "Damaged areas", damagedArea);
- }
- }
-
- public void addTrace(final String message) {
- if (isVisible && traceIndex < trace.length) {
- trace[traceIndex] = message;
- traceIndex++;
- }
- }
-
- public void addTrace(final View view, final String message, final Object object) {
- if (isVisible && traceIndex < trace.length) {
- trace[traceIndex] = view.getClass().getName() + " " + message + ": " + object;
- traceIndex++;
- }
- }
-
- public void close() {
- if (isVisible) {
- spyWindow.close();
- isVisible = false;
- }
- }
-
- public void reset() {
- if (isVisible) {
- event++;
- traceIndex = 0;
- actionCount = 8;
- damagedArea = "";
- setDownAt(null);
- for (int i = actionCount; i < label[0].length; i++) {
- label[0][i] = null;
- label[1][i] = null;
- }
- }
- }
-
- private void set(final int index, final String label, final Object debug) {
- if (spyWindow != null) {
- this.label[0][index] = debug == null ? null : label + ":";
- this.label[1][index] = debug == null ? null : debug.toString();
-
- spyWindow.display(event, this.label, trace, traceIndex);
- }
- }
-
- public void setAbsoluteLocation(final Location absoluteLocation) {
- if (isVisible) {
- set(6, "Absolute view location", absoluteLocation);
- }
- }
-
- public void setDownAt(final Location downAt) {
- if (isVisible) {
- set(0, "Down at", downAt);
- }
- }
-
- public void setLocationInView(final Location internalLocation) {
- if (isVisible) {
- set(3, "Relative mouse location", internalLocation);
- }
- }
-
- public void setLocationInViewer(final Location mouseLocation) {
- if (isVisible) {
- set(1, "Mouse location", mouseLocation);
- }
- }
-
- public void setOver(final Object data) {
- if (isVisible) {
- set(2, "Mouse over", data);
- }
- }
-
- public void setType(final ViewAreaType type) {
- if (isVisible) {
- set(4, "Area type", type);
- }
- }
-
- public void setViewLocation(final Location locationWithinViewer) {
- if (isVisible) {
- set(5, "View location", locationWithinViewer);
- }
- }
-
- public void open() {
- if (!isVisible) {
- spyWindow.open();
- isVisible = true;
- }
- }
-
- public boolean isVisible() {
- return isVisible;
- }
-
- public void redraw(final String redrawArea, final int redrawCount) {
- set(8, "Redraw", "#" + redrawCount + " " + redrawArea);
- damagedArea = "";
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/a43dbdd9/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/InteractionSpyWindow.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/InteractionSpyWindow.java b/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/InteractionSpyWindow.java
deleted file mode 100644
index 882b956..0000000
--- a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/InteractionSpyWindow.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.viewer.dnd.view;
-
-public interface InteractionSpyWindow {
-
- void close();
-
- void display(int event, String label[][], String[] trace, int traceIndex);
-
- void open();
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/a43dbdd9/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/InternalDrag.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/InternalDrag.java b/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/InternalDrag.java
deleted file mode 100644
index 4f1ac7f..0000000
--- a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/InternalDrag.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.viewer.dnd.view;
-
-import org.apache.isis.viewer.dnd.drawing.Location;
-
-/**
- * Details a drag event that is internal to view.
- */
-public interface InternalDrag extends Drag {
- Location getLocation();
-
- View getOverlay();
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/a43dbdd9/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/KeyboardAction.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/KeyboardAction.java b/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/KeyboardAction.java
deleted file mode 100644
index b7eb41e..0000000
--- a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/KeyboardAction.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.viewer.dnd.view;
-
-public interface KeyboardAction {
- public static final int NONE = 0;
- public static final int ABORT = 1;
- public static final int NEXT_VIEW = 2;
- public static final int NEXT_WINDOW = 3;
- public static final int PREVIOUS_VIEW = 4;
- public final static int PREVIOUS_WINDOW = 5;
-
- int getKeyCode();
-
- char getKeyChar();
-
- int getModifiers();
-
- void consume();
-
- boolean isConsumed();
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/a43dbdd9/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/Look.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/Look.java b/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/Look.java
deleted file mode 100644
index 97743fd..0000000
--- a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/Look.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.viewer.dnd.view;
-
-public interface Look {
- void install();
-
- String getName();
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/a43dbdd9/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/MenuOptions.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/MenuOptions.java b/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/MenuOptions.java
deleted file mode 100644
index 90d9d6f..0000000
--- a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/MenuOptions.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.viewer.dnd.view;
-
-public interface MenuOptions {
-
- public abstract void menuOptions(final UserActionSet options);
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/a43dbdd9/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/ObjectContent.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/ObjectContent.java b/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/ObjectContent.java
deleted file mode 100644
index 86f5263..0000000
--- a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/ObjectContent.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.viewer.dnd.view;
-
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.consent.Consent;
-
-public interface ObjectContent extends Content {
-
- Consent canClear();
-
- Consent canSet(final ObjectAdapter dragSource);
-
- void clear();
-
- ObjectAdapter getObject();
-
- void setObject(final ObjectAdapter object);
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/a43dbdd9/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/Placement.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/Placement.java b/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/Placement.java
deleted file mode 100644
index 18bae8d..0000000
--- a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/Placement.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.viewer.dnd.view;
-
-import org.apache.isis.viewer.dnd.drawing.Location;
-import org.apache.isis.viewer.dnd.drawing.Size;
-
-/**
- * Used to determine the placement of a new view on the workspace. It can be: an
- * absolute placement given a Location; a position relative to a given view; or
- * in the center. A relative placement uses the PlacementStrategy to determine
- * an optimum location.
- */
-public class Placement {
- private static final int ABSOLUTE = 1;
- private static final int RELATIVE = 2;
- public static final int CENTER = 3;
- private static PlacementStrategy placementStrategy = new PlacementStrategyImpl();
- private final Location location;
- private final View relativeTo;
- private final int position;
-
- public Placement(final Location location) {
- this.location = location;
- relativeTo = null;
- position = ABSOLUTE;
- }
-
- public Placement(final View relativeTo) {
- this.relativeTo = relativeTo.getView();
- location = null;
- position = RELATIVE;
- }
-
- public Placement(final int position) {
- this.relativeTo = null;
- location = null;
- this.position = position;
- }
-
- private Location center(final View workspace, final View view) {
- final Size rootSize = workspace.getSize();
- final Location location = new Location(rootSize.getWidth() / 2, rootSize.getHeight() / 2);
- final Size dialogSize = view.getRequiredSize(new Size(rootSize));
- location.subtract(dialogSize.getWidth() / 2, dialogSize.getHeight() / 2);
- return location;
- }
-
- public void position(final Workspace workspace, final View view) {
- switch (position) {
- case ABSOLUTE:
- view.setLocation(location);
- break;
-
- case RELATIVE:
- view.setLocation(placementStrategy.determinePlacement(workspace, relativeTo, view));
- break;
-
- case CENTER:
- view.setLocation(center(workspace, view));
- break;
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/a43dbdd9/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/PlacementStrategy.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/PlacementStrategy.java b/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/PlacementStrategy.java
deleted file mode 100644
index 24260fc..0000000
--- a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/PlacementStrategy.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.viewer.dnd.view;
-
-import org.apache.isis.viewer.dnd.drawing.Location;
-
-/**
- * Determines an option location for a new view relative to an existing view,
- *
- * @see Placement
- */
-public interface PlacementStrategy {
- Location determinePlacement(Workspace workspace, final View relativeToView, final View view);
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/a43dbdd9/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/PlacementStrategyImpl.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/PlacementStrategyImpl.java b/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/PlacementStrategyImpl.java
deleted file mode 100644
index c368b52..0000000
--- a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/PlacementStrategyImpl.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.viewer.dnd.view;
-
-import org.apache.isis.viewer.dnd.drawing.Location;
-import org.apache.isis.viewer.dnd.drawing.Size;
-
-// TODO move out of this package and inject it
-public class PlacementStrategyImpl implements PlacementStrategy {
- private static final int PADDING = 10;
-
- @Override
- public Location determinePlacement(final Workspace workspace, final View relativeToView, final View newView) {
- if (relativeToView == null) {
- return new Location();
- }
-
- final Size workspaceSize = workspace.getSize();
- final View rootView = rootView(workspace, relativeToView);
- final Location rootViewLocation = rootView.getLocation();
- final Size rootViewSize = rootView.getSize();
- final Location newLocation = new Location(rootViewLocation);
- final Size requiredSize = newView.getView().getRequiredSize(Size.createMax());
-
- if (rootViewLocation.getX() + rootViewSize.getWidth() + PADDING + requiredSize.getWidth() < workspaceSize.getWidth()) {
- newLocation.add(rootViewSize.getWidth() + PADDING, 0);
- } else if (rootViewLocation.getY() + rootViewSize.getHeight() + PADDING + requiredSize.getHeight() < workspaceSize.getHeight()) {
- newLocation.add(0, rootViewSize.getHeight() + PADDING);
- } else if (requiredSize.getWidth() + PADDING < rootViewLocation.getX()) {
- newLocation.subtract(requiredSize.getWidth() + PADDING, 0);
- } else if (requiredSize.getHeight() + PADDING < rootViewLocation.getY()) {
- newLocation.subtract(0, requiredSize.getHeight() + PADDING);
- } else {
- newLocation.add(PADDING * 6, PADDING * 6);
- }
-
- final int maxSpaceToLeft = workspaceSize.getWidth() - requiredSize.getWidth();
- final int maxSpaceAbove = workspaceSize.getHeight() - requiredSize.getHeight();
-
- ensureWidth(newLocation, maxSpaceToLeft);
- ensureHeight(newLocation, maxSpaceAbove);
-
- final Location firstAttempt = new Location(newLocation);
-
- while (workspace.subviewFor(newLocation) != null && workspace.subviewFor(newLocation).getLocation().equals(newLocation)) {
- newLocation.add(PADDING * 4, PADDING * 4);
- ensureWidth(newLocation, maxSpaceToLeft);
- ensureHeight(newLocation, maxSpaceAbove);
-
- if (newLocation.equals(firstAttempt)) {
- break;
- }
- }
- return newLocation;
- }
-
- private void ensureHeight(final Location ofLocation, final int availableHeight) {
- final int yoffset = availableHeight - ofLocation.getY();
- if (yoffset < 0) {
- ofLocation.add(0, yoffset);
- ofLocation.setY(Math.max(0, ofLocation.getY()));
- }
- }
-
- private void ensureWidth(final Location ofLocation, final int availableWifth) {
- final int xoffset = availableWifth - ofLocation.getX();
- if (xoffset < 0) {
- ofLocation.add(xoffset, 0);
- ofLocation.setX(Math.max(0, ofLocation.getX()));
- }
- }
-
- private View rootView(final View workspace, final View relativeTo) {
- final View parent = relativeTo.getParent().getView();
- return parent == null || parent == workspace ? relativeTo : rootView(workspace, parent);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/a43dbdd9/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/Selectable.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/Selectable.java b/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/Selectable.java
deleted file mode 100644
index 04fa82c..0000000
--- a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/Selectable.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.viewer.dnd.view;
-
-public interface Selectable {
-
- int getId();
-
- void setSelectedNode(View selectedView);
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/a43dbdd9/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/ShutdownListener.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/ShutdownListener.java b/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/ShutdownListener.java
deleted file mode 100644
index f6a0b33..0000000
--- a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/ShutdownListener.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.viewer.dnd.view;
-
-public interface ShutdownListener {
-
- void quit();
-
- void logOut();
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/a43dbdd9/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/SubviewDecorator.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/SubviewDecorator.java b/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/SubviewDecorator.java
deleted file mode 100644
index d342f22..0000000
--- a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/SubviewDecorator.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.viewer.dnd.view;
-
-public interface SubviewDecorator {
- ViewAxis createAxis(Content content);
-
- View decorate(Axes axes, View view);
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/a43dbdd9/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/Toolkit.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/Toolkit.java b/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/Toolkit.java
deleted file mode 100644
index f761721..0000000
--- a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/Toolkit.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.viewer.dnd.view;
-
-import org.apache.isis.core.commons.exceptions.IsisException;
-import org.apache.isis.viewer.dnd.drawing.Color;
-import org.apache.isis.viewer.dnd.drawing.ColorsAndFonts;
-import org.apache.isis.viewer.dnd.drawing.Text;
-
-public abstract class Toolkit {
- public static boolean debug = false;
- private static Toolkit instance;
-
- public static int defaultBaseline() {
- return getInstance().colorsAndFonts.defaultBaseline();
- }
-
- public static int defaultFieldHeight() {
- return getInstance().colorsAndFonts.defaultFieldHeight();
- }
-
- public static Color getColor(final int rgbColor) {
- return getInstance().colorsAndFonts.getColor(rgbColor);
- }
-
- public static Color getColor(final String name) {
- final Color color = getInstance().colorsAndFonts.getColor(name);
- if (color == null) {
- throw new IsisException("No such color: " + name);
- }
- return color;
- }
-
- public static ContentFactory getContentFactory() {
- return getInstance().contentFactory;
- }
-
- protected static Toolkit getInstance() {
- return instance;
- }
-
- public static Text getText(final String name) {
- final Text text = getInstance().colorsAndFonts.getText(name);
- if (text == null) {
- throw new IsisException("No such text style: " + name);
- }
- return text;
- }
-
- public static Viewer getViewer() {
- return getInstance().viewer;
- }
-
- public static Feedback getFeedbackManager() {
- return getInstance().feedbackManager;
- }
-
- public static GlobalViewFactory getViewFactory() {
- return getInstance().viewFactory;
- }
-
- protected ContentFactory contentFactory;
- protected ColorsAndFonts colorsAndFonts;
- protected Viewer viewer;
- protected Feedback feedbackManager;
- protected GlobalViewFactory viewFactory;
-
- protected Toolkit() {
- if (instance != null) {
- throw new IllegalStateException("Toolkit already instantiated");
- }
- instance = this;
- init();
- }
-
- protected abstract void init();
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/a43dbdd9/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/UndoStack.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/UndoStack.java b/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/UndoStack.java
deleted file mode 100644
index 586f450..0000000
--- a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/UndoStack.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.viewer.dnd.view;
-
-import java.util.Vector;
-
-public class UndoStack {
-
- private final Vector<Command> commands = new Vector<Command>();
-
- public void add(final Command command) {
- commands.addElement(command);
- command.execute();
- }
-
- public void undoLastCommand() {
- final Command lastCommand = commands.lastElement();
- lastCommand.undo();
- commands.removeElement(lastCommand);
- }
-
- public String descriptionOfUndo() {
- final Command lastCommand = commands.lastElement();
- return lastCommand.getDescription();
- }
-
- public boolean isEmpty() {
- return commands.isEmpty();
- }
-
- public String getNameOfUndo() {
- final Command lastCommand = commands.lastElement();
- return lastCommand.getName();
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/a43dbdd9/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/UserAction.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/UserAction.java b/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/UserAction.java
deleted file mode 100644
index 240492c..0000000
--- a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/UserAction.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.viewer.dnd.view;
-
-import org.apache.isis.core.metamodel.consent.Consent;
-import org.apache.isis.core.metamodel.spec.ActionType;
-import org.apache.isis.viewer.dnd.drawing.Location;
-
-public interface UserAction {
-
- /**
- * Returns the type of action: user, exploration, debug, or a set.
- */
- ActionType getType();
-
- /**
- * Indicate that this action is disabled
- */
- Consent disabled(View view);
-
- /**
- * Invoke this action.
- */
- void execute(Workspace workspace, View view, Location at);
-
- /**
- * Returns the description of the action.
- */
- String getDescription(View view);
-
- /**
- * Returns the help text for the action.
- */
- String getHelp(View view);
-
- /**
- * Returns the name of the action as the user will refer to it.
- */
- String getName(View view);
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/a43dbdd9/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/UserActionSet.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/UserActionSet.java b/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/UserActionSet.java
deleted file mode 100644
index a3d7048..0000000
--- a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/UserActionSet.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * 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.ActionType;
-import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-import org.apache.isis.viewer.dnd.drawing.Color;
-
-public interface UserActionSet extends UserAction {
-
- void add(UserAction userAction);
-
- void addObjectMenuOptions(ObjectAdapter object);
-
- void addCreateOptions(ObjectSpecification specification);
-
- UserActionSet addNewActionSet(String name);
-
- UserActionSet addNewActionSet(String name, ActionType type);
-
- UserAction[] getUserActions();
-
- Color getColor();
-
- void setColor(Color color);
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/a43dbdd9/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/View.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/View.java b/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/View.java
deleted file mode 100644
index 406405d..0000000
--- a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/View.java
+++ /dev/null
@@ -1,396 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.viewer.dnd.view;
-
-import org.apache.isis.core.commons.debug.DebugBuilder;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.consent.Consent;
-import org.apache.isis.core.runtime.userprofile.OptionsClient;
-import org.apache.isis.viewer.dnd.drawing.Bounds;
-import org.apache.isis.viewer.dnd.drawing.Canvas;
-import org.apache.isis.viewer.dnd.drawing.Location;
-import org.apache.isis.viewer.dnd.drawing.Padding;
-import org.apache.isis.viewer.dnd.drawing.Size;
-
-public interface View extends Cloneable, OptionsClient {
-
- void addView(View view);
-
- /**
- * Determines if the user is able to change the held value.
- */
- Consent canChangeValue();
-
- /**
- * Determines whether this view accepts keyboard focus. If so focusLost and
- * focusReceived will be called.
- */
- boolean canFocus();
-
- boolean contains(View view);
-
- boolean containsFocus();
-
- /**
- * Called when the popup menu is being populated for this view. Any content
- * options that need to appear on the menu should be added to the
- * <code>menuOptions</code> object.
- */
- void contentMenuOptions(UserActionSet menuOptions);
-
- void debug(DebugBuilder debug);
-
- void debugStructure(DebugBuilder debug);
-
- /**
- * Called when a view is no longer needed and its resources can be disposed
- * of. Dissociates this view from its parent, and removes itself from the
- * list of views that need to be updated.
- *
- * @see #removeView(View)
- */
- void dispose();
-
- /**
- * Called as mouse is dragged within and without this view. This only occurs
- * when no content or view is being dragged.
- */
- void drag(InternalDrag drag);
-
- void drag(ViewDrag drag);
-
- void dragCancel(InternalDrag drag);
-
- View dragFrom(Location location);
-
- /**
- * Called as the content being dragged is dragged into this view. This only
- * occurs when view contents are being dragged, and not when views
- * themselves are being dragged.
- */
- void dragIn(ContentDrag drag);
-
- /**
- * Called as the content being dragged is dragged out of this view. This
- * only occurs when view contents are being dragged, and not when views
- * themselves are being dragged.
- */
- void dragOut(ContentDrag drag);
-
- DragEvent dragStart(DragStart drag);
-
- /**
- * Called as the drag ends within and without this view. This only occurs
- * when no content or view is being dragged.
- */
- void dragTo(InternalDrag drag);
-
- /**
- * Called by the frame, or the parent view, when this view must redraw
- * itself.
- */
- void draw(Canvas canvas);
-
- /**
- * Called as another view's contents (the source) is dropped on this view's
- * contents (the target). The source view can be obtained from the ViewDrag
- * object.
- */
- void drop(ContentDrag drag);
-
- /**
- * Called as another view (the source) is dropped on this view (the target).
- * The source view can be obtained from the ViewDrag object.
- */
- void drop(ViewDrag drag);
-
- /**
- * Indicates that editing has been completed and the entry should be saved.
- * Will be called by the view manager when other action place within the
- * parent.
- *
- * @param moveFocus
- * flags that focus should be moved from this field after the
- * entry has been processed.
- * @param toNextField
- * flags that the focus should be moved to the next field (if
- * <code>true</code>) or to the previous field (if
- * <code>false</code>). This parameter is ignored if the
- * moveFocus parameter is <code>false</code>.
- */
- void editComplete(boolean moveFocus, boolean toNextField);
-
- /**
- * Called as the mouse crosses the bounds, and ends up inside, of this view.
- * Is also called as the mouse returns into this view from a contained view.
- */
- void entered();
-
- /**
- * Called as the mouse crosses the bounds, and ends up outside, of this
- * view.
- */
- void exited();
-
- /**
- * Called when the user clicks the mouse buttone within this view.
- *
- * @param click
- * the location within the current view where the mouse click
- * took place
- */
- void firstClick(Click click);
-
- void focusLost();
-
- void focusReceived();
-
- Location getAbsoluteLocation();
-
- int getBaseline();
-
- /**
- * Returns the bounding rectangle that describes where (within it parent),
- * and how big, this view is.
- *
- * @see #getSize()
- * @see #getLocation()
- * @return Bounds
- */
- Bounds getBounds();
-
- /**
- * get the object that this view represents
- */
- Content getContent();
-
- FocusManager getFocusManager();
-
- int getId();
-
- /**
- * Determines the location relative to this object's containing view
- *
- * @see #getBounds()
- */
- Location getLocation();
-
- Padding getPadding();
-
- View getParent();
-
- Size getRequiredSize(Size availableSpace);
-
- /**
- * Determines the size of this view.
- *
- * @see #getBounds()
- */
- Size getSize();
-
- ViewSpecification getSpecification();
-
- ViewState getState();
-
- View[] getSubviews();
-
- /**
- * returns the topmost decorator in the chain, or the view itself if not
- * decorated.
- */
- View getView();
-
- Viewer getViewManager();
-
- Axes getViewAxes();
-
- Feedback getFeedbackManager();
-
- Workspace getWorkspace();
-
- boolean hasFocus();
-
- View identify(Location mouseLocation);
-
- /**
- * Flags that the views do not properly represent the content, and hence it
- * needs rebuilding. Contrast this with invalidateLayout(), which deals with
- * an a complete view, but one that is not showing properly.
- *
- * @see #invalidateLayout()
- */
- void invalidateContent();
-
- /**
- * Flags that the views are possibly not displaying the content fully - too
- * small, wrong place etc - although views exists for all the content.
- * Contrast this with invalidateContent(), which deals with an incomplete
- * view.
- *
- * @see #invalidateContent()
- */
- void invalidateLayout();
-
- /**
- * Called when the user presses any key on the keyboard while this view has
- * the focus.
- */
- void keyPressed(KeyboardAction key);
-
- /**
- * Called when the user releases any key on the keyboard while this view has
- * the focus.
- */
- void keyReleased(KeyboardAction action);
-
- /**
- * Called when the user presses a non-control key (i.e. data entry keys and
- * not shift, up-arrow etc). Such a key press will result in a prior call to
- * <code>keyPressed</code> and a subsequent call to <code>keyReleased</code>
- * .
- */
- void keyTyped(KeyboardAction action);
-
- void layout();
-
- /**
- * Limits the bounds of this view (normally when being moved or dropped) so
- * it never extends beyond the bounds of a view of the specified size.
- */
- void limitBoundsWithin(Size size);
-
- void markDamaged();
-
- void markDamaged(Bounds bounds);
-
- /**
- * Called as the mouse button is pressed down within this view. Does
- * nothing; should be overriden when needed. the position relative to the
- * top-left of this view
- */
- void mouseDown(Click click);
-
- /**
- * Called as the mouse is moved around within this view. Does nothing;
- * should be overriden when needed.
- *
- * @param location
- * the position relative to the top-left of this view
- */
- void mouseMoved(Location location);
-
- /**
- * Called as the mouse button is released within this view (assuming that it
- * was pressed in this view). Does nothing; should be overridden when
- * needed.
- */
- void mouseUp(Click click);
-
- /**
- * Called when an action generates a result, allowing this view to decide
- * what to do with it.
- */
- void objectActionResult(ObjectAdapter result, Placement placement);
-
- /**
- * Called as the drag of this view's content starts.
- */
- View pickupContent(Location location);
-
- /**
- * Called as the drag of this view starts.
- */
- View pickupView(Location location);
-
- void print(Canvas canvas);
-
- /**
- * Refreshes this view by reaccessing its content and redisplaying it.
- */
- void refresh();
-
- /**
- * Removes the specifed view from the subviews contained by this view.
- */
- void removeView(View view);
-
- void replaceView(View toReplace, View replacement);
-
- /**
- * Called when the user double-clicked this view. This method will have been
- * preceded by a call to <code>click</code>.
- */
- void secondClick(Click click);
-
- void setBounds(Bounds bounds);
-
- void setFocusManager(FocusManager focusManager);
-
- /**
- * Specifies the location of this view, relative to its enclosing view.
- */
- void setLocation(Location point);
-
- void setParent(View view);
-
- void setSize(Size size);
-
- void setView(View view);
-
- /**
- * Identifies the subview that contains the specified location within its
- * bounds. Returns null if no subview exists for that location.
- */
- View subviewFor(Location location);
-
- /**
- * Called when the user triple-clicks the mouse buttone within this view.
- * This method will have been preceded by a call to <code>doubleClick</code>
- * .
- */
- void thirdClick(Click click);
-
- /**
- * notification that the content of this view has changed
- */
- void update(ObjectAdapter object);
-
- void updateView();
-
- /**
- * Determines if the user is invoking an action relating to this view,
- * rather than to whatever this view represents.
- *
- * @param mouseLocation
- * @return true if the user is targeting the view itself, false if the user
- * is targeting what is being represented
- */
- ViewAreaType viewAreaType(Location mouseLocation);
-
- /**
- * Called when the popup menu is being populated for this view. Any view
- * options that need to appear on the menu should be added to the
- * <code>menuOptions</code> object.
- */
- void viewMenuOptions(UserActionSet menuOptions);
-
- void drag(ContentDrag contentDrag);
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/a43dbdd9/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/ViewAreaType.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/ViewAreaType.java b/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/ViewAreaType.java
deleted file mode 100644
index 4f0e337..0000000
--- a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/ViewAreaType.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.viewer.dnd.view;
-
-public class ViewAreaType {
- public static final ViewAreaType VIEW = new ViewAreaType("View");
- public static final ViewAreaType CONTENT = new ViewAreaType("Content");
- public static final ViewAreaType INTERNAL = new ViewAreaType("Internal");
- private final String name;
-
- public ViewAreaType(final String name) {
- this.name = name;
- }
-
- @Override
- public String toString() {
- return name;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/a43dbdd9/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/ViewAxis.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/ViewAxis.java b/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/ViewAxis.java
deleted file mode 100644
index 9fdfdc0..0000000
--- a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/ViewAxis.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.viewer.dnd.view;
-
-public interface ViewAxis {
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/a43dbdd9/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/ViewConstants.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/ViewConstants.java b/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/ViewConstants.java
deleted file mode 100644
index baf083d..0000000
--- a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/ViewConstants.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.dnd.view;
-
-import org.apache.isis.core.runtime.system.context.IsisContext;
-import org.apache.isis.viewer.dnd.util.Properties;
-
-public final class ViewConstants {
-
- /** Horizontal padding (||) between two components */
- public static final int HPADDING = IsisContext.getConfiguration().getInteger(Properties.PROPERTY_BASE + "hpadding", 3);
- /** Vertical padding (=) between two components */
- public static final int VPADDING = IsisContext.getConfiguration().getInteger(Properties.PROPERTY_BASE + "vpadding", 3);
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/a43dbdd9/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/ViewDrag.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/ViewDrag.java b/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/ViewDrag.java
deleted file mode 100644
index 316efde..0000000
--- a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/ViewDrag.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * 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. The target of a ViewDrag is always
- * the workspace of the source view.
- *
- * <p>
- * An overlay view, as returned by the pickup() method on the source view, is
- * moved by this drag objects so its location follows the pointer by an offset
- * equivalent to the mouse location within the view.
- */
-public interface ViewDrag extends Drag {
-
- View getSourceView();
-
- Location getLocation();
-
- Location getViewDropLocation();
-
- void subtract(int left, int top);
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/a43dbdd9/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/ViewFactory.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/ViewFactory.java b/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/ViewFactory.java
deleted file mode 100644
index e0557b4..0000000
--- a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/ViewFactory.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.viewer.dnd.view;
-
-public interface ViewFactory {
- /**
- * Create a new view to this specification for the specified context, and
- * using the specified axis if specified (which can be null).
- */
-
- View createView(Content content, Axes axes, int sequence);
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/a43dbdd9/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/ViewRequirement.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/ViewRequirement.java b/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/ViewRequirement.java
deleted file mode 100644
index 87fef3f..0000000
--- a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/ViewRequirement.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.viewer.dnd.view;
-
-import org.apache.isis.core.commons.ensure.Assert;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.facetapi.Facet;
-import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-
-public class ViewRequirement {
- public static final int NONE = 0;
- public static final int CLOSED = 0x01;
- // public static final int SUMMARY = 0x02;
- public static final int OPEN = 0x04;
-
- public static final int EDITABLE = 0x10;
-
- public static final int FIXED = 0x100;
- public static final int EXPANDABLE = 0x200;
-
- public static final int ROOT = 0x1000;
- public static final int SUBVIEW = 0x2000;
-
- public static final int DESIGN = 0x10000;
-
- private final Content content;
- private final int status;
-
- public ViewRequirement(final Content content, int status) {
- Assert.assertNotNull(content);
- this.content = content;
- this.status = status;
- status = CLOSED;
- }
-
- public Content getContent() {
- return content;
- }
-
- public boolean is(final int status) {
- return (this.status & status) == status;
- }
-
- public boolean isClosed() {
- return is(CLOSED);
- }
-
- public boolean isOpen() {
- return is(OPEN);
- }
-
- public boolean isFixed() {
- return is(FIXED);
- }
-
- public boolean isExpandable() {
- return is(EXPANDABLE);
- }
-
- public boolean isSubview() {
- return is(SUBVIEW);
- }
-
- public boolean isEditable() {
- return is(EDITABLE);
- }
-
- @Deprecated
- public boolean isDesign() {
- return true;
- }
-
- public boolean isObject() {
- return content.isObject();
- }
-
- public boolean isCollection() {
- return content.isCollection();
- }
-
- public boolean isTextParseable() {
- return content.isTextParseable();
- }
-
- public boolean isFor(final Class<?> cls) {
- return cls.isAssignableFrom(content.getClass());
- }
-
- public boolean hasReference() {
- return content.getAdapter() != null;
- }
-
- public boolean isForValueType(final Class<? extends Facet> cls) {
- final ObjectSpecification specification = content.getSpecification();
- return specification != null && specification.containsFacet(cls);
- }
-
- public ObjectSpecification getSpecification() {
- return content.getAdapter().getSpecification();
- }
-
- public ObjectAdapter getAdapter() {
- return content.getAdapter();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/a43dbdd9/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/ViewSpecification.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/ViewSpecification.java b/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/ViewSpecification.java
deleted file mode 100644
index 05ec850..0000000
--- a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/ViewSpecification.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.viewer.dnd.view;
-
-/**
- * Describes a view, and how it is built.
- */
-public interface ViewSpecification extends ViewFactory {
-
- String getName();
-
- /**
- * Determines if the view created to this specification can display the
- * specified type. Returns true if it can.
- */
- boolean canDisplay(ViewRequirement requirement);
-
- /**
- * Indicates whether views to this specification are open - displaying the
- * attributes of the content object - or are closed - display only the title
- * of the content object.
- */
- boolean isOpen();
-
- /**
- * Indicates whether this view can be replaced with another view (for the
- * same value or reference).
- *
- * @return true if it can be replaced by another view; false if it can't be
- * replaces
- */
- boolean isReplaceable();
-
- boolean isSubView();
-
- /**
- * Return true if the generated views are to have their sizes adjusted so
- * they are consistent with surrounding views.
- */
- // TODO rename
- boolean isAligned();
-
- /**
- * Indicates if this view can handled being resized. If it can't then the
- * viewer can put it in a scroll border.
- */
- boolean isResizeable();
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/a43dbdd9/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/ViewState.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/ViewState.java b/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/ViewState.java
deleted file mode 100644
index cc76f88..0000000
--- a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/ViewState.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.viewer.dnd.view;
-
-public class ViewState implements Cloneable {
- private static final short CAN_DROP = 0x10;
- private static final short CANT_DROP = 0x08;
- private static final short CONTENT_IDENTIFIED = 0x04;
- private static final short ROOT_VIEW_IDENTIFIED = 0x01;
- private static final short VIEW_IDENTIFIED = 0x02;
- private static final short INVALID = 0x40;
- private static final short ACTIVE = 0x20;
- private static final short OUT_OF_SYNCH = 0x80;
-
- private short state;
-
- public void setCanDrop() {
- state |= CAN_DROP;
- }
-
- public void setCantDrop() {
- state |= CANT_DROP;
- }
-
- public void setContentIdentified() {
- state |= CONTENT_IDENTIFIED;
- }
-
- public boolean isObjectIdentified() {
- return (state & CONTENT_IDENTIFIED) > 0;
- }
-
- public void setRootViewIdentified() {
- state |= ROOT_VIEW_IDENTIFIED;
- }
-
- public boolean isRootViewIdentified() {
- return (state & ROOT_VIEW_IDENTIFIED) > 0;
- }
-
- public void setViewIdentified() {
- state |= VIEW_IDENTIFIED;
- }
-
- public boolean isViewIdentified() {
- return (state & VIEW_IDENTIFIED) > 0;
- }
-
- public boolean canDrop() {
- return (state & CAN_DROP) == CAN_DROP;
- }
-
- public boolean cantDrop() {
- return (state & CANT_DROP) == CANT_DROP;
- }
-
- public void clearObjectIdentified() {
- state &= ~(CONTENT_IDENTIFIED | CAN_DROP | CANT_DROP);
- }
-
- public void clearRootViewIdentified() {
- state &= ~ROOT_VIEW_IDENTIFIED;
- }
-
- public void clearViewIdentified() {
- state &= ~(VIEW_IDENTIFIED | CONTENT_IDENTIFIED | CAN_DROP | CANT_DROP);
- }
-
- @Override
- protected Object clone() throws CloneNotSupportedException {
- return super.clone();
- }
-
- @Override
- public String toString() {
- String str = "";
- if (state == 0) {
- str = "Normal";
- } else {
- str += isObjectIdentified() ? "Object-Identified " : "";
- str += isViewIdentified() ? "View-identified " : "";
- str += isRootViewIdentified() ? "Root-view-identified " : "";
- str += canDrop() ? "Can-drop " : "";
- str += cantDrop() ? "Cant-drop " : "";
- str += isActive() ? "Active " : "";
- str += isInvalid() ? "Invalid " : "";
- str += isOutOfSynch() ? "Out-of-synch " : "";
- str += " " + Integer.toBinaryString(state);
- }
- return str;
- }
-
- public void setActive() {
- setFlag(ACTIVE);
- }
-
- public void setInactive() {
- resetFlag(ACTIVE);
- }
-
- public boolean isActive() {
- return isFlagSet(ACTIVE);
- }
-
- private boolean isFlagSet(final short flag) {
- return (state & flag) > 0;
- }
-
- public void clearInvalid() {
- resetFlag(INVALID);
- }
-
- private void setFlag(final short flag) {
- state |= flag;
- }
-
- public void setInvalid() {
- setFlag(INVALID);
- }
-
- private void resetFlag(final short flag) {
- state &= ~flag;
- }
-
- public boolean isInvalid() {
- return isFlagSet(INVALID);
- }
-
- public boolean isOutOfSynch() {
- return isFlagSet(OUT_OF_SYNCH);
- }
-
- public void setOutOfSynch() {
- setFlag(OUT_OF_SYNCH);
- }
-
- public void clearOutOfSynch() {
- resetFlag(OUT_OF_SYNCH);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/a43dbdd9/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/ViewUpdateNotifier.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/ViewUpdateNotifier.java b/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/ViewUpdateNotifier.java
deleted file mode 100644
index ee31241..0000000
--- a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/ViewUpdateNotifier.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.viewer.dnd.view;
-
-import org.apache.isis.core.commons.debug.DebuggableWithTitle;
-
-public interface ViewUpdateNotifier extends DebuggableWithTitle {
-
- void add(View view);
-
- void remove(View view);
-
- void invalidateViewsForChangedObjects();
-
- void removeViewsForDisposedObjects();
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/a43dbdd9/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/Viewer.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/Viewer.java b/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/Viewer.java
deleted file mode 100644
index 27211ca..0000000
--- a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/Viewer.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.viewer.dnd.view;
-
-import org.apache.isis.core.commons.debug.DebuggableWithTitle;
-import org.apache.isis.viewer.dnd.drawing.Background;
-import org.apache.isis.viewer.dnd.drawing.Bounds;
-import org.apache.isis.viewer.dnd.drawing.Location;
-import org.apache.isis.viewer.dnd.drawing.Size;
-
-public interface Viewer {
-
- void markDamaged(final Bounds bounds);
-
- boolean hasFocus(final View view);
-
- UndoStack getUndoStack();
-
- Size getOverlaySize();
-
- void saveCurrentFieldEntry();
-
- void setKeyboardFocus(final View view);
-
- boolean isRunningAsExploration();
-
- boolean isRunningAsPrototype();
-
- void clearAction();
-
- /**
- * Force a repaint of the damaged area of the viewer.
- */
- void scheduleRepaint();
-
- void addToNotificationList(final View view);
-
- void removeFromNotificationList(final View view);
-
- void setBackground(Background background);
-
- InteractionSpy getSpy();
-
- void clearOverlayView();
-
- void clearOverlayView(final View view);
-
- void setOverlayView(final View view);
-
- void showDebugFrame(DebuggableWithTitle[] info, Location at);
-
- void showInOverlay(Content content, Location location);
-
- // TODO should this be an extension?
- String selectFilePath(final String title, final String directory);
-
- void setClipboard(String clip, Class<?> class1);
-
- Object getClipboard(Class<?> class1);
-
- /**
- * Removes views for objects that no longer exist, ie have been deleted.
- */
- void disposeUnneededViews();
-
- void saveOpenObjects();
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/a43dbdd9/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/Workspace.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/Workspace.java b/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/Workspace.java
deleted file mode 100644
index 0270b08..0000000
--- a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/Workspace.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.viewer.dnd.view;
-
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-
-public interface Workspace extends View {
-
- View addIconFor(ObjectAdapter adapter, Placement placement);
-
- View addWindowFor(ObjectAdapter object, Placement placement);
-
- void addWindow(View window, Placement placement);
-
- void addDialog(View dialog, Placement placement);
-
- /**
- * Lower the specified view so it is below all the other views.
- */
- void lower(View view);
-
- /**
- * Raise the specified view so it is above all the other views.
- */
- void raise(View view);
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/a43dbdd9/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/action/AbstractObjectOption.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/action/AbstractObjectOption.java b/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/action/AbstractObjectOption.java
deleted file mode 100644
index a78b7b8..0000000
--- a/mothballed/component/viewer/dnd/impl/src/main/java/org/apache/isis/viewer/dnd/view/action/AbstractObjectOption.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.viewer.dnd.view.action;
-
-import org.apache.isis.applib.annotation.Where;
-import org.apache.isis.core.commons.util.ToString;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.consent.Allow;
-import org.apache.isis.core.metamodel.consent.Consent;
-import org.apache.isis.core.metamodel.consent.Veto;
-import org.apache.isis.core.metamodel.spec.ActionType;
-import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
-import org.apache.isis.core.runtime.system.context.IsisContext;
-import org.apache.isis.viewer.dnd.view.View;
-import org.apache.isis.viewer.dnd.view.option.UserActionAbstract;
-
-public abstract class AbstractObjectOption extends UserActionAbstract {
-
- // REVIEW: confirm this rendering context
- private final Where where = Where.OBJECT_FORMS;
-
- protected final ObjectAction action;
- protected final ObjectAdapter target;
-
- protected AbstractObjectOption(final ObjectAction action, final ObjectAdapter target, final String name) {
- super(name);
- this.action = action;
- this.target = target;
- }
-
- @Override
- public Consent disabled(final View view) {
- final ObjectAdapter adapter = view.getContent().getAdapter();
- if (adapter != null && adapter.isDestroyed()) {
- // TODO: move logic into Facet
- return new Veto("Can't do anything with a destroyed object");
- }
- final Consent usableForUser = action.isUsable(IsisContext.getAuthenticationSession(), target, where);
- if (usableForUser.isVetoed()) {
- return usableForUser;
- }
-
- final Consent validParameters = checkValid();
- if (validParameters != null && validParameters.isVetoed()) {
- return validParameters;
- }
- final String desc = action.getDescription();
- final String description = getName(view) + (desc.length() == 0 ? "" : ": " + desc);
- // TODO: replace with a Facet
- return new Allow(description);
- }
-
- protected Consent checkValid() {
- return null;
- }
-
- @Override
- public String getHelp(final View view) {
- return action.getHelp();
- }
-
- @Override
- public ActionType getType() {
- return action.getType();
- }
-
- @Override
- public String toString() {
- return new ToString(this).append("action", action).toString();
- }
-}