From 4eb5847f9929fd69f656f415fca454ffd605448f Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Mon, 19 Apr 2010 13:50:48 +0000 Subject: Merged drag'n'drop enhancements [12493],[12484] svn changeset:12652/svn branch:6.4 --- src/com/vaadin/ui/AbstractSelect.java | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src/com/vaadin/ui') diff --git a/src/com/vaadin/ui/AbstractSelect.java b/src/com/vaadin/ui/AbstractSelect.java index d2b9239963..9667de32d6 100644 --- a/src/com/vaadin/ui/AbstractSelect.java +++ b/src/com/vaadin/ui/AbstractSelect.java @@ -27,6 +27,7 @@ import com.vaadin.event.dd.TargetDetailsImpl; import com.vaadin.event.dd.acceptcriteria.ClientCriterion; import com.vaadin.event.dd.acceptcriteria.ClientSideCriterion; import com.vaadin.event.dd.acceptcriteria.ContainsDataFlavor; +import com.vaadin.event.dd.acceptcriteria.TargetDetailIs; import com.vaadin.terminal.KeyMapper; import com.vaadin.terminal.PaintException; import com.vaadin.terminal.PaintTarget; @@ -1849,4 +1850,24 @@ public abstract class AbstractSelect extends AbstractField implements } + /** + * An accept criterion to accept drops only on a specific vertical location + * of an item. + *

+ * This accept criterion is currently usable in Tree and Table + * implementations. + */ + public static class VerticalLocationIs extends TargetDetailIs { + public static VerticalLocationIs TOP = new VerticalLocationIs( + VerticalDropLocation.TOP); + public static VerticalLocationIs BOTTOM = new VerticalLocationIs( + VerticalDropLocation.BOTTOM); + public static VerticalLocationIs MIDDLE = new VerticalLocationIs( + VerticalDropLocation.MIDDLE); + + private VerticalLocationIs(VerticalDropLocation l) { + super("detail", l.name()); + } + } + } -- cgit v1.2.3