Class PanForceTool

All Implemented Interfaces:
Direct Known Subclasses:
PanForceMouseTool, PanForceTouchTool

public class PanForceTool extends Tool
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.
  • Field Details


      protected static final int MODIFIERS_ONLY_MASK

      protected static final String HAND_CURSOR

      protected static final Tool.ActivationRequest 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 range Tool.MIN_PRIORITY...Tool.MAX_PRIORITY. The default priority is equal to Tool.MAX_PRIORITY minus the render priority.
      getDispatchPriority in class Tool
      the dispatch priority
    • handleEditEvent

      protected void handleEditEvent(boolean isActive, EditEvent e)
      Description copied from class: Tool
      Handle the given EditEvent. This method dispatches the edit event to the individual handleXYZ()-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.
      handleEditEvent in class Tool
      isActive - whether this tool is currently active
      e - 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 the InputEvent constants containing _DOWN_ in their name. The default is to use just the left mouse button.
      modifierAndButtonMask - The mask to use.
      See Also:
    • getModifierAndButtonMask

      public int getModifierAndButtonMask()
      Returns the current mask.
      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. If true, the pan mode cursor is shown in idle mode, if false it is still shown, but only during the active panning gesture. The default is false.
      useIdlePanModeCursor - True, if the pan mode cursor shall be used, false else.
    • isUseIdlePanModeCursor

      public boolean isUseIdlePanModeCursor()
      True, when pan mode cursor is used, false else.