From: Matti Tahvonen Date: Wed, 17 Mar 2010 16:33:55 +0000 (+0000) Subject: some javadocs X-Git-Tag: 6.7.0.beta1~1902 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e92b9743d74885dda10ec95f643b58d66de56942;p=vaadin-framework.git some javadocs svn changeset:11941/svn branch:6.3 --- diff --git a/src/com/vaadin/ui/AbstractSelect.java b/src/com/vaadin/ui/AbstractSelect.java index 74fdbb525d..45ff75a66e 100644 --- a/src/com/vaadin/ui/AbstractSelect.java +++ b/src/com/vaadin/ui/AbstractSelect.java @@ -21,6 +21,7 @@ import com.vaadin.data.Property; import com.vaadin.data.util.IndexedContainer; import com.vaadin.event.DataBoundTransferable; import com.vaadin.event.dd.DragAndDropEvent; +import com.vaadin.event.dd.DropTarget; import com.vaadin.event.dd.DropTargetDetailsImpl; import com.vaadin.event.dd.acceptCriteria.ClientCriterion; import com.vaadin.event.dd.acceptCriteria.ClientSideCriterion; @@ -1769,7 +1770,7 @@ public abstract class AbstractSelect extends AbstractField implements } /** - * TODO Javadoc! + * Helper implementation for subclasses that implement {@link DropTarget}. * * @since 6.3 */ @@ -1781,11 +1782,13 @@ public abstract class AbstractSelect extends AbstractField implements protected Object idOver; /** - * TODO Javadoc! + * Constructor that automatically converts itemIdOver key to + * corresponding item Id * */ - AbstractSelectDropTargetDetails(Map rawVariables) { - super(rawVariables); + protected AbstractSelectDropTargetDetails( + Map rawVariables) { + super(rawVariables, (DropTarget) AbstractSelect.this); // eagar fetch itemid, mapper may be emptied String keyover = (String) getData("itemIdOver"); if (keyover != null) { @@ -1794,8 +1797,8 @@ public abstract class AbstractSelect extends AbstractField implements } /** - * If the drag operation is currently over an Item, this method returns - * the identifier of the Item. + * If the drag operation is currently over an {@link Item}, this method + * returns the identifier of that {@link Item}. * */ public Object getItemIdOver() { @@ -1803,8 +1806,7 @@ public abstract class AbstractSelect extends AbstractField implements } /** - * TODO Javadoc! - * + * Returns a detailed vertical location where the drop happened on Item. */ public VerticalDropLocation getDropLocation() { String detail = (String) getData("detail"); diff --git a/src/com/vaadin/ui/Tree.java b/src/com/vaadin/ui/Tree.java index 9f3649ebe9..7ad0a159e7 100644 --- a/src/com/vaadin/ui/Tree.java +++ b/src/com/vaadin/ui/Tree.java @@ -32,6 +32,7 @@ import com.vaadin.event.dd.DragAndDropEvent; import com.vaadin.event.dd.DragSource; import com.vaadin.event.dd.DropHandler; import com.vaadin.event.dd.DropTarget; +import com.vaadin.event.dd.DropTargetDetails; import com.vaadin.event.dd.acceptCriteria.ClientCriterion; import com.vaadin.event.dd.acceptCriteria.ClientSideCriterion; import com.vaadin.event.dd.acceptCriteria.ServerSideCriterion; @@ -103,7 +104,17 @@ public class Tree extends AbstractSelect implements Container.Hierarchical, * Supported drag modes for Tree. */ public enum TreeDragMode { - NONE, NODE + /** + * When drag mode is NONE, draggin from Tree is not supported. Browsers + * may still support selecting text/icons from Tree which can initiate + * HTML 5 style drag and drop operation. + */ + NONE, + /** + * When drag mode is NODE, users can initiate drag from Tree nodes that + * represent {@link Item}s in from the backed {@link Container}. + */ + NODE // , SUBTREE } @@ -1111,7 +1122,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical, } /** - * TODO Javadoc! + * A {@link DropTargetDetails} implementation with Tree specific api. * * @since 6.3 */ @@ -1191,10 +1202,11 @@ public class Tree extends AbstractSelect implements Container.Hierarchical, } - /** - * TODO Javadoc! + /* + * (non-Javadoc) * - * @since 6.3 + * @see + * com.vaadin.event.dd.DropTarget#translateDropTargetDetails(java.util.Map) */ public TreeDropTargetDetails translateDropTargetDetails( Map clientVariables) { @@ -1202,7 +1214,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical, } /** - * API for {@link TreeDropCriterion} + * Helper API for {@link TreeDropCriterion} * * @param itemId * @return @@ -1211,10 +1223,22 @@ public class Tree extends AbstractSelect implements Container.Hierarchical, return itemIdMapper.key(itemId); } + /** + * Sets the drag mode that controls how Tree behaves as a {@link DragSource} + * . + * + * @param dragMode + */ public void setDragMode(TreeDragMode dragMode) { this.dragMode = dragMode; } + /** + * @return the drag mode that controls how Tree behaves as a + * {@link DragSource}. + * + * @see TreeDragMode + */ public TreeDragMode getDragMode() { return dragMode; }