diff options
Diffstat (limited to 'rule_api/src')
-rw-r--r-- | rule_api/src/com/android/ide/common/api/IDragElement.java | 8 | ||||
-rw-r--r-- | rule_api/src/com/android/ide/common/api/IViewRule.java | 16 |
2 files changed, 20 insertions, 4 deletions
diff --git a/rule_api/src/com/android/ide/common/api/IDragElement.java b/rule_api/src/com/android/ide/common/api/IDragElement.java index 885ba35..50a5014 100644 --- a/rule_api/src/com/android/ide/common/api/IDragElement.java +++ b/rule_api/src/com/android/ide/common/api/IDragElement.java @@ -86,6 +86,14 @@ public interface IDragElement { public abstract IDragElement[] getInnerElements(); /** + * Returns true if the given {@link INode} represents this drag element + * + * @param node the node to be checked + * @return true if the given node represents this drag element + */ + public abstract boolean isSame(@NonNull INode node); + + /** * An XML attribute in the {@link IDragElement}. * <p/> * The attribute is always represented by a namespace URI, a name and a value. diff --git a/rule_api/src/com/android/ide/common/api/IViewRule.java b/rule_api/src/com/android/ide/common/api/IViewRule.java index bcf4e89..c115795 100644 --- a/rule_api/src/com/android/ide/common/api/IViewRule.java +++ b/rule_api/src/com/android/ide/common/api/IViewRule.java @@ -161,7 +161,9 @@ public interface IViewRule { * @param targetView the corresponding View object for the target layout, or * null if not known * @param elements an array of {@link IDragElement} element descriptors for - * the dragged views + * the dragged views. When there are more than one element, the + * first element will always be the "primary" element (e.g. the + * one that the mouse is actively dragging.) * @return a {@link DropFeedback} object with drop state (which will be * supplied to a follow-up {@link #onDropMove} call), or null if the * drop should be ignored @@ -178,7 +180,9 @@ public interface IViewRule { * @param targetNode the {@link INode} for the target layout receiving a * drop event * @param elements an array of {@link IDragElement} element descriptors for - * the dragged views + * the dragged views. When there are more than one element, the + * first element will always be the "primary" element (e.g. the + * one that the mouse is actively dragging.) * @param feedback the {@link DropFeedback} object created by * {@link #onDropEnter(INode, Object, IDragElement[])} * @param where the current mouse drag position @@ -211,7 +215,9 @@ public interface IViewRule { * @param targetNode the {@link INode} for the target layout receiving a * drop event * @param elements an array of {@link IDragElement} element descriptors for - * the dragged views + * the dragged views. When there are more than one element, the + * first element will always be the "primary" element (e.g. the + * one that the mouse is actively dragging.) * @param feedback the {@link DropFeedback} object created by * {@link #onDropEnter(INode, Object, IDragElement[])} */ @@ -230,7 +236,9 @@ public interface IViewRule { * @param targetNode the {@link INode} for the target layout receiving a * drop event * @param elements an array of {@link IDragElement} element descriptors for - * the dragged views + * the dragged views. When there are more than one element, the + * first element will always be the "primary" element (e.g. the + * one that the mouse is actively dragging.) * @param feedback the {@link DropFeedback} object created by * {@link #onDropEnter(INode, Object, IDragElement[])} * @param where the mouse drop position |