aboutsummaryrefslogtreecommitdiffstats
path: root/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/api
diff options
context:
space:
mode:
authorTor Norbye <tnorbye@google.com>2011-07-07 11:57:59 -0700
committerTor Norbye <tnorbye@google.com>2011-07-08 20:31:19 -0700
commit0595b4123048f53179b5c2c65cf88968ac488ad3 (patch)
treed518ec578c0d0c3812cb4855337deb9275fa6743 /eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/api
parentd50c45bbd9e0d031c6fd86e92a78ffc3f8550b23 (diff)
downloadsdk-0595b4123048f53179b5c2c65cf88968ac488ad3.zip
sdk-0595b4123048f53179b5c2c65cf88968ac488ad3.tar.gz
sdk-0595b4123048f53179b5c2c65cf88968ac488ad3.tar.bz2
Simple insets support
This changeset adds the basic plumbing for supporting insets, such that selection handles can reflect the true bounds of a widget, and such that guidelines which show adjacent matches can show and measure the correct visual distance between the widgets. The actual insets data is not available (though there are some commented out measurements for some of the most important widgets, like buttons), so the purpose of this changeset is to put the APIs in place such that the various view rules can correctly account for these deltas when they become available. Change-Id: I326bfa22f0d239d76685b371d38bb8eac594a53b
Diffstat (limited to 'eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/api')
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/api/IViewMetadata.java7
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/api/Margins.java4
2 files changed, 10 insertions, 1 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/api/IViewMetadata.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/api/IViewMetadata.java
index 22fcb50..0687f30 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/api/IViewMetadata.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/api/IViewMetadata.java
@@ -35,6 +35,13 @@ public interface IViewMetadata {
public String getDisplayName();
/**
+ * Gets the insets for this view
+ *
+ * @return the insets for this view
+ */
+ public Margins getInsets();
+
+ /**
* Returns the {@link FillPreference} of this view
*
* @return the {@link FillPreference} of this view
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/api/Margins.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/api/Margins.java
index 9e7c1d9..40f44ce 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/api/Margins.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/api/Margins.java
@@ -17,7 +17,9 @@
package com.android.ide.common.api;
/**
- * Set of margins for a node.
+ * Set of margins - distances to outer left, top, right and bottom edges. These objects
+ * can be used for both actual <b>margins</b> as well as insets - and in general any
+ * deltas to the bounds of a rectangle.
*/
public class Margins {
/** The left margin */