Top Description Fields Constructors Methods
com.sun.glass.ui.monocle

pack-priv Class TouchInput

extends Object
Class Inheritance
Imports
com.sun.glass.events.TouchEvent, com.sun.glass.ui.GestureSupport, .TouchInputSupport, .View, .Window

Processes touch input events based on changes to touch state. Not thread-safe.

Field Summary

Modifier and TypeField and Description
private TouchPipeline
private final GestureSupport
private static TouchInput
private TouchState
private final TouchInputSupport
private final int
touchRadius

This property determines the sensitivity of move events from touch.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private int
countEvents(TouchState newState)

Calculate the number of touch point events that will be sent by dispatchPoints().

private void
dispatchPoint(Window window, View view, int state, int id, int x, int y)

pack-priv TouchPipeline
getBasePipeline()

Gets the base touch filter pipeline common to all touch devices

pack-priv static TouchInput
pack-priv void
getState(TouchState
target into which to copy the touch state
result
)

Copies the current state into the TouchState provided.

pack-priv int
private void
private void
postPoint(Window window, View view, int state, TouchState.Point p)

private void
postPoints(Window window, View view, int[] states, int[] ids, int[] xs, int[] ys)

private void
postTouchEvent(TouchState
The state for which to process all points
state
,
int
The type of TouchEvent to send (e.g. TouchEvent.PRESSED)
eventType
)

Sends the same event type for all points in the given state

private void
postTouchEvent(MonocleWindow
The current Window
window
,
View
The current View
view
,
TouchState
The updated touch points
newState
)

Sends updated touch points within the same View as last processed touch points.

pack-priv void
setState(TouchState
The updated touch state
newState
)

Called from the input processor to update the touch state and send touch and mouse events.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

basePipelineback to summary
private TouchPipeline basePipeline
gesturesback to summary
private final GestureSupport gestures
instanceback to summary
private static TouchInput instance
stateback to summary
private TouchState state
touchesback to summary
private final TouchInputSupport touches
touchRadiusback to summary
private final int touchRadius

This property determines the sensitivity of move events from touch. The bigger the value the less sensitive is the touch screen. In practice move events with a delta smaller then the value of this property will be filtered out.The value of the property is in pixels.

Constructor Detail

TouchInputback to summary
private TouchInput()

Method Detail

countEventsback to summary
private int countEvents(TouchState newState)

Calculate the number of touch point events that will be sent by dispatchPoints(). This is the union of the touch points in the old and new states.

dispatchPointback to summary
private void dispatchPoint(Window window, View view, int state, int id, int x, int y)
getBasePipelineback to summary
pack-priv TouchPipeline getBasePipeline()

Gets the base touch filter pipeline common to all touch devices

getInstanceback to summary
pack-priv static TouchInput getInstance()
getStateback to summary
pack-priv void getState(TouchState result)

Copies the current state into the TouchState provided.

Parameters
result:TouchState

target into which to copy the touch state

getTouchRadiusback to summary
pack-priv int getTouchRadius()
postNoPointsback to summary
private void postNoPoints(View view)
postPointback to summary
private void postPoint(Window window, View view, int state, TouchState.Point p)
postPointsback to summary
private void postPoints(Window window, View view, int[] states, int[] ids, int[] xs, int[] ys)
postTouchEventback to summary
private void postTouchEvent(TouchState state, int eventType)

Sends the same event type for all points in the given state

Parameters
state:TouchState

The state for which to process all points

eventType:int

The type of TouchEvent to send (e.g. TouchEvent.PRESSED)

postTouchEventback to summary
private void postTouchEvent(MonocleWindow window, View view, TouchState newState)

Sends updated touch points within the same View as last processed touch points.

Parameters
window:MonocleWindow

The current Window

view:View

The current View

newState:TouchState

The updated touch points

setStateback to summary
pack-priv void setState(TouchState newState)

Called from the input processor to update the touch state and send touch and mouse events.

Parameters
newState:TouchState

The updated touch state