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 2012/01/22 09:05:57 UTC
svn commit: r1234460 [6/30] - in /incubator/isis/trunk/framework/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/...
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/ClosedCollectionNodeSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/ClosedCollectionNodeSpecification.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/ClosedCollectionNodeSpecification.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/ClosedCollectionNodeSpecification.java Sun Jan 22 08:05:17 2012
@@ -29,10 +29,11 @@ import org.apache.isis.viewer.dnd.view.V
import org.apache.isis.viewer.dnd.view.collection.CollectionContent;
/**
- * Specification for a tree node that will display a closed collection as a root node or within an object.
+ * Specification for a tree node that will display a closed collection as a root
+ * node or within an object.
*
- * @see org.apache.isis.viewer.dnd.tree.OpenCollectionNodeSpecification for displaying an open collection within an
- * object.
+ * @see org.apache.isis.viewer.dnd.tree.OpenCollectionNodeSpecification for
+ * displaying an open collection within an object.
*/
public class ClosedCollectionNodeSpecification extends NodeSpecification {
@Override
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/ClosedObjectNodeSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/ClosedObjectNodeSpecification.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/ClosedObjectNodeSpecification.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/ClosedObjectNodeSpecification.java Sun Jan 22 08:05:17 2012
@@ -35,12 +35,13 @@ import org.apache.isis.viewer.dnd.view.V
import org.apache.isis.viewer.dnd.view.border.SelectObjectBorder;
/**
- * Specification for a tree node that will display a closed object as a root node or within an object. This will
- * indicate that the created view can be opened if: one of it fields is a collection; it is set up to show objects
+ * Specification for a tree node that will display a closed object as a root
+ * node or within an object. This will indicate that the created view can be
+ * opened if: one of it fields is a collection; it is set up to show objects
* within objects and one of the fields is an object but it is not a lookup.
*
- * @see org.apache.isis.viewer.dnd.tree.OpenObjectNodeSpecification for displaying an open collection as part of an
- * object.
+ * @see org.apache.isis.viewer.dnd.tree.OpenObjectNodeSpecification for
+ * displaying an open collection as part of an object.
*/
class ClosedObjectNodeSpecification extends NodeSpecification {
private final boolean showObjectContents;
@@ -58,16 +59,13 @@ class ClosedObjectNodeSpecification exte
@Override
public int canOpen(final Content content) {
final ObjectAdapter object = ((ObjectContent) content).getObject();
- final List<ObjectAssociation> fields =
- object.getSpecification().getAssociations(
- ObjectAssociationFilters.dynamicallyVisible(IsisContext.getAuthenticationSession(), object));
+ final List<ObjectAssociation> fields = object.getSpecification().getAssociations(ObjectAssociationFilters.dynamicallyVisible(IsisContext.getAuthenticationSession(), object));
for (int i = 0; i < fields.size(); i++) {
if (fields.get(i).isOneToManyAssociation()) {
return CAN_OPEN;
}
- if (showObjectContents && fields.get(i).isOneToOneAssociation()
- && !(BoundedFacetUtils.isBoundedSet(object.getSpecification()))) {
+ if (showObjectContents && fields.get(i).isOneToOneAssociation() && !(BoundedFacetUtils.isBoundedSet(object.getSpecification()))) {
return CAN_OPEN;
}
}
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/CompositeNodeSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/CompositeNodeSpecification.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/CompositeNodeSpecification.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/CompositeNodeSpecification.java Sun Jan 22 08:05:17 2012
@@ -45,20 +45,21 @@ public abstract class CompositeNodeSpeci
@Override
protected View createNodeView(final Content content, final Axes axes) {
- final CompositeViewUsingBuilder view =
- new CompositeViewUsingBuilder(content, this, axes, createLayout(content, axes), builder);
+ final CompositeViewUsingBuilder view = new CompositeViewUsingBuilder(content, this, axes, createLayout(content, axes), builder);
return view;
}
protected abstract Layout createLayout(Content content, Axes axes);
/*
- * public View createView(final Content content, Axes axes, int fieldNumber) { ViewRequirement requirement = new
- * ViewRequirement(content, ViewRequirement.CLOSED); if (collectionLeafNodeSpecification.canDisplay(content,
- * requirement )) { return collectionLeafNodeSpecification.createView(content, axes, -1); }
+ * public View createView(final Content content, Axes axes, int fieldNumber)
+ * { ViewRequirement requirement = new ViewRequirement(content,
+ * ViewRequirement.CLOSED); if
+ * (collectionLeafNodeSpecification.canDisplay(content, requirement )) {
+ * return collectionLeafNodeSpecification.createView(content, axes, -1); }
*
- * if (objectLeafNodeSpecification.canDisplay(content, requirement)) { return
- * objectLeafNodeSpecification.createView(content, axes, -1); }
+ * if (objectLeafNodeSpecification.canDisplay(content, requirement)) {
+ * return objectLeafNodeSpecification.createView(content, axes, -1); }
*
* return null; }
*/
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/EmptyNodeSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/EmptyNodeSpecification.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/EmptyNodeSpecification.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/EmptyNodeSpecification.java Sun Jan 22 08:05:17 2012
@@ -25,7 +25,8 @@ import org.apache.isis.viewer.dnd.view.V
import org.apache.isis.viewer.dnd.view.ViewRequirement;
/**
- * A simple specification that always returns false when asked if it can display any content.
+ * A simple specification that always returns false when asked if it can display
+ * any content.
*
* @see #canDisplay(ViewRequirement)
*/
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/OpenCollectionNodeSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/OpenCollectionNodeSpecification.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/OpenCollectionNodeSpecification.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/OpenCollectionNodeSpecification.java Sun Jan 22 08:05:17 2012
@@ -30,14 +30,16 @@ import org.apache.isis.viewer.dnd.view.c
import org.apache.isis.viewer.dnd.view.composite.StackLayout;
/**
- * Specification for a tree node that will display an open collection as a root node or within an object.
+ * Specification for a tree node that will display an open collection as a root
+ * node or within an object.
*
- * @see org.apache.isis.viewer.dnd.tree.ClosedCollectionNodeSpecification for displaying a closed collection within an
- * object.
+ * @see org.apache.isis.viewer.dnd.tree.ClosedCollectionNodeSpecification for
+ * displaying a closed collection within an object.
*/
public class OpenCollectionNodeSpecification extends CompositeNodeSpecification {
/**
- * A collection tree can only be displayed for a collection that has elements.
+ * A collection tree can only be displayed for a collection that has
+ * elements.
*/
@Override
public boolean canDisplay(final ViewRequirement requirement) {
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/OpenObjectNodeSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/OpenObjectNodeSpecification.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/OpenObjectNodeSpecification.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/OpenObjectNodeSpecification.java Sun Jan 22 08:05:17 2012
@@ -36,10 +36,11 @@ import org.apache.isis.viewer.dnd.view.c
import org.apache.isis.viewer.dnd.view.composite.StackLayout;
/**
- * Specification for a tree node that will display an open object as a root node or within an object.
+ * Specification for a tree node that will display an open object as a root node
+ * or within an object.
*
- * @see org.apache.isis.viewer.dnd.tree.ClosedObjectNodeSpecification for displaying a closed collection within an
- * object.
+ * @see org.apache.isis.viewer.dnd.tree.ClosedObjectNodeSpecification for
+ * displaying a closed collection within an object.
*/
public class OpenObjectNodeSpecification extends CompositeNodeSpecification {
private final SubviewDecorator decorator = new SelectObjectBorder.Factory();
@@ -54,16 +55,14 @@ public class OpenObjectNodeSpecification
}
/**
- * This is only used to control root nodes. Therefore a object tree can only be displayed for an object with fields
- * that are collections.
+ * This is only used to control root nodes. Therefore a object tree can only
+ * be displayed for an object with fields that are collections.
*/
@Override
public boolean canDisplay(final ViewRequirement requirement) {
if (requirement.isObject() && requirement.hasReference()) {
final ObjectAdapter object = requirement.getAdapter();
- final List<ObjectAssociation> fields =
- object.getSpecification().getAssociations(
- ObjectAssociationFilters.dynamicallyVisible(IsisContext.getAuthenticationSession(), object));
+ final List<ObjectAssociation> fields = object.getSpecification().getAssociations(ObjectAssociationFilters.dynamicallyVisible(IsisContext.getAuthenticationSession(), object));
for (int i = 0; i < fields.size(); i++) {
if (fields.get(i).isOneToManyAssociation()) {
return true;
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/TreeNodeBorder.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/TreeNodeBorder.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/TreeNodeBorder.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/TreeNodeBorder.java Sun Jan 22 08:05:17 2012
@@ -126,10 +126,12 @@ public class TreeNodeBorder extends Abst
final Color secondary2 = Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY2);
final Color secondary3 = Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY3);
/*
- * REVIEW if (getViewAxis(TableAxis.class) != null) { if (((SelectableViewAxis)
- * getViewAxis(SelectableViewAxis.class)).isSelected(getView())) { canvas.drawSolidRectangle(left, 0,
- * getSize().getWidth() - left, top, Toolkit.getColor(ColorsAndFonts.COLOR_PRIMARY2)); secondary2 = secondary1;
- * } }
+ * REVIEW if (getViewAxis(TableAxis.class) != null) { if
+ * (((SelectableViewAxis)
+ * getViewAxis(SelectableViewAxis.class)).isSelected(getView())) {
+ * canvas.drawSolidRectangle(left, 0, getSize().getWidth() - left, top,
+ * Toolkit.getColor(ColorsAndFonts.COLOR_PRIMARY2)); secondary2 =
+ * secondary1; } }
*/
if (getState().isObjectIdentified()) {
canvas.drawRectangle(left, 0, getSize().getWidth() - left, top, secondary2);
@@ -150,8 +152,7 @@ public class TreeNodeBorder extends Abst
if (addBox) {
x += BOX_X_OFFSET;
canvas.drawLine(x, y, x + BOX_SIZE - 1, y, secondary3);
- canvas.drawSolidRectangle(x, y - BOX_SIZE / 2, BOX_SIZE, BOX_SIZE,
- Toolkit.getColor(ColorsAndFonts.COLOR_WHITE));
+ canvas.drawSolidRectangle(x, y - BOX_SIZE / 2, BOX_SIZE, BOX_SIZE, Toolkit.getColor(ColorsAndFonts.COLOR_WHITE));
canvas.drawRectangle(x, y - BOX_SIZE / 2, BOX_SIZE, BOX_SIZE, secondary1);
if (canOpen == NodeSpecification.UNKNOWN) {
@@ -221,8 +222,9 @@ public class TreeNodeBorder extends Abst
getParent().replaceView(getView(), newView);
}
/*
- * } else if (y < top && x > left && click.button1()) { if (canOpen() == NodeSpecification.UNKNOWN) {
- * resolveContent(); markDamaged(); } selectNode();
+ * } else if (y < top && x > left && click.button1()) { if
+ * (canOpen() == NodeSpecification.UNKNOWN) { resolveContent();
+ * markDamaged(); } selectNode();
*/
} else {
super.firstClick(click);
@@ -294,7 +296,8 @@ public class TreeNodeBorder extends Abst
// TODO remove
private void selectNode() {
/*
- * if (getViewAxis(SelectableViewAxis.class) != null) { ((SelectableViewAxis)
+ * if (getViewAxis(SelectableViewAxis.class) != null) {
+ * ((SelectableViewAxis)
* getViewAxis(SelectableViewAxis.class)).selected(getView()); }
*/
}
@@ -344,7 +347,6 @@ public class TreeNodeBorder extends Abst
}
private boolean withinBox(final int x, final int y) {
- return x >= BOX_X_OFFSET && x <= BOX_X_OFFSET + BOX_SIZE && y >= (top - BOX_SIZE) / 2
- && y <= (top + BOX_SIZE) / 2;
+ return x >= BOX_X_OFFSET && x <= BOX_X_OFFSET + BOX_SIZE && y >= (top - BOX_SIZE) / 2 && y <= (top + BOX_SIZE) / 2;
}
}
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/TreeSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/TreeSpecification.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/TreeSpecification.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/TreeSpecification.java Sun Jan 22 08:05:17 2012
@@ -26,14 +26,16 @@ import org.apache.isis.viewer.dnd.view.V
import org.apache.isis.viewer.dnd.view.ViewSpecification;
/**
- * Specification for a tree browser frame with a tree displaying only collections and objects containing collections.
+ * Specification for a tree browser frame with a tree displaying only
+ * collections and objects containing collections.
*/
public class TreeSpecification implements ViewSpecification {
private final OpenCollectionNodeSpecification openCollection;
private final OpenObjectNodeSpecification openObject;
public TreeSpecification() {
- final ClosedObjectNodeSpecification closedObject = new ClosedObjectNodeSpecification(false); // , new
+ final ClosedObjectNodeSpecification closedObject = new ClosedObjectNodeSpecification(false); // ,
+ // new
// SelectObjectBorder.Factory());
final NodeSpecification closedCollection = new ClosedCollectionNodeSpecification();
final EmptyNodeSpecification noNode = new EmptyNodeSpecification();
@@ -55,9 +57,7 @@ public class TreeSpecification implement
@Override
public boolean canDisplay(final ViewRequirement requirement) {
- return requirement.is(ViewRequirement.OPEN)
- && (openCollection.canDisplay(requirement) || openObject.canDisplay(requirement))
- && requirement.isExpandable();
+ return requirement.is(ViewRequirement.OPEN) && (openCollection.canDisplay(requirement) || openObject.canDisplay(requirement)) && requirement.isExpandable();
}
@Override
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree2/CollectionTreeNodeSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree2/CollectionTreeNodeSpecification.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree2/CollectionTreeNodeSpecification.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree2/CollectionTreeNodeSpecification.java Sun Jan 22 08:05:17 2012
@@ -41,8 +41,7 @@ public class CollectionTreeNodeSpecifica
collectionNodeSpec.addSubviewDecorator(new ExpandableViewBorder.Factory(iconSpec, objectNodeSpec, null));
collectionNodeSpec.addViewDecorator(new IconBorder.Factory(Toolkit.getText(ColorsAndFonts.TEXT_NORMAL)));
objectNodeSpec.addSubviewDecorator(new SelectObjectBorder.Factory());
- objectNodeSpec.addSubviewDecorator(new ExpandableViewBorder.Factory(iconSpec, objectNodeSpec,
- collectionNodeSpec));
+ objectNodeSpec.addSubviewDecorator(new ExpandableViewBorder.Factory(iconSpec, objectNodeSpec, collectionNodeSpec));
// objectNodeSpec.addSubviewDecorator(new FieldLabelsDecorator());
objectNodeSpec.addViewDecorator(new IconBorder.Factory(Toolkit.getText(ColorsAndFonts.TEXT_NORMAL)));
return new ViewSpecification[] { collectionNodeSpec, objectNodeSpec };
@@ -60,8 +59,10 @@ public class CollectionTreeNodeSpecifica
// TODO this should be available if an item can be given more space
/*
- * @Override public boolean canDisplay(final Content content, ViewRequirement requirement) { return
- * content.isCollection() && requirement.is(ViewRequirement.CLOSED) && requirement.is(ViewRequirement.SUBVIEW) &&
+ * @Override public boolean canDisplay(final Content content,
+ * ViewRequirement requirement) { return content.isCollection() &&
+ * requirement.is(ViewRequirement.CLOSED) &&
+ * requirement.is(ViewRequirement.SUBVIEW) &&
* requirement.is(ViewRequirement.SUBVIEW); }
*/
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/util/Properties.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/util/Properties.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/util/Properties.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/util/Properties.java Sun Jan 22 08:05:17 2012
@@ -74,8 +74,7 @@ public class Properties {
y = Integer.valueOf(st.nextToken().trim()).intValue();
return new Location(x, y);
} else {
- throw new IsisConfigurationException("Location not specified correctly in " + name + ": "
- + initialLocation);
+ throw new IsisConfigurationException("Location not specified correctly in " + name + ": " + initialLocation);
}
}
return defaultLocation;
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/Content.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/Content.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/Content.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/Content.java Sun Jan 22 08:05:17 2012
@@ -33,7 +33,8 @@ public interface Content {
Consent canDrop(Content sourceContent);
/**
- * Allows this content to add menu options to the set of menu options the user will see for this content.
+ * Allows this content to add menu options to the set of menu options the
+ * user will see for this content.
*
* @see #viewMenuOptions(UserActionSet)
*/
@@ -42,7 +43,8 @@ public interface Content {
void debugDetails(DebugBuilder debug);
/**
- * Implements the response to the dropping of the specified content onto this content.
+ * Implements the response to the dropping of the specified content onto
+ * this content.
*/
ObjectAdapter drop(Content sourceContent);
@@ -51,7 +53,8 @@ public interface Content {
String getHelp();
/**
- * The name of the icon to use to respresent the object represented by this content.
+ * The name of the icon to use to respresent the object represented by this
+ * content.
*/
String getIconName();
@@ -92,7 +95,8 @@ public interface Content {
boolean isOptionEnabled();
/**
- * Returns true if the object represented by this content is transient; has not been persisted yet.
+ * Returns true if the object represented by this content is transient; has
+ * not been persisted yet.
*/
boolean isTransient();
@@ -101,7 +105,8 @@ public interface Content {
String title();
/**
- * Allows this content to add menu options to the set of menu options the user will see for this view.
+ * Allows this content to add menu options to the set of menu options the
+ * user will see for this view.
*
* @see #contentMenuOptions(UserActionSet)
*/
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/ContentDrag.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/ContentDrag.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/ContentDrag.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/ContentDrag.java Sun Jan 22 08:05:17 2012
@@ -22,7 +22,8 @@ package org.apache.isis.viewer.dnd.view;
import org.apache.isis.viewer.dnd.drawing.Location;
/**
- * Details a drag event that affects a view's content (as opposed to the view itself).
+ * Details a drag event that affects a view's content (as opposed to the view
+ * itself).
*/
public interface ContentDrag extends Drag {
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/FocusManager.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/FocusManager.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/FocusManager.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/FocusManager.java Sun Jan 22 08:05:17 2012
@@ -24,23 +24,26 @@ package org.apache.isis.viewer.dnd.view;
*/
public interface FocusManager {
/**
- * The next view within the container to move the focus to; move to next field.
+ * The next view within the container to move the focus to; move to next
+ * field.
*/
void focusNextView();
/**
- * The previous view within the container to move the focus to; move to previous field.
+ * The previous view within the container to move the focus to; move to
+ * previous field.
*/
void focusPreviousView();
/**
- * The parent view within the container to move the focus to; move up to containing view in the hierachy.
+ * The parent view within the container to move the focus to; move up to
+ * containing view in the hierachy.
*/
void focusParentView();
/**
- * The first child view within the container to move the focus to; move down to the first view within the current
- * view.
+ * The first child view within the container to move the focus to; move down
+ * to the first view within the current view.
*/
void focusFirstChildView();
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/Placement.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/Placement.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/Placement.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/Placement.java Sun Jan 22 08:05:17 2012
@@ -23,9 +23,10 @@ import org.apache.isis.viewer.dnd.drawin
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.
+ * 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;
@@ -64,17 +65,17 @@ public class Placement {
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;
+ case ABSOLUTE:
+ view.setLocation(location);
+ break;
+
+ case RELATIVE:
+ view.setLocation(placementStrategy.determinePlacement(workspace, relativeTo, view));
+ break;
+
+ case CENTER:
+ view.setLocation(center(workspace, view));
+ break;
}
}
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/PlacementStrategyImpl.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/PlacementStrategyImpl.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/PlacementStrategyImpl.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/PlacementStrategyImpl.java Sun Jan 22 08:05:17 2012
@@ -39,11 +39,9 @@ public class PlacementStrategyImpl imple
final Location newLocation = new Location(rootViewLocation);
final Size requiredSize = newView.getView().getRequiredSize(Size.createMax());
- if (rootViewLocation.getX() + rootViewSize.getWidth() + PADDING + requiredSize.getWidth() < workspaceSize
- .getWidth()) {
+ 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()) {
+ } 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);
@@ -61,8 +59,7 @@ public class PlacementStrategyImpl imple
final Location firstAttempt = new Location(newLocation);
- while (workspace.subviewFor(newLocation) != null
- && workspace.subviewFor(newLocation).getLocation().equals(newLocation)) {
+ while (workspace.subviewFor(newLocation) != null && workspace.subviewFor(newLocation).getLocation().equals(newLocation)) {
newLocation.add(PADDING * 4, PADDING * 4);
ensureWidth(newLocation, maxSpaceToLeft);
ensureHeight(newLocation, maxSpaceAbove);
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/View.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/View.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/View.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/View.java Sun Jan 22 08:05:17 2012
@@ -33,11 +33,9 @@ import org.apache.isis.viewer.dnd.util.P
public interface View extends Cloneable, OptionsClient {
/** Horizontal padding (||) between two components */
- public static final int HPADDING = IsisContext.getConfiguration().getInteger(Properties.PROPERTY_BASE + "hpadding",
- 3);
+ 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);
+ public static final int VPADDING = IsisContext.getConfiguration().getInteger(Properties.PROPERTY_BASE + "vpadding", 3);
void addView(View view);
@@ -47,7 +45,8 @@ public interface View extends Cloneable,
Consent canChangeValue();
/**
- * Determines whether this view accepts keyboard focus. If so focusLost and focusReceived will be called.
+ * Determines whether this view accepts keyboard focus. If so focusLost and
+ * focusReceived will be called.
*/
boolean canFocus();
@@ -56,8 +55,9 @@ public interface View extends Cloneable,
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.
+ * 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);
@@ -66,16 +66,17 @@ public interface View extends Cloneable,
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.
+ * 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.
+ * 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);
@@ -86,61 +87,71 @@ public interface View extends Cloneable,
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.
+ * 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.
+ * 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.
+ * 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.
+ * 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.
+ * 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.
+ * 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.
+ * 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.
+ * 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>.
+ * 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.
+ * 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.
+ * Called as the mouse crosses the bounds, and ends up outside, of this
+ * view.
*/
void exited();
@@ -148,7 +159,8 @@ public interface View extends Cloneable,
* 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
+ * the location within the current view where the mouse click
+ * took place
*/
void firstClick(Click click);
@@ -161,7 +173,8 @@ public interface View extends Cloneable,
int getBaseline();
/**
- * Returns the bounding rectangle that describes where (within it parent), and how big, this view is.
+ * Returns the bounding rectangle that describes where (within it parent),
+ * and how big, this view is.
*
* @see #getSize()
* @see #getLocation()
@@ -205,7 +218,8 @@ public interface View extends Cloneable,
View[] getSubviews();
/**
- * returns the topmost decorator in the chain, or the view itself if not decorated.
+ * returns the topmost decorator in the chain, or the view itself if not
+ * decorated.
*/
View getView();
@@ -222,42 +236,49 @@ public interface View extends Cloneable,
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.
+ * 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.
+ * 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.
+ * 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.
+ * 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>.
+ * 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.
+ * 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);
@@ -266,13 +287,15 @@ public interface View extends Cloneable,
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
+ * 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.
+ * 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
@@ -280,13 +303,15 @@ public interface View extends Cloneable,
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.
+ * 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.
+ * Called when an action generates a result, allowing this view to decide
+ * what to do with it.
*/
void objectActionResult(ObjectAdapter result, Placement placement);
@@ -315,8 +340,8 @@ public interface View extends Cloneable,
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>.
+ * 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);
@@ -336,14 +361,15 @@ public interface View extends Cloneable,
void setView(View view);
/**
- * Identifies the subview that contains the specified location within its bounds. Returns null if no subview exists
- * for that location.
+ * 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>.
+ * 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);
@@ -355,16 +381,19 @@ public interface View extends Cloneable,
void updateView();
/**
- * Determines if the user is invoking an action relating to this view, rather than to whatever this view represents.
+ * 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
+ * @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.
+ * 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);
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/ViewDrag.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/ViewDrag.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/ViewDrag.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/ViewDrag.java Sun Jan 22 08:05:17 2012
@@ -22,11 +22,13 @@ 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.
+ * 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.
+ * 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 {
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/ViewFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/ViewFactory.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/ViewFactory.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/ViewFactory.java Sun Jan 22 08:05:17 2012
@@ -21,8 +21,8 @@ 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).
+ * 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);
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/ViewSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/ViewSpecification.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/ViewSpecification.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/ViewSpecification.java Sun Jan 22 08:05:17 2012
@@ -27,34 +27,39 @@ public interface ViewSpecification exten
String getName();
/**
- * Determines if the view created to this specification can display the specified type. Returns true if it can.
+ * 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.
+ * 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).
+ * 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
+ * @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.
+ * 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.
+ * Indicates if this view can handled being resized. If it can't then the
+ * viewer can put it in a scroll border.
*/
boolean isResizeable();
}
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/action/ActionHelper.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/action/ActionHelper.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/action/ActionHelper.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/action/ActionHelper.java Sun Jan 22 08:05:17 2012
@@ -64,8 +64,10 @@ public class ActionHelper {
}
/*
- * int[] maxLength = action.getParameterMaxLengths(); int[] typicalLength = action.getParameterTypicalLengths();
- * int[] noLines = action.getParameterNoLines(); boolean[] canWrap = action.canParametersWrap();
+ * int[] maxLength = action.getParameterMaxLengths(); int[]
+ * typicalLength = action.getParameterTypicalLengths(); int[] noLines =
+ * action.getParameterNoLines(); boolean[] canWrap =
+ * action.canParametersWrap();
*/
return new ActionHelper(target, action, parameters, defaultValues, options);
}
@@ -75,8 +77,7 @@ public class ActionHelper {
private final ObjectAdapter target;
private final ObjectAdapter[][] options;
- private ActionHelper(final ObjectAdapter target, final ObjectAction action, final ObjectAdapter[] parameters,
- final ObjectAdapter[] defaultValues, final ObjectAdapter[][] options) {
+ private ActionHelper(final ObjectAdapter target, final ObjectAction action, final ObjectAdapter[] parameters, final ObjectAdapter[] defaultValues, final ObjectAdapter[][] options) {
this.target = target;
this.action = action;
this.parameters = parameters;
@@ -90,13 +91,10 @@ public class ActionHelper {
final ObjectAdapter adapter = parameters[i];
final ObjectSpecification specification = parameters2.get(i).getSpecification();
if (specification.isParseable()) {
- final ParseableEntryActionParameter parseableEntryActionParameter =
- (ParseableEntryActionParameter) parameters2.get(i);
- parameterContents[i] =
- new TextParseableParameterImpl(parseableEntryActionParameter, adapter, options[i], i, this);
+ final ParseableEntryActionParameter parseableEntryActionParameter = (ParseableEntryActionParameter) parameters2.get(i);
+ parameterContents[i] = new TextParseableParameterImpl(parseableEntryActionParameter, adapter, options[i], i, this);
} else {
- parameterContents[i] =
- new ObjectParameterImpl((OneToOneActionParameter) parameters2.get(i), adapter, options[i], i, this);
+ parameterContents[i] = new ObjectParameterImpl((OneToOneActionParameter) parameters2.get(i), adapter, options[i], i, this);
}
}
@@ -104,7 +102,8 @@ public class ActionHelper {
}
public Consent disabled() {
- // REVIEW this is no good as it lumps all the parameters together; I need to know which parameter is
+ // REVIEW this is no good as it lumps all the parameters together; I
+ // need to know which parameter is
// disabled!
return action.isProposedArgumentSetValid(target, parameters);
}
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/action/DialoggedObjectOption.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/action/DialoggedObjectOption.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/action/DialoggedObjectOption.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/action/DialoggedObjectOption.java Sun Jan 22 08:05:17 2012
@@ -33,15 +33,15 @@ import org.apache.isis.viewer.dnd.view.V
import org.apache.isis.viewer.dnd.view.Workspace;
/**
- * Options for an underlying object determined dynamically by looking for methods starting with action, veto and option
- * for specifying the action, vetoing the option and giving the option an name respectively.
+ * Options for an underlying object determined dynamically by looking for
+ * methods starting with action, veto and option for specifying the action,
+ * vetoing the option and giving the option an name respectively.
*/
public class DialoggedObjectOption extends AbstractObjectOption {
public static DialoggedObjectOption createOption(final ObjectAction action, final ObjectAdapter object) {
final int paramCount = action.getParameterCount();
Assert.assertTrue("Only for actions taking one or more params", paramCount > 0);
- if (!action.isVisible(IsisContext.getAuthenticationSession(), object).isAllowed()
- || !action.isVisible(IsisContext.getAuthenticationSession(), object).isAllowed()) {
+ if (!action.isVisible(IsisContext.getAuthenticationSession(), object).isAllowed() || !action.isVisible(IsisContext.getAuthenticationSession(), object).isAllowed()) {
return null;
}
@@ -60,8 +60,7 @@ public class DialoggedObjectOption exten
public void execute() {
final ActionHelper helper = ActionHelper.createInstance(target, action);
Content content;
- if (target == null && action.getOnType().isService() || target != null
- && target.getSpecification().isNotCollection()) {
+ if (target == null && action.getOnType().isService() || target != null && target.getSpecification().isNotCollection()) {
content = new ObjectActionContent(helper);
} else if (target.getSpecification().isCollection()) {
content = new CollectionActionContent(helper);
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/action/ImmediateObjectOption.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/action/ImmediateObjectOption.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/action/ImmediateObjectOption.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/action/ImmediateObjectOption.java Sun Jan 22 08:05:17 2012
@@ -31,8 +31,9 @@ import org.apache.isis.viewer.dnd.view.V
import org.apache.isis.viewer.dnd.view.Workspace;
/**
- * Options for an underlying object determined dynamically by looking for methods starting with action, veto and option
- * for specifying the action, vetoing the option and giving the option an name respectively.
+ * Options for an underlying object determined dynamically by looking for
+ * methods starting with action, veto and option for specifying the action,
+ * vetoing the option and giving the option an name respectively.
*/
public class ImmediateObjectOption extends AbstractObjectOption {
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/action/ObjectParameterImpl.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/action/ObjectParameterImpl.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/action/ObjectParameterImpl.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/action/ObjectParameterImpl.java Sun Jan 22 08:05:17 2012
@@ -41,8 +41,7 @@ public class ObjectParameterImpl extends
private final ObjectAdapter[] optionAdapters;
private final OneToOneActionParameter objectActionParameter;
- public ObjectParameterImpl(final OneToOneActionParameter objectActionParameter, final ObjectAdapter adapter,
- final ObjectAdapter[] optionAdapters, final int i, final ActionHelper invocation) {
+ public ObjectParameterImpl(final OneToOneActionParameter objectActionParameter, final ObjectAdapter adapter, final ObjectAdapter[] optionAdapters, final int i, final ActionHelper invocation) {
this.objectActionParameter = objectActionParameter;
this.optionAdapters = optionAdapters;
this.index = i;
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/action/OptionFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/action/OptionFactory.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/action/OptionFactory.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/action/OptionFactory.java Sun Jan 22 08:05:17 2012
@@ -38,9 +38,7 @@ public class OptionFactory {
public static void addCreateOptions(final ObjectSpecification specification, final UserActionSet options) {
// TODO do the same as addObjectMenuOptions and collect together all the
// actions for all the types
- final List<ObjectAction> actions =
- specification.getServiceActionsReturning(Arrays.asList(ActionType.USER, ActionType.EXPLORATION, ActionType.PROTOTYPE,
- ActionType.DEBUG));
+ final List<ObjectAction> actions = specification.getServiceActionsReturning(Arrays.asList(ActionType.USER, ActionType.EXPLORATION, ActionType.PROTOTYPE, ActionType.DEBUG));
menuOptions(actions, null, options);
}
@@ -50,11 +48,10 @@ public class OptionFactory {
}
final ObjectSpecification noSpec = adapter.getSpecification();
- menuOptions(
- noSpec.getObjectActions(Arrays.asList(ActionType.USER, ActionType.EXPLORATION, ActionType.PROTOTYPE, ActionType.DEBUG), Contributed.INCLUDED),
- adapter, options);
+ menuOptions(noSpec.getObjectActions(Arrays.asList(ActionType.USER, ActionType.EXPLORATION, ActionType.PROTOTYPE, ActionType.DEBUG), Contributed.INCLUDED), adapter, options);
- // TODO: this looks like a bit of a hack; can we improve it by looking at the facets?
+ // TODO: this looks like a bit of a hack; can we improve it by looking
+ // at the facets?
if (adapter.getObject() instanceof ObjectList) {
return;
}
@@ -69,8 +66,7 @@ public class OptionFactory {
options.add(new DisposeObjectOption());
}
- private static void menuOptions(final List<ObjectAction> actions, final ObjectAdapter target,
- final UserActionSet menuOptionSet) {
+ private static void menuOptions(final List<ObjectAction> actions, final ObjectAdapter target, final UserActionSet menuOptionSet) {
for (int i = 0; i < actions.size(); i++) {
UserAction option = null;
if (actions.get(i).getActions().size() > 0) {
@@ -81,8 +77,7 @@ public class OptionFactory {
final int noOfParameters = actions.get(i).getParameterCount();
if (noOfParameters == 0) {
option = ImmediateObjectOption.createOption(actions.get(i), target);
- } else if (actions.get(i).isContributed() && noOfParameters == 1 && target != null
- && target.getSpecification().isOfType(actions.get(i).getParameters().get(0).getSpecification())) {
+ } else if (actions.get(i).isContributed() && noOfParameters == 1 && target != null && target.getSpecification().isOfType(actions.get(i).getParameters().get(0).getSpecification())) {
option = ImmediateObjectOption.createServiceOption(actions.get(i), target);
} else {
option = DialoggedObjectOption.createOption(actions.get(i), target);
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/action/TextParseableParameterImpl.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/action/TextParseableParameterImpl.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/action/TextParseableParameterImpl.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/action/TextParseableParameterImpl.java Sun Jan 22 08:05:17 2012
@@ -42,8 +42,7 @@ public class TextParseableParameterImpl
private final ActionHelper invocation;
private final int index;
- public TextParseableParameterImpl(final ParseableEntryActionParameter objectActionParameters,
- final ObjectAdapter adapter, final ObjectAdapter[] options, final int i, final ActionHelper invocation) {
+ public TextParseableParameterImpl(final ParseableEntryActionParameter objectActionParameters, final ObjectAdapter adapter, final ObjectAdapter[] options, final int i, final ActionHelper invocation) {
this.parameter = objectActionParameters;
this.options = options;
index = i;
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/base/AbstractBorder.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/base/AbstractBorder.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/base/AbstractBorder.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/base/AbstractBorder.java Sun Jan 22 08:05:17 2012
@@ -47,8 +47,7 @@ public class AbstractBorder extends Abst
}
protected Bounds contentArea() {
- return new Bounds(getLeft(), getTop(), getSize().getWidth() - getLeft() - getRight(), getSize().getHeight()
- - getTop() - getBottom());
+ return new Bounds(getLeft(), getTop(), getSize().getWidth() - getLeft() - getRight(), getSize().getHeight() - getTop() - getBottom());
}
@Override
@@ -87,8 +86,7 @@ public class AbstractBorder extends Abst
@Override
public void draw(final Canvas canvas) {
if (Toolkit.debug) {
- canvas.drawDebugOutline(new Bounds(getSize()), getBaseline(),
- Toolkit.getColor(ColorsAndFonts.COLOR_DEBUG_BOUNDS_BORDER));
+ canvas.drawDebugOutline(new Bounds(getSize()), getBaseline(), Toolkit.getColor(ColorsAndFonts.COLOR_DEBUG_BOUNDS_BORDER));
}
final int width = getSize().getWidth() - getRight();
final int height = getSize().getHeight() - getBottom();
@@ -161,8 +159,7 @@ public class AbstractBorder extends Abst
@Override
protected void debugDetails(final DebugBuilder debug) {
super.debugDetails(debug);
- debug.appendln("border", getTop() + "/" + getBottom() + " " + getLeft() + "/" + getRight()
- + " (top/bottom left/right)");
+ debug.appendln("border", getTop() + "/" + getBottom() + " " + getLeft() + "/" + getRight() + " (top/bottom left/right)");
debug.appendln("contents", contentArea());
}
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/base/AbstractFocusManager.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/base/AbstractFocusManager.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/base/AbstractFocusManager.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/base/AbstractFocusManager.java Sun Jan 22 08:05:17 2012
@@ -25,7 +25,8 @@ import org.apache.isis.viewer.dnd.view.F
import org.apache.isis.viewer.dnd.view.View;
/**
- * Abstract focus manager that uses the set of views to move focus between from the concrete subclass.
+ * Abstract focus manager that uses the set of views to move focus between from
+ * the concrete subclass.
*
* @see #getChildViews()
*/
@@ -47,7 +48,8 @@ public abstract class AbstractFocusManag
}
/**
- * Throws a ObjectAdapterRuntimeException if the specified view is available to this focus manager.
+ * Throws a ObjectAdapterRuntimeException if the specified view is available
+ * to this focus manager.
*/
private void checkCanFocusOn(final View view) {
final View[] views = getChildViews();
@@ -59,7 +61,8 @@ public abstract class AbstractFocusManag
}
if (!valid) {
- // throw new ObjectAdapterRuntimeException("No view " + view + " to focus on in " +
+ // throw new ObjectAdapterRuntimeException("No view " + view +
+ // " to focus on in " +
// container.getView());
}
}
@@ -158,7 +161,9 @@ public abstract class AbstractFocusManag
}
// Don't move to any view
- // throw new ObjectAdapterRuntimeException("Can't move to previous peer from " + focus);
+ // throw new
+ // ObjectAdapterRuntimeException("Can't move to previous peer from "
+ // + focus);
}
}
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/base/AbstractView.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/base/AbstractView.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/base/AbstractView.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/base/AbstractView.java Sun Jan 22 08:05:17 2012
@@ -188,8 +188,7 @@ public abstract class AbstractView imple
debug.appendln("Self", getView());
debug.appendln("Parent's size", getParent() == null ? new Size() : getParent().getSize());
- debug.appendln("Size w/in parent",
- getView().getRequiredSize(getParent() == null ? new Size() : getParent().getSize()));
+ debug.appendln("Size w/in parent", getView().getRequiredSize(getParent() == null ? new Size() : getParent().getSize()));
debug.appendln("Location w/in parent", getView().getLocation());
debug.appendln("Changable", canChangeValue());
debug.appendln("Focus", (canFocus() ? "focusable" : "non-focusable"));
@@ -216,8 +215,10 @@ public abstract class AbstractView imple
debug.appendln();
debug.appendTitle("View structure");
- // b.appendln("Built", (buildInvalid ? "no" : "yes") + ", " + buildCount + " builds");
- // b.appendln("Laid out", (layoutInvalid ? "no" : "yes") + ", " + layoutCount + " layouts");
+ // b.appendln("Built", (buildInvalid ? "no" : "yes") + ", " + buildCount
+ // + " builds");
+ // b.appendln("Laid out", (layoutInvalid ? "no" : "yes") + ", " +
+ // layoutCount + " layouts");
debug.appendln(getSpecification().getName().toUpperCase());
debugStructure(debug);
@@ -306,7 +307,8 @@ public abstract class AbstractView imple
}
/**
- * Clears the background of this view to the given color (call from the {@link #draw(Canvas)} method.
+ * Clears the background of this view to the given color (call from the
+ * {@link #draw(Canvas)} method.
*/
protected void clearBackground(final Canvas canvas, final Color color) {
final Bounds bounds = getBounds();
@@ -316,8 +318,7 @@ public abstract class AbstractView imple
@Override
public void draw(final Canvas canvas) {
if (Toolkit.debug) {
- canvas.drawDebugOutline(new Bounds(getSize()), getBaseline(),
- Toolkit.getColor(ColorsAndFonts.COLOR_DEBUG_BOUNDS_VIEW));
+ canvas.drawDebugOutline(new Bounds(getSize()), getBaseline(), Toolkit.getColor(ColorsAndFonts.COLOR_DEBUG_BOUNDS_VIEW));
}
}
@@ -423,7 +424,8 @@ public abstract class AbstractView imple
@Override
public final View getParent() {
- // Assert.assertEquals(parent == null ? null : parent.getView(), parent);
+ // Assert.assertEquals(parent == null ? null : parent.getView(),
+ // parent);
// return parent;
return parent == null ? null : parent.getView();
@@ -529,8 +531,8 @@ public abstract class AbstractView imple
}
/**
- * Limits the bounds of the this view (when being moved or dropped) so it never extends outside the specified bounds
- * e.g. outside of a parent view
+ * Limits the bounds of the this view (when being moved or dropped) so it
+ * never extends outside the specified bounds e.g. outside of a parent view
*/
public void limitBoundsWithin(final Bounds containerBounds) {
final Bounds contentBounds = getView().getBounds();
@@ -680,7 +682,8 @@ public abstract class AbstractView imple
}
/**
- * Sets the location and size view the {@link #setLocation(Location)) and {@link #setSize(Size)) methods.
+ * Sets the location and size view the {@link #setLocation(Location)) and
+ * {@link #setSize(Size)) methods.
*/
@Override
public void setBounds(final Bounds bounds) {
@@ -778,7 +781,8 @@ public abstract class AbstractView imple
addContentMenuItems(options, content);
addNewViewMenuItems(options, content);
- // TODO ask the viewer for the print option - provided by the underlying system
+ // TODO ask the viewer for the print option - provided by the underlying
+ // system
// options.add(new PrintOption());
addViewDebugMenuItems(options);
@@ -832,8 +836,9 @@ public abstract class AbstractView imple
public void execute(final Workspace workspace, final View view, final Location at) {
Properties.setStringOption("view.object-default", getSpecification().getName());
/*
- * Options viewOptions = Properties.getViewConfigurationOptions(getSpecification());
- * getView().saveOptions(viewOptions);
+ * Options viewOptions =
+ * Properties.getViewConfigurationOptions
+ * (getSpecification()); getView().saveOptions(viewOptions);
*/
}
});
@@ -844,8 +849,9 @@ public abstract class AbstractView imple
public void execute(final Workspace workspace, final View view, final Location at) {
Properties.setStringOption("view.collection-default", getSpecification().getName());
/*
- * Options viewOptions = Properties.getViewConfigurationOptions(getSpecification());
- * getView().saveOptions(viewOptions);
+ * Options viewOptions =
+ * Properties.getViewConfigurationOptions
+ * (getSpecification()); getView().saveOptions(viewOptions);
*/
}
});
@@ -856,16 +862,16 @@ public abstract class AbstractView imple
public void execute(final Workspace workspace, final View view, final Location at) {
Properties.setStringOption("view.icon-default", getSpecification().getName());
/*
- * Options viewOptions = Properties.getViewConfigurationOptions(getSpecification());
- * getView().saveOptions(viewOptions);
+ * Options viewOptions =
+ * Properties.getViewConfigurationOptions
+ * (getSpecification()); getView().saveOptions(viewOptions);
*/
}
});
}
if (getContent() instanceof RootObject || getContent() instanceof RootCollection) {
- options.add(new UserActionAbstract("Use as default view for "
- + getContent().getSpecification().getSingularName(), ActionType.USER) {
+ options.add(new UserActionAbstract("Use as default view for " + getContent().getSpecification().getSingularName(), ActionType.USER) {
@Override
public void execute(final Workspace workspace, final View view, final Location at) {
final Options viewOptions = Properties.getViewConfigurationOptions(getSpecification());
@@ -879,13 +885,17 @@ public abstract class AbstractView imple
});
}
/*
- * options.add(new UserActionAbstract("Create new specification", UserAction.USER) { // TODO probably needs to
- * be a replace with new view specification public void execute(final Workspace workspace, final View view,
- * final Location at) { UserViewSpecification newSpec = new UserViewSpecification(getView()); Options
- * viewOptions = Properties.getViewConfigurationOptions(newSpec); getView().saveOptions(viewOptions);
+ * options.add(new UserActionAbstract("Create new specification",
+ * UserAction.USER) { // TODO probably needs to be a replace with new
+ * view specification public void execute(final Workspace workspace,
+ * final View view, final Location at) { UserViewSpecification newSpec =
+ * new UserViewSpecification(getView()); Options viewOptions =
+ * Properties.getViewConfigurationOptions(newSpec);
+ * getView().saveOptions(viewOptions);
*
* viewOptions = Properties.getUserViewSpecificationOptions(newSpec);
- * viewOptions.addOption("wrapped-specification", getSpecification().getClass().getName());
+ * viewOptions.addOption("wrapped-specification",
+ * getSpecification().getClass().getName());
*
* Toolkit.getViewFactory().addSpecification(newSpec); } });
*/
@@ -904,8 +914,7 @@ public abstract class AbstractView imple
}
private void createOpenAsSubmenu(final UserActionSet options, final Content content) {
- final ViewRequirement requirements =
- new ViewRequirement(content, ViewRequirement.OPEN | ViewRequirement.EXPANDABLE);
+ final ViewRequirement requirements = new ViewRequirement(content, ViewRequirement.OPEN | ViewRequirement.EXPANDABLE);
final Enumeration possibleViews = Toolkit.getViewFactory().availableViews(requirements);
if (possibleViews.hasMoreElements()) {
final UserActionSet submenu = options.addNewActionSet("Open as");
@@ -971,6 +980,7 @@ public abstract class AbstractView imple
@Override
public void saveOptions(final Options viewOptions) {
- // viewOptions.addOption("spec", getSpecification().getClass().getName());
+ // viewOptions.addOption("spec",
+ // getSpecification().getClass().getName());
}
}
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/base/DragViewOutline.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/base/DragViewOutline.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/base/DragViewOutline.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/base/DragViewOutline.java Sun Jan 22 08:05:17 2012
@@ -43,8 +43,7 @@ public class DragViewOutline extends Abs
final Bounds r = getBounds();
for (int i = 0; i < thickness; i++) {
- canvas.drawRectangle(i, i, r.getWidth() - i * 2 - 1, r.getHeight() - i * 2 - 1,
- Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY1));
+ canvas.drawRectangle(i, i, r.getWidth() - i * 2 - 1, r.getHeight() - i * 2 - 1, Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY1));
}
}
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/base/FieldErrorView.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/base/FieldErrorView.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/base/FieldErrorView.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/base/FieldErrorView.java Sun Jan 22 08:05:17 2012
@@ -33,9 +33,11 @@ import org.apache.isis.viewer.dnd.view.V
import org.apache.isis.viewer.dnd.view.ViewSpecification;
/**
- * Displays an error message in place of a normal field when a problem occurs, usually due to a programming error, and
- * the normal field cannot be created. A example of this is where value field is declared in an ObjectAdapter, but the
- * programmer forgot to instantiate the value object, causing null to be returned instead, which is an illegal value.
+ * Displays an error message in place of a normal field when a problem occurs,
+ * usually due to a programming error, and the normal field cannot be created. A
+ * example of this is where value field is declared in an ObjectAdapter, but the
+ * programmer forgot to instantiate the value object, causing null to be
+ * returned instead, which is an illegal value.
*/
public class FieldErrorView extends AbstractView {
@@ -51,12 +53,9 @@ public class FieldErrorView extends Abst
super.draw(canvas);
final Size size = getSize();
- canvas.drawSolidRectangle(0, 0, size.getWidth() - 1, size.getHeight() - 1,
- Toolkit.getColor(ColorsAndFonts.COLOR_WHITE));
- canvas.drawRectangle(0, 0, size.getWidth() - 1, size.getHeight() - 1,
- Toolkit.getColor(ColorsAndFonts.COLOR_BLACK));
- canvas.drawText(error, 14, 20, Toolkit.getColor(ColorsAndFonts.COLOR_INVALID),
- Toolkit.getText(ColorsAndFonts.TEXT_NORMAL));
+ canvas.drawSolidRectangle(0, 0, size.getWidth() - 1, size.getHeight() - 1, Toolkit.getColor(ColorsAndFonts.COLOR_WHITE));
+ canvas.drawRectangle(0, 0, size.getWidth() - 1, size.getHeight() - 1, Toolkit.getColor(ColorsAndFonts.COLOR_BLACK));
+ canvas.drawText(error, 14, 20, Toolkit.getColor(ColorsAndFonts.COLOR_INVALID), Toolkit.getText(ColorsAndFonts.TEXT_NORMAL));
}
@Override
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/base/IconGraphic.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/base/IconGraphic.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/base/IconGraphic.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/base/IconGraphic.java Sun Jan 22 08:05:17 2012
@@ -63,8 +63,7 @@ public class IconGraphic {
public void draw(final Canvas canvas, final int x, final int baseline) {
final int y = baseline - this.baseline + 1;
if (Toolkit.debug) {
- canvas.drawDebugOutline(new Bounds(new Location(x, y), getSize()), getBaseline(),
- Toolkit.getColor(ColorsAndFonts.COLOR_DEBUG_BOUNDS_DRAW));
+ canvas.drawDebugOutline(new Bounds(new Location(x, y), getSize()), getBaseline(), Toolkit.getColor(ColorsAndFonts.COLOR_DEBUG_BOUNDS_DRAW));
}
final Image icon = icon();
if (icon == null) {
@@ -87,8 +86,8 @@ public class IconGraphic {
protected Image icon() {
final String iconName = content.getIconName();
/*
- * If the graphic is based on a name provided by the object then the icon could be changed at any time, so we
- * won't lazily load it.
+ * If the graphic is based on a name provided by the object then the
+ * icon could be changed at any time, so we won't lazily load it.
*/
if (icon != null && (iconName == null || iconName.equals(lastIconName))) {
return icon;
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/base/ObjectView.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/base/ObjectView.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/base/ObjectView.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/base/ObjectView.java Sun Jan 22 08:05:17 2012
@@ -83,8 +83,9 @@ public abstract class ObjectView extends
}
/**
- * Called when a dragged object is dropped onto this view. The default behaviour implemented here calls the action
- * method on the target, passing the source object in as the only parameter.
+ * Called when a dragged object is dropped onto this view. The default
+ * behaviour implemented here calls the action method on the target, passing
+ * the source object in as the only parameter.
*/
@Override
public void drop(final ContentDrag drag) {
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/base/UserViewSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/base/UserViewSpecification.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/base/UserViewSpecification.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/base/UserViewSpecification.java Sun Jan 22 08:05:17 2012
@@ -38,8 +38,10 @@ public class UserViewSpecification imple
}
/*
- * public UserViewSpecification(View view) { specification = view.getSpecification(); Options copyOptions = new
- * Options(); view.saveOptions(copyOptions); name = specification.getName() + " " + new Date().getSeconds();
+ * public UserViewSpecification(View view) { specification =
+ * view.getSpecification(); Options copyOptions = new Options();
+ * view.saveOptions(copyOptions); name = specification.getName() + " " + new
+ * Date().getSeconds();
*
* // view.setSpecification(this); // view.loadOptions(copyOptions); }
*/
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/base/ViewUpdateNotifierImpl.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/base/ViewUpdateNotifierImpl.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/base/ViewUpdateNotifierImpl.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/base/ViewUpdateNotifierImpl.java Sun Jan 22 08:05:17 2012
@@ -173,10 +173,7 @@ public class ViewUpdateNotifierImpl impl
removeViews(viewsForObject);
final Vector<View> remainingViews = viewListByAdapter.get(objectToDispose);
if (remainingViews != null && remainingViews.size() > 0) {
- getMessageBroker().addWarning(
- "There are still views (within other views) for the disposed object "
- + objectToDispose.titleString()
- + ". Only objects that are shown as root views can be properly disposed of");
+ getMessageBroker().addWarning("There are still views (within other views) for the disposed object " + objectToDispose.titleString() + ". Only objects that are shown as root views can be properly disposed of");
} else {
getAdapterManager().removeAdapter(objectToDispose);
}