diff options
author | Tor Norbye <tnorbye@google.com> | 2012-04-03 16:32:32 -0700 |
---|---|---|
committer | Tor Norbye <tnorbye@google.com> | 2012-06-07 21:07:57 -0700 |
commit | 1d3020c83415d3d60f3f4c024ae2a21e0c8b4a13 (patch) | |
tree | 16689df75d1da314e331ac5ccf26fd9cd3c6ebaa /rule_api/src | |
parent | d0fdcfdfac4b2ec4898df933aa90541d79420519 (diff) | |
download | sdk-1d3020c83415d3d60f3f4c024ae2a21e0c8b4a13.zip sdk-1d3020c83415d3d60f3f4c024ae2a21e0c8b4a13.tar.gz sdk-1d3020c83415d3d60f3f4c024ae2a21e0c8b4a13.tar.bz2 |
Add isSame on IDragElement, and sort primary to front
Change-Id: I7121b5f0e3714fec705387603f641bc14ed0ab3e
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 |