Package org.jmol.multitouch
Class ActionManagerMT
java.lang.Object
org.jmol.viewer.ActionManager
org.jmol.multitouch.ActionManagerMT
- All Implemented Interfaces:
EventManager,JmolMultiTouchClient
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate JmolMultiTouchAdapterstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intprivate booleanstatic final intstatic final intstatic final intprivate static final String[]static final intstatic final intprivate intstatic final intprivate long(package private) booleanstatic final intstatic final intstatic final intstatic final intprivate booleanstatic final intstatic final intstatic final intprivate intprivate JmolTouchSimulatorInterfaceprivate static final com.sparshui.GestureTypestatic final intstatic final intstatic final intstatic final intprivate static final com.sparshui.GestureTypestatic final intstatic final intFields inherited from class org.jmol.viewer.ActionManager
ACTION_assignNew, ACTION_center, ACTION_clickFrank, ACTION_connectAtoms, ACTION_count, ACTION_deleteAtom, ACTION_deleteBond, ACTION_depth, ACTION_dragAtom, ACTION_dragDrawObject, ACTION_dragDrawPoint, ACTION_dragLabel, ACTION_dragMinimize, ACTION_dragMinimizeMolecule, ACTION_dragSelected, ACTION_dragZ, ACTION_multiTouchSimulation, ACTION_navTranslate, ACTION_pickAtom, ACTION_pickIsosurface, ACTION_pickLabel, ACTION_pickMeasure, ACTION_pickNavigate, ACTION_pickPoint, ACTION_popupMenu, ACTION_reset, ACTION_rotate, ACTION_rotateBranch, ACTION_rotateSelected, ACTION_rotateZ, ACTION_rotateZorZoom, ACTION_select, ACTION_selectAndDrag, ACTION_selectAndNot, ACTION_selectNone, ACTION_selectOr, ACTION_selectToggle, ACTION_selectToggleExtended, ACTION_setMeasure, ACTION_slab, ACTION_slabAndDepth, ACTION_slideZoom, ACTION_spinDrawObjectCCW, ACTION_spinDrawObjectCW, ACTION_stopMotion, ACTION_swipe, ACTION_translate, ACTION_wheelZoom, b, clickedCount, current, DEFAULT_GESTURE_SWIPE_FACTOR, DEFAULT_MOUSE_DRAG_FACTOR, DEFAULT_MOUSE_WHEEL_FACTOR, haveMultiTouchInput, hoverWatcherThread, isMultiTouch, isMultiTouchClient, isMultiTouchServer, MININUM_GESTURE_DELAY_MILLISECONDS, mouseDragFactor, mouseWheelFactor, moved, PICKING_ASSIGN_ATOM, PICKING_ASSIGN_BOND, PICKING_CENTER, PICKING_CONNECT, PICKING_DELETE_ATOM, PICKING_DELETE_BOND, PICKING_DRAG_ATOM, PICKING_DRAG_LIGAND, PICKING_DRAG_MINIMIZE, PICKING_DRAG_MINIMIZE_MOLECULE, PICKING_DRAG_MODEL, PICKING_DRAG_MOLECULE, PICKING_DRAG_SELECTED, PICKING_DRAW, PICKING_IDENTIFY, PICKING_IDENTIFY_BOND, PICKING_INVERT_STEREO, PICKING_LABEL, PICKING_MEASURE, PICKING_MEASURE_ANGLE, PICKING_MEASURE_DISTANCE, PICKING_MEASURE_SEQUENCE, PICKING_MEASURE_TORSION, PICKING_MK_RESET, PICKING_NAVIGATE, PICKING_OFF, PICKING_ROTATE_BOND, PICKING_SELECT_ATOM, PICKING_SELECT_CHAIN, PICKING_SELECT_ELEMENT, PICKING_SELECT_GROUP, PICKING_SELECT_MODEL, PICKING_SELECT_MOLECULE, PICKING_SELECT_POLYMER, PICKING_SELECT_SITE, PICKING_SELECT_STRUCTURE, PICKING_SPIN, PICKING_STRUTS, PICKING_SYMMETRY, PICKINGSTYLE_MEASURE_OFF, PICKINGSTYLE_MEASURE_ON, PICKINGSTYLE_SELECT_CHIME, PICKINGSTYLE_SELECT_DRAG, PICKINGSTYLE_SELECT_JMOL, PICKINGSTYLE_SELECT_PFAAT, PICKINGSTYLE_SELECT_RASMOL, pressedCount, vwr, XY_RANGE, zoomTrigger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()voiddispose()javajs.util.Lst<com.sparshui.GestureType>getAllowedGestures(int groupID) protected floatgetDegrees(float delta, boolean isX) Transform a screen pixel change to an angular change such that a full sweep of the dimension (up to 500 pixels) corresponds to 180 degrees of rotation.private static StringgetEventName(int i) intgetGroupID(int x, int y) private voidvoidmouseAction(int mode, long time, int x, int y, int count, int modifiers) voidprocessMultitouchEvent(int groupID, int eventType, int touchID, int iData, javajs.util.P3 pt, long time) Specific to ActionManagerMT -- for processing SparshUI gesturesprotected voidsetBinding(Binding newBinding) voidprivate voidstartSparshUIService(boolean isSimulated) Methods inherited from class org.jmol.viewer.ActionManager
checkHover, clearBindings, clearMouseInfo, exitMeasurementMode, getActionFromName, getActionName, getAtomPickingMode, getBindingInfo, getBondPickingMode, getPickingMode, getPickingModeName, getPickingState, getPickingStyleIndex, getPickingStyleName, isHoverable, isMTClient, isMTServer, keyPressed, keyReleased, keyTyped, mouseEnterExit, setCurrent, setDragAtomIndex, setModeMouse, setMotion, setMouseMode, setPickingMode, startHoverWatcher, userAction, userActionEnabled, zoomByFactor
-
Field Details
-
adapter
-
simulator
-
groupID
private int groupID -
simulationPhase
private int simulationPhase -
resetNeeded
private boolean resetNeeded -
lastLogTime
private long lastLogTime -
doneHere
private boolean doneHere -
DRAG_GESTURE
public static final int DRAG_GESTURE- See Also:
-
MULTI_POINT_DRAG_GESTURE
public static final int MULTI_POINT_DRAG_GESTURE- See Also:
-
ROTATE_GESTURE
public static final int ROTATE_GESTURE- See Also:
-
SPIN_GESTURE
public static final int SPIN_GESTURE- See Also:
-
TOUCH_GESTURE
public static final int TOUCH_GESTURE- See Also:
-
ZOOM_GESTURE
public static final int ZOOM_GESTURE- See Also:
-
DBLCLK_GESTURE
public static final int DBLCLK_GESTURE- See Also:
-
FLICK_GESTURE
public static final int FLICK_GESTURE- See Also:
-
RELATIVE_DRAG_GESTURE
public static final int RELATIVE_DRAG_GESTURE- See Also:
-
INVALID_GESTURE
public static final int INVALID_GESTURE- See Also:
-
TWO_POINT_GESTURE
private static final com.sparshui.GestureType TWO_POINT_GESTURE -
SINGLE_POINT_GESTURE
private static final com.sparshui.GestureType SINGLE_POINT_GESTURE -
DRIVER_NONE
public static final int DRIVER_NONE- See Also:
-
SERVICE_LOST
public static final int SERVICE_LOST- See Also:
-
DRAG_EVENT
public static final int DRAG_EVENT- See Also:
-
ROTATE_EVENT
public static final int ROTATE_EVENT- See Also:
-
SPIN_EVENT
public static final int SPIN_EVENT- See Also:
-
TOUCH_EVENT
public static final int TOUCH_EVENT- See Also:
-
ZOOM_EVENT
public static final int ZOOM_EVENT- See Also:
-
DBLCLK_EVENT
public static final int DBLCLK_EVENT- See Also:
-
FLICK_EVENT
public static final int FLICK_EVENT- See Also:
-
RELATIVE_DRAG_EVENT
public static final int RELATIVE_DRAG_EVENT- See Also:
-
CLICK_EVENT
public static final int CLICK_EVENT- See Also:
-
eventNames
-
BIRTH
public static final int BIRTH- See Also:
-
DEATH
public static final int DEATH- See Also:
-
MOVE
public static final int MOVE- See Also:
-
CLICK
public static final int CLICK- See Also:
-
mouseDown
boolean mouseDown
-
-
Constructor Details
-
ActionManagerMT
public ActionManagerMT()
-
-
Method Details
-
setViewer
- Overrides:
setViewerin classActionManager
-
startSparshUIService
private void startSparshUIService(boolean isSimulated) -
setBinding
- Overrides:
setBindingin classActionManager
-
clear
public void clear()- Overrides:
clearin classActionManager
-
dispose
public void dispose()- Overrides:
disposein classActionManager
-
getEventName
-
getAllowedGestures
public javajs.util.Lst<com.sparshui.GestureType> getAllowedGestures(int groupID) - Specified by:
getAllowedGesturesin interfaceJmolMultiTouchClient
-
getGroupID
public int getGroupID(int x, int y) - Specified by:
getGroupIDin interfaceJmolMultiTouchClient
-
processMultitouchEvent
public void processMultitouchEvent(int groupID, int eventType, int touchID, int iData, javajs.util.P3 pt, long time) Description copied from class:ActionManagerSpecific to ActionManagerMT -- for processing SparshUI gestures- Specified by:
processMultitouchEventin interfaceJmolMultiTouchClient- Overrides:
processMultitouchEventin classActionManager
-
logEvent
-
mouseAction
public void mouseAction(int mode, long time, int x, int y, int count, int modifiers) - Specified by:
mouseActionin interfaceEventManager- Overrides:
mouseActionin classActionManager- Parameters:
mode- MOVED PRESSED DRAGGED RELEASED CLICKED WHEELEDmodifiers- LEFT RIGHT MIDDLE WHEEL SHIFT ALT CTRL
-
getDegrees
protected float getDegrees(float delta, boolean isX) Description copied from class:ActionManagerTransform a screen pixel change to an angular change such that a full sweep of the dimension (up to 500 pixels) corresponds to 180 degrees of rotation.- Overrides:
getDegreesin classActionManager- Returns:
- desired scaled rotation, in degrees
-