Class DemoTooltipGenerator
java.lang.Object
com.levigo.jadice.web.demo.common.client.DemoTooltipGenerator
- All Implemented Interfaces:
AnnotationTooltipGenerator
An example of an
AnnotationTooltipGenerator which creates tooltips for annotations in the
enterprise demo.-
Field Summary
Fields -
Constructor Summary
Constructors -
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.
-
Field Details
-
timeFormat
protected com.google.gwt.i18n.shared.DateTimeFormat timeFormat
-
-
Constructor Details
-
DemoTooltipGenerator
public DemoTooltipGenerator()
-
-
Method Details
-
createTooltipText
public com.google.gwt.safehtml.shared.SafeHtml createTooltipText(Document document, Annotation annotation) Description copied from interface:AnnotationTooltipGeneratorCreates the tooltip text for the given annotation.- Specified by:
createTooltipTextin interfaceAnnotationTooltipGenerator- 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
Description copied from interface:AnnotationTooltipGeneratorChecks if thisAnnotationTooltipGeneratoris enabled/active for the given annotation. This method is called before the tooltip is created viaAnnotationTooltipGenerator.createTooltipText(Document, Annotation).Subclasses could, for example, check for a specific Annotation type to just provide tooltips for those annotation types.
- Specified by:
isEnabledin interfaceAnnotationTooltipGenerator- Parameters:
document- the correspondingDocumentannotation- the annotation which is in question to create a tooltip for- Returns:
- true:
AnnotationTooltipGenerator.createTooltipText(Document, Annotation)will be called for this annotation; false else
-