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 [4/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/calendar/CalendarGrid.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/calendar/CalendarGrid.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/calendar/CalendarGrid.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/calendar/CalendarGrid.java Sun Jan 22 08:05:17 2012
@@ -69,9 +69,7 @@ public class CalendarGrid extends Compos
if (cellContents[cellNo] == null) {
cell = new BlankView(new NullContent());
} else {
- cell =
- new CompositeViewUsingBuilder(cellContents[cellNo], null, new Axes(), new StackLayout(),
- new CollectionElementBuilder(new IconElementFactory()));
+ cell = new CompositeViewUsingBuilder(cellContents[cellNo], null, new Axes(), new StackLayout(), new CollectionElementBuilder(new IconElementFactory()));
cell = new ScrollBorder(cell);
}
cells[cellNo] = cell;
@@ -197,8 +195,7 @@ public class CalendarGrid extends Compos
for (int row = 0; row < rows; row++) {
final int y = topInset + row * rowHeight;
if (!acrossThenDown && hasHeader) {
- canvas
- .drawText(cellLayout.header(row), 0, y + 20, CalendarConstants.textColor, CalendarConstants.style);
+ canvas.drawText(cellLayout.header(row), 0, y + 20, CalendarConstants.textColor, CalendarConstants.style);
}
canvas.drawLine(leftInset, y, width, y, CalendarConstants.lineColor);
}
@@ -207,8 +204,7 @@ public class CalendarGrid extends Compos
for (int column = 0; column < columns; column++) {
final int x = leftInset + column * columnWidth;
if (acrossThenDown && hasHeader) {
- canvas.drawText(cellLayout.header(column), x, topInset - 5, CalendarConstants.textColor,
- CalendarConstants.style);
+ canvas.drawText(cellLayout.header(column), x, topInset - 5, CalendarConstants.textColor, CalendarConstants.style);
}
canvas.drawLine(x, topInset, x, topInset + height, CalendarConstants.lineColor);
}
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/calendar/CalendarSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/calendar/CalendarSpecification.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/calendar/CalendarSpecification.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/calendar/CalendarSpecification.java Sun Jan 22 08:05:17 2012
@@ -53,8 +53,7 @@ public class CalendarSpecification imple
public boolean canDisplay(final ViewRequirement requirement) {
final boolean openCollection = requirement.isCollection() && requirement.isOpen();
if (openCollection) {
- final List<OneToOneAssociation> propertyList =
- ((CollectionContent) requirement.getContent()).getElementSpecification().getProperties();
+ final List<OneToOneAssociation> propertyList = ((CollectionContent) requirement.getContent()).getElementSpecification().getProperties();
for (final OneToOneAssociation association : propertyList) {
if (!association.isAlwaysHidden() && association.getSpecification().containsFacet(DateValueFacet.class)) {
return true;
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/calendar/CalendarView.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/calendar/CalendarView.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/calendar/CalendarView.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/calendar/CalendarView.java Sun Jan 22 08:05:17 2012
@@ -187,9 +187,11 @@ public class CalendarView extends Compos
}
/*
- * public void invalidateLayout() { // super.invalidateLayout(); View parent = getParent(); if (parent != null) { //
- * parent.invalidateLayout(); } isInvalid = true; View toolbar = getSubviews()[0]; toolbar.invalidateLayout(); //
- * View grid = getSubviews()[1]; // grid.invalidateLayout(); } protected boolean isLayoutInvalid() { return
+ * public void invalidateLayout() { // super.invalidateLayout(); View parent
+ * = getParent(); if (parent != null) { // parent.invalidateLayout(); }
+ * isInvalid = true; View toolbar = getSubviews()[0];
+ * toolbar.invalidateLayout(); // View grid = getSubviews()[1]; //
+ * grid.invalidateLayout(); } protected boolean isLayoutInvalid() { return
* isInvalid; }
*/
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/calendar/DayCells.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/calendar/DayCells.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/calendar/DayCells.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/calendar/DayCells.java Sun Jan 22 08:05:17 2012
@@ -52,8 +52,7 @@ public class DayCells extends Cells {
public String title(final int cell) {
final Calendar d = (Calendar) date.clone();
d.add(Calendar.DAY_OF_WEEK, cell);
- final String displayName =
- dayFormat.format(d.getTime()) + " " + d.get(Calendar.DAY_OF_MONTH) + " " + monthFormat.format(d.getTime());
+ final String displayName = dayFormat.format(d.getTime()) + " " + d.get(Calendar.DAY_OF_MONTH) + " " + monthFormat.format(d.getTime());
return displayName;
}
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/calendar/SingleDayCells.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/calendar/SingleDayCells.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/calendar/SingleDayCells.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/calendar/SingleDayCells.java Sun Jan 22 08:05:17 2012
@@ -46,8 +46,7 @@ public class SingleDayCells extends Cell
public String title(final int cell) {
final Calendar d = (Calendar) date.clone();
d.add(Calendar.DAY_OF_WEEK, cell);
- final String displayName =
- dayFormat.format(d.getTime()) + " " + d.get(Calendar.DAY_OF_MONTH) + " " + monthFormat.format(d.getTime());
+ final String displayName = dayFormat.format(d.getTime()) + " " + d.get(Calendar.DAY_OF_MONTH) + " " + monthFormat.format(d.getTime());
return displayName;
}
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/combined/ExpandableListSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/combined/ExpandableListSpecification.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/combined/ExpandableListSpecification.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/combined/ExpandableListSpecification.java Sun Jan 22 08:05:17 2012
@@ -42,8 +42,10 @@ public class ExpandableListSpecification
// 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/combined/FormWithTableSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/combined/FormWithTableSpecification.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/combined/FormWithTableSpecification.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/combined/FormWithTableSpecification.java Sun Jan 22 08:05:17 2012
@@ -72,8 +72,7 @@ public class FormWithTableSpecification
final ObjectSpecification spec = content.getSpecification();
final ObjectAdapter target = content.getAdapter();
final AuthenticationSession session = IsisContext.getAuthenticationSession();
- final List<ObjectAssociation> fields =
- spec.getAssociations(ObjectAssociationFilters.dynamicallyVisible(session, target));
+ final List<ObjectAssociation> fields = spec.getAssociations(ObjectAssociationFilters.dynamicallyVisible(session, target));
for (final ObjectAssociation field : fields) {
if (field.isOneToManyAssociation()) {
return Toolkit.getContentFactory().createFieldContent(field, target);
@@ -84,15 +83,20 @@ public class FormWithTableSpecification
/*
*
- * @Override protected void init() { addSubviewDecorator(new FieldLabelsDecorator() { public View decorate(Axes
- * axes, View view) { if (view.getContent().isCollection()) { return view; } else { return super.decorate(axes,
- * view); } } }); addViewDecorator(new IconBorder.Factory()); }
+ * @Override protected void init() { addSubviewDecorator(new
+ * FieldLabelsDecorator() { public View decorate(Axes axes, View view) { if
+ * (view.getContent().isCollection()) { return view; } else { return
+ * super.decorate(axes, view); } } }); addViewDecorator(new
+ * IconBorder.Factory()); }
*
- * @Override protected SubviewSpec createFieldFactory() { return new SubviewSpec() { public View createView(final
- * Content content, Axes axes, int sequence) { if (content.isCollection()) { return new
- * InternalTableSpecification().createView(content, axes, sequence); } else { final ViewFactory factory =
- * Toolkit.getViewFactory(); int requirement = ViewRequirement.CLOSED | ViewRequirement.SUBVIEW; ViewRequirement
- * viewRequirement = new ViewRequirement(content, requirement); return factory.createView(viewRequirement); } } }; }
+ * @Override protected SubviewSpec createFieldFactory() { return new
+ * SubviewSpec() { public View createView(final Content content, Axes axes,
+ * int sequence) { if (content.isCollection()) { return new
+ * InternalTableSpecification().createView(content, axes, sequence); } else
+ * { final ViewFactory factory = Toolkit.getViewFactory(); int requirement =
+ * ViewRequirement.CLOSED | ViewRequirement.SUBVIEW; ViewRequirement
+ * viewRequirement = new ViewRequirement(content, requirement); return
+ * factory.createView(viewRequirement); } } }; }
*/
@Override
public String getName() {
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/combined/SplitViewSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/combined/SplitViewSpecification.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/combined/SplitViewSpecification.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/combined/SplitViewSpecification.java Sun Jan 22 08:05:17 2012
@@ -67,8 +67,7 @@ public abstract class SplitViewSpecifica
final ObjectSpecification spec = content.getSpecification();
final ObjectAdapter target = content.getAdapter();
final AuthenticationSession session = IsisContext.getAuthenticationSession();
- final List<ObjectAssociation> fields =
- spec.getAssociations(ObjectAssociationFilters.dynamicallyVisible(session, target));
+ final List<ObjectAssociation> fields = spec.getAssociations(ObjectAssociationFilters.dynamicallyVisible(session, target));
final List<ObjectAssociation> selectableFields = new ArrayList<ObjectAssociation>();
for (final ObjectAssociation field : fields) {
if (validField(field)) {
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/combined/TwoPartViewSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/combined/TwoPartViewSpecification.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/combined/TwoPartViewSpecification.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/combined/TwoPartViewSpecification.java Sun Jan 22 08:05:17 2012
@@ -69,8 +69,7 @@ public class TwoPartViewSpecification ex
final ObjectSpecification spec = content.getSpecification();
final ObjectAdapter target = content.getAdapter();
final AuthenticationSession session = IsisContext.getAuthenticationSession();
- final List<ObjectAssociation> fields =
- spec.getAssociations(ObjectAssociationFilters.dynamicallyVisible(session, target));
+ final List<ObjectAssociation> fields = spec.getAssociations(ObjectAssociationFilters.dynamicallyVisible(session, target));
for (final ObjectAssociation field : fields) {
if (validField(field)) {
return Toolkit.getContentFactory().createFieldContent(field, target);
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/configurable/ConfigurableCompositeViewBorder.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/configurable/ConfigurableCompositeViewBorder.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/configurable/ConfigurableCompositeViewBorder.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/configurable/ConfigurableCompositeViewBorder.java Sun Jan 22 08:05:17 2012
@@ -71,10 +71,8 @@ public class ConfigurableCompositeViewBo
ViewSpecification specification;
if (elementsClass.startsWith("user:")) {
final String name = elementsClass.substring("user:".length());
- final String wrappedSpecificationClass =
- Properties.getUserViewSpecificationOptions(name).getString("wrapped-specification");
- final ViewSpecification wrappedSpectification =
- (ViewSpecification) InstanceUtil.createInstance(wrappedSpecificationClass);
+ final String wrappedSpecificationClass = Properties.getUserViewSpecificationOptions(name).getString("wrapped-specification");
+ final ViewSpecification wrappedSpectification = (ViewSpecification) InstanceUtil.createInstance(wrappedSpecificationClass);
specification = new UserViewSpecification(wrappedSpectification, name);
} else {
specification = (ViewSpecification) InstanceUtil.createInstance(elementsClass);
@@ -105,8 +103,7 @@ public class ConfigurableCompositeViewBo
super.viewMenuOptions(menuOptions);
final UserActionSet subOptions = menuOptions.addNewActionSet("Elements as");
final View firstSubview = getSubviews()[0];
- final int status =
- ViewRequirement.OPEN | ViewRequirement.CLOSED | ViewRequirement.SUBVIEW | ViewRequirement.FIXED;
+ final int status = ViewRequirement.OPEN | ViewRequirement.CLOSED | ViewRequirement.SUBVIEW | ViewRequirement.FIXED;
final ViewRequirement viewRequirement = new ViewRequirement(firstSubview.getContent(), status);
final Enumeration<ViewSpecification> possibleViews = Toolkit.getViewFactory().availableViews(viewRequirement);
while (possibleViews.hasMoreElements()) {
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/configurable/ConfigurableFieldBorder.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/configurable/ConfigurableFieldBorder.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/configurable/ConfigurableFieldBorder.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/configurable/ConfigurableFieldBorder.java Sun Jan 22 08:05:17 2012
@@ -86,19 +86,16 @@ public class ConfigurableFieldBorder ext
if (wrappedView instanceof LabelBorder) {
wrappedView = ((LabelBorder) wrappedView).getWrapped();
} else {
- wrappedView =
- LabelBorder.createFieldLabelBorder(view.getParent().getViewAxes().getAxis(LabelAxis.class),
- wrappedView);
+ wrappedView = LabelBorder.createFieldLabelBorder(view.getParent().getViewAxes().getAxis(LabelAxis.class), wrappedView);
}
wrappedView.setView(ConfigurableFieldBorder.this);
getView().invalidateLayout();
}
});
- replaceOptions(
- Toolkit.getViewFactory().availableViews(
- new ViewRequirement(getContent(), ViewRequirement.OPEN | ViewRequirement.CLOSED
- | ViewRequirement.SUBVIEW)), menuOptions); // openSubviews(content, this), options);
+ replaceOptions(Toolkit.getViewFactory().availableViews(new ViewRequirement(getContent(), ViewRequirement.OPEN | ViewRequirement.CLOSED | ViewRequirement.SUBVIEW)), menuOptions); // openSubviews(content,
+ // this),
+ // options);
}
@@ -114,9 +111,7 @@ public class ConfigurableFieldBorder ext
@Override
protected void replace(final View view, final View withReplacement) {
final View parent = wrappedView.getParent();
- wrappedView =
- LabelBorder.createFieldLabelBorder(
- view.getParent().getViewAxes().getAxis(LabelAxis.class), withReplacement);
+ wrappedView = LabelBorder.createFieldLabelBorder(view.getParent().getViewAxes().getAxis(LabelAxis.class), withReplacement);
wrappedView.setParent(parent);
wrappedView.setView(ConfigurableFieldBorder.this);
invalidateLayout();
@@ -137,8 +132,7 @@ public class ConfigurableFieldBorder ext
final Size s = getSize();
final int xExtent = s.getWidth();
if (state.isViewIdentified()) {
- canvas.drawSolidRectangle(xExtent - BORDER + 1, top, BORDER - 2, s.getHeight() - 2 * top,
- Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY3));
+ canvas.drawSolidRectangle(xExtent - BORDER + 1, top, BORDER - 2, s.getHeight() - 2 * top, Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY3));
}
}
}
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/configurable/GridListSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/configurable/GridListSpecification.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/configurable/GridListSpecification.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/configurable/GridListSpecification.java Sun Jan 22 08:05:17 2012
@@ -40,8 +40,7 @@ public class GridListSpecification exten
public View createView(final Content content, final Axes axes, final int sequence) {
final GlobalViewFactory factory = Toolkit.getViewFactory();
- final ViewSpecification elementSpecification =
- axes.getAxis(ConfigurationAxis.class).getElementSpecification();
+ final ViewSpecification elementSpecification = axes.getAxis(ConfigurationAxis.class).getElementSpecification();
if (elementSpecification == null) {
final int defaultRequirement = ViewRequirement.CLOSED | ViewRequirement.SUBVIEW;
final ViewRequirement viewRequirement = new ViewRequirement(content, defaultRequirement);
@@ -55,7 +54,8 @@ public class GridListSpecification exten
public GridListSpecification() {
final ElementFactory factory = new ElementFactory();
builder = new CollectionElementBuilder(factory);
- // TODO allow to be switched on so that user can change the view for a single element. This type of
+ // TODO allow to be switched on so that user can change the view for a
+ // single element. This type of
// view used for an element would not be stored.
if (false) {
addSubviewDecorator(new ConfigurableFieldBorder.Factory());
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/configurable/NewObjectView.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/configurable/NewObjectView.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/configurable/NewObjectView.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/configurable/NewObjectView.java Sun Jan 22 08:05:17 2012
@@ -67,8 +67,7 @@ public class NewObjectView extends Compo
private void addFieldView(final ObjectAdapter object, final ObjectAssociation field) {
final FieldContent fieldContent = (FieldContent) Toolkit.getContentFactory().createFieldContent(field, object);
- final ViewRequirement requirement =
- new ViewRequirement(fieldContent, ViewRequirement.CLOSED | ViewRequirement.SUBVIEW);
+ final ViewRequirement requirement = new ViewRequirement(fieldContent, ViewRequirement.CLOSED | ViewRequirement.SUBVIEW);
View fieldView = Toolkit.getViewFactory().createView(requirement);
fieldView = LabelBorder.createFieldLabelBorder(labelAxis, fieldView);
@@ -78,10 +77,8 @@ public class NewObjectView extends Compo
private void addFieldView(final NewObjectField field) {
final ObjectAdapter object = getContent().getAdapter();
- final FieldContent fieldContent =
- (FieldContent) Toolkit.getContentFactory().createFieldContent(field.getField(), object);
- final ViewRequirement requirement =
- new ViewRequirement(fieldContent, ViewRequirement.CLOSED | ViewRequirement.SUBVIEW);
+ final FieldContent fieldContent = (FieldContent) Toolkit.getContentFactory().createFieldContent(field.getField(), object);
+ final ViewRequirement requirement = new ViewRequirement(fieldContent, ViewRequirement.CLOSED | ViewRequirement.SUBVIEW);
View fieldView = Toolkit.getViewFactory().createView(requirement);
if (field.includeLabel()) {
fieldView = LabelBorder.createFieldLabelBorder(labelAxis, fieldView);
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/configurable/PanelView.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/configurable/PanelView.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/configurable/PanelView.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/configurable/PanelView.java Sun Jan 22 08:05:17 2012
@@ -99,8 +99,7 @@ public class PanelView extends Composite
}
public void addView(final Content content, final Position position) {
- final ViewRequirement requirement =
- new ViewRequirement(content, ViewRequirement.OPEN | ViewRequirement.SUBVIEW);
+ final ViewRequirement requirement = new ViewRequirement(content, ViewRequirement.OPEN | ViewRequirement.SUBVIEW);
final ViewSpecification viewSpecification = Toolkit.getViewFactory().availableViews(requirement).nextElement();
addView(content, viewSpecification, position);
}
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/dialog/ActionDialogSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/dialog/ActionDialogSpecification.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/dialog/ActionDialogSpecification.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/dialog/ActionDialogSpecification.java Sun Jan 22 08:05:17 2012
@@ -59,12 +59,10 @@ public class ActionDialogSpecification e
public View createView(final Content content, final Axes axes, final int fieldNumber) {
if (content instanceof TextParseableParameter) {
final GlobalViewFactory factory = Toolkit.getViewFactory();
- return factory
- .createView(new ViewRequirement(content, ViewRequirement.CLOSED | ViewRequirement.SUBVIEW));
+ return factory.createView(new ViewRequirement(content, ViewRequirement.CLOSED | ViewRequirement.SUBVIEW));
} else if (content instanceof ObjectParameter) {
final GlobalViewFactory factory = Toolkit.getViewFactory();
- return factory
- .createView(new ViewRequirement(content, ViewRequirement.CLOSED | ViewRequirement.SUBVIEW));
+ return factory.createView(new ViewRequirement(content, ViewRequirement.CLOSED | ViewRequirement.SUBVIEW));
}
return null;
@@ -177,10 +175,10 @@ public class ActionDialogSpecification e
addViewDecorator(new CompositeViewDecorator() {
@Override
public View decorate(final View view, final Axes axes) {
- // TODO reintroduce the 'Apply' notion, but under control from the method declaration
+ // TODO reintroduce the 'Apply' notion, but under control from
+ // the method declaration
final ButtonAction[] actions = new ButtonAction[] { new ExecuteAndCloseAction(), new CancelAction() };
- final ButtonBorder buttonBorder =
- new ButtonBorder(actions, new IconBorder(view, Toolkit.getText(ColorsAndFonts.TEXT_TITLE_SMALL)));
+ final ButtonBorder buttonBorder = new ButtonBorder(actions, new IconBorder(view, Toolkit.getText(ColorsAndFonts.TEXT_TITLE_SMALL)));
buttonBorder.setFocusManager(new ActionDialogFocusManager(buttonBorder));
return buttonBorder;
}
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/dialog/ActionFieldBuilder.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/dialog/ActionFieldBuilder.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/dialog/ActionFieldBuilder.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/dialog/ActionFieldBuilder.java Sun Jan 22 08:05:17 2012
@@ -97,8 +97,7 @@ public class ActionFieldBuilder extends
if (content instanceof ObjectParameter) {
if (subviewsObject != invocationsObject) {
- final ObjectParameter parameter =
- new ObjectParameterImpl((ObjectParameterImpl) content, invocationsObject);
+ final ObjectParameter parameter = new ObjectParameterImpl((ObjectParameterImpl) content, invocationsObject);
final View fieldView = createFieldView(view, parameter, i);
view.replaceView(subview, decorateSubview(view.getViewAxes(), fieldView));
}
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/drawing/Bounds.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/drawing/Bounds.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/drawing/Bounds.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/drawing/Bounds.java Sun Jan 22 08:05:17 2012
@@ -22,18 +22,20 @@ package org.apache.isis.viewer.dnd.drawi
import org.apache.log4j.Logger;
/**
- * Bounds represent a rectangular area on the screen. The top-left corner is represented by the location (available
- * using getLocation(), and getX() and getY()). The extent of the bounds is specified by its height and width (available
- * using getHeight() and getWidth()). The bottom-right point is the offset from the top-left point by width -1 and
- * hieght - 1 pixels.
+ * Bounds represent a rectangular area on the screen. The top-left corner is
+ * represented by the location (available using getLocation(), and getX() and
+ * getY()). The extent of the bounds is specified by its height and width
+ * (available using getHeight() and getWidth()). The bottom-right point is the
+ * offset from the top-left point by width -1 and hieght - 1 pixels.
*
* For example a bounds created as follows
*
* new Bounds(5, 10, 10, 20)
*
- * Would represent a rectangle at location (5, 10), with a width of 10 pixels and a height of 20. Note, hower that the
- * lower-right corner would be at (14, 29), as there are 10 pixels between pixel 5 and pixel 14, and 20 between 10 and
- * 29.
+ * Would represent a rectangle at location (5, 10), with a width of 10 pixels
+ * and a height of 20. Note, hower that the lower-right corner would be at (14,
+ * 29), as there are 10 pixels between pixel 5 and pixel 14, and 20 between 10
+ * and 29.
*/
public class Bounds {
Logger LOG = Logger.getLogger("Bounds");
@@ -182,8 +184,10 @@ public class Bounds {
}
/**
- * Determines whether this bounds overlaps the specified bounds. If any area is shared by the two bounds then this
- * will return true. As the edges of the bounds are of a finite size the bounds overlap if any of the edges overlap.
+ * Determines whether this bounds overlaps the specified bounds. If any area
+ * is shared by the two bounds then this will return true. As the edges of
+ * the bounds are of a finite size the bounds overlap if any of the edges
+ * overlap.
*/
public boolean intersects(final Bounds bounds) {
final int tx1 = this.x;
@@ -192,17 +196,13 @@ public class Bounds {
final int ox2 = bounds.x + bounds.width - 1;
// tx1 < ox1 < tx2 || tx1 < ox2 < tx2
- final boolean xOverlap =
- (tx1 <= ox1 && ox1 <= tx2) || (tx1 <= ox2 && ox1 <= tx2) || (ox1 <= tx1 && tx1 <= ox2)
- || (ox1 <= tx2 && tx1 <= ox2);
+ final boolean xOverlap = (tx1 <= ox1 && ox1 <= tx2) || (tx1 <= ox2 && ox1 <= tx2) || (ox1 <= tx1 && tx1 <= ox2) || (ox1 <= tx2 && tx1 <= ox2);
final int ty1 = this.y;
final int ty2 = this.y + this.height - 1;
final int oy1 = bounds.y;
final int oy2 = bounds.y + bounds.height - 1;
- final boolean yOverlap =
- (ty1 <= oy1 && oy1 <= ty2) || (ty1 <= oy2 && oy1 <= ty2) || (oy1 <= ty1 && ty1 <= oy2)
- || (oy1 <= ty2 && ty1 <= oy2);
+ final boolean yOverlap = (ty1 <= oy1 && oy1 <= ty2) || (ty1 <= oy2 && oy1 <= ty2) || (oy1 <= ty1 && ty1 <= oy2) || (oy1 <= ty2 && ty1 <= oy2);
return xOverlap && yOverlap;
}
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/drawing/DebugCanvas.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/drawing/DebugCanvas.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/drawing/DebugCanvas.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/drawing/DebugCanvas.java Sun Jan 22 08:05:17 2012
@@ -56,8 +56,7 @@ public class DebugCanvas 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) {
indent();
buffer.appendln("Rectangle (3D) " + x + "," + y + " " + width + "x" + height);
}
@@ -83,8 +82,7 @@ public class DebugCanvas implements Canv
@Override
public void drawLine(final Location start, final int xExtent, final int yExtent, final Color color) {
indent();
- buffer.appendln("Line from " + start.getX() + "," + start.getY() + " to " + (start.getX() + xExtent) + ","
- + (start.getY() + yExtent) + " " + color);
+ buffer.appendln("Line from " + start.getX() + "," + start.getY() + " to " + (start.getX() + xExtent) + "," + (start.getY() + yExtent) + " " + color);
}
@Override
@@ -106,8 +104,7 @@ public class DebugCanvas 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) {
indent();
buffer.appendln("Rounded Rectangle " + x + "," + y + " " + (x + width) + "x" + (y + height) + " " + color);
}
@@ -130,28 +127,32 @@ public class DebugCanvas implements Canv
buffer.appendln("Oval (solid) " + x + "," + y + " " + width + "x" + height + " " + color);
}
+ @Override
public void drawSolidRectangle(final int x, final int y, final int width, final int height, final Color color) {
indent();
buffer.appendln("Rectangle (solid) " + x + "," + y + " " + width + "x" + height + " " + color);
}
+ @Override
public void drawSolidShape(final Shape shape, final Color color) {
indent();
buffer.appendln("Shape (solid) " + shape + " " + color);
}
+ @Override
public void drawSolidShape(final Shape shape, final int x, final int y, final Color color) {
indent();
buffer.appendln("Shape (solid)" + shape + " at " + x + "/" + y + " (left, top)" + " " + color);
}
+ @Override
public void drawText(final String text, final int x, final int y, final Color color, final Text style) {
indent();
buffer.appendln("Text " + x + "," + y + " \"" + text + "\" " + style + " " + color);
}
- public void drawText(final String text, final int x, final int y, final int maxWidth, final Color color,
- final Text style) {
+ @Override
+ public void drawText(final String text, final int x, final int y, final int maxWidth, final Color color, final Text style) {
indent();
buffer.appendln("Text " + x + "," + y + " +" + maxWidth + "xh \"" + text + "\" " + style + " " + color);
}
@@ -163,11 +164,13 @@ public class DebugCanvas implements Canv
}
}
+ @Override
public void offset(final int x, final int y) {
indent();
buffer.appendln("Offset by " + x + "/" + y + " (left, top)");
}
+ @Override
public boolean overlaps(final Bounds bounds) {
return true;
}
@@ -177,6 +180,7 @@ public class DebugCanvas implements Canv
return "Canvas";
}
+ @Override
public void drawDebugOutline(final Bounds bounds, final int baseline, final Color color) {
}
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/drawing/DebugCanvasAbsolute.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/drawing/DebugCanvasAbsolute.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/drawing/DebugCanvasAbsolute.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/drawing/DebugCanvasAbsolute.java Sun Jan 22 08:05:17 2012
@@ -42,6 +42,7 @@ public class DebugCanvasAbsolute impleme
offsetY = y;
}
+ @Override
public Canvas createSubcanvas() {
buffer.blankLine();
indent();
@@ -49,10 +50,12 @@ public class DebugCanvasAbsolute impleme
return new DebugCanvasAbsolute(buffer, level + 1, offsetX, offsetY);
}
+ @Override
public Canvas createSubcanvas(final Bounds bounds) {
return createSubcanvas(bounds.getX(), bounds.getY(), bounds.getWidth(), bounds.getHeight());
}
+ @Override
public Canvas createSubcanvas(final int x, final int y, final int width, final int height) {
// buffer.blankLine();
indent();
@@ -65,27 +68,27 @@ public class DebugCanvasAbsolute impleme
return new DebugCanvasAbsolute(buffer, level + 1, dx, dy);
}
- public void draw3DRectangle(final int x, final int y, final int width, final int height, final Color color,
- final boolean raised) {
+ @Override
+ public void draw3DRectangle(final int x, final int y, final int width, final int height, final Color color, final boolean raised) {
indent();
final int px = offsetX + x;
final int py = offsetY + y;
final int qx = px + width - 1;
final int qy = py + height - 1;
- buffer.appendln("Rectangle (3D) " + px + "," + py + " " + width + "x" + height + " (" + qx + "," + qy + ") "
- + line());
+ buffer.appendln("Rectangle (3D) " + px + "," + py + " " + width + "x" + height + " (" + qx + "," + qy + ") " + line());
}
+ @Override
public void drawImage(final Image image, final int x, final int y) {
indent();
final int px = offsetX + x;
final int py = offsetY + y;
final int qx = px + image.getWidth() - 1;
final int qy = py + image.getHeight() - 1;
- buffer.appendln("Icon " + px + "," + py + " " + image.getWidth() + "x" + image.getHeight() + " (" + qx + ","
- + qy + ") " + line());
+ buffer.appendln("Icon " + px + "," + py + " " + image.getWidth() + "x" + image.getHeight() + " (" + qx + "," + qy + ") " + line());
}
+ @Override
public void drawImage(final Image image, final int x, final int y, final int width, final int height) {
indent();
final int px = offsetX + x;
@@ -95,6 +98,7 @@ public class DebugCanvasAbsolute impleme
buffer.appendln("Icon " + px + "," + py + " " + width + "x" + height + " (" + qx + "," + qy + ") " + line());
}
+ @Override
public void drawLine(final int x, final int y, final int x2, final int y2, final Color color) {
indent();
final int px = offsetX + x;
@@ -104,12 +108,13 @@ public class DebugCanvasAbsolute impleme
buffer.appendln("Line from " + px + "," + py + " to " + qx + "," + qy + " " + color + line());
}
+ @Override
public void drawLine(final Location start, final int xExtent, final int yExtent, final Color color) {
indent();
- buffer.appendln("Line from " + start.getX() + "," + start.getY() + " to " + (start.getX() + xExtent) + ","
- + (start.getY() + yExtent) + " " + color + line());
+ buffer.appendln("Line from " + start.getX() + "," + start.getY() + " to " + (start.getX() + xExtent) + "," + (start.getY() + yExtent) + " " + color + line());
}
+ @Override
public void drawOval(final int x, final int y, final int width, final int height, final Color color) {
indent();
final int px = offsetX + x;
@@ -117,6 +122,7 @@ public class DebugCanvasAbsolute impleme
buffer.appendln("Oval " + px + "," + py + " " + width + "x" + height + " " + color + line());
}
+ @Override
public void drawRectangle(final int x, final int y, final int width, final int height, final Color color) {
indent();
final int px = offsetX + x;
@@ -124,8 +130,7 @@ public class DebugCanvasAbsolute impleme
final int qx = px + width - 1;
final int qy = py + height - 1;
- buffer.appendln("Rectangle " + px + "," + py + " " + width + "x" + height + " (" + qx + "," + qy + ") " + color
- + line());
+ buffer.appendln("Rectangle " + px + "," + py + " " + width + "x" + height + " (" + qx + "," + qy + ") " + color + line());
}
private String line() {
@@ -141,27 +146,29 @@ public class DebugCanvasAbsolute impleme
return line.substring(line.indexOf('('));
}
+ @Override
public void drawRectangleAround(final Bounds bounds, final Color color) {
indent();
buffer.appendln("Rectangle 0,0 " + bounds.getWidth() + "x" + bounds.getHeight() + " " + color + line());
}
- public void drawRoundedRectangle(final int x, final int y, final int width, final int height, final int arcWidth,
- final int arcHeight, final Color color) {
+ @Override
+ public void drawRoundedRectangle(final int x, final int y, final int width, final int height, final int arcWidth, final int arcHeight, final Color color) {
indent();
final int px = offsetX + x;
final int py = offsetY + y;
final int qx = px + width - 1;
final int qy = py + height - 1;
- buffer.appendln("Rounded Rectangle " + px + "," + py + " " + width + "x" + height + " (" + qx + "," + qy + ") "
- + color + line());
+ buffer.appendln("Rounded Rectangle " + px + "," + py + " " + width + "x" + height + " (" + qx + "," + qy + ") " + color + line());
}
+ @Override
public void drawShape(final Shape shape, final Color color) {
indent();
buffer.appendln("Shape " + shape + " " + color);
}
+ @Override
public void drawShape(final Shape shape, final int x, final int y, final Color color) {
indent();
final int px = offsetX + x;
@@ -169,31 +176,33 @@ public class DebugCanvasAbsolute impleme
buffer.appendln("Shape " + shape + " at " + px + "," + py + " (left, top)" + " " + color + line());
}
+ @Override
public void drawSolidOval(final int x, final int y, final int width, final int height, final Color color) {
indent();
final int px = offsetX + x;
final int py = offsetY + y;
final int qx = px + width - 1;
final int qy = py + height - 1;
- buffer.appendln("Oval (solid) " + px + "," + py + " " + width + "x" + height + " (" + qx + "," + qy + ") "
- + color + line());
+ buffer.appendln("Oval (solid) " + px + "," + py + " " + width + "x" + height + " (" + qx + "," + qy + ") " + color + line());
}
+ @Override
public void drawSolidRectangle(final int x, final int y, final int width, final int height, final Color color) {
indent();
final int px = offsetX + x;
final int py = offsetY + y;
final int qx = px + width - 1;
final int qy = py + height - 1;
- buffer.appendln("Rectangle (solid) " + px + "," + py + " " + width + "x" + height + " (" + qx + "," + qy + ") "
- + color + line());
+ buffer.appendln("Rectangle (solid) " + px + "," + py + " " + width + "x" + height + " (" + qx + "," + qy + ") " + color + line());
}
+ @Override
public void drawSolidShape(final Shape shape, final Color color) {
indent();
buffer.appendln("Shape (solid) " + shape + " " + color);
}
+ @Override
public void drawSolidShape(final Shape shape, final int x, final int y, final Color color) {
indent();
final int px = offsetX + x;
@@ -201,6 +210,7 @@ public class DebugCanvasAbsolute impleme
buffer.appendln("Shape (solid)" + shape + " at " + px + "," + py + " (left, top)" + " " + color + line());
}
+ @Override
public void drawText(final String text, final int x, final int y, final Color color, final Text style) {
indent();
final int px = offsetX + x;
@@ -208,8 +218,8 @@ public class DebugCanvasAbsolute impleme
buffer.appendln("Text " + px + "," + py + " \"" + text + "\" " + color + line());
}
- public void drawText(final String text, final int x, final int y, final int maxWidth, final Color color,
- final Text style) {
+ @Override
+ public void drawText(final String text, final int x, final int y, final int maxWidth, final Color color, final Text style) {
indent();
final int px = offsetX + x;
final int py = offsetY + y;
@@ -222,6 +232,7 @@ public class DebugCanvasAbsolute impleme
}
}
+ @Override
public void offset(final int x, final int y) {
// indent();
offsetX += x;
@@ -229,14 +240,17 @@ public class DebugCanvasAbsolute impleme
// buffer.appendln("Offset by " + x + "/" + y + " (left, top)");
}
+ @Override
public boolean overlaps(final Bounds bounds) {
return true;
}
+ @Override
public String toString() {
return "Canvas";
}
+ @Override
public void drawDebugOutline(final Bounds bounds, final int baseline, final Color color) {
}
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/drawing/DrawingUtil.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/drawing/DrawingUtil.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/drawing/DrawingUtil.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/drawing/DrawingUtil.java Sun Jan 22 08:05:17 2012
@@ -20,8 +20,7 @@
package org.apache.isis.viewer.dnd.drawing;
public class DrawingUtil {
- public static void drawHatching(final Canvas canvas, final int x, final int y, final int width, final int height,
- final Color foreground, final Color shadow) {
+ public static void drawHatching(final Canvas canvas, final int x, final int y, final int width, final int height, final Color foreground, final Color shadow) {
final int bottom = y + height;
for (int p = y; p < bottom; p += 4) {
drawDots(canvas, x, p, width, foreground, shadow);
@@ -31,8 +30,7 @@ public class DrawingUtil {
}
}
- private static void drawDots(final Canvas canvas, final int x, final int y, final int width,
- final Color foreground, final Color shadow) {
+ private static void drawDots(final Canvas canvas, final int x, final int y, final int width, final Color foreground, final Color shadow) {
final int x2 = x + width;
for (int p = x; p < x2; p += 4) {
canvas.drawLine(p, y, p, y, shadow);
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/drawing/ImageFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/drawing/ImageFactory.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/drawing/ImageFactory.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/drawing/ImageFactory.java Sun Jan 22 08:05:17 2012
@@ -46,8 +46,8 @@ public abstract class ImageFactory {
}
/**
- * Keyed list of icons (each derived from an image, of a specific size etc), where the key is the name of the icon
- * and its size.
+ * Keyed list of icons (each derived from an image, of a specific size etc),
+ * where the key is the name of the icon and its size.
*/
private final Hashtable<String, Image> templateImages = new Hashtable<String, Image>();
@@ -117,7 +117,8 @@ public abstract class ImageFactory {
// ////////////////////////////////////////////////////////////////////
/**
- * Loads an icon of the specified size, and with the specified tint. If color is null then no tint is applied.
+ * Loads an icon of the specified size, and with the specified tint. If
+ * color is null then no tint is applied.
*/
public Image loadIcon(final String name, final int height, final Color tint) {
final String id = name + SEPARATOR + height + SEPARATOR + tint;
@@ -137,7 +138,8 @@ public abstract class ImageFactory {
// ////////////////////////////////////////////////////////////////////
/**
- * Loads the fall back icon image, for use when no specific image can be found
+ * Loads the fall back icon image, for use when no specific image can be
+ * found
*/
public Image loadDefaultIcon(final int height, final Color tint) {
final String fallbackImage = getConfiguration().getString(DEFAULT_IMAGE_PROPERTY, DEFAULT_IMAGE_NAME);
@@ -161,7 +163,8 @@ public abstract class ImageFactory {
public abstract Image loadImage(final String path);
/**
- * Load an image with the given name, but of a specific height and of a specific hint.
+ * Load an image with the given name, but of a specific height and of a
+ * specific hint.
*/
protected abstract Image loadImage(final String name, final int height, final Color tint);
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/drawing/Padding.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/drawing/Padding.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/drawing/Padding.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/drawing/Padding.java Sun Jan 22 08:05:17 2012
@@ -123,8 +123,7 @@ public class Padding {
if (obj instanceof Padding) {
final Padding object = (Padding) obj;
- return object.top == this.top && object.bottom == this.bottom && object.left == this.left
- && object.right == this.right;
+ return object.top == this.top && object.bottom == this.bottom && object.left == this.left && object.right == this.right;
}
return false;
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/drawing/Size.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/drawing/Size.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/drawing/Size.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/drawing/Size.java Sun Jan 22 08:05:17 2012
@@ -120,23 +120,26 @@ public class Size {
}
/**
- * Limits the height of this Size so that if its height is greater than the specified maximum then the height is
- * reduced to the maximum. If the height is less than maximum (or equal to it) then nothing is done.
+ * Limits the height of this Size so that if its height is greater than the
+ * specified maximum then the height is reduced to the maximum. If the
+ * height is less than maximum (or equal to it) then nothing is done.
*/
public void limitHeight(final int maximum) {
height = Math.min(height, maximum);
}
/**
- * Limits the width of this Size so that if its width is greater than the specified maximum then the width is
- * reduced to the maximum. If the width is less than maximum (or equal to it) then nothing is done.
+ * Limits the width of this Size so that if its width is greater than the
+ * specified maximum then the width is reduced to the maximum. If the width
+ * is less than maximum (or equal to it) then nothing is done.
*/
public void limitWidth(final int maximum) {
width = Math.min(width, maximum);
}
/**
- * Limits the width and height of this Size so it is no larger than the specified maximum size.
+ * Limits the width and height of this Size so it is no larger than the
+ * specified maximum size.
*
* @see #limitWidth(int)
* @see #limitHeight(int)
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/drawing/Text.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/drawing/Text.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/drawing/Text.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/drawing/Text.java Sun Jan 22 08:05:17 2012
@@ -27,18 +27,21 @@ public interface Text {
int charWidth(char c);
/**
- * Returns the height, in pixels, of the distance from the baseline to top of the tallest character (including
- * accents that are not common in english.
+ * Returns the height, in pixels, of the distance from the baseline to top
+ * of the tallest character (including accents that are not common in
+ * english.
*/
int getAscent();
/**
- * Returns the height, in pixels, of the distance from bottom of the lowest descending character to the baseline.
+ * Returns the height, in pixels, of the distance from bottom of the lowest
+ * descending character to the baseline.
*/
int getDescent();
/**
- * Returns the mid point, in pixels, between the baseline and the top of the characters.
+ * Returns the mid point, in pixels, between the baseline and the top of the
+ * characters.
*/
int getMidPoint();
@@ -48,7 +51,8 @@ public interface Text {
String getName();
/**
- * Returns the height, in pixels, for a normal line of text - where there is some space between two lines of text.
+ * Returns the height, in pixels, for a normal line of text - where there is
+ * some space between two lines of text.
*/
int getTextHeight();
@@ -61,7 +65,8 @@ public interface Text {
int getLineHeight();
/**
- * Returns the number of blank vertical pixels to add between adjacent lines to give them additional spacing.
+ * Returns the number of blank vertical pixels to add between adjacent lines
+ * to give them additional spacing.
*/
int getLineSpacing();
@@ -71,7 +76,8 @@ public interface Text {
int stringWidth(String text);
/**
- * Returns the height in pixels when the specified text is wrapped at the specified width
+ * Returns the height in pixels when the specified text is wrapped at the
+ * specified width
*/
int stringHeight(String text, int maxWidth);
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/field/AbstractField.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/field/AbstractField.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/field/AbstractField.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/field/AbstractField.java Sun Jan 22 08:05:17 2012
@@ -73,7 +73,8 @@ public abstract class AbstractField exte
}
/**
- * Indicates the drag started within this view's bounds is continuing. By default does nothing.
+ * Indicates the drag started within this view's bounds is continuing. By
+ * default does nothing.
*/
@Override
public void drag(final InternalDrag drag) {
@@ -87,7 +88,8 @@ public abstract class AbstractField exte
}
/**
- * Indicates the start of a drag within this view's bounds. By default does nothing.
+ * Indicates the start of a drag within this view's bounds. By default does
+ * nothing.
*/
@Override
public View dragFrom(final Location location) {
@@ -95,8 +97,9 @@ public abstract class AbstractField exte
}
/**
- * Indicates the drag started within this view's bounds has been finished (although the location may now be outside
- * of its bounds). By default does nothing.
+ * Indicates the drag started within this view's bounds has been finished
+ * (although the location may now be outside of its bounds). By default does
+ * nothing.
*/
@Override
public void dragTo(final InternalDrag drag) {
@@ -118,7 +121,8 @@ public abstract class AbstractField exte
canvas.drawImage(image, getSize().getWidth() - 16, 2);
}
- // canvas.clearBackground(this, Toolkit.getColor(ColorsAndFonts.COLOR_INVALID));
+ // canvas.clearBackground(this,
+ // Toolkit.getColor(ColorsAndFonts.COLOR_INVALID));
}
super.draw(canvas);
@@ -173,22 +177,26 @@ public abstract class AbstractField exte
}
/**
- * 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.
*/
@Override
public void keyPressed(final 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.
*/
@Override
public void keyReleased(final 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>
+ * .
*/
@Override
public void keyTyped(final KeyboardAction action) {
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/field/AbstractValueOption.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/field/AbstractValueOption.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/field/AbstractValueOption.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/field/AbstractValueOption.java Sun Jan 22 08:05:17 2012
@@ -39,8 +39,10 @@ public abstract class AbstractValueOptio
}
protected void updateParent(final View view) {
- // 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/field/ColorField.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/field/ColorField.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/field/ColorField.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/field/ColorField.java Sun Jan 22 08:05:17 2012
@@ -101,12 +101,15 @@ public class ColorField extends TextPars
}
/*
- * @Override public void firstClick(final Click click) { if (((TextParseableContent)
- * getContent()).isEditable().isAllowed()) { final View overlay = new DisposeOverlay(new ColorFieldOverlay(this),
- * new ValueDropDownAxis((TextParseableContent) getContent(), getView())); final Location location =
- * this.getAbsoluteLocation(); // Location location = click.getLocationWithinViewer(); // TODO offset by constant
- * amount // location.move(10, 10); overlay.setLocation(location); // overlay.setSize(overlay.getRequiredSize(new
- * Size())); // overlay.markDamaged(); getViewManager().setOverlayView(overlay); } }
+ * @Override public void firstClick(final Click click) { if
+ * (((TextParseableContent) getContent()).isEditable().isAllowed()) { final
+ * View overlay = new DisposeOverlay(new ColorFieldOverlay(this), new
+ * ValueDropDownAxis((TextParseableContent) getContent(), getView())); final
+ * Location location = this.getAbsoluteLocation(); // Location location =
+ * click.getLocationWithinViewer(); // TODO offset by constant amount //
+ * location.move(10, 10); overlay.setLocation(location); //
+ * overlay.setSize(overlay.getRequiredSize(new Size())); //
+ * overlay.markDamaged(); getViewManager().setOverlayView(overlay); } }
*/
@Override
public int getBaseline() {
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/field/ColorFieldOverlay.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/field/ColorFieldOverlay.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/field/ColorFieldOverlay.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/field/ColorFieldOverlay.java Sun Jan 22 08:05:17 2012
@@ -28,12 +28,14 @@ import org.apache.isis.viewer.dnd.view.T
import org.apache.isis.viewer.dnd.view.base.AbstractView;
class ColorFieldOverlay extends AbstractView {
- private static final int colors[] = new int[] { 0xffffff, 0x0, 0x666666, 0xcccccc, // white, black, dark
- // gray, light gray
- 0x000099, 0x0066cc, 0x0033ff, 0x99ccff, // blues
- 0x990000, 0xff0033, 0xcc0066, 0xff66ff, // reds
- 0x003300, 0x00ff33, 0x669933, 0xccff66 // greens
- };
+ private static final int colors[] = new int[] { 0xffffff, 0x0, 0x666666, 0xcccccc, // white,
+ // black,
+ // dark
+ // gray, light gray
+ 0x000099, 0x0066cc, 0x0033ff, 0x99ccff, // blues
+ 0x990000, 0xff0033, 0xcc0066, 0xff66ff, // reds
+ 0x003300, 0x00ff33, 0x669933, 0xccff66 // greens
+ };
private static final int COLUMNS = 4;
private static final int ROWS = 4;
private static final int ROW_HEIGHT = 18;
@@ -54,16 +56,14 @@ class ColorFieldOverlay extends Abstract
@Override
public void draw(final Canvas canvas) {
- canvas.drawSolidRectangle(0, 0, COLUMNS * COLUMN_WIDTH - 1, ROWS * ROW_HEIGHT - 1,
- Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY3));
+ canvas.drawSolidRectangle(0, 0, COLUMNS * COLUMN_WIDTH - 1, ROWS * ROW_HEIGHT - 1, Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY3));
for (int i = 0; i < colors.length; i++) {
final Color color = Toolkit.getColor(colors[i]);
final int y = i / COLUMNS * ROW_HEIGHT;
final int x = i % COLUMNS * COLUMN_WIDTH;
canvas.drawSolidRectangle(x, y, COLUMN_WIDTH - 1, ROW_HEIGHT - 1, color);
}
- canvas.drawRectangle(0, 0, COLUMNS * COLUMN_WIDTH - 1, ROWS * ROW_HEIGHT - 1,
- Toolkit.getColor(ColorsAndFonts.COLOR_PRIMARY2));
+ canvas.drawRectangle(0, 0, COLUMNS * COLUMN_WIDTH - 1, ROWS * ROW_HEIGHT - 1, Toolkit.getColor(ColorsAndFonts.COLOR_PRIMARY2));
}
@Override
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/field/CopyValueOption.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/field/CopyValueOption.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/field/CopyValueOption.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/field/CopyValueOption.java Sun Jan 22 08:05:17 2012
@@ -40,7 +40,8 @@ public class CopyValueOption extends Abs
}
// TODO: move logic into Facets
return Allow.DEFAULT;
- // return new Allow(String.format("Copy value '%s' to clipboard", field.getSelectedText()));
+ // return new Allow(String.format("Copy value '%s' to clipboard",
+ // field.getSelectedText()));
}
@Override
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/field/EmptyField.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/field/EmptyField.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/field/EmptyField.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/field/EmptyField.java Sun Jan 22 08:05:17 2012
@@ -48,15 +48,13 @@ public class EmptyField extends Abstract
public static class Specification implements ViewSpecification {
@Override
public boolean canDisplay(final ViewRequirement requirement) {
- return requirement.isObject() && requirement.isOpen() && !requirement.isTextParseable()
- && !requirement.hasReference();
+ return requirement.isObject() && requirement.isOpen() && !requirement.isTextParseable() && !requirement.hasReference();
}
@Override
public View createView(final Content content, final Axes axes, final int sequence) {
final EmptyField emptyField = new EmptyField(content, this, Toolkit.getText(ColorsAndFonts.TEXT_NORMAL));
- if ((content instanceof OneToOneField && ((OneToOneField) content).isEditable().isAllowed())
- || content instanceof ObjectParameter) {
+ if ((content instanceof OneToOneField && ((OneToOneField) content).isEditable().isAllowed()) || content instanceof ObjectParameter) {
if (content.isOptionEnabled()) {
return new ObjectBorder(new OpenObjectDropDownBorder(emptyField, new IconSpecification()));
} else {
@@ -183,7 +181,8 @@ public class EmptyField extends Abstract
}
/**
- * Objects returned by menus are used to set this field before passing the call on to the parent.
+ * Objects returned by menus are used to set this field before passing the
+ * call on to the parent.
*/
@Override
public void objectActionResult(final ObjectAdapter result, final Placement placement) {
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/field/FieldOfSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/field/FieldOfSpecification.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/field/FieldOfSpecification.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/field/FieldOfSpecification.java Sun Jan 22 08:05:17 2012
@@ -104,8 +104,7 @@ class InternalFieldView extends Composit
private final Content fieldContent;
- public InternalFieldView(final Content content, final Content fieldContent, final Axes axes,
- final ViewSpecification specification) {
+ public InternalFieldView(final Content content, final Content fieldContent, final Axes axes, final ViewSpecification specification) {
super(content, specification);
this.fieldContent = fieldContent;
}
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/field/ImageField.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/field/ImageField.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/field/ImageField.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/field/ImageField.java Sun Jan 22 08:05:17 2012
@@ -174,18 +174,18 @@ public class ImageField extends Abstract
final boolean ctrl = (modifiers & InputEvent.CTRL_MASK) > 0;
switch (keyCode) {
- case KeyEvent.VK_V:
- if (ctrl) {
- key.consume();
- pasteFromClipboard();
- }
- break;
- case KeyEvent.VK_C:
- if (ctrl) {
- key.consume();
- copy();
- }
- break;
+ case KeyEvent.VK_V:
+ if (ctrl) {
+ key.consume();
+ pasteFromClipboard();
+ }
+ break;
+ case KeyEvent.VK_C:
+ if (ctrl) {
+ key.consume();
+ copy();
+ }
+ break;
}
}
@@ -206,9 +206,11 @@ public class ImageField extends Abstract
}
/*
- * private void loadImageFromURL(final String filename) { try { final URL url = new URL("file://" + filename); final
- * Image image = java.awt.Toolkit.getDefaultToolkit().getImage(url); loadImage(image); } catch (final
- * MalformedURLException e) { throw new IsisException("Failed to load image from " + filename); } }
+ * private void loadImageFromURL(final String filename) { try { final URL
+ * url = new URL("file://" + filename); final Image image =
+ * java.awt.Toolkit.getDefaultToolkit().getImage(url); loadImage(image); }
+ * catch (final MalformedURLException e) { throw new
+ * IsisException("Failed to load image from " + filename); } }
*/
private void loadImageFromFile(final String filename) {
final Image image = java.awt.Toolkit.getDefaultToolkit().getImage(filename);
@@ -230,14 +232,19 @@ public class ImageField extends Abstract
} else {
LOG.info("unsupported paste operation " + content);
- // note java does not support transferring images from the clipboard
+ // note java does not support transferring images from the
+ // clipboard
// although it has an image flavor for it !!?
/*
- * DataFlavor[] transferDataFlavors = content.getTransferDataFlavors(); for (int i = 0; i <
- * transferDataFlavors.length; i++) { LOG.debug("data transfer as " +
+ * DataFlavor[] transferDataFlavors =
+ * content.getTransferDataFlavors(); for (int i = 0; i <
+ * transferDataFlavors.length; i++) {
+ * LOG.debug("data transfer as " +
* transferDataFlavors[i].getMimeType()); }
*
- * Image image = (Image) content.getTransferData(DataFlavor.imageFlavor); LOG.debug("pasted " + image);
+ * Image image = (Image)
+ * content.getTransferData(DataFlavor.imageFlavor);
+ * LOG.debug("pasted " + image);
*/
}
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/field/PasswordField.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/field/PasswordField.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/field/PasswordField.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/field/PasswordField.java Sun Jan 22 08:05:17 2012
@@ -62,7 +62,8 @@ public class PasswordField extends TextF
}
/**
- * Only allow deletion of last character, ie don;t allow editing of the internals of the password.
+ * Only allow deletion of last character, ie don;t allow editing of the
+ * internals of the password.
*/
@Override
public void delete() {
@@ -158,8 +159,7 @@ public class PasswordField extends TextF
final String[] lines = textContent.getDisplayLines();
if (lines.length > 1) {
- throw new IsisException("Password field should contain a string that contains no line breaks; contains "
- + lines.length);
+ throw new IsisException("Password field should contain a string that contains no line breaks; contains " + lines.length);
}
final String chars = lines[0];
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/field/PasteValueOption.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/field/PasteValueOption.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/field/PasteValueOption.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/field/PasteValueOption.java Sun Jan 22 08:05:17 2012
@@ -36,8 +36,7 @@ public class PasteValueOption extends Ab
if (changable.isVetoed()) {
return changable;
} else {
- return changable.setDescription(String.format("Replace field content with '%s' from clipboard",
- getClipboard(view)));
+ return changable.setDescription(String.format("Replace field content with '%s' from clipboard", getClipboard(view)));
}
}
Modified: incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/field/SimpleDatePicker.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/field/SimpleDatePicker.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/field/SimpleDatePicker.java (original)
+++ incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/field/SimpleDatePicker.java Sun Jan 22 08:05:17 2012
@@ -62,13 +62,9 @@ public class SimpleDatePicker extends Ab
}
}
- private static final Button[] buttons = new Button[] { new Button('W', Calendar.WEEK_OF_YEAR, 1),
- new Button('F', Calendar.WEEK_OF_YEAR, 2), new Button('M', Calendar.MONTH, 1),
- new Button('Q', Calendar.MONTH, 3), new Button('Y', Calendar.YEAR, 1), new Button('D', Calendar.YEAR, 10),
-
- new Button('w', Calendar.WEEK_OF_YEAR, -1), new Button('f', Calendar.WEEK_OF_YEAR, -2),
- new Button('m', Calendar.MONTH, -1), new Button('q', Calendar.MONTH, -3), new Button('y', Calendar.YEAR, -1),
- new Button('d', Calendar.YEAR, -10) };
+ private static final Button[] buttons = new Button[] { new Button('W', Calendar.WEEK_OF_YEAR, 1), new Button('F', Calendar.WEEK_OF_YEAR, 2), new Button('M', Calendar.MONTH, 1), new Button('Q', Calendar.MONTH, 3), new Button('Y', Calendar.YEAR, 1), new Button('D', Calendar.YEAR, 10),
+
+ new Button('w', Calendar.WEEK_OF_YEAR, -1), new Button('f', Calendar.WEEK_OF_YEAR, -2), new Button('m', Calendar.MONTH, -1), new Button('q', Calendar.MONTH, -3), new Button('y', Calendar.YEAR, -1), new Button('d', Calendar.YEAR, -10) };
private static final int ROWS = 7;
private static final int COLUMNS = 7;
private static final int PADDING = 5;
@@ -130,7 +126,8 @@ public class SimpleDatePicker extends Ab
/*
* (non-Javadoc)
*
- * @see org.nakedobjects.plugins.dnd.field.DatePicker#getRequiredSize(org.nakedobjects.plugins.dnd.drawing.Size)
+ * @see org.nakedobjects.plugins.dnd.field.DatePicker#getRequiredSize(org.
+ * nakedobjects.plugins.dnd.drawing.Size)
*/
@Override
public Size getRequiredSize(final Size availableSpace) {
@@ -140,7 +137,9 @@ public class SimpleDatePicker extends Ab
/*
* (non-Javadoc)
*
- * @see org.nakedobjects.plugins.dnd.field.DatePicker#draw(org.nakedobjects.plugins.dnd.drawing.Canvas)
+ * @see
+ * org.nakedobjects.plugins.dnd.field.DatePicker#draw(org.nakedobjects.plugins
+ * .dnd.drawing.Canvas)
*/
@Override
public void draw(final Canvas canvas) {
@@ -163,8 +162,7 @@ public class SimpleDatePicker extends Ab
private void drawBackground(final Canvas canvas, final int width, final int height) {
canvas.drawSolidRectangle(0, 0, width - 1, headerHeight, Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY1));
canvas.drawSolidRectangle(0, 0, labelWidth, height - 1, Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY1));
- canvas.drawSolidRectangle(labelWidth, headerHeight, width - labelWidth - 1, height - cellHeight - 1,
- Toolkit.getColor(ColorsAndFonts.COLOR_WINDOW));
+ canvas.drawSolidRectangle(labelWidth, headerHeight, width - labelWidth - 1, height - cellHeight - 1, Toolkit.getColor(ColorsAndFonts.COLOR_WINDOW));
canvas.drawRectangle(0, 0, width - 1, height - 1, Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY1));
}
@@ -183,8 +181,7 @@ public class SimpleDatePicker extends Ab
private void drawDayMarker(final Canvas canvas) {
if (mouseOverColumn >= 0 && mouseOverColumn < COLUMNS && mouseOverRow >= 0 && mouseOverRow < ROWS) {
- canvas.drawRectangle(labelWidth + mouseOverColumn * cellWidth, headerHeight + mouseOverRow * cellHeight,
- cellWidth, cellHeight, Toolkit.getColor(ColorsAndFonts.COLOR_PRIMARY3));
+ canvas.drawRectangle(labelWidth + mouseOverColumn * cellWidth, headerHeight + mouseOverRow * cellHeight, cellWidth, cellHeight, Toolkit.getColor(ColorsAndFonts.COLOR_PRIMARY3));
}
}
@@ -218,12 +215,10 @@ public class SimpleDatePicker extends Ab
for (int column = 0; column < COLUMNS; column++) {
final String day = "" + d.get(Calendar.DAY_OF_MONTH);
if (currentDate != null && currentDate.equals(d)) {
- canvas.drawSolidRectangle(x, headerHeight + row * cellHeight, cellWidth, cellHeight,
- Toolkit.getColor(ColorsAndFonts.COLOR_PRIMARY2));
+ canvas.drawSolidRectangle(x, headerHeight + row * cellHeight, cellWidth, cellHeight, Toolkit.getColor(ColorsAndFonts.COLOR_PRIMARY2));
}
if (today.getTime().equals(d.getTime())) {
- canvas.drawRectangle(x, headerHeight + row * cellHeight, cellWidth, cellHeight,
- Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY2));
+ canvas.drawRectangle(x, headerHeight + row * cellHeight, cellWidth, cellHeight, Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY2));
}
canvas.drawText(day, x - PADDING / 2 + cellWidth - style.stringWidth(day), y, mainTextColor, style);
x += cellWidth;
@@ -248,8 +243,7 @@ public class SimpleDatePicker extends Ab
}
}
- private void drawControl(final Canvas canvas, final int x, final int y, final int width, final int height,
- final String label, final int over) {
+ private void drawControl(final Canvas canvas, final int x, final int y, final int width, final int height, final String label, final int over) {
if (Toolkit.debug) {
canvas.drawRectangle(x - 2, y, width + 4, height, Toolkit.getColor(ColorsAndFonts.COLOR_DEBUG_BOUNDS_VIEW));
}
@@ -281,7 +275,9 @@ public class SimpleDatePicker extends Ab
/*
* (non-Javadoc)
*
- * @see org.nakedobjects.plugins.dnd.field.DatePicker#mouseMoved(org.nakedobjects.plugins.dnd.drawing.Location)
+ * @see
+ * org.nakedobjects.plugins.dnd.field.DatePicker#mouseMoved(org.nakedobjects
+ * .plugins.dnd.drawing.Location)
*/
@Override
public void mouseMoved(final Location location) {
@@ -333,7 +329,9 @@ public class SimpleDatePicker extends Ab
/*
* (non-Javadoc)
*
- * @see org.nakedobjects.plugins.dnd.field.DatePicker#firstClick(org.nakedobjects.plugins.dnd.view.Click)
+ * @see
+ * org.nakedobjects.plugins.dnd.field.DatePicker#firstClick(org.nakedobjects
+ * .plugins.dnd.view.Click)
*/
@Override
public void firstClick(final Click click) {
@@ -356,7 +354,8 @@ public class SimpleDatePicker extends Ab
((TextParseableContent) content).parseTextEntry(value.titleString());
((TextParseableContent) content).entryComplete();
/*
- * if (content.isObject()) { ((ObjectContent) content).setObject(value); }
+ * if (content.isObject()) { ((ObjectContent)
+ * content).setObject(value); }
*/
// content.
getView().refresh();
@@ -378,7 +377,9 @@ public class SimpleDatePicker extends Ab
/*
* (non-Javadoc)
*
- * @see org.nakedobjects.plugins.dnd.field.DatePicker#keyPressed(org.nakedobjects.plugins.dnd.view.KeyboardAction)
+ * @see
+ * org.nakedobjects.plugins.dnd.field.DatePicker#keyPressed(org.nakedobjects
+ * .plugins.dnd.view.KeyboardAction)
*/
@Override
public void keyPressed(final KeyboardAction key) {