Class HighlightTool

java.lang.Object
com.levigo.jadice.web.client.tool.Tool
com.levigo.jadice.web.client.tools.HighlightTool
All Implemented Interfaces:
com.levigo.jadice.web.client.tools.internal.text.SelectTextGestureReceptiveTool, MenuContributor

public class HighlightTool extends Tool implements com.levigo.jadice.web.client.tools.internal.text.SelectTextGestureReceptiveTool
Tool for Highlighting some Shapes (in DOCPUnits) This is used by the TextSelection or some SearchTools.
  • Constructor Details

    • HighlightTool

      public HighlightTool()
  • Method Details

    • removeAll

      public void removeAll(String key)
    • add

      public HighlightTool.RemoveHandler add(String key, Page page, Shape shape)
    • render

      protected void render(RenderParameters parameters, boolean isActive)
      Description copied from class: Tool
      Renders the Tool's UI onto the given Graphics2D context using the given RenderControls.

      This render method is called within the context and during the rendering of a single page. The page being rendered is passed to implementors of this method in order to be able to control and influence the page rendering.

      Overrides:
      render in class Tool
      Parameters:
      parameters - the view component which is currently being rendered
      isActive - whether the called tool is currently active
    • putColorToMap

      public void putColorToMap(String key, String color)
      Puts a new color to the color map. Predefined colors are defined for RolloutSearch.KEY_CURRENT, RolloutSearch.KEY_ALL, TextSelectionTool.KEY_SELECT.
      Parameters:
      key - the key for the map
      color - the value for the map
    • clear

      public void clear()
      Clears the shapes map to remove references of the pages of the document when it is closed.
    • updateSelections

      public void updateSelections(List<Selection> selections)
      Specified by:
      updateSelections in interface com.levigo.jadice.web.client.tools.internal.text.SelectTextGestureReceptiveTool