Class CalloutsRenderingInformationProvider
- java.lang.Object
-
- ro.sync.ecss.extensions.api.callouts.CalloutsRenderingInformationProvider
-
@API(type=EXTENDABLE, src=PUBLIC) public abstract class CalloutsRenderingInformationProvider extends java.lang.Object
Provider for data that will be rendered as callouts, in Author mode. By default it only handles custom persistent highlights but you can override the methodhandlesAlsoDefaultHighlights()
to handle also built-in persistent highlights (comment, insertion or deletion change).
The callouts are representations of Track Changes insert and delete highlights, review comment highlights and custom review highlights in Author mode.
By default, the callouts visibility in Author mode is controlled from Oxygen Preferences but it can be changed by using theAuthorCalloutsController
methods.
The callouts rendering provider can be set fromAuthorCalloutsController.setCalloutsRenderingInformationProvider(CalloutsRenderingInformationProvider)
- Since:
- 14
-
-
Constructor Summary
Constructors Constructor Description CalloutsRenderingInformationProvider()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract AuthorCalloutRenderingInformation
getCalloutRenderingInformation(AuthorPersistentHighlight highlight)
Get the callout rendering information associated with a persistent highlight.boolean
handlesAlsoDefaultHighlights()
Returntrue
if you want the rendering information provider to be also called for built-in persistent highlights (comment, insertion or deletion change).abstract boolean
shouldRenderAsCallout(AuthorPersistentHighlight highlight)
Asks if a custom persistent highlight should be rendered as a callout in the Author mode.
-
-
-
Method Detail
-
getCalloutRenderingInformation
public abstract AuthorCalloutRenderingInformation getCalloutRenderingInformation(AuthorPersistentHighlight highlight)
Get the callout rendering information associated with a persistent highlight.
For custom highlights the callout rendering information is requested only for that custom persistent highlights for which theshouldRenderAsCallout(AuthorPersistentHighlight)
For built-in persistent highlights (comment, insertion or deletion change) the rendering can be requested only you override thehandlesAlsoDefaultHighlights()
method to returntrue
.
The callouts are representations of Track Changes insert and delete highlights, review comment highlights and custom review highlights in Author mode.- Parameters:
highlight
- The Author persistent highlight. The type of the highlight can be obtained by using theAuthorPersistentHighlight.getType()
- Returns:
- The callout rendering information associated with a custom persistent
highlight or
null
if the highlight must not be rendered in Author as a callout.
-
shouldRenderAsCallout
public abstract boolean shouldRenderAsCallout(AuthorPersistentHighlight highlight)
Asks if a custom persistent highlight should be rendered as a callout in the Author mode.
The callouts are representations of Track Changes insert and delete highlights, review comment highlights and custom persistent highlights in Author mode.
If this method returnstrue
, the callout rendering information for this callout must be provided bygetCalloutRenderingInformation(AuthorPersistentHighlight)
method.
The implementation of this method must be fast, being called frequently.- Parameters:
highlight
- The Author custom persistent highlight.- Returns:
true
if the highlight can be rendered as a callout in Author mode.
-
handlesAlsoDefaultHighlights
public boolean handlesAlsoDefaultHighlights()
Returntrue
if you want the rendering information provider to be also called for built-in persistent highlights (comment, insertion or deletion change). The callout rendering information is requested only if the application preferences are configured to show callouts for these highlight types. By default the rendering information provider is called only for custom highlights.
The callouts are representations of Track Changes insert and delete highlights, review comment highlights and custom review highlights in Author mode.- Returns:
true
if thegetCalloutRenderingInformation(AuthorPersistentHighlight)
method should be called also for built-in persistent highlights (comment, insertion or deletion change).- Since:
- 17.1
-
-