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

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

    • MODIFIERS_ONLY_MASK

      protected static final int MODIFIERS_ONLY_MASK
    • HAND_CURSOR

      protected static final String HAND_CURSOR
    • ACTIVATION_VOTE

      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.
      Overrides:
      getDispatchPriority in class Tool
      Returns:
      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.
      Overrides:
      handleEditEvent in class Tool
      Parameters:
      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.
      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. 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.
      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.