# Class JmolTouchSimulator

java.lang.Object
com.sparshui.inputdevice.JmolTouchSimulator

All Implemented Interfaces:
  `JmolTouchSimulatorInterface`

public class JmolTouchSimulator extends Object implements JmolTouchSimulatorInterface
allows Jmol to implement multitouch testing using the mouse press CTRL-LEFT and drag twice for a two-stroke multitouch gesture that will be sent to the server in an interlaced fashion. adapted by Bob Hanson for Jmol 11/29/2009

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`protected class`
`JmolTouchSimulator.TouchData`
`protected class`
`JmolTouchSimulator.TouchDataComparator`

## Field Summary

Fields
Modifier and Type
Field
Description
`protected Map<Integer, JmolTouchSimulator.TouchData>`
`_active`

## Constructor Summary

Constructors
Constructor
Description
`JmolTouchSimulator()`

## Method Summary

Modifier and Type
Method
Description
`protected void`
`dispatchTouchEvent(JmolTouchSimulator.TouchData data)`
protocol modified by Bob Hanson for Jmol to demonstrate extended SparshUI protocol to include a return from the server indicating whether or not to consume this event.
`void`
`dispose()`
`void`
`endRecording()`
`void`
`mouseDragged(long time, int x, int y)`
`void`
`mousePressed(long time, int x, int y)`
`void`
`mouseReleased(long time, int x, int y)`
`void`
`startRecording()`
`boolean`
`startSimulator(Object display)`
`void`
`toggleMode()`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### _active

protected Map<Integer, JmolTouchSimulator.TouchData> _active

## Constructor Details

### JmolTouchSimulator

public JmolTouchSimulator()

## Method Details

### dispose

public void dispose()

Specified by:
  `dispose` in interface `JmolTouchSimulatorInterface`

### startSimulator

public boolean startSimulator(Object display)

Specified by:
  `startSimulator` in interface `JmolTouchSimulatorInterface`

### toggleMode

public void toggleMode()

Specified by:
  `toggleMode` in interface `JmolTouchSimulatorInterface`

### startRecording

public void startRecording()

Specified by:
  `startRecording` in interface `JmolTouchSimulatorInterface`

### endRecording

public void endRecording()

Specified by:
  `endRecording` in interface `JmolTouchSimulatorInterface`

### mousePressed

public void mousePressed(long time, int x, int y)

Specified by:
  `mousePressed` in interface `JmolTouchSimulatorInterface`

### mouseReleased

public void mouseReleased(long time, int x, int y)

Specified by:
  `mouseReleased` in interface `JmolTouchSimulatorInterface`

### mouseDragged

public void mouseDragged(long time, int x, int y)

Specified by:
  `mouseDragged` in interface `JmolTouchSimulatorInterface`

### dispatchTouchEvent

protected void dispatchTouchEvent(JmolTouchSimulator.TouchData data)
protocol modified by Bob Hanson for Jmol to demonstrate extended SparshUI protocol to include a return from the server indicating whether or not to consume this event. server return == (byte) 1 --> do consume this event server return == (byte) 0 --> do not consume this event

Parameters:
  `data` -