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 [9/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/view/menu/PopupMenu.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/menu/PopupMenu.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/menu/PopupMenu.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/menu/PopupMenu.java Sun Jan 22 08:05:17 2012
@@ -71,8 +71,7 @@ public class PopupMenu extends AbstractV
return item;
}
- public static Item createOption(final UserAction action, final Object object, final View view,
- final Location location) {
+ public static Item createOption(final UserAction action, final Object object, final View view, final Location location) {
final Item item = new Item();
if (action == null) {
item.isBlank = true;
@@ -248,8 +247,7 @@ public class PopupMenu extends AbstractV
simpleFocusManager = new SubviewFocusManager(this);
}
- private void addItems(final View target, final UserAction[] options, final int len, final Vector<Item> list,
- final ActionType type) {
+ private void addItems(final View target, final UserAction[] options, final int len, final Vector<Item> list, final ActionType type) {
final int initialSize = list.size();
for (int i = 0; i < len; i++) {
if (options[i].getType() == type) {
@@ -293,7 +291,8 @@ public class PopupMenu extends AbstractV
canvas.draw3DRectangle(0, 0, width, height, backgroundColor, true);
final int itemHeight = style().getLineHeight() + VPADDING;
- // int baseLine = itemHeight / 2 + style().getAscent() / 2 + getPadding().getTop();
+ // int baseLine = itemHeight / 2 + style().getAscent() / 2 +
+ // getPadding().getTop();
int baseLine = style().getAscent() + getPadding().getTop() + 1;
final int left = getPadding().getLeft();
for (int i = 0; i < items.length; i++) {
@@ -310,7 +309,8 @@ public class PopupMenu extends AbstractV
final int depth = style().getLineHeight() + 2;
canvas.drawSolidRectangle(2, top, width - 4, depth, backgroundColor.darker());
canvas.draw3DRectangle(2, top, width - 4, depth + 1, backgroundColor.brighter(), false);
- // canvas.drawText(items[i].name, left, baseLine, normalColor(), style());
+ // canvas.drawText(items[i].name, left, baseLine,
+ // normalColor(), style());
color = reversedColor();
} else {
@@ -329,7 +329,8 @@ public class PopupMenu extends AbstractV
baseLine += itemHeight;
}
- // canvas.drawRectangleAround(this, Toolkit.getColor(ColorsAndFonts.COLOR_DEBUG_BOUNDS_VIEW));
+ // canvas.drawRectangleAround(this,
+ // Toolkit.getColor(ColorsAndFonts.COLOR_DEBUG_BOUNDS_VIEW));
}
@Override
@@ -494,15 +495,19 @@ public class PopupMenu extends AbstractV
}
/*
- * @Override public void layout(final Size maximumSize) { coreSize = new Bounds(getCoreRequiredSize());
+ * @Override public void layout(final Size maximumSize) { coreSize = new
+ * Bounds(getCoreRequiredSize());
*
- * final int option = getOption(); final int itemHeight = style().getLineHeight() + VPADDING; int menuWidth =
- * coreSize.getWidth(); // Location menuLocation = new Location(menuWidth - 4, itemHeight * option); Location
- * menuLocation = new Location(0, itemHeight * option);
+ * final int option = getOption(); final int itemHeight =
+ * style().getLineHeight() + VPADDING; int menuWidth = coreSize.getWidth();
+ * // Location menuLocation = new Location(menuWidth - 4, itemHeight *
+ * option); Location menuLocation = new Location(0, itemHeight * option);
*
- * if (submenu != null) { submenu.layout(maximumSize); submenu.setLocation(menuLocation);
+ * if (submenu != null) { submenu.layout(maximumSize);
+ * submenu.setLocation(menuLocation);
*
- * //coreSize.setX(submenu.getSize().getWidth() - 4); //getLocation() } setSize(getMaximumSize()); }
+ * //coreSize.setX(submenu.getSize().getWidth() - 4); //getLocation() }
+ * setSize(getMaximumSize()); }
*/
public View makeView(final ObjectAdapter object, final ObjectAssociation field) throws CloneNotSupportedException {
throw new RuntimeException();
@@ -515,7 +520,8 @@ public class PopupMenu extends AbstractV
} else {
getParent().markDamaged();
}
- // markDamaged(new Bounds(getAbsoluteLocation(), getSize())); ///getView().getBounds());
+ // markDamaged(new Bounds(getAbsoluteLocation(), getSize()));
+ // ///getView().getBounds());
}
@Override
@@ -589,8 +595,7 @@ public class PopupMenu extends AbstractV
@Override
public String toString() {
- return "PopupMenu [location=" + getLocation() + ",item=" + optionIdentified + ",itemCount="
- + (items == null ? 0 : items.length) + "]";
+ return "PopupMenu [location=" + getLocation() + ",item=" + optionIdentified + ",itemCount=" + (items == null ? 0 : items.length) + "]";
}
protected boolean transparentBackground() {
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/menu/PopupMenuContainer.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/menu/PopupMenuContainer.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/menu/PopupMenuContainer.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/menu/PopupMenuContainer.java Sun Jan 22 08:05:17 2012
@@ -127,9 +127,7 @@ public class PopupMenuContainer extends
}
final Location submenuLocation = new Location(0, submenuOffset);
- final boolean placeToLeft =
- at.getX() + menuSize.getWidth() + submenuSize.getWidth() < getViewManager().getOverlaySize()
- .getWidth();
+ final boolean placeToLeft = at.getX() + menuSize.getWidth() + submenuSize.getWidth() < getViewManager().getOverlaySize().getWidth();
if (placeToLeft) {
submenuLocation.setX(menuSize.getWidth() - MENU_OVERLAP);
} else {
@@ -166,13 +164,11 @@ public class PopupMenuContainer extends
}
}
- public void show(final boolean forView, final boolean includeDebug, final boolean includeExploration,
- final boolean includePrototype) {
+ public void show(final boolean forView, final boolean includeDebug, final boolean includeExploration, final boolean includePrototype) {
final boolean withExploration = getViewManager().isRunningAsExploration() && includeExploration;
final boolean withPrototype = getViewManager().isRunningAsPrototype() && includePrototype;
- final UserActionSet optionSet =
- new UserActionSetImpl(withExploration, withPrototype, includeDebug, ActionType.USER);
+ final UserActionSet optionSet = new UserActionSetImpl(withExploration, withPrototype, includeDebug, ActionType.USER);
if (forView) {
target.viewMenuOptions(optionSet);
} else {
@@ -197,8 +193,7 @@ public class PopupMenuContainer extends
}
}
- private String changeStatus(final View over, final boolean forView, final boolean includeExploration,
- final boolean includeDebug) {
+ private String changeStatus(final View over, final boolean forView, final boolean includeExploration, final boolean includeDebug) {
final StringBuffer status = new StringBuffer("Menu for ");
if (forView) {
status.append("view ");
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/menu/UserActionSetImpl.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/menu/UserActionSetImpl.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/menu/UserActionSetImpl.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/menu/UserActionSetImpl.java Sun Jan 22 08:05:17 2012
@@ -48,10 +48,8 @@ public class UserActionSetImpl implement
private final Vector options = new Vector();
private final ActionType type;
- public UserActionSetImpl(final boolean includeExploration, final boolean includePrototype,
- final boolean includeDebug, final ActionType type) {
- this("", type, includeExploration, includePrototype, includeDebug, Toolkit
- .getColor(ColorsAndFonts.COLOR_DEBUG_BASELINE));
+ public UserActionSetImpl(final boolean includeExploration, final boolean includePrototype, final boolean includeDebug, final ActionType type) {
+ this("", type, includeExploration, includePrototype, includeDebug, Toolkit.getColor(ColorsAndFonts.COLOR_DEBUG_BASELINE));
}
private UserActionSetImpl(final String groupName, final UserActionSetImpl parent) {
@@ -59,12 +57,10 @@ public class UserActionSetImpl implement
}
private UserActionSetImpl(final String groupName, final UserActionSetImpl parent, final ActionType type) {
- this(groupName, type, parent.includeExploration, parent.includePrototype, parent.includeDebug, parent
- .getColor());
+ this(groupName, type, parent.includeExploration, parent.includePrototype, parent.includeDebug, parent.getColor());
}
- private UserActionSetImpl(final String groupName, final ActionType type, final boolean includeExploration,
- final boolean includePrototype, final boolean includeDebug, final Color backgroundColor) {
+ private UserActionSetImpl(final String groupName, final ActionType type, final boolean includeExploration, final boolean includePrototype, final boolean includeDebug, final Color backgroundColor) {
this.groupName = groupName;
this.type = type;
this.includeExploration = includeExploration;
@@ -93,8 +89,7 @@ public class UserActionSetImpl implement
@Override
public void add(final UserAction option) {
final ActionType section = option.getType();
- if (section == ActionType.USER || (includeExploration && section == ActionType.EXPLORATION)
- || (includePrototype && section == ActionType.PROTOTYPE) || (includeDebug && section == ActionType.DEBUG)) {
+ if (section == ActionType.USER || (includeExploration && section == ActionType.EXPLORATION) || (includePrototype && section == ActionType.PROTOTYPE) || (includeDebug && section == ActionType.DEBUG)) {
options.addElement(option);
}
}
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/option/IconizeViewOption.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/option/IconizeViewOption.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/option/IconizeViewOption.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/option/IconizeViewOption.java Sun Jan 22 08:05:17 2012
@@ -51,9 +51,11 @@ public class IconizeViewOption extends U
}
/*
- * // TODO change so that an iconized version of the window is created and displayed, which holds the original
- * view. View iconView = new RootIconSpecification().createView(view.getContent(), null);
- * iconView.setLocation(view.getLocation()); workspace.replaceView(view, iconView);
+ * // TODO change so that an iconized version of the window is created
+ * and displayed, which holds the original view. View iconView = new
+ * RootIconSpecification().createView(view.getContent(), null);
+ * iconView.setLocation(view.getLocation()); workspace.replaceView(view,
+ * iconView);
*/
}
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/option/ReplaceViewOption.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/option/ReplaceViewOption.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/option/ReplaceViewOption.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/option/ReplaceViewOption.java Sun Jan 22 08:05:17 2012
@@ -37,8 +37,7 @@ public class ReplaceViewOption extends U
@Override
public String getDescription(final View view) {
- return "Replace this " + view.getSpecification().getName() + " view with a " + specification.getName()
- + " view";
+ return "Replace this " + view.getSpecification().getName() + " view with a " + specification.getName() + " view";
}
@Override
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/option/UserActionAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/option/UserActionAbstract.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/option/UserActionAbstract.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/option/UserActionAbstract.java Sun Jan 22 08:05:17 2012
@@ -29,12 +29,13 @@ import org.apache.isis.viewer.dnd.view.V
import org.apache.isis.viewer.dnd.view.Workspace;
/**
- * Each option that a user is shown in an objects popup menu a MenuOption. A MenuOption details: the name of an option
- * (in the users language);
+ * Each option that a user is shown in an objects popup menu a MenuOption. A
+ * MenuOption details: the name of an option (in the users language);
* <ul>
* the type of object that might result when requesting this option
* </ul>
- * ; a way to determine whether a user can select this option on the current object.
+ * ; a way to determine whether a user can select this option on the current
+ * object.
*/
public abstract class UserActionAbstract implements UserAction {
private String description;
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/text/CursorPosition.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/text/CursorPosition.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/text/CursorPosition.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/text/CursorPosition.java Sun Jan 22 08:05:17 2012
@@ -22,8 +22,9 @@ package org.apache.isis.viewer.dnd.view.
import org.apache.isis.viewer.dnd.drawing.Location;
/**
- * Represents the position of a line cursor within a TextContent. The character position for a line extends from zero to
- * text.length + 1. Where 0 means the cursor is to the left of the first character, and 1 is to right of the first
+ * Represents the position of a line cursor within a TextContent. The character
+ * position for a line extends from zero to text.length + 1. Where 0 means the
+ * cursor is to the left of the first character, and 1 is to right of the first
* character and to the left of the second character.
*/
public class CursorPosition {
@@ -255,7 +256,6 @@ public class CursorPosition {
}
public boolean isBefore(final CursorPosition positionToCompare) {
- return line < positionToCompare.line
- || (line == positionToCompare.line && character < positionToCompare.character);
+ return line < positionToCompare.line || (line == positionToCompare.line && character < positionToCompare.character);
}
}
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/text/TextBlock.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/text/TextBlock.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/text/TextBlock.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/text/TextBlock.java Sun Jan 22 08:05:17 2012
@@ -178,8 +178,8 @@ class TextBlock {
}
/**
- * breaks a block at the cursor position by truncating this block and creating a new block and adding the removed
- * text.
+ * breaks a block at the cursor position by truncating this block and
+ * creating a new block and adding the removed text.
*/
public TextBlock splitAt(final int line, final int character) {
format();
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/text/TextContent.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/text/TextContent.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/text/TextContent.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/text/TextContent.java Sun Jan 22 08:05:17 2012
@@ -62,16 +62,17 @@ public class TextContent {
}
/**
- * Returns the number of lines that this field will display the content. This can be smaller than the actual number
- * of lines of content, but will be at least one.
+ * Returns the number of lines that this field will display the content.
+ * This can be smaller than the actual number of lines of content, but will
+ * be at least one.
*/
public int getNoDisplayLines() {
return availableDisplayLines;
}
/**
- * Aligns the lines of content so that the specified line is within the array of lines returned by
- * getDisplayLines().
+ * Aligns the lines of content so that the specified line is within the
+ * array of lines returned by getDisplayLines().
*
* @see #getDisplayLines()
*/
@@ -181,7 +182,8 @@ public class TextContent {
}
/**
- * returns the entire text of the content, with a newline between each block (but not after the final block.
+ * returns the entire text of the content, with a newline between each block
+ * (but not after the final block.
*/
public String getText() {
final StringBuffer content = new StringBuffer();
@@ -243,7 +245,8 @@ public class TextContent {
}
/**
- * Returns the number of lines required to display the content text in it entirety.
+ * Returns the number of lines required to display the content text in it
+ * entirety.
*/
public int getNoLinesOfContent() {
int lineCount = 0;
@@ -276,8 +279,8 @@ public class TextContent {
content.append("lines", availableDisplayLines);
content.append("blocks=", blocks.size());
/*
- * for (int i = 0; i < blocks.size(); i++) { content.append(i == 0 ? " " : "\n ");
- * content.append(blocks.elementAt(i)); }
+ * for (int i = 0; i < blocks.size(); i++) { content.append(i == 0 ? " "
+ * : "\n "); content.append(blocks.elementAt(i)); }
*/
return content.toString();
}
@@ -346,8 +349,8 @@ public class TextContent {
}
/*
- * slightly offsetting mouse helps the user position the cursor between characters near the pointer rather than
- * always after the pointer
+ * slightly offsetting mouse helps the user position the cursor between
+ * characters near the pointer rather than always after the pointer
*/
final int x = atLocation.getX() - 3;
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/text/TextSelection.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/text/TextSelection.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/text/TextSelection.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/text/TextSelection.java Sun Jan 22 08:05:17 2012
@@ -31,7 +31,8 @@ public class TextSelection {
}
/**
- * Determine if the selection is back to front. Returns true if the cursor position is before the start position.
+ * Determine if the selection is back to front. Returns true if the cursor
+ * position is before the start position.
*/
private boolean backwardSelection() {
return cursor.isBefore(start);
@@ -55,14 +56,16 @@ public class TextSelection {
// private CursorPosition end = new CursorPosition(0,0);
/**
- * returns true is a selection exists - if the start and end locations are not the same
+ * returns true is a selection exists - if the start and end locations are
+ * not the same
*/
public boolean hasSelection() {
return !cursor.samePosition(start);
}
/**
- * clears the selection so nothing is selected. The start and end points are set to the same values as the cursor.
+ * clears the selection so nothing is selected. The start and end points are
+ * set to the same values as the cursor.
*/
public void resetTo(final CursorPosition pos) {
start.asFor(pos);
@@ -91,7 +94,6 @@ public class TextSelection {
@Override
public String toString() {
- return "Selection [from=" + start.getLine() + ":" + start.getCharacter() + ",to=" + cursor.getLine() + ":"
- + cursor.getCharacter() + "]";
+ return "Selection [from=" + start.getLine() + ":" + start.getCharacter() + ",to=" + cursor.getLine() + ":" + cursor.getCharacter() + "]";
}
}
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/text/TitleText.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/text/TitleText.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/text/TitleText.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/text/TitleText.java Sun Jan 22 08:05:17 2012
@@ -32,8 +32,8 @@ import org.apache.isis.viewer.dnd.view.V
import org.apache.isis.viewer.dnd.view.ViewState;
/**
- * TitleText draws the text derived from the subclass within a view. The text is properly truncated if longer than the
- * specified maximum width.
+ * TitleText draws the text derived from the subclass within a view. The text is
+ * properly truncated if longer than the specified maximum width.
*/
public abstract class TitleText {
private static final int NO_MAX_WIDTH = -1;
@@ -49,18 +49,21 @@ public abstract class TitleText {
}
/**
- * Draw this TitleText's text stating from the specified x coordination and on the specified baseline.
+ * Draw this TitleText's text stating from the specified x coordination and
+ * on the specified baseline.
*/
public void draw(final Canvas canvas, final int x, final int baseline) {
draw(canvas, x, baseline, NO_MAX_WIDTH);
}
/**
- * Draw this TitleText's text stating from the specified x coordination and on the specified baseline. If a maximum
- * width is specified (ie it is positive) then the text drawn will not extend past that width.
+ * Draw this TitleText's text stating from the specified x coordination and
+ * on the specified baseline. If a maximum width is specified (ie it is
+ * positive) then the text drawn will not extend past that width.
*
* @param maxWidth
- * the maximum width to display the text within; if negative no limit is imposed
+ * the maximum width to display the text within; if negative no
+ * limit is imposed
*/
public void draw(final Canvas canvas, final int x, final int baseline, final int maxWidth) {
Color color;
@@ -84,8 +87,7 @@ public abstract class TitleText {
if (Toolkit.debug) {
final int x2 = style.stringWidth(text);
- canvas.drawDebugOutline(new Bounds(xt, yt - style.getAscent(), x2, style.getTextHeight()), baseline,
- Toolkit.getColor(ColorsAndFonts.COLOR_DEBUG_BOUNDS_DRAW));
+ canvas.drawDebugOutline(new Bounds(xt, yt - style.getAscent(), x2, style.getTextHeight()), baseline, Toolkit.getColor(ColorsAndFonts.COLOR_DEBUG_BOUNDS_DRAW));
}
canvas.drawText(text, xt, yt, color, style);
}
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/undo/AssociateCommand.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/undo/AssociateCommand.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/undo/AssociateCommand.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/undo/AssociateCommand.java Sun Jan 22 08:05:17 2012
@@ -30,8 +30,7 @@ public class AssociateCommand implements
private final ObjectAdapter associatedObject;
private final String name;
- public AssociateCommand(final ObjectAdapter object, final ObjectAdapter associatedObject,
- final OneToOneAssociation field) {
+ public AssociateCommand(final ObjectAdapter object, final ObjectAdapter associatedObject, final OneToOneAssociation field) {
this.description = "Clear association of " + associatedObject.titleString();
this.name = "associate " + associatedObject.titleString();
this.object = object;
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/undo/SetValueCommand.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/undo/SetValueCommand.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/undo/SetValueCommand.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/undo/SetValueCommand.java Sun Jan 22 08:05:17 2012
@@ -53,8 +53,10 @@ public class SetValueCommand implements
final Object obj = facet.fromEncodedString(oldValue);
final ObjectAdapter adapter = getAdapterManager().adapterFor(obj);
value.setAssociation(object, adapter);
- // have commented this out because it isn't needed; the transaction manager will do this
- // for us on endTransaction. Still, if I'm wrong and it is needed, hopefully this
+ // have commented this out because it isn't needed; the transaction
+ // manager will do this
+ // for us on endTransaction. Still, if I'm wrong and it is needed,
+ // hopefully this
// comment will help...
// IsisContext.getObjectPersistor().objectChangedAllDirty();
}
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/window/AbstractWindowBorder.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/window/AbstractWindowBorder.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/window/AbstractWindowBorder.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/window/AbstractWindowBorder.java Sun Jan 22 08:05:17 2012
@@ -115,9 +115,9 @@ public abstract class AbstractWindowBord
final boolean hasFocus = containsFocus();
final ViewState state = getState();
- borderRender.draw(canvas, getSize(), hasFocus, state, controls, title() + " (" + getSpecification().getName()
- + ")");
- // canvas.drawRectangle(0, 0, getSize().getWidth(), borderRender.getTop(), Toolkit.getColor(0xfff));
+ borderRender.draw(canvas, getSize(), hasFocus, state, controls, title() + " (" + getSpecification().getName() + ")");
+ // canvas.drawRectangle(0, 0, getSize().getWidth(),
+ // borderRender.getTop(), Toolkit.getColor(0xfff));
// controls
for (int i = 0; controls != null && i < controls.length; i++) {
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/window/WindowBorder.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/window/WindowBorder.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/window/WindowBorder.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/window/WindowBorder.java Sun Jan 22 08:05:17 2012
@@ -53,8 +53,7 @@ public class WindowBorder extends Abstra
if (isTransient()) {
setControls(new WindowControl[] { new CloseWindowControl(this) });
} else {
- setControls(new WindowControl[] { new IconizeWindowControl(this), new ResizeWindowControl(this),
- new CloseWindowControl(this) });
+ setControls(new WindowControl[] { new IconizeWindowControl(this), new ResizeWindowControl(this), new CloseWindowControl(this) });
}
}
@@ -101,10 +100,8 @@ public class WindowBorder extends Abstra
final Content content = getContent();
final UserActionSet suboptions = menuOptions.addNewActionSet("Replace with");
- replaceOptions(Toolkit.getViewFactory().availableViews(new ViewRequirement(content, ViewRequirement.OPEN)),
- suboptions);
- replaceOptions(Toolkit.getViewFactory().availableViews(new ViewRequirement(content, ViewRequirement.CLOSED)),
- suboptions);
+ replaceOptions(Toolkit.getViewFactory().availableViews(new ViewRequirement(content, ViewRequirement.OPEN)), suboptions);
+ replaceOptions(Toolkit.getViewFactory().availableViews(new ViewRequirement(content, ViewRequirement.CLOSED)), suboptions);
}
protected void replaceOptions(final Enumeration possibleViews, final UserActionSet options) {
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/viewer/SkylarkViewFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/viewer/SkylarkViewFactory.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/viewer/SkylarkViewFactory.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/viewer/SkylarkViewFactory.java Sun Jan 22 08:05:17 2012
@@ -51,7 +51,8 @@ import org.apache.isis.viewer.dnd.viewer
import org.apache.log4j.Logger;
/**
- * This class holds all the different view types that all the different objects can be viewed as.
+ * This class holds all the different view types that all the different objects
+ * can be viewed as.
*/
public class SkylarkViewFactory implements GlobalViewFactory {
private static final ViewSpecification fallback = new FallbackView.Specification();
@@ -101,14 +102,17 @@ public class SkylarkViewFactory implemen
} else {
spec = specification;
}
- // TODO this should be passed in so that factory created views can be related to the views that ask
+ // TODO this should be passed in so that factory created views can be
+ // related to the views that ask
// for them
final Axes axes = new Axes();
View createView = spec.createView(content, axes, -1);
/*
- * ObjectSpecification contentSpecification = content.getSpecification(); if (contentSpecification != null) {
- * Options viewOptions = Properties.getViewConfigurationOptions(spec); createView.loadOptions(viewOptions); }
+ * ObjectSpecification contentSpecification =
+ * content.getSpecification(); if (contentSpecification != null) {
+ * Options viewOptions = Properties.getViewConfigurationOptions(spec);
+ * createView.loadOptions(viewOptions); }
*/
if (content.isObject()) {
final ObjectAdapter adapter = content.getAdapter();
@@ -268,8 +272,7 @@ public class SkylarkViewFactory implemen
return viewsFor(requirement, designSpecifications);
}
- private Enumeration<ViewSpecification> viewsFor(final ViewRequirement requirement,
- final List<ViewSpecification> viewSpecifications) {
+ private Enumeration<ViewSpecification> viewsFor(final ViewRequirement requirement, final List<ViewSpecification> viewSpecifications) {
final Vector<ViewSpecification> v = new Vector<ViewSpecification>();
for (final ViewSpecification specification : viewSpecifications) {
if (specification.canDisplay(requirement)) {
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/viewer/basic/ApplicationWorkspace.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/viewer/basic/ApplicationWorkspace.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/viewer/basic/ApplicationWorkspace.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/viewer/basic/ApplicationWorkspace.java Sun Jan 22 08:05:17 2012
@@ -73,8 +73,7 @@ public final class ApplicationWorkspace
protected Vector<View> serviceViews;
protected Vector<View> iconViews;
- public ApplicationWorkspace(final Content content, final Axes axes, final CompositeViewSpecification specification,
- final Layout layout, final ApplicationWorkspaceBuilder builder) {
+ public ApplicationWorkspace(final Content content, final Axes axes, final CompositeViewSpecification specification, final Layout layout, final ApplicationWorkspaceBuilder builder) {
super(content, specification, axes, layout, builder);
serviceViews = new Vector<View>();
iconViews = new Vector<View>();
@@ -128,9 +127,7 @@ public final class ApplicationWorkspace
@Override
public View addIconFor(final ObjectAdapter object, final Placement placement) {
final Content content = Toolkit.getContentFactory().createRootContent(object);
- final View icon =
- Toolkit.getViewFactory().createView(
- new ViewRequirement(content, ViewRequirement.CLOSED | ViewRequirement.ROOT));
+ final View icon = Toolkit.getViewFactory().createView(new ViewRequirement(content, ViewRequirement.CLOSED | ViewRequirement.ROOT));
add(iconViews, icon);
placement.position(this, icon);
return icon;
@@ -138,9 +135,7 @@ public final class ApplicationWorkspace
public void addServiceIconFor(final ObjectAdapter service) {
final Content content = new ServiceObject(service);
- final View serviceIcon =
- Toolkit.getViewFactory().createView(
- new ViewRequirement(content, ViewRequirement.CLOSED | ViewRequirement.SUBVIEW));
+ final View serviceIcon = Toolkit.getViewFactory().createView(new ViewRequirement(content, ViewRequirement.CLOSED | ViewRequirement.SUBVIEW));
add(serviceViews, serviceIcon);
}
@@ -155,7 +150,8 @@ public final class ApplicationWorkspace
}
}
- // TODO check the dragging in of objects, flag to user that object cannot be dropped
+ // TODO check the dragging in of objects, flag to user that object cannot be
+ // dropped
@Override
public void drop(final ContentDrag drag) {
getFeedbackManager().showDefaultCursor();
@@ -187,9 +183,7 @@ public final class ApplicationWorkspace
dropLocation.subtract(drag.getOffset());
if (drag.isShift()) {
- newView =
- Toolkit.getViewFactory().createView(
- new ViewRequirement(getContent(), ViewRequirement.OPEN | ViewRequirement.SUBVIEW));
+ newView = Toolkit.getViewFactory().createView(new ViewRequirement(getContent(), ViewRequirement.OPEN | ViewRequirement.SUBVIEW));
drag.getTargetView().addView(newView);
newView.setLocation(dropLocation);
} else {
@@ -417,7 +411,8 @@ public final class ApplicationWorkspace
}
private void menuForChangingUsers(final UserActionSet options) {
- // TODO pick out users from the perspectives, but only show when in exploration mode
+ // TODO pick out users from the perspectives, but only show when in
+ // exploration mode
if (getAuthenticationSession() instanceof MultiUserExplorationSession) {
final MultiUserExplorationSession session = (MultiUserExplorationSession) getAuthenticationSession();
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/viewer/basic/ApplicationWorkspaceBuilder.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/viewer/basic/ApplicationWorkspaceBuilder.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/viewer/basic/ApplicationWorkspaceBuilder.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/viewer/basic/ApplicationWorkspaceBuilder.java Sun Jan 22 08:05:17 2012
@@ -34,13 +34,15 @@ import org.apache.isis.viewer.dnd.view.c
import org.apache.log4j.Logger;
/**
- * WorkspaceBuilder builds a workspace view for an ObjectContent view by finding a collection of classes from a field
- * called 'classes' and adding an icon for each element. Similarly, if there is a collection called 'objects' its
+ * WorkspaceBuilder builds a workspace view for an ObjectContent view by finding
+ * a collection of classes from a field called 'classes' and adding an icon for
+ * each element. Similarly, if there is a collection called 'objects' its
* elements are also added to the display.
*
* <p>
- * During lay-out any icons that have an UNPLACED location (-1, -1) are given a location. Objects of type
- * ObjectSpecification are added to the left-hand side, while all other icons are placed on the right-hand side of the
+ * During lay-out any icons that have an UNPLACED location (-1, -1) are given a
+ * location. Objects of type ObjectSpecification are added to the left-hand
+ * side, while all other icons are placed on the right-hand side of the
* workspace view. Open windows are displayed in the centre.
*/
public class ApplicationWorkspaceBuilder extends AbstractViewBuilder {
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/viewer/basic/CollectionDisplayIterator.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/viewer/basic/CollectionDisplayIterator.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/viewer/basic/CollectionDisplayIterator.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/viewer/basic/CollectionDisplayIterator.java Sun Jan 22 08:05:17 2012
@@ -36,7 +36,8 @@ public interface CollectionDisplayIterat
public int getDisplaySize();
/**
- * If true there is a next page to display, and 'next' and 'last' options are valid
+ * If true there is a next page to display, and 'next' and 'last' options
+ * are valid
*/
public boolean hasNext();
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/viewer/basic/FallbackView.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/viewer/basic/FallbackView.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/viewer/basic/FallbackView.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/viewer/basic/FallbackView.java Sun Jan 22 08:05:17 2012
@@ -91,8 +91,7 @@ public class FallbackView extends Object
canvas.drawSolidRectangle(0, 0, 10, height, Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY2));
canvas.drawLine(10, 0, 10, height - 2, Toolkit.getColor(ColorsAndFonts.COLOR_BLACK));
canvas.drawRectangle(0, 0, width, height, Toolkit.getColor(ColorsAndFonts.COLOR_BLACK));
- canvas.drawText(getContent().title(), 14, getBaseline(), Toolkit.getColor(ColorsAndFonts.COLOR_BLACK),
- Toolkit.getText(ColorsAndFonts.TEXT_NORMAL));
+ canvas.drawText(getContent().title(), 14, getBaseline(), Toolkit.getColor(ColorsAndFonts.COLOR_BLACK), Toolkit.getText(ColorsAndFonts.TEXT_NORMAL));
}
@Override
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/viewer/basic/LogoBackground.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/viewer/basic/LogoBackground.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/viewer/basic/LogoBackground.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/viewer/basic/LogoBackground.java Sun Jan 22 08:05:17 2012
@@ -65,12 +65,8 @@ public class LogoBackground implements B
x = viewSize.getWidth() / 2 - logoSize.getWidth() / 2;
y = viewSize.getHeight() / 2 - logoSize.getHeight() / 2;
} else {
- x =
- (location.getX() >= 0) ? location.getX() : viewSize.getWidth() + location.getX()
- - logoSize.getWidth();
- y =
- (location.getY() >= 0) ? location.getY() : viewSize.getHeight() + location.getY()
- - logoSize.getHeight();
+ x = (location.getX() >= 0) ? location.getX() : viewSize.getWidth() + location.getX() - logoSize.getWidth();
+ y = (location.getY() >= 0) ? location.getY() : viewSize.getHeight() + location.getY() - logoSize.getHeight();
}
canvas.drawImage(logo, x, y, logoSize.getWidth(), logoSize.getHeight());
}
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/viewer/basic/MinimizedView.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/viewer/basic/MinimizedView.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/viewer/basic/MinimizedView.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/viewer/basic/MinimizedView.java Sun Jan 22 08:05:17 2012
@@ -199,8 +199,7 @@ public class MinimizedView extends Abstr
public MinimizedView(final View viewToMinimize) {
super(viewToMinimize.getContent(), new Specification());
this.minimizedView = viewToMinimize;
- iconView =
- new SubviewIconSpecification().createView(viewToMinimize.getContent(), viewToMinimize.getViewAxes(), -1);
+ iconView = new SubviewIconSpecification().createView(viewToMinimize.getContent(), viewToMinimize.getViewAxes(), -1);
iconView.setParent(this);
controls = new WindowControl[] { new RestoreWindowControl(this), new CloseWindowControl(this) };
}
@@ -231,7 +230,8 @@ public class MinimizedView extends Abstr
return super.dragStart(drag);
}
// View dragOverlay = new DragViewOutline(getView());
- // return new ViewDrag(this, new Offset(drag.getLocation()), dragOverlay);
+ // return new ViewDrag(this, new Offset(drag.getLocation()),
+ // dragOverlay);
}
@Override
@@ -245,9 +245,7 @@ public class MinimizedView extends Abstr
final int top = 3;
final boolean hasFocus = containsFocus();
- final Color lightColor =
- hasFocus ? Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY1) : Toolkit
- .getColor(ColorsAndFonts.COLOR_SECONDARY2);
+ final Color lightColor = hasFocus ? Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY1) : Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY2);
clearBackground(canvas, Toolkit.getColor(ColorsAndFonts.COLOR_WINDOW));
canvas.drawRectangle(1, 0, width - 2, height, lightColor);
canvas.drawRectangle(0, 1, width, height - 2, lightColor);
@@ -257,13 +255,13 @@ public class MinimizedView extends Abstr
final ViewState state = getState();
if (state.isActive()) {
final int i = left;
- canvas.drawRectangle(i, top, width - 2 * i, height - 2 * i - top,
- Toolkit.getColor(ColorsAndFonts.COLOR_ACTIVE));
+ canvas.drawRectangle(i, top, width - 2 * i, height - 2 * i - top, Toolkit.getColor(ColorsAndFonts.COLOR_ACTIVE));
}
- final int bw = controls[0].getLocation().getX() - 3; // controls.length * WindowControl.WIDTH;
- canvas.drawSolidRectangle(bw, top, width - bw - 3, height - top * 2,
- Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY3));
+ final int bw = controls[0].getLocation().getX() - 3; // controls.length
+ // *
+ // WindowControl.WIDTH;
+ canvas.drawSolidRectangle(bw, top, width - bw - 3, height - top * 2, Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY3));
canvas.drawLine(bw - 1, top, bw - 1, height - top * 2, lightColor);
for (int i = 0; controls != null && i < controls.length; i++) {
@@ -401,9 +399,11 @@ public class MinimizedView extends Abstr
final View button = overControl(click.getLocation());
if (button == null) {
/*
- * if (overBorder(click.getLocation())) { Workspace workspace = getWorkspace(); if (workspace != null) { if
- * (click.button2()) { workspace.lower(getView()); } else if (click.button1()) { workspace.raise(getView());
- * } } } else { super.firstClick(click); }
+ * if (overBorder(click.getLocation())) { Workspace workspace =
+ * getWorkspace(); if (workspace != null) { if (click.button2()) {
+ * workspace.lower(getView()); } else if (click.button1()) {
+ * workspace.raise(getView()); } } } else { super.firstClick(click);
+ * }
*/} else {
button.firstClick(click);
}
Modified: incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/DummyCanvas.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/DummyCanvas.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/DummyCanvas.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/DummyCanvas.java Sun Jan 22 08:05:17 2012
@@ -49,8 +49,7 @@ public class DummyCanvas implements Canv
}
@Override
- public void draw3DRectangle(final int x, final int y, final int width, final int height, final Color color,
- final boolean raised) {
+ public void draw3DRectangle(final int x, final int y, final int width, final int height, final Color color, final boolean raised) {
}
@Override
@@ -82,8 +81,7 @@ public class DummyCanvas implements Canv
}
@Override
- public void drawRoundedRectangle(final int x, final int y, final int width, final int height, final int arcWidth,
- final int arcHeight, final Color color) {
+ public void drawRoundedRectangle(final int x, final int y, final int width, final int height, final int arcWidth, final int arcHeight, final Color color) {
}
@Override
@@ -115,8 +113,7 @@ public class DummyCanvas implements Canv
}
@Override
- public void drawText(final String text, final int x, final int y, final int maxWidth, final Color color,
- final Text style) {
+ public void drawText(final String text, final int x, final int y, final int maxWidth, final Color color, final Text style) {
}
@Override
Modified: incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/DummyView.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/DummyView.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/DummyView.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/DummyView.java Sun Jan 22 08:05:17 2012
@@ -297,7 +297,7 @@ public class DummyView implements View {
@Override
public View[] getSubviews() {
- return (View[]) subviews.toArray(new View[subviews.size()]);
+ return subviews.toArray(new View[subviews.size()]);
}
@Override
Modified: incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/ViewManagerTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/ViewManagerTest.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/ViewManagerTest.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/ViewManagerTest.java Sun Jan 22 08:05:17 2012
@@ -34,37 +34,46 @@ public class ViewManagerTest extends Tes
}
/*
- * public void testMouseClick() { MockWorkspace workspace = new MockWorkspace(null); MockView view = new MockView();
+ * public void testMouseClick() { MockWorkspace workspace = new
+ * MockWorkspace(null); MockView view = new MockView();
* workspace.setupIdentifyView(view);
*
* ViewManager manager = new ViewManager(workspace, null);
*
- * view.setupGetAbsoluteLocation(new Location(10, 10)); view.setupIndicatesForView(true);
- * view.setExpectedFirstClickCalls(1);
+ * view.setupGetAbsoluteLocation(new Location(10, 10));
+ * view.setupIndicatesForView(true); view.setExpectedFirstClickCalls(1);
*
- * manager.mouseClicked(createMouseEvent(10, 20, 1, MouseEvent.BUTTON1_MASK));
+ * manager.mouseClicked(createMouseEvent(10, 20, 1,
+ * MouseEvent.BUTTON1_MASK));
*
* view.verify(); }
*
- * public void testPopupMouseClick() { MockWorkspace workspace = new MockWorkspace(null); MockView view = new
- * MockView(); workspace.setupIdentifyView(view);
+ * public void testPopupMouseClick() { MockWorkspace workspace = new
+ * MockWorkspace(null); MockView view = new MockView();
+ * workspace.setupIdentifyView(view);
*
- * MockPopupMenu popup = new MockPopupMenu(); ViewManager manager = new ViewManager(workspace, popup);
+ * MockPopupMenu popup = new MockPopupMenu(); ViewManager manager = new
+ * ViewManager(workspace, popup);
*
- * view.setupGetAbsoluteLocation(new Location(10, 10)); view.setupIndicatesForView(true);
+ * view.setupGetAbsoluteLocation(new Location(10, 10));
+ * view.setupIndicatesForView(true);
*
* workspace.addExpectedSetIdentifiedViewValues(view);
*
- * popup.addExpectedInitValues(view, true, true); view.setupGetAbsoluteLocation(new Location(10, 10));
- * view.setupIndicatesForView(true); // popup.setupGetParent(null); // popup.setupIndicatesForView(true);
+ * popup.addExpectedInitValues(view, true, true);
+ * view.setupGetAbsoluteLocation(new Location(10, 10));
+ * view.setupIndicatesForView(true); // popup.setupGetParent(null); //
+ * popup.setupIndicatesForView(true);
*
- * manager.mouseClicked(createMouseEvent(10, 20, 1, MouseEvent.BUTTON3_MASK));
+ * manager.mouseClicked(createMouseEvent(10, 20, 1,
+ * MouseEvent.BUTTON3_MASK));
*
* popup.verify(); view.verify();
*
* popup.setExpectedFirstClickCalls(1); }
*
- * private MouseEvent createMouseEvent(final int x, final int y, final int count, final int button) { return new
- * MouseEvent(COMPONENT, 0, 0, button, x, y, count, false); }
+ * private MouseEvent createMouseEvent(final int x, final int y, final int
+ * count, final int button) { return new MouseEvent(COMPONENT, 0, 0, button,
+ * x, y, count, false); }
*/
}
Modified: incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/configurable/ConfigurableListViewSpecificationTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/configurable/ConfigurableListViewSpecificationTest.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/configurable/ConfigurableListViewSpecificationTest.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/configurable/ConfigurableListViewSpecificationTest.java Sun Jan 22 08:05:17 2012
@@ -102,11 +102,13 @@ public class ConfigurableListViewSpecifi
/*
* TODO Fails trying to load user profile form NO system. View view =
- * viewSpecification.createView(collectionContent, new Axes(), 0); Axes axes = view.getViewAxes(); GridLayout
- * axis = axes.getAxis(GridLayout.class); assertEquals(1, axis.getSize());
+ * viewSpecification.createView(collectionContent, new Axes(), 0); Axes
+ * axes = view.getViewAxes(); GridLayout axis =
+ * axes.getAxis(GridLayout.class); assertEquals(1, axis.getSize());
*
*
- * ConfigurationAxis configurationAxis = axes.getAxis(ConfigurationAxis.class);
+ * ConfigurationAxis configurationAxis =
+ * axes.getAxis(ConfigurationAxis.class);
* assertNotNull(configurationAxis);
*/
}
Modified: incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/view/text/CursorPostionStub.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/view/text/CursorPostionStub.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/view/text/CursorPostionStub.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/view/text/CursorPostionStub.java Sun Jan 22 08:05:17 2012
@@ -19,7 +19,6 @@
package org.apache.isis.viewer.dnd.view.text;
-
public class CursorPostionStub extends CursorPosition {
public CursorPostionStub(final TextContent content, final int line, final int afterCharacter) {
super(content, line, afterCharacter);
Modified: incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/view/text/MultilineTextFieldContentTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/view/text/MultilineTextFieldContentTest.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/view/text/MultilineTextFieldContentTest.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/view/text/MultilineTextFieldContentTest.java Sun Jan 22 08:05:17 2012
@@ -81,10 +81,8 @@ public class MultilineTextFieldContentTe
}
});
- final IsisSessionFactoryDefault sessionFactory =
- new IsisSessionFactoryDefault(DeploymentType.EXPLORATION, new IsisConfigurationDefault(),
- mockTemplateImageLoader, mockSpecificationLoader, mockAuthenticationManager, mockAuthorizationManager,
- mockUserProfileLoader, mockPersistenceSessionFactory, servicesList);
+ final IsisSessionFactoryDefault sessionFactory = new IsisSessionFactoryDefault(DeploymentType.EXPLORATION, new IsisConfigurationDefault(), mockTemplateImageLoader, mockSpecificationLoader, mockAuthenticationManager, mockAuthorizationManager, mockUserProfileLoader,
+ mockPersistenceSessionFactory, servicesList);
IsisContextStatic.createRelaxedInstance(sessionFactory);
sessionFactory.init();
@@ -100,8 +98,7 @@ public class MultilineTextFieldContentTe
selection.resetTo(new CursorPosition(content, 1, 3));
selection.extendTo(new CursorPosition(content, 1, 7));
content.delete(selection);
- Assert.assertEquals("Line one\nLino\nLine three\nLine four that is long enough that it wraps",
- content.getText());
+ Assert.assertEquals("Line one\nLino\nLine three\nLine four that is long enough that it wraps", content.getText());
}
@Test
@@ -110,8 +107,7 @@ public class MultilineTextFieldContentTe
selection.resetTo(new CursorPosition(content, 1, 7));
selection.extendTo(new CursorPosition(content, 1, 3));
content.delete(selection);
- Assert.assertEquals("Line one\nLino\nLine three\nLine four that is long enough that it wraps",
- content.getText());
+ Assert.assertEquals("Line one\nLino\nLine three\nLine four that is long enough that it wraps", content.getText());
}
@Test
@@ -147,8 +143,7 @@ public class MultilineTextFieldContentTe
selection.resetTo(new CursorPosition(content, 5, 0));
selection.extendTo(new CursorPosition(content, 5, 3));
content.delete(selection);
- Assert.assertEquals("Line one\nLine two\nLine three\nLine four that is long enough that wraps",
- content.getText());
+ Assert.assertEquals("Line one\nLine two\nLine three\nLine four that is long enough that wraps", content.getText());
}
@Test
Modified: incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/view/text/TextBlockTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/view/text/TextBlockTest.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/view/text/TextBlockTest.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/view/text/TextBlockTest.java Sun Jan 22 08:05:17 2012
@@ -37,8 +37,7 @@ public class TextBlockTest extends TestC
LogManager.getRootLogger().setLevel(Level.OFF);
final TextBlockTarget user = new TextBlockTargetExample();
- block =
- new TextBlock(user, "Now is the winter of our discontent made summer by this glorious sun of York", true);
+ block = new TextBlock(user, "Now is the winter of our discontent made summer by this glorious sun of York", true);
// "Now is the winter "
// "of our discontent "
// "made summer by "
Modified: incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/view/text/TextFieldContentStub.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/view/text/TextFieldContentStub.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/view/text/TextFieldContentStub.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/view/text/TextFieldContentStub.java Sun Jan 22 08:05:17 2012
@@ -19,7 +19,6 @@
package org.apache.isis.viewer.dnd.view.text;
-
public class TextFieldContentStub extends TextContent {
public TextFieldContentStub() {
Modified: incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/view/text/TextFieldContentTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/view/text/TextFieldContentTest.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/view/text/TextFieldContentTest.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/view/text/TextFieldContentTest.java Sun Jan 22 08:05:17 2012
@@ -90,10 +90,8 @@ public class TextFieldContentTest {
}
});
- final IsisSessionFactory sessionFactory =
- new IsisSessionFactoryDefault(DeploymentType.EXPLORATION, new IsisConfigurationDefault(),
- mockTemplateImageLoader, mockSpecificationLoader, mockAuthenticationManager, mockAuthorizationManager,
- mockUserProfileLoader, mockPersistenceSessionFactory, servicesList);
+ final IsisSessionFactory sessionFactory = new IsisSessionFactoryDefault(DeploymentType.EXPLORATION, new IsisConfigurationDefault(), mockTemplateImageLoader, mockSpecificationLoader, mockAuthenticationManager, mockAuthorizationManager, mockUserProfileLoader, mockPersistenceSessionFactory,
+ servicesList);
sessionFactory.init();
IsisContextStatic.createRelaxedInstance(sessionFactory);
@@ -136,7 +134,8 @@ public class TextFieldContentTest {
@Test
public void testInsert() {
/*
- * CursorPosition cursor = new CursorPosition(0,0); content.insert(cursor, "test string");
+ * CursorPosition cursor = new CursorPosition(0,0);
+ * content.insert(cursor, "test string");
*/
}
@@ -165,8 +164,7 @@ public class TextFieldContentTest {
// TODO reinstate once name has be set
public void testAlignField() {
// the following text wraps so it takes up 9 line
- content
- .setText("Apache Isis - a framework that exposes behaviourally complete business objects directly to the user. Copyright (C) 2010 Apache Software Foundation");
+ content.setText("Apache Isis - a framework that exposes behaviourally complete business objects directly to the user. Copyright (C) 2010 Apache Software Foundation");
assertEquals(9, content.getNoLinesOfContent());
@@ -202,11 +200,9 @@ public class TextFieldContentTest {
@Test
public void testInstertOverTheEndOfLine() {
final CursorPosition cursor = new CursorPosition(content, 0, 0);
- content.insert(cursor,
- "test insert that is longer than the four lines that were originally allocated for this test");
+ content.insert(cursor, "test insert that is longer than the four lines that were originally allocated for this test");
- assertEquals("test insert that is longer than the four lines that were originally allocated for this test",
- content.getText());
+ assertEquals("test insert that is longer than the four lines that were originally allocated for this test", content.getText());
assertEquals(4, content.getNoDisplayLines());
assertEquals(6, content.getNoLinesOfContent());
}
Modified: incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/viewer/ViewUpdateNotifierTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/viewer/ViewUpdateNotifierTest.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/viewer/ViewUpdateNotifierTest.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/viewer/ViewUpdateNotifierTest.java Sun Jan 22 08:05:17 2012
@@ -134,10 +134,8 @@ public class ViewUpdateNotifierTest {
}
});
- final IsisSessionFactory sessionFactory =
- new IsisSessionFactoryDefault(DeploymentType.EXPLORATION, new IsisConfigurationDefault(),
- mockTemplateImageLoader, mockSpecificationLoader, mockAuthenticationManager, mockAuthorizationManager,
- mockUserProfileLoader, mockPersistenceSessionFactory, servicesList);
+ final IsisSessionFactory sessionFactory = new IsisSessionFactoryDefault(DeploymentType.EXPLORATION, new IsisConfigurationDefault(), mockTemplateImageLoader, mockSpecificationLoader, mockAuthenticationManager, mockAuthorizationManager, mockUserProfileLoader, mockPersistenceSessionFactory,
+ servicesList);
sessionFactory.init();
IsisContextStatic.createRelaxedInstance(sessionFactory);
Modified: incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/viewer/basic/ActionFieldBuilderTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/viewer/basic/ActionFieldBuilderTest.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/viewer/basic/ActionFieldBuilderTest.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/viewer/basic/ActionFieldBuilderTest.java Sun Jan 22 08:05:17 2012
@@ -105,10 +105,7 @@ public class ActionFieldBuilderTest {
}
};
- final IsisSessionFactoryDefault sessionFactory =
- new IsisSessionFactoryDefault(DeploymentType.EXPLORATION, configuration, mockTemplateImageLoader,
- mockSpecificationLoader, mockAuthenticationManager, mockAuthorizationManager, mockUserProfileLoader,
- mockPersistenceSessionFactory, servicesList);
+ final IsisSessionFactoryDefault sessionFactory = new IsisSessionFactoryDefault(DeploymentType.EXPLORATION, configuration, mockTemplateImageLoader, mockSpecificationLoader, mockAuthenticationManager, mockAuthorizationManager, mockUserProfileLoader, mockPersistenceSessionFactory, servicesList);
IsisContext.setConfiguration(sessionFactory.getConfiguration());
IsisContextStatic.createRelaxedInstance(sessionFactory);
@@ -132,8 +129,9 @@ public class ActionFieldBuilderTest {
control.expectAndDefaultReturn(view.getContent(), null);
/*
- * DummyView[] views = new DummyView[2]; views[1] = new DummyView(); views[1].setupContent(new
- * ObjectParameter("name", null, null, false, 1, actionContent)); view.setupSubviews(views);
+ * DummyView[] views = new DummyView[2]; views[1] = new DummyView();
+ * views[1].setupContent(new ObjectParameter("name", null, null, false,
+ * 1, actionContent)); view.setupSubviews(views);
*/
control.replay();
@@ -144,17 +142,21 @@ public class ActionFieldBuilderTest {
}
/*
- * // TODO fails on server as cant load X11 for Text class public void xxxtestNewBuild() { view.setupSubviews(new
- * View[0]);
+ * // TODO fails on server as cant load X11 for Text class public void
+ * xxxtestNewBuild() { view.setupSubviews(new View[0]);
*
- * view.addAction("add TextView0 null"); view.addAction("add MockView1/LabelBorder"); view.addAction("add
+ * view.addAction("add TextView0 null");
+ * view.addAction("add MockView1/LabelBorder"); view.addAction("add
* MockView2/LabelBorder");
*
* builder.build(view);
*
- * view.verify(); } public void xxxtestUpdateBuildWhereParameterHasChangedFromNullToAnObject() { DummyView[] views =
- * new DummyView[2]; views[1] = new DummyView(); ObjectParameter objectParameter = new ObjectParameter("name", null,
- * null, false, 1, actionContent); views[1].setupContent(objectParameter); view.setupSubviews(views);
+ * view.verify(); } public void
+ * xxxtestUpdateBuildWhereParameterHasChangedFromNullToAnObject() {
+ * DummyView[] views = new DummyView[2]; views[1] = new DummyView();
+ * ObjectParameter objectParameter = new ObjectParameter("name", null, null,
+ * false, 1, actionContent); views[1].setupContent(objectParameter);
+ * view.setupSubviews(views);
*
* actionContent.setParameter(0, new DummyObjectAdapter());
*
@@ -164,10 +166,12 @@ public class ActionFieldBuilderTest {
*
* view.verify(); }
*
- * public void xxxtestUpdateBuildWhereParameterHasChangedFromAnObjectToNull() { DummyView[] views = new
- * DummyView[2]; views[1] = new DummyView(); ObjectParameter objectParameter = new ObjectParameter("name", new
- * DummyObjectAdapter(), null, false, 1, actionContent); views[1].setupContent(objectParameter);
- * view.setupSubviews(views);
+ * public void
+ * xxxtestUpdateBuildWhereParameterHasChangedFromAnObjectToNull() {
+ * DummyView[] views = new DummyView[2]; views[1] = new DummyView();
+ * ObjectParameter objectParameter = new ObjectParameter("name", new
+ * DummyObjectAdapter(), null, false, 1, actionContent);
+ * views[1].setupContent(objectParameter); view.setupSubviews(views);
*
* objectParameter.setObject(null);
*
@@ -177,10 +181,12 @@ public class ActionFieldBuilderTest {
*
* view.verify(); }
*
- * public void xxxtestUpdateBuildWhereParameterHasChangedFromOneObjectToAnother() { DummyView[] views = new
- * DummyView[2]; views[1] = new DummyView(); ObjectParameter objectParameter = new ObjectParameter("name", new
- * DummyObjectAdapter(), null, false, 1, actionContent); views[1].setupContent(objectParameter);
- * view.setupSubviews(views);
+ * public void
+ * xxxtestUpdateBuildWhereParameterHasChangedFromOneObjectToAnother() {
+ * DummyView[] views = new DummyView[2]; views[1] = new DummyView();
+ * ObjectParameter objectParameter = new ObjectParameter("name", new
+ * DummyObjectAdapter(), null, false, 1, actionContent);
+ * views[1].setupContent(objectParameter); view.setupSubviews(views);
*
* objectParameter.setObject(new DummyObjectAdapter());
*
@@ -190,12 +196,15 @@ public class ActionFieldBuilderTest {
*
* view.verify(); }
*
- * public void xxtestUpdateBuildWhereParameterObjectSetButToSameObject() { DummyView[] views = new DummyView[2];
- * views[1] = new DummyView(); DummyObjectAdapter dummyObjectAdapter = new DummyObjectAdapter(); ObjectParameter
- * objectParameter = new ObjectParameter("name", dummyObjectAdapter, null, false, 1, actionContent);
+ * public void xxtestUpdateBuildWhereParameterObjectSetButToSameObject() {
+ * DummyView[] views = new DummyView[2]; views[1] = new DummyView();
+ * DummyObjectAdapter dummyObjectAdapter = new DummyObjectAdapter();
+ * ObjectParameter objectParameter = new ObjectParameter("name",
+ * dummyObjectAdapter, null, false, 1, actionContent);
* views[1].setupContent(objectParameter); view.setupSubviews(views);
*
- * actionContent.setParameter(0, dummyObjectAdapter); // objectParameter.setObject(dummyObjectAdapter);
+ * actionContent.setParameter(0, dummyObjectAdapter); //
+ * objectParameter.setObject(dummyObjectAdapter);
*
* builder.build(view);
*
@@ -203,8 +212,9 @@ public class ActionFieldBuilderTest {
*
* class MockActionHelper extends ActionHelper {
*
- * protected MockActionHelper( ObjectAdapter target, Action action, String[] labels, ObjectAdapter[] parameters,
- * ObjectSpecification[] parameterTypes, boolean[] required) { super(target, action, labels, parameters,
+ * protected MockActionHelper( ObjectAdapter target, Action action, String[]
+ * labels, ObjectAdapter[] parameters, ObjectSpecification[] parameterTypes,
+ * boolean[] required) { super(target, action, labels, parameters,
* parameterTypes, required); }
*/
}
Modified: incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/viewer/basic/PlacementStrategyImplTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/viewer/basic/PlacementStrategyImplTest.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/viewer/basic/PlacementStrategyImplTest.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/viewer/basic/PlacementStrategyImplTest.java Sun Jan 22 08:05:17 2012
@@ -87,8 +87,7 @@ public class PlacementStrategyImplTest {
newView.setupRequiredSize(new Size(NEW_VIEW_WIDTH, NEW_VIEW_HEIGHT));
final Location location = strategy.determinePlacement(workspace, existingView, newView);
- Assert.assertEquals(
- new Location(ORIGINAL_X + ROOT_VIEW_WIDTH + PADDING + PADDING * 4, ORIGINAL_Y + PADDING * 4), location);
+ Assert.assertEquals(new Location(ORIGINAL_X + ROOT_VIEW_WIDTH + PADDING + PADDING * 4, ORIGINAL_Y + PADDING * 4), location);
}
@Test
@@ -141,8 +140,7 @@ public class PlacementStrategyImplTest {
existingView.setSize(new Size(800, 600));
final Location location = strategy.determinePlacement(workspace, existingView, newView);
- Assert.assertEquals("should be placed on top of original, but slightly offset", new Location(100 + PADDING * 6,
- 100 + PADDING * 6), location);
+ Assert.assertEquals("should be placed on top of original, but slightly offset", new Location(100 + PADDING * 6, 100 + PADDING * 6), location);
}
@Test
Modified: incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/viewer/basic/ScrollBorderTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/viewer/basic/ScrollBorderTest.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/viewer/basic/ScrollBorderTest.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/viewer/basic/ScrollBorderTest.java Sun Jan 22 08:05:17 2012
@@ -92,10 +92,7 @@ public class ScrollBorderTest {
TestToolkit.createInstance();
final IsisConfigurationDefault configuration = new IsisConfigurationDefault();
- final IsisSessionFactory sessionFactory =
- new IsisSessionFactoryDefault(DeploymentType.EXPLORATION, configuration, mockTemplateImageLoader,
- mockSpecificationLoader, mockAuthenticationManager, mockAuthorizationManager, mockUserProfileLoader,
- mockPersistenceSessionFactory, servicesList);
+ final IsisSessionFactory sessionFactory = new IsisSessionFactoryDefault(DeploymentType.EXPLORATION, configuration, mockTemplateImageLoader, mockSpecificationLoader, mockAuthenticationManager, mockAuthorizationManager, mockUserProfileLoader, mockPersistenceSessionFactory, servicesList);
sessionFactory.init();
IsisContextStatic.createRelaxedInstance(sessionFactory);
}
Modified: incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/viewer/basic/SimpleCollectionSorterTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/viewer/basic/SimpleCollectionSorterTest.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/viewer/basic/SimpleCollectionSorterTest.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/viewer/basic/SimpleCollectionSorterTest.java Sun Jan 22 08:05:17 2012
@@ -34,8 +34,7 @@ public class SimpleCollectionSorterTest
}
public void testSortByTitle() {
- final ObjectAdapter[] instances =
- new ObjectAdapter[] { object("one"), object("two"), object("three"), object("four"), };
+ final ObjectAdapter[] instances = new ObjectAdapter[] { object("one"), object("two"), object("three"), object("four"), };
final SimpleCollectionSorter sorter = new SimpleCollectionSorter();
sorter.sort(instances, new TitleComparator(), CollectionSorter.NORMAL);
@@ -47,8 +46,7 @@ public class SimpleCollectionSorterTest
}
public void testSortByTitleReversed() {
- final ObjectAdapter[] instances =
- new ObjectAdapter[] { object("one"), object("two"), object("three"), object("four"), };
+ final ObjectAdapter[] instances = new ObjectAdapter[] { object("one"), object("two"), object("three"), object("four"), };
final SimpleCollectionSorter sorter = new SimpleCollectionSorter();
sorter.sort(instances, new TitleComparator(), CollectionSorter.REVERSED);
Modified: incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/viewer/basic/TitleTextTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/viewer/basic/TitleTextTest.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/viewer/basic/TitleTextTest.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/viewer/basic/TitleTextTest.java Sun Jan 22 08:05:17 2012
@@ -58,24 +58,32 @@ public class TitleTextTest extends Proxy
canvas = new TestCanvas();
}
- // TODO these tests won't work on server that doesn't have graphics - eg a Linux box without X
+ // TODO these tests won't work on server that doesn't have graphics - eg a
+ // Linux box without X
/*
- * public void XXtestDrawCanvas() { title = "abcde"; titleText.draw(canvas, 10, 20); }
+ * public void XXtestDrawCanvas() { title = "abcde"; titleText.draw(canvas,
+ * 10, 20); }
*
- * public void testDrawCanvasDefaultColor() { titleText.draw(canvas, 10, 20);
- * assertEquals(Toolkit.getColor(ColorsAndFonts.COLOR_BLACK), canvas.color); }
+ * public void testDrawCanvasDefaultColor() { titleText.draw(canvas, 10,
+ * 20); assertEquals(Toolkit.getColor(ColorsAndFonts.COLOR_BLACK),
+ * canvas.color); }
*
* public void testDrawCanvasCanDrop() { view.getState().setCanDrop();
*
- * titleText.draw(canvas, 10, 20); assertEquals(Toolkit.getColor(ColorsAndFonts.COLOR_VALID), canvas.color); }
+ * titleText.draw(canvas, 10, 20);
+ * assertEquals(Toolkit.getColor(ColorsAndFonts.COLOR_VALID), canvas.color);
+ * }
*
* public void testDrawCanvasCantDrop() { view.getState().setCantDrop();
*
- * titleText.draw(canvas, 10, 20); assertEquals(ColorsAndFonts.COLOR_INVALID, canvas.color); }
+ * titleText.draw(canvas, 10, 20);
+ * assertEquals(ColorsAndFonts.COLOR_INVALID, canvas.color); }
*
- * public void testDrawCanvasIdentifier() { view.getState().setContentIdentified();
+ * public void testDrawCanvasIdentifier() {
+ * view.getState().setContentIdentified();
*
- * titleText.draw(canvas, 10, 20); assertEquals(Toolkit.getColor("primary1"), canvas.color); }
+ * titleText.draw(canvas, 10, 20);
+ * assertEquals(Toolkit.getColor("primary1"), canvas.color); }
*/
public void testDrawingLocation() {
titleText.draw(canvas, 10, 20);
Modified: incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/viewer/tree/TreeBrowserFrameTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/viewer/tree/TreeBrowserFrameTest.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/viewer/tree/TreeBrowserFrameTest.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/test/java/org/apache/isis/viewer/dnd/viewer/tree/TreeBrowserFrameTest.java Sun Jan 22 08:05:17 2012
@@ -74,14 +74,16 @@ public class TreeBrowserFrameTest extend
}
public void testLeftViewSize() {
- // width => width of view (150) + scroll border (0) + resize border (7) => 159
+ // width => width of view (150) + scroll border (0) + resize border (7)
+ // => 159
// height => height of view (250) + scroll border (0) => 250
assertEquals(leftView(), leftView().getView());
assertEquals(new Size(350 + 7, 250), leftView().getView().getRequiredSize(Size.createMax()));
}
public void testInitialBlankViewSize() {
- // 120 is the minimum width given to the blan view by the MasterDetailPanel
+ // 120 is the minimum width given to the blan view by the
+ // MasterDetailPanel
assertEquals(new Size(120, 0), rightView().getRequiredSize(Size.createMax()));
}
@@ -110,7 +112,8 @@ public class TreeBrowserFrameTest extend
assertEquals("retains original size", new Size(400 - 120, 200), leftView().getSize());
// scroll border 16 pixels; resize border 5 pixels; total 21 pixels
- // assertEquals("width reduces", new Size(100, 200), rightView.getSize());
+ // assertEquals("width reduces", new Size(100, 200),
+ // rightView.getSize());
// assertEquals(new Location(100, 0), rightView.getLocation());
}
@@ -136,8 +139,9 @@ public class TreeBrowserFrameTest extend
}
/*
- * public void testLayoutInReducedSpaceReducesSizeOfRightView() { layoutFrameInReducedSpace();
- * assertEquals("retains original size", new Size(120, 200), rightView().getSize()); }
+ * public void testLayoutInReducedSpaceReducesSizeOfRightView() {
+ * layoutFrameInReducedSpace(); assertEquals("retains original size", new
+ * Size(120, 200), rightView().getSize()); }
*/
private void layoutFrameInReducedSpace() {
Modified: incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/HtmlViewerConstants.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/HtmlViewerConstants.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/HtmlViewerConstants.java (original)
+++ incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/HtmlViewerConstants.java Sun Jan 22 08:05:17 2012
@@ -27,12 +27,14 @@ public final class HtmlViewerConstants {
public static final String STYLE_SHEET = PROPERTY_BASE + "style-sheet";
public static final String HEADER_FILE = PROPERTY_BASE + "header-file";
/**
- * Used if {@link #HEADER_FILE} is not specified or does not refer to a valid resource.
+ * Used if {@link #HEADER_FILE} is not specified or does not refer to a
+ * valid resource.
*/
public static final String HEADER = PROPERTY_BASE + "header";
public static final String FOOTER_FILE = PROPERTY_BASE + "footer-file";
/**
- * Used if {@link #FOOTER_FILE} is not specified or does not refer to a valid resource.
+ * Used if {@link #FOOTER_FILE} is not specified or does not refer to a
+ * valid resource.
*/
public static final String FOOTER = PROPERTY_BASE + "footer";