Class PanForceTool
java.lang.Object
com.levigo.jadice.web.client.tool.Tool
com.levigo.jadice.web.client.tools.PanForceTool
- All Implemented Interfaces:
MenuContributor
- Direct Known Subclasses:
PanForceMouseTool,PanForceTouchTool
A base class for scrolling down by pressing the page and moving the mouse or finger. This class
wont do any scrolling on its own. Use
PanForceMouseTool and PanForceTouchTool.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classPan Gesture with a little panning after MouseUp or TouchEndNested classes/interfaces inherited from class com.levigo.jadice.web.client.tool.Tool
Tool.ActivationRequest -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Tool.ActivationRequestprotected static final Stringprotected intprotected static final intprotected booleanFields inherited from class com.levigo.jadice.web.client.tool.Tool
DEFAULT_PRIORITY, MAX_PRIORITY, MIN_PRIORITY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected intReturn the dispatch priority for this tool.intReturns the current mask.protected voidhandleEditEvent(boolean isActive, EditEvent e) Handle the givenEditEvent.booleanvoidsetModifierAndButtonMask(int modifierAndButtonMask) Set the mask of modifier keys (Shift, Control, Alt etc.) and mouse buttons (left, right etc.)voidsetUseIdlePanModeCursor(boolean useIdlePanModeCursor) Set whether to use the pan mode cursor when idle, i.e. while the button is not pressed, but a button press would initiate the pan mode.Methods inherited from class com.levigo.jadice.web.client.tool.Tool
contribute, ensureDebugId, getActivationFeedback, getActivationFeedback, getActivationRequest, getActivationRequestForKeyPressed, getActivationRequestForMouseDragged, getActivationRequestForMousePressed, getActivationRequestForTouchMove, getActivationRequestForTouchStart, getManager, getRenderPriority, handleGestureChange, handleGestureEnd, handleGestureStart, handleKeyPressed, handleKeyReleased, handleKeyTyped, handleMouseClicked, handleMouseDragged, handleMouseEntered, handleMouseExited, handleMouseMoved, handleMousePressed, handleMouseReleased, handleMouseWheelMoved, handlePointerDown, handlePointerMove, handlePointerUp, handleTouchEnd, handleTouchMove, handleTouchStart, propagatePropertyChange, render, setActive, setCursor, setCursor, setEnabled, setManager, setStatusFeedback
-
Field Details
-
MODIFIERS_ONLY_MASK
protected static final int MODIFIERS_ONLY_MASK -
HAND_CURSOR
-
ACTIVATION_VOTE
-
modifierAndButtonMask
protected int modifierAndButtonMask -
useIdlePanModeCursor
protected boolean useIdlePanModeCursor
-
-
Constructor Details
-
PanForceTool
public PanForceTool()
-
-
Method Details
-
getDispatchPriority
protected int getDispatchPriority()Description copied from class:ToolReturn the dispatch priority for this tool. Tools with higher dispatch priorities receive events earlier than tools with lower priorities. The priority should be in the rangeTool.MIN_PRIORITY...Tool.MAX_PRIORITY. The default priority is equal toTool.MAX_PRIORITYminus the render priority.- Overrides:
getDispatchPriorityin classTool- Returns:
- the dispatch priority
-
handleEditEvent
Description copied from class:ToolHandle the givenEditEvent. This method dispatches the edit event to the individualhandleXYZ()-Methods. However, implementors may want and are allowed to override this method in order to perform standard handling tasks common to all types of events.- Overrides:
handleEditEventin classTool- Parameters:
isActive- whether this tool is currently activee- the event
-
setModifierAndButtonMask
public void setModifierAndButtonMask(int modifierAndButtonMask) Set the mask of modifier keys (Shift, Control, Alt etc.) and mouse buttons (left, right etc.) to be used to initiate panning. The modifier mask must use theInputEventconstants containing_DOWN_in their name. The default is to use just the left mouse button.- Parameters:
modifierAndButtonMask- The mask to use.- See Also:
-
getModifierAndButtonMask
public int getModifierAndButtonMask()Returns the current mask.- Returns:
- The current mask.
-
setUseIdlePanModeCursor
public void setUseIdlePanModeCursor(boolean useIdlePanModeCursor) Set whether to use the pan mode cursor when idle, i.e. while the button is not pressed, but a button press would initiate the pan mode. Iftrue, the pan mode cursor is shown in idle mode, iffalseit is still shown, but only during the active panning gesture. The default isfalse.- Parameters:
useIdlePanModeCursor- True, if the pan mode cursor shall be used, false else.
-
isUseIdlePanModeCursor
public boolean isUseIdlePanModeCursor()- Returns:
- True, when pan mode cursor is used, false else.
-