Adds documentation for a few methods.
Change-Id: I6bdae25a8b81cdac931f2591f33570b01e34fb2cmain
parent
4793e91317
commit
9cf69a45b2
|
@ -93,13 +93,13 @@ public class Key implements Comparable<Key> {
|
||||||
/** Icon to display instead of a label. Icon takes precedence over a label */
|
/** Icon to display instead of a label. Icon takes precedence over a label */
|
||||||
private final int mIconId;
|
private final int mIconId;
|
||||||
|
|
||||||
/** Width of the key, not including the gap */
|
/** Width of the key, excluding the gap */
|
||||||
private final int mWidth;
|
private final int mWidth;
|
||||||
/** Height of the key, not including the gap */
|
/** Height of the key, excluding the gap */
|
||||||
private final int mHeight;
|
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;
|
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;
|
private final int mY;
|
||||||
/** Hit bounding box of the key */
|
/** Hit bounding box of the key */
|
||||||
private final Rect mHitBox = new Rect();
|
private final Rect mHitBox = new Rect();
|
||||||
|
@ -736,18 +736,34 @@ public class Key implements Comparable<Key> {
|
||||||
return iconSet.getIconDrawable(getIconId());
|
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() {
|
public int getWidth() {
|
||||||
return mWidth;
|
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() {
|
public int getHeight() {
|
||||||
return mHeight;
|
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() {
|
public int getX() {
|
||||||
return mX;
|
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() {
|
public int getY() {
|
||||||
return mY;
|
return mY;
|
||||||
}
|
}
|
||||||
|
|
|
@ -145,6 +145,12 @@ public final class InputPointers {
|
||||||
return mPointerIds.getPrimitiveArray();
|
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() {
|
public int[] getTimes() {
|
||||||
if (DebugFlags.DEBUG_ENABLED || DEBUG_TIME) {
|
if (DebugFlags.DEBUG_ENABLED || DEBUG_TIME) {
|
||||||
if (!isValidTimeStamps()) {
|
if (!isValidTimeStamps()) {
|
||||||
|
|
Loading…
Reference in New Issue