Class HighlightTool

All Implemented Interfaces:, MenuContributor

public class HighlightTool extends Tool implements
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.

      render in class Tool
      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.
      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