Class JmolSparshClientAdapter
java.lang.Object
org.jmol.multitouch.JmolMultiTouchClientAdapter
org.jmol.multitouch.sparshui.JmolSparshClientAdapter
- All Implemented Interfaces:
SparshClient, JmolMultiTouchAdapter
-
Field Summary
Fields inherited from class JmolMultiTouchClientAdapter
actionManager, isServer, ptTemp -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()getAllowedGestures(int groupID) This method must return the allowed Gestures for the specified group.intgetGroupID(Location location) This method must return an ID for a group of points that should be processed together.voidprocessEvent(int groupID, Event event) Translate the specialized Sparsh UI information into a format that Jmol's ActionManager can understand without any special classes.booleansetMultiTouchClient(Viewer vwr, JmolMultiTouchClient client, boolean isSimulation) Methods inherited from class JmolMultiTouchClientAdapter
fixXY, isServer, mouseMoved
-
Constructor Details
-
JmolSparshClientAdapter
public JmolSparshClientAdapter()
-
-
Method Details
-
dispose
public void dispose()- Specified by:
disposein interfaceJmolMultiTouchAdapter- Specified by:
disposein classJmolMultiTouchClientAdapter
-
setMultiTouchClient
- Specified by:
setMultiTouchClientin interfaceJmolMultiTouchAdapter- Overrides:
setMultiTouchClientin classJmolMultiTouchClientAdapter
-
getAllowedGestures
Description copied from interface:SparshClientThis method must return the allowed Gestures for the specified group. Gestures IDs are given in GestureType.java. This method should construct a list of valid gesture IDs for the specified groupID and return it. The client will then begin receiving events that are appropriate to the list of allowed gestures it returned.- Specified by:
getAllowedGesturesin interfaceSparshClient- Parameters:
groupID- The groupID we wish to obtain the allowed gestures for.- Returns:
- A list of allowed Gesture IDs
-
getGroupID
Description copied from interface:SparshClientThis method must return an ID for a group of points that should be processed together. If a constant value is returned, all points will be processed together and gestures will be recognized on the entire screen. Otherwise, if a unique ID is returned, gestures will be recognized locally for each ID.- Specified by:
getGroupIDin interfaceSparshClient- Parameters:
location- The location with coordinate values between 0 and 1 of the point we are requesting the groupID for.- Returns:
- The groupID that is associated with the current location.
-
processEvent
Translate the specialized Sparsh UI information into a format that Jmol's ActionManager can understand without any special classes. This allows the applet to modularize the multitouch business into an optional JAR file- Specified by:
processEventin interfaceSparshClient- Parameters:
groupID-event-
-