APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.glass.ui.monocle

pack-priv Class MouseState

extends Object
Class Inheritance
Imports
com.sun.glass.events.KeyEvent, .MouseEvent

MouseState is a snapshot of mouse coordinates and which buttons are pressed. MouseState is used both to store the current state of mouse input and to describe changes to that state.

Field Summary

Modifier and TypeField and Description
private IntSet
private int
pack-priv static final int
pack-priv static final int
pack-priv static final int
private MonocleWindow
private int
x

private int
y

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv boolean
canBeFoldedWith(MouseState
the MouseState to compare to
ms
)

Finds out whether two non-null states are identical in everything but their coordinates

pack-priv void
copyTo(MouseState
The MouseState to which to copy this state's data.
target
)

Copies the contents of this state object to another.

pack-priv int
getButton()

Returns the Glass button ID used for this state.

pack-priv IntSet
pack-priv int
getModifiers()

Returns the Glass event modifiers for this state

pack-priv int
pack-priv MonocleWindow

Returns:

the MonocleWindow at the top of the stack at the coordinates described by this state object, or the fallback window in case the current window is null or no window can be found for the supplied coordinates.
getWindow
(boolean
true if the cached value for the target window should be recalculated; false if the cached value should be used to determine the result of this method.
recalculateCache
,
MonocleWindow
if the original window is null, or if no window can be found, return the fallback window
fallback
)

Returns the Glass window on which the coordinates of this state are located.

pack-priv int
getX()

pack-priv int
getY()

pack-priv void
pressButton(int button)

pack-priv void
releaseButton(int button)

pack-priv void
setWheel(int wheel)

pack-priv void
setX(int x)

pack-priv void
setY(int y)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

buttonsPressedback to summary
private IntSet buttonsPressed
wheelback to summary
private int wheel
WHEEL_DOWNback to summary
pack-priv static final int WHEEL_DOWN
WHEEL_NONEback to summary
pack-priv static final int WHEEL_NONE
WHEEL_UPback to summary
pack-priv static final int WHEEL_UP
windowback to summary
private MonocleWindow window
xback to summary
private int x
yback to summary
private int y

Constructor Detail

MouseStateback to summary
pack-priv MouseState()

Method Detail

canBeFoldedWithback to summary
pack-priv boolean canBeFoldedWith(MouseState ms)

Finds out whether two non-null states are identical in everything but their coordinates

Parameters
ms:MouseState

the MouseState to compare to

copyToback to summary
pack-priv void copyTo(MouseState target)

Copies the contents of this state object to another.

Parameters
target:MouseState

The MouseState to which to copy this state's data.

getButtonback to summary
pack-priv int getButton()

Returns the Glass button ID used for this state.

getButtonsPressedback to summary
pack-priv IntSet getButtonsPressed()
getModifiersback to summary
pack-priv int getModifiers()

Returns the Glass event modifiers for this state

getWheelback to summary
pack-priv int getWheel()
getWindowback to summary
pack-priv MonocleWindow getWindow(boolean recalculateCache, MonocleWindow fallback)

Returns the Glass window on which the coordinates of this state are located.

Parameters
recalculateCache:boolean

true if the cached value for the target window should be recalculated; false if the cached value should be used to determine the result of this method.

fallback:MonocleWindow

if the original window is null, or if no window can be found, return the fallback window

Returns:MonocleWindow

the MonocleWindow at the top of the stack at the coordinates described by this state object, or the fallback window in case the current window is null or no window can be found for the supplied coordinates.

getXback to summary
pack-priv int getX()
getYback to summary
pack-priv int getY()
pressButtonback to summary
pack-priv void pressButton(int button)
releaseButtonback to summary
pack-priv void releaseButton(int button)
setWheelback to summary
pack-priv void setWheel(int wheel)
setXback to summary
pack-priv void setX(int x)
setYback to summary
pack-priv void setY(int y)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override