Class SetCurrentPageTool

java.lang.Object
com.levigo.jadice.web.client.tool.Tool
com.levigo.jadice.web.client.tools.SetCurrentPageTool
All Implemented Interfaces:
MenuContributor

public class SetCurrentPageTool extends Tool
This tool allows to jump to a specific page. It is used by the ThumbnailView to set the current page when the user clicks on the thumbnails.

The default behavior is to jump to the page if the user double clicks the page with the left mouse button.

The click count can be configured via setActivationClickCount(int).

  • Constructor Details

    • SetCurrentPageTool

      public SetCurrentPageTool()
  • Method Details

    • handleMouseClicked

      protected void handleMouseClicked(MouseEditEvent e, boolean isActive)
      Description copied from class: Tool
      Invoked when the mouse button has been clicked (pressed and released) on a component.
      Overrides:
      handleMouseClicked in class Tool
      Parameters:
      e - the MouseEditEvent
      isActive - whether this tool is currently active
    • handleTouchStart

      protected void handleTouchStart(TouchEditEvent e, boolean isActive)
      Description copied from class: Tool
      Invoked when a touch started.
      Overrides:
      handleTouchStart in class Tool
      Parameters:
      e - the TouchEditEvent
      isActive - whether this tool is currently active
    • handleKeyPressed

      protected void handleKeyPressed(KeyEditEvent e, boolean isActive)
      Description copied from class: Tool
      Invoked when a key has been pressed. See the class description for KeyEvent for a definition of a key pressed event.
      Overrides:
      handleKeyPressed in class Tool
      Parameters:
      e - the MouseEditEvent
      isActive - whether this tool is currently active
    • getActivationClickCount

      public int getActivationClickCount()
      Returns the current activation click count (left mouse button).
      Returns:
      the click count
    • setActivationClickCount

      public void setActivationClickCount(int activationClickCount)
      Sets the activation click count to the desired value.

      Default: 2 (double click with left mouse button)

      Parameters:
      activationClickCount - how many left mouse button hits count as "click"?