aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Faden <dfaden@google.com>2014-08-26 00:40:18 -0700
committerJean Chalard <jchalard@google.com>2014-08-26 08:08:24 +0000
commit9cf69a45b24646bdd4bf365afe4e8e9fb30f9a22 (patch)
treeba14b31e1a61536b43b4e81cf4ec0264b809b97b
parent4793e91317f8fe00627405d87f007acb92c39d54 (diff)
downloadlatinime-9cf69a45b24646bdd4bf365afe4e8e9fb30f9a22.tar.gz
latinime-9cf69a45b24646bdd4bf365afe4e8e9fb30f9a22.tar.xz
latinime-9cf69a45b24646bdd4bf365afe4e8e9fb30f9a22.zip
Adds documentation for a few methods.
Change-Id: I6bdae25a8b81cdac931f2591f33570b01e34fb2c
-rw-r--r--java/src/com/android/inputmethod/keyboard/Key.java24
-rw-r--r--java/src/com/android/inputmethod/latin/InputPointers.java6
2 files changed, 26 insertions, 4 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/Key.java b/java/src/com/android/inputmethod/keyboard/Key.java
index f00889ed7..3743d26e6 100644
--- a/java/src/com/android/inputmethod/keyboard/Key.java
+++ b/java/src/com/android/inputmethod/keyboard/Key.java
@@ -93,13 +93,13 @@ public class Key implements Comparable<Key> {
/** Icon to display instead of a label. Icon takes precedence over a label */
private final int mIconId;
- /** Width of the key, not including the gap */
+ /** Width of the key, excluding the gap */
private final int mWidth;
- /** Height of the key, not including the gap */
+ /** Height of the key, excluding the gap */
private final int mHeight;
- /** X coordinate of the key in the keyboard layout */
+ /** X coordinate of the top-left corner of the key in the keyboard layout, excluding the gap. */
private final int mX;
- /** Y coordinate of the key in the keyboard layout */
+ /** Y coordinate of the top-left corner of the key in the keyboard layout, excluding the gap. */
private final int mY;
/** Hit bounding box of the key */
private final Rect mHitBox = new Rect();
@@ -736,18 +736,34 @@ public class Key implements Comparable<Key> {
return iconSet.getIconDrawable(getIconId());
}
+ /**
+ * Gets the width of the key in pixels, excluding the gap.
+ * @return The width of the key in pixels, excluding the gap.
+ */
public int getWidth() {
return mWidth;
}
+ /**
+ * Gets the height of the key in pixels, excluding the gap.
+ * @return The height of the key in pixels, excluding the gap.
+ */
public int getHeight() {
return mHeight;
}
+ /**
+ * Gets the x-coordinate of the top-left corner of the key in pixels, excluding the gap.
+ * @return The x-coordinate of the top-left corner of the key in pixels, excluding the gap.
+ */
public int getX() {
return mX;
}
+ /**
+ * Gets the y-coordinate of the top-left corner of the key in pixels, excluding the gap.
+ * @return The y-coordinate of the top-left corner of the key in pixels, excluding the gap.
+ */
public int getY() {
return mY;
}
diff --git a/java/src/com/android/inputmethod/latin/InputPointers.java b/java/src/com/android/inputmethod/latin/InputPointers.java
index 790e0d830..d57a881c0 100644
--- a/java/src/com/android/inputmethod/latin/InputPointers.java
+++ b/java/src/com/android/inputmethod/latin/InputPointers.java
@@ -145,6 +145,12 @@ public final class InputPointers {
return mPointerIds.getPrimitiveArray();
}
+ /**
+ * Gets the time each point was registered, in milliseconds, relative to the first event in the
+ * sequence.
+ * @return The time each point was registered, in milliseconds, relative to the first event in
+ * the sequence.
+ */
public int[] getTimes() {
if (DebugFlags.DEBUG_ENABLED || DEBUG_TIME) {
if (!isValidTimeStamps()) {