public class TooltipLayoutHelper<TRenderableSeries extends IRenderableSeriesCore,TSeriesTooltip extends ISeriesTooltipCore> extends java.lang.Object implements com.scichart.core.framework.IAttachable, IThemeable
Modifier and Type | Class and Description |
---|---|
static interface |
TooltipLayoutHelper.SeriesTooltipCallback<T extends ISeriesTooltipCore>
Defines a callback which allows to update series tooltip with latest information for specified (x, y) coordinates on screen
|
Modifier and Type | Field and Description |
---|---|
protected com.scichart.core.AttachableServiceContainer |
services |
Constructor and Description |
---|
TooltipLayoutHelper(int tooltipContainerLayoutResId,
com.scichart.core.observable.ProjectionCollection<TSeriesTooltip,TRenderableSeries> seriesTooltips,
TooltipLayoutHelper.SeriesTooltipCallback<TSeriesTooltip> tooltipCallback)
Creates a new instance of
TooltipLayoutHelper class. |
Modifier and Type | Method and Description |
---|---|
void |
applyThemeProvider(IThemeProvider themeProvider)
Applies specified theme to current instance
|
void |
attachTo(com.scichart.core.IServiceContainer services) |
protected ITooltipContainer |
createTooltip(android.content.Context context)
Create new
ITooltipContainer instance. |
protected TooltipLayout |
createTooltipLayout(android.content.Context context)
Create new
TooltipLayout instance. |
void |
detach() |
TooltipPosition |
getTooltipPosition()
Gets the position of the tooltip related to the current touch point.
|
boolean |
isAttached() |
void |
setObservableSeries(com.scichart.core.observable.ObservableCollection<TRenderableSeries> observableSeries) |
void |
setTooltipPosition(TooltipPosition tooltipPosition)
Sets the position of the tooltip related to the current touch point.
|
void |
tryRemoveTooltip()
Tries to remove series tooltip from screen
|
void |
tryUpdateTooltip(android.graphics.PointF point) |
protected void |
updateTooltip(float x,
float y,
TooltipLayoutHelper.SeriesTooltipCallback<TSeriesTooltip> tooltipCallback)
Update tooltips if the renderable series and new point is valid according to the new x and y values.
|
public TooltipLayoutHelper(int tooltipContainerLayoutResId, com.scichart.core.observable.ProjectionCollection<TSeriesTooltip,TRenderableSeries> seriesTooltips, TooltipLayoutHelper.SeriesTooltipCallback<TSeriesTooltip> tooltipCallback)
TooltipLayoutHelper
class.public final TooltipPosition getTooltipPosition()
TooltipPosition
related to the current touch point.public final void setTooltipPosition(TooltipPosition tooltipPosition)
tooltipPosition
- The TooltipPosition
related to the current touch point.public final void setObservableSeries(com.scichart.core.observable.ObservableCollection<TRenderableSeries> observableSeries)
public void attachTo(com.scichart.core.IServiceContainer services)
attachTo
in interface com.scichart.core.framework.IAttachable
public void detach()
detach
in interface com.scichart.core.framework.IAttachable
public final boolean isAttached()
isAttached
in interface com.scichart.core.framework.IAttachable
protected TooltipLayout createTooltipLayout(android.content.Context context)
TooltipLayout
instance.context
- The context of the application.TooltipLayout
.protected ITooltipContainer createTooltip(android.content.Context context)
ITooltipContainer
instance.context
- The context of the application.ITooltipContainer
.public void applyThemeProvider(IThemeProvider themeProvider)
applyThemeProvider
in interface IThemeable
themeProvider
- The IThemeProvider
instance which provides new theme for current instancepublic void tryUpdateTooltip(android.graphics.PointF point)
public void tryRemoveTooltip()
protected void updateTooltip(float x, float y, TooltipLayoutHelper.SeriesTooltipCallback<TSeriesTooltip> tooltipCallback)
x
- The x value of the point.y
- The x value of the point.tooltipCallback
- The callback to use for updating of series tooltip