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.SafeHtml
createTooltipText
(Document document, Annotation annotation) Creates the tooltip text for the given annotation.boolean
isEnabled
(Document document, Annotation annotation) Checks if thisAnnotationTooltipGenerator
is enabled/active for the given annotation.
-
Method Details
-
createTooltipText
Creates the tooltip text for the given annotation.- Parameters:
document
- the correspondingDocument
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
Checks if thisAnnotationTooltipGenerator
is 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 correspondingDocument
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
-