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 Summary
Modifier and TypeMethodDescriptioncom.google.gwt.safehtml.shared.SafeHtmlcreateTooltipText(Document document, Annotation annotation) Creates the tooltip text for the given annotation.booleanisEnabled(Document document, Annotation annotation) Checks if thisAnnotationTooltipGeneratoris enabled/active for the given annotation.
-
Method Details
-
createTooltipText
Creates the tooltip text for the given annotation.- Parameters:
document- the correspondingDocumentannotation- the annotation to create the tooltip for- Returns:
- a
SafeHtmlobject with the tooltip text, or null if no tooltip shall be shown.
-
isEnabled
Checks if thisAnnotationTooltipGeneratoris enabled/active for the given annotation. This method is called before the tooltip is created viacreateTooltipText(Document, Annotation).Subclasses could, for example, check for a specific Annotation type to just provide tooltips for those annotation types.
- Parameters:
document- the correspondingDocumentannotation- the annotation which is in question to create a tooltip for- Returns:
- true:
createTooltipText(Document, Annotation)will be called for this annotation; false else
-