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 class
Pan 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.ActivationRequest
protected static final String
protected int
protected static final int
protected boolean
Fields inherited from class com.levigo.jadice.web.client.tool.Tool
DEFAULT_PRIORITY, MAX_PRIORITY, MIN_PRIORITY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected int
Return the dispatch priority for this tool.int
Returns the current mask.protected void
handleEditEvent
(boolean isActive, EditEvent e) Handle the givenEditEvent
.boolean
void
setModifierAndButtonMask
(int modifierAndButtonMask) Set the mask of modifier keys (Shift, Control, Alt etc.) and mouse buttons (left, right etc.)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.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:Tool
Return 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_PRIORITY
minus the render priority.- Overrides:
getDispatchPriority
in classTool
- Returns:
- the dispatch priority
-
handleEditEvent
Description copied from class:Tool
Handle 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:
handleEditEvent
in 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 theInputEvent
constants 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, iffalse
it 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.
-