diff options
author | Artur Signell <artur.signell@itmill.com> | 2010-04-19 13:50:48 +0000 |
---|---|---|
committer | Artur Signell <artur.signell@itmill.com> | 2010-04-19 13:50:48 +0000 |
commit | 4eb5847f9929fd69f656f415fca454ffd605448f (patch) | |
tree | 3eab4fe82b5541cfdab446e3b6812093e5676cce /src/com/vaadin/ui | |
parent | e2a5e02e5d19fbc6b810ae768fdd4cbfb85f4230 (diff) | |
download | vaadin-framework-4eb5847f9929fd69f656f415fca454ffd605448f.tar.gz vaadin-framework-4eb5847f9929fd69f656f415fca454ffd605448f.zip |
Merged drag'n'drop enhancements [12493],[12484]
svn changeset:12652/svn branch:6.4
Diffstat (limited to 'src/com/vaadin/ui')
-rw-r--r-- | src/com/vaadin/ui/AbstractSelect.java | 21 |
1 files changed, 21 insertions, 0 deletions
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. + * <p> + * 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()); + } + } + } |