Class Pointer
java.lang.Object
nl.colorize.multimedialib.renderer.Pointer
Represents a pointer device, which can be a mouse, a trackpad, or touch
controls, depending on the current platform and device.
Devices that support multi-touch will allow multiple pointers to be active
simultaneously. In such situations the render will provide access to
multiple Pointer
instances that can be tracked individually, using
getId()
to identify each pointer.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetId()
int
getState()
boolean
Returns true if this pointer is currently in the pressed state, regardless of the pointer's current position.boolean
Returns true if this pointer is currently in the pressed state and the pointer's position is currently located within the specified area.boolean
Returns true if this pointer is currently in the released state, regardless of the pointer's current position.boolean
isReleased
(Rect bounds) Returns true if this pointer is currently in the released state and the pointer's position is currently located within the specified area.void
void
setPosition
(Point2D position) void
setState
(int state)
-
Field Details
-
STATE_IDLE
public static final int STATE_IDLE- See Also:
-
STATE_PRESSED
public static final int STATE_PRESSED- See Also:
-
STATE_RELEASED
public static final int STATE_RELEASED- See Also:
-
-
Constructor Details
-
Pointer
-
-
Method Details
-
isPressed
public boolean isPressed()Returns true if this pointer is currently in the pressed state, regardless of the pointer's current position. -
isPressed
Returns true if this pointer is currently in the pressed state and the pointer's position is currently located within the specified area. -
isReleased
public boolean isReleased()Returns true if this pointer is currently in the released state, regardless of the pointer's current position. -
isReleased
Returns true if this pointer is currently in the released state and the pointer's position is currently located within the specified area. -
getId
-
getPosition
-
getState
public int getState() -
setId
-
setPosition
-
setState
public void setState(int state)
-