Interface AnnotationTooltipGenerator

All Known Implementing Classes:
DemoTooltipGenerator

public interface AnnotationTooltipGenerator
A generator to create tooltip texts for annotations. Used by the AnnotationTool.
See Also:
  • Method Details

    • createTooltipText

      com.google.gwt.safehtml.shared.SafeHtml createTooltipText(Document document, Annotation annotation)
      Creates the tooltip text for the given annotation.
      Parameters:
      document - the corresponding Document
      annotation - the annotation to create the tooltip for
      Returns:
      a SafeHtml object with the tooltip text, or null if no tooltip shall be shown.
    • isEnabled

      boolean isEnabled(Document document, Annotation annotation)
      Checks if this AnnotationTooltipGenerator is enabled/active for the given annotation. This method is called before the tooltip is created via createTooltipText(Document, Annotation).

      Subclasses could, for example, check for a specific Annotation type to just provide tooltips for those annotation types.

      Parameters:
      document - the corresponding Document
      annotation - the annotation which is in question to create a tooltip for
      Returns:
      true: createTooltipText(Document, Annotation) will be called for this annotation; false else