Class AnnotationBase
Provides a base class for annotations to be rendered over the chart
Inheritance
Inherited Members
Namespace:
Assembly: .dll
Syntax
public abstract class AnnotationBase extends FrameLayout implements IAnnotation, IAnnotationContainer, IAnnotationInteractionService, ISciChartSurfaceProvider
Constructors
AnnotationBase(Context context)
Declaration
protected AnnotationBase(Context context)
Parameters
Type | Name | Description |
---|---|---|
android.content.Context | context |
AnnotationBase(Context context, AttributeSet attrs)
Declaration
protected AnnotationBase(Context context, AttributeSet attrs)
Parameters
Type | Name | Description |
---|---|---|
android.content.Context | context | |
android.util.AttributeSet | attrs |
AnnotationBase(Context context, AttributeSet attrs, int defStyleAttr)
Declaration
protected AnnotationBase(Context context, AttributeSet attrs, int defStyleAttr)
Parameters
Type | Name | Description |
---|---|---|
android.content.Context | context | |
android.util.AttributeSet | attrs | |
int | defStyleAttr |
AnnotationBase(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)
Declaration
protected AnnotationBase(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)
Parameters
Type | Name | Description |
---|---|---|
android.content.Context | context | |
android.util.AttributeSet | attrs | |
int | defStyleAttr | |
int | defStyleRes |
Fields
X1Y1Index
Defines index for resizing grip placed at (x1, y1) coordinate
Declaration
public static final int X1Y1Index
Field Value
Type | Description |
---|---|
int |
X1Y2Index
Defines index for resizing grip placed at (x1, y2) coordinate
Declaration
public static final int X1Y2Index
Field Value
Type | Description |
---|---|
int |
X2Y1Index
Defines index for resizing grip placed at (x2, y1) coordinate
Declaration
public static final int X2Y1Index
Field Value
Type | Description |
---|---|
int |
X2Y2Index
Defines index for resizing grip placed at (x2, y2) coordinate
Declaration
public static final int X2Y2Index
Field Value
Type | Description |
---|---|
int |
annotationCoordinates
Declaration
protected final AnnotationCoordinates annotationCoordinates
Field Value
Type | Description |
---|---|
AnnotationCoordinates |
annotationSurfaceProperty
Declaration
protected final SmartProperty<AnnotationSurfaceEnum> annotationSurfaceProperty
Field Value
Type | Description |
---|---|
SmartProperty<AnnotationSurfaceEnum> |
coordinateModeProperty
Declaration
protected final SmartProperty<AnnotationCoordinateMode> coordinateModeProperty
Field Value
Type | Description |
---|---|
SmartProperty<AnnotationCoordinateMode> |
dragDirectionsProperty
Declaration
protected final SmartProperty<Direction2D> dragDirectionsProperty
Field Value
Type | Description |
---|---|
SmartProperty<Direction2D> |
invalidateRunnable
Declaration
protected final Runnable invalidateRunnable
Field Value
Type | Description |
---|---|
Runnable |
isEditableProperty
Declaration
protected final SmartPropertyBoolean isEditableProperty
Field Value
Type | Description |
---|---|
SmartPropertyBoolean |
isHiddenProperty
Declaration
protected final SmartPropertyBoolean isHiddenProperty
Field Value
Type | Description |
---|---|
SmartPropertyBoolean |
isSelectedProperty
Declaration
protected final SmartPropertyBoolean isSelectedProperty
Field Value
Type | Description |
---|---|
SmartPropertyBoolean |
resizeDirectionsProperty
Declaration
protected final SmartProperty<Direction2D> resizeDirectionsProperty
Field Value
Type | Description |
---|---|
SmartProperty<Direction2D> |
resizingGripProperty
Declaration
protected final SmartProperty<IResizingGrip> resizingGripProperty
Field Value
Type | Description |
---|---|
SmartProperty<IResizingGrip> |
selectionDrawableProperty
Declaration
protected final SmartProperty<IAnnotationSelectionDrawable> selectionDrawableProperty
Field Value
Type | Description |
---|---|
SmartProperty<IAnnotationSelectionDrawable> |
x1Property
Declaration
protected final SmartProperty<Comparable> x1Property
Field Value
Type | Description |
---|---|
SmartProperty<Comparable> |
x2Property
Declaration
protected final SmartProperty<Comparable> x2Property
Field Value
Type | Description |
---|---|
SmartProperty<Comparable> |
xAxisIdProperty
Declaration
protected final SmartProperty<String> xAxisIdProperty
Field Value
Type | Description |
---|---|
SmartProperty<String> |
y1Property
Declaration
protected final SmartProperty<Comparable> y1Property
Field Value
Type | Description |
---|---|
SmartProperty<Comparable> |
y2Property
Declaration
protected final SmartProperty<Comparable> y2Property
Field Value
Type | Description |
---|---|
SmartProperty<Comparable> |
yAxisIdProperty
Declaration
protected final SmartProperty<String> yAxisIdProperty
Field Value
Type | Description |
---|---|
SmartProperty<String> |
zIndexProperty
Declaration
protected final SmartPropertyInteger zIndexProperty
Field Value
Type | Description |
---|---|
SmartPropertyInteger |
Methods
applyThemeProvider(IThemeProvider themeProvider)
Applies specified theme to current instance
Declaration
public void applyThemeProvider(IThemeProvider themeProvider)
Parameters
Type | Name | Description |
---|---|---|
IThemeProvider | themeProvider |
attachAdorners(IAdornerLayer adornerLayer)
Attaches associated IAdornerProvider to the parent IAdornerLayer
Declaration
protected void attachAdorners(IAdornerLayer adornerLayer)
Parameters
Type | Name | Description |
---|---|---|
IAdornerLayer | adornerLayer | The parent IAdornerLayer |
attachTo(IServiceContainer services)
Declaration
public void attachTo(IServiceContainer services)
Parameters
Type | Name | Description |
---|---|---|
IServiceContainer | services |
decrementSuspend()
Declaration
public void decrementSuspend()
detach()
Declaration
public void detach()
detachAdorners(IAdornerLayer adornerLayer)
Detaches associated IAdornerProvider from the parent IAdornerLayer
Declaration
protected void detachAdorners(IAdornerLayer adornerLayer)
Parameters
Type | Name | Description |
---|---|---|
IAdornerLayer | adornerLayer | The parent IAdornerLayer |
dispatchGenericPointerEvent(MotionEvent event)
Declaration
protected boolean dispatchGenericPointerEvent(MotionEvent event)
Parameters
Type | Name | Description |
---|---|---|
android.view.MotionEvent | event |
Returns
Type | Description |
---|---|
boolean |
Overrides
dispatchTouchEvent(MotionEvent ev)
Declaration
public boolean dispatchTouchEvent(MotionEvent ev)
Parameters
Type | Name | Description |
---|---|---|
android.view.MotionEvent | ev |
Returns
Type | Description |
---|---|
boolean |
Overrides
fromCoordinate(float coord, IAxis axis)
Converts a pixel coordinate to data-value
Declaration
protected Comparable fromCoordinate(float coord, IAxis axis)
Parameters
Type | Name | Description |
---|---|---|
float | coord | The pixel coordinate |
IAxis | axis | The axis for which the data value is calculated |
Returns
Type | Description |
---|---|
Comparable | The converted data-value |
fromRelativeCoordinate(float coord, IAxis axis)
Converts a relative coordinate (e.g. 0.0 to 1.0) to data-value
Declaration
protected Comparable fromRelativeCoordinate(float coord, IAxis axis)
Parameters
Type | Name | Description |
---|---|---|
float | coord | The relative coordinate, in the range of 0.0 to 1.0 for extremes of the viewport |
IAxis | axis | The axis for which the data value is calculated |
Returns
Type | Description |
---|---|
Comparable | The converted data-value |
getAdornerLayer()
Gets the Adorner Canvas to place annotation adorners.
Declaration
protected final IAdornerLayer getAdornerLayer()
Returns
Type | Description |
---|---|
IAdornerLayer | The IAdornerLayer instance to place annotation adorners. |
getAnnotationSelectionDrawable()
Gets the IAnnotationSelectionDrawable instance for this annotation
Declaration
public final IAnnotationSelectionDrawable getAnnotationSelectionDrawable()
Returns
Type | Description |
---|---|
IAnnotationSelectionDrawable | The IAnnotationSelectionDrawable instance |
getAnnotationSurface()
Gets the AnnotationSurfaceEnum to place the annotation on. The default is AnnotationSurfaceEnum#AboveChart
Declaration
public final AnnotationSurfaceEnum getAnnotationSurface()
Returns
Type | Description |
---|---|
AnnotationSurfaceEnum |
getCoordinateMode()
Gets the AnnotationCoordinateMode to use when placing the annotation.
E.g. the default of AnnotationCoordinateMode#Absolute requires that X1,Y1 coordinates are data-values. The AnnotationCoordinateMode#Relative requires that X1,Y1 are double values from 0.0 to 1.0
Declaration
public final AnnotationCoordinateMode getCoordinateMode()
Returns
Type | Description |
---|---|
AnnotationCoordinateMode | The AnnotationCoordinateMode for this annotation |
getDragDirections()
Gets the Direction2D with the Drag direction for this annotation
Declaration
public final Direction2D getDragDirections()
Returns
Type | Description |
---|---|
Direction2D |
getIsEditable()
Gets the value indicating whether this annotation is editable or not
Declaration
public final boolean getIsEditable()
Returns
Type | Description |
---|---|
boolean |
getIsSuspended()
Declaration
public final boolean getIsSuspended()
Returns
Type | Description |
---|---|
boolean |
getParentSurface()
Gets the parent surface that this instance is associated with
Declaration
public final ISciChartSurface getParentSurface()
Returns
Type | Description |
---|---|
ISciChartSurface |
getResizeDirections()
Gets the Direction2D with the Resize direction for this annotation
Declaration
public final Direction2D getResizeDirections()
Returns
Type | Description |
---|---|
Direction2D |
getResizingGrip()
Gets the IResizingGrip instance for this annotation
Declaration
public final IResizingGrip getResizingGrip()
Returns
Type | Description |
---|---|
IResizingGrip | The IResizingGrip instance |
getResizingGripPosition(int resizingGripIndex, PointF resizingGripPosition)
Get the coordinates of resizing grip with specified index
Declaration
public void getResizingGripPosition(int resizingGripIndex, PointF resizingGripPosition)
Parameters
Type | Name | Description |
---|---|---|
int | resizingGripIndex | The index of resizing grip to get |
android.graphics.PointF | resizingGripPosition | The point to storing position of resizing grip |
getServices()
Declaration
public final IServiceContainer getServices()
Returns
Type | Description |
---|---|
IServiceContainer |
getSurface()
Gets the parent IAnnotationSurface for this annotation
Declaration
protected final IAnnotationSurface getSurface()
Returns
Type | Description |
---|---|
IAnnotationSurface | The parent IAnnotationSurface instance |
getUpdateSuspenderCount()
Declaration
public final AtomicInteger getUpdateSuspenderCount()
Returns
Type | Description |
---|---|
AtomicInteger |
getX1()
Gets the X1 Coordinate of the Annotation.
Declaration
public final Comparable getX1()
Returns
Type | Description |
---|---|
Comparable |
getX2()
Gets the X2 Coordinate of the Annotation.
Declaration
public final Comparable getX2()
Returns
Type | Description |
---|---|
Comparable |
getXAxis()
Gets the XAxis instance associated with this annotation
Declaration
public IAxis getXAxis()
Returns
Type | Description |
---|---|
IAxis |
getXAxis(String axisId)
Gets the XAxis instance by string with Axis Id
Declaration
protected final IAxis getXAxis(String axisId)
Parameters
Type | Name | Description |
---|---|---|
String | axisId | The axis id |
Returns
Type | Description |
---|---|
IAxis | The XAxis instance |
getXAxisId()
Gets the XAxis Id that this annotation is measured against.
Declaration
public final String getXAxisId()
Returns
Type | Description |
---|---|
String |
getY1()
Gets the Y1 Coordinate of the Annotation.
Declaration
public final Comparable getY1()
Returns
Type | Description |
---|---|
Comparable |
getY2()
Gets the Y2 Coordinate of the Annotation.
Declaration
public final Comparable getY2()
Returns
Type | Description |
---|---|
Comparable |
getYAxis()
Gets the YAxis instance associated with this annotation
Declaration
public IAxis getYAxis()
Returns
Type | Description |
---|---|
IAxis |
getYAxis(String axisId)
Gets the YAxis instance by string with Axis Id
Declaration
protected final IAxis getYAxis(String axisId)
Parameters
Type | Name | Description |
---|---|---|
String | axisId | The axis id |
Returns
Type | Description |
---|---|
IAxis | The YAxis instance |
getYAxisId()
Gets the YAxis Id that this annotation is measured against.
Declaration
public final String getYAxisId()
Returns
Type | Description |
---|---|
String |
getZIndex()
Gets the z-index position for this annotation
Declaration
public final int getZIndex()
Returns
Type | Description |
---|---|
int | The z-index value |
hide()
Hides the Annotation by removing it and its adorner markers from the parent ISciChartSurface
Declaration
public final void hide()
initPlacementStrategy(strategyManager.CoordinateSystem newCoordinateSystem)
Creates a new IAnnotationPlacementStrategy for specified CoordinateSystem
Declaration
protected abstract IAnnotationPlacementStrategy initPlacementStrategy(strategyManager.CoordinateSystem newCoordinateSystem)
Parameters
Type | Name | Description |
---|---|---|
strategyManager.CoordinateSystem | newCoordinateSystem | The new CoordinateSystem value |
Returns
Type | Description |
---|---|
IAnnotationPlacementStrategy | The IAnnotationPlacementStrategy instance |
invalidateElement()
Declaration
public void invalidateElement()
isAttached()
Declaration
public final boolean isAttached()
Returns
Type | Description |
---|---|
boolean |
isCoordinateValid(float coord, int canvasMeasurement)
Determines whether the coordinate is valid for placing on the canvas, e.g. is greater than zero and less than canvasMeasurement
Declaration
public boolean isCoordinateValid(float coord, int canvasMeasurement)
Parameters
Type | Name | Description |
---|---|---|
float | coord | the coordinate |
int | canvasMeasurement | The canvas dimension in this axis |
Returns
Type | Description |
---|---|
boolean | true if coordinate is valid; otherwise, false |
isEditable()
Gets the value indicating whether this annotation is editable or not
Declaration
public final boolean isEditable()
Returns
Type | Description |
---|---|
boolean |
isHidden()
Gets the value indicating whether this annotation is hidden or not
Declaration
public final boolean isHidden()
Returns
Type | Description |
---|---|
boolean |
isPointWithinBounds(float x, float y)
Checks if specified point is within annotation's bounds
Declaration
protected boolean isPointWithinBounds(float x, float y)
Parameters
Type | Name | Description |
---|---|---|
float | x | The x coordinate to check |
float | y | The y coordinate to check |
Returns
Type | Description |
---|---|
boolean | True if point is within annotation's bounds |
isPointWithinBounds(float x, float y, IHitTestable relativeTo)
Checks if point specified relative to IHitTestable element is within annotation's bounds
Declaration
protected boolean isPointWithinBounds(float x, float y, IHitTestable relativeTo)
Parameters
Type | Name | Description |
---|---|---|
float | x | The x coordinate to check |
float | y | The y coordinate to check |
IHitTestable | relativeTo | The IHitTestable element to use when checking the point |
Returns
Type | Description |
---|---|
boolean | True if point is within annotation's bounds |
isSelected()
Gets the value indicating whether this annotation is selected or not
Declaration
public final boolean isSelected()
Returns
Type | Description |
---|---|
boolean |
Overrides
makeInvisible()
Makes this annotation container visible
Declaration
public void makeInvisible()
makeVisible()
Makes this annotation container visible
Declaration
public void makeVisible()
moveAnnotation(float horizOffset, float vertOffset)
This method is used in internally to move annotation in X and Y direction
Declaration
public final void moveAnnotation(float horizOffset, float vertOffset)
Parameters
Type | Name | Description |
---|---|---|
float | horizOffset | |
float | vertOffset |
moveBasePointTo(float xCoord, float yCoord, int index)
This method is used in internally to set an adorner point position
Declaration
public final void moveBasePointTo(float xCoord, float yCoord, int index)
Parameters
Type | Name | Description |
---|---|---|
float | xCoord | |
float | yCoord | |
int | index |
moveBasePointTo(float xCoord, float yCoord, int index, IAxis xAxis, IAxis yAxis)
This method is used in internally to set an adorner point position
Declaration
protected void moveBasePointTo(float xCoord, float yCoord, int index, IAxis xAxis, IAxis yAxis)
Parameters
Type | Name | Description |
---|---|---|
float | xCoord | The new x coordinate of base point in pixels |
float | yCoord | The new y coordinate of base point in pixels |
int | index | The index of base point to move |
IAxis | xAxis | The current XAxis instance |
IAxis | yAxis | The current YAxis instance |
notifyOnDragDelta(float horizontalOffset, float verticalOffset)
Notifies OnAnnotationDragListener about drag operation
Declaration
protected final void notifyOnDragDelta(float horizontalOffset, float verticalOffset)
Parameters
Type | Name | Description |
---|---|---|
float | horizontalOffset | The horizontal offset in pixels |
float | verticalOffset | The vertical offset in pixels |
notifyOnDragEnded()
Notifies OnAnnotationDragListener about end of drag operation
Declaration
protected final void notifyOnDragEnded()
notifyOnDragStarted()
Notifies OnAnnotationDragListener about start of drag operation
Declaration
protected final void notifyOnDragStarted()
onAnnotationSelected()
Called when parent annotation becomes selected
Declaration
public void onAnnotationSelected()
onAnnotationUnselected()
Called when parent annotation becomes unselected
Declaration
public void onAnnotationUnselected()
onAttachedToWindow()
Declaration
protected void onAttachedToWindow()
Overrides
onAxisAlignmentChanged(IAxis axis, AxisAlignment oldValue, AxisAlignment newValue)
Notifies about changing of axis alignment in one of axes
Declaration
public void onAxisAlignmentChanged(IAxis axis, AxisAlignment oldValue, AxisAlignment newValue)
Parameters
Type | Name | Description |
---|---|---|
IAxis | axis | |
AxisAlignment | oldValue | |
AxisAlignment | newValue |
onDetachedFromWindow()
Declaration
protected void onDetachedFromWindow()
Overrides
onDragDelta(float horizontalOffset, float verticalOffset)
Called when this adorner provider is dragged
Declaration
public final boolean onDragDelta(float horizontalOffset, float verticalOffset)
Parameters
Type | Name | Description |
---|---|---|
float | horizontalOffset | |
float | verticalOffset |
Returns
Type | Description |
---|---|
boolean |
onDragEnded()
Called when drag operation ends
Declaration
public final void onDragEnded()
onDragStarted(float startPointX, float startPointY, IAdornerLayer relativeTo)
Called when drag operation starts on IAdornerLayer
Declaration
public boolean onDragStarted(float startPointX, float startPointY, IAdornerLayer relativeTo)
Parameters
Type | Name | Description |
---|---|---|
float | startPointX | |
float | startPointY | |
IAdornerLayer | relativeTo |
Returns
Type | Description |
---|---|
boolean |
onDrawAdorner(Canvas adornerCanvas)
Draws this adorner provider on specified Canvas
Declaration
public void onDrawAdorner(Canvas adornerCanvas)
Parameters
Type | Name | Description |
---|---|---|
android.graphics.Canvas | adornerCanvas |
onStrategyManagerChanged(strategyManager.IStrategyManager manager)
Called when something changes in IStrategyManager
Declaration
public void onStrategyManagerChanged(strategyManager.IStrategyManager manager)
Parameters
Type | Name | Description |
---|---|---|
strategyManager.IStrategyManager | manager |
onTouchEvent(MotionEvent event)
Declaration
public boolean onTouchEvent(MotionEvent event)
Parameters
Type | Name | Description |
---|---|---|
android.view.MotionEvent | event |
Returns
Type | Description |
---|---|
boolean |
Overrides
onTrySelectAnnotationContainer()
Tries to select IAnnotationContainer instance
Declaration
public final boolean onTrySelectAnnotationContainer()
Returns
Type | Description |
---|---|
boolean |
onXAxesCollectionChanged(CollectionChangedEventArgs<IAxis> args)
Called when parent SciChartSurface#getXAxes() collection changes
Declaration
public void onXAxesCollectionChanged(CollectionChangedEventArgs<IAxis> args)
Parameters
Type | Name | Description |
---|---|---|
CollectionChangedEventArgs<IAxis> | args |
onXAxesDrasticallyChanged()
Called when parent SciChartSurface#getXAxes() collection drastically changed
Declaration
public void onXAxesDrasticallyChanged()
onXAxisIdChanged()
Called when XAxis Id changes
Declaration
protected void onXAxisIdChanged()
onYAxesCollectionChanged(CollectionChangedEventArgs<IAxis> args)
Called when parent SciChartSurface#getYAxes() collection changes
Declaration
public void onYAxesCollectionChanged(CollectionChangedEventArgs<IAxis> args)
Parameters
Type | Name | Description |
---|---|---|
CollectionChangedEventArgs<IAxis> | args |
onYAxesDrasticallyChanged()
Called when parent SciChartSurface#getYAxes() collection drastically changed
Declaration
public void onYAxesDrasticallyChanged()
onYAxisIdChanged()
Called when YAxis Id changes
Declaration
protected void onYAxisIdChanged()
refresh()
refresh the annotation position
Declaration
public final void refresh()
resumeUpdates(IUpdateSuspender suspender)
Declaration
public void resumeUpdates(IUpdateSuspender suspender)
Parameters
Type | Name | Description |
---|---|---|
IUpdateSuspender | suspender |
setAnnotationSelectionDrawable(IAnnotationSelectionDrawable annotationSelectionDrawable)
Sets the IAnnotationSelectionDrawable instance for this annotation
Declaration
public final void setAnnotationSelectionDrawable(IAnnotationSelectionDrawable annotationSelectionDrawable)
Parameters
Type | Name | Description |
---|---|---|
IAnnotationSelectionDrawable | annotationSelectionDrawable | The IAnnotationSelectionDrawable instance |
setAnnotationSurface(AnnotationSurfaceEnum annotationsSurface)
Sets the AnnotationSurfaceEnum to place the annotation on. The default is AnnotationSurfaceEnum#AboveChart
Declaration
public final void setAnnotationSurface(AnnotationSurfaceEnum annotationsSurface)
Parameters
Type | Name | Description |
---|---|---|
AnnotationSurfaceEnum | annotationsSurface |
setCoordinateMode(AnnotationCoordinateMode coordinateMode)
Sets the AnnotationCoordinateMode to use when placing the annotation.
E.g. the default of AnnotationCoordinateMode#Absolute requires that X1,Y1 coordinates are data-values. The AnnotationCoordinateMode#Relative requires that X1,Y1 are double values from 0.0 to 1.0
Declaration
public final void setCoordinateMode(AnnotationCoordinateMode coordinateMode)
Parameters
Type | Name | Description |
---|---|---|
AnnotationCoordinateMode | coordinateMode | The AnnotationCoordinateMode for this annotation |
setDragDirections(Direction2D dragDirections)
Sets the Direction2D with the Drag direction for this annotation
Declaration
public final void setDragDirections(Direction2D dragDirections)
Parameters
Type | Name | Description |
---|---|---|
Direction2D | dragDirections |
setIsEditable(boolean isEditable)
Sets the value indicating whether this annotation is editable or not
Declaration
public final void setIsEditable(boolean isEditable)
Parameters
Type | Name | Description |
---|---|---|
boolean | isEditable |
setIsHidden(boolean isHidden)
Sets the value indicating whether this annotation is hidden or not
Declaration
public final void setIsHidden(boolean isHidden)
Parameters
Type | Name | Description |
---|---|---|
boolean | isHidden |
setOnAnnotationDragListener(OnAnnotationDragListener listener)
Sets the OnAnnotationDragListener which is called when drag event occurs on this annotation
Declaration
public void setOnAnnotationDragListener(OnAnnotationDragListener listener)
Parameters
Type | Name | Description |
---|---|---|
OnAnnotationDragListener | listener |
setOnAnnotationIsHiddenChangeListener(OnAnnotationIsHiddenChangeListener listener)
Sets the OnAnnotationIsHiddenChangeListener which is called when IAnnotation#isHidden() property changes
Declaration
public void setOnAnnotationIsHiddenChangeListener(OnAnnotationIsHiddenChangeListener listener)
Parameters
Type | Name | Description |
---|---|---|
OnAnnotationIsHiddenChangeListener | listener |
setOnAnnotationSelectionChangeListener(OnAnnotationSelectionChangeListener listener)
Sets the OnAnnotationSelectionChangeListener which is called when IAnnotation#isSelected() property changes
Declaration
public void setOnAnnotationSelectionChangeListener(OnAnnotationSelectionChangeListener listener)
Parameters
Type | Name | Description |
---|---|---|
OnAnnotationSelectionChangeListener | listener |
setResizeDirections(Direction2D resizeDirections)
Sets the Direction2D with the Resize direction for this annotation
Declaration
public final void setResizeDirections(Direction2D resizeDirections)
Parameters
Type | Name | Description |
---|---|---|
Direction2D | resizeDirections |
setResizingGrip(IResizingGrip resizingGrip)
Sets the IResizingGrip instance for this annotation
Declaration
public final void setResizingGrip(IResizingGrip resizingGrip)
Parameters
Type | Name | Description |
---|---|---|
IResizingGrip | resizingGrip | The IResizingGrip instance |
setSelected(boolean isSelected)
Sets the value indicating whether this annotation is selected or not
Declaration
public final void setSelected(boolean isSelected)
Parameters
Type | Name | Description |
---|---|---|
boolean | isSelected |
Overrides
setX1(Comparable x1)
Sets the X1 Coordinate of the Annotation.
For AnnotationCoordinateMode#Absolute, this must be a data-value on the XAxis such as a double for com.scichart.charting.visuals.axes.NumericAxis
For AnnotationCoordinateMode#Relative, this must be a double value between 0.0 and 1.0, where 0.0 is the far left of the XAxis and 1.0 is the far right.
Declaration
public final void setX1(Comparable x1)
Parameters
Type | Name | Description |
---|---|---|
Comparable | x1 |
setX2(Comparable x2)
Sets the X2 Coordinate of the Annotation.
For AnnotationCoordinateMode#Absolute, this must be a data-value on the XAxis such as a double for com.scichart.charting.visuals.axes.NumericAxis
For AnnotationCoordinateMode#Relative, this must be a double value between 0.0 and 1.0, where 0.0 is the far left of the XAxis and 1.0 is the far right.
Declaration
public final void setX2(Comparable x2)
Parameters
Type | Name | Description |
---|---|---|
Comparable | x2 |
setXAxisId(String xAxisId)
Sets the XAxis Id that this annotation is measured against.
Declaration
public final void setXAxisId(String xAxisId)
Parameters
Type | Name | Description |
---|---|---|
String | xAxisId |
setXYPropertiesFromIndex(Comparable xValue, Comparable yValue, int index)
Sets X and Y Value for base point with specified index
Declaration
protected void setXYPropertiesFromIndex(Comparable xValue, Comparable yValue, int index)
Parameters
Type | Name | Description |
---|---|---|
Comparable | xValue | The X Value to set |
Comparable | yValue | The Y Value to set |
int | index | The index of base point to set |
setY1(Comparable y1)
Sets the Y1 Coordinate of the Annotation.
For AnnotationCoordinateMode#Absolute, this must be a data-value on the YAxis such as a double for com.scichart.charting.visuals.axes.NumericAxis
For AnnotationCoordinateMode#Relative, this must be a double value between 0.0 and 1.0, where 0.0 is the far left of the YAxis and 1.0 is the far right.
Declaration
public final void setY1(Comparable y1)
Parameters
Type | Name | Description |
---|---|---|
Comparable | y1 |
setY2(Comparable y2)
Sets the Y2 Coordinate of the Annotation.
For AnnotationCoordinateMode#Absolute, this must be a data-value on the YAxis such as a double for com.scichart.charting.visuals.axes.NumericAxis
For AnnotationCoordinateMode#Relative, this must be a double value between 0.0 and 1.0, where 0.0 is the far left of the YAxis and 1.0 is the far right.
Declaration
public final void setY2(Comparable y2)
Parameters
Type | Name | Description |
---|---|---|
Comparable | y2 |
setYAxisId(String yAxisId)
Sets the YAxis Id that this annotation is measured against.
Declaration
public final void setYAxisId(String yAxisId)
Parameters
Type | Name | Description |
---|---|---|
String | yAxisId |
setZIndex(int zIndex)
Sets the z-index position for this annotation
Declaration
public final void setZIndex(int zIndex)
Parameters
Type | Name | Description |
---|---|---|
int | zIndex | The new z-index value |
show()
Shows annotation which being hidden by IAnnotation#hide() call
Declaration
public final void show()
suspendUpdates()
Declaration
public final IUpdateSuspender suspendUpdates()
Returns
Type | Description |
---|---|
IUpdateSuspender |
toCoordinate(Comparable dataValue, int canvasMeasurement, coordinateCalculators.ICoordinateCalculator coordCalc, Direction2D direction)
Converts a data value to pixel coordinate
Declaration
protected float toCoordinate(Comparable dataValue, int canvasMeasurement, coordinateCalculators.ICoordinateCalculator coordCalc, Direction2D direction)
Parameters
Type | Name | Description |
---|---|---|
Comparable | dataValue | The data value to convert |
int | canvasMeasurement | The size of IAnnotationSurface |
coordinateCalculators.ICoordinateCalculator | coordCalc | The current ICoordinateCalculator |
Direction2D | direction | The X or Y direction for the transformation |
Returns
Type | Description |
---|---|
float | The converted pixel coordinates |
tryUpdate(coordinateCalculators.ICoordinateCalculator xCalc, coordinateCalculators.ICoordinateCalculator yCalc)
Updates annotation if coordinate calculators are valid
Declaration
protected void tryUpdate(coordinateCalculators.ICoordinateCalculator xCalc, coordinateCalculators.ICoordinateCalculator yCalc)
Parameters
Type | Name | Description |
---|---|---|
coordinateCalculators.ICoordinateCalculator | xCalc | The current ICoordinateCalculator for XAxis |
coordinateCalculators.ICoordinateCalculator | yCalc | The current ICoordinateCalculator for YAxis |
update(coordinateCalculators.ICoordinateCalculator xCalc, coordinateCalculators.ICoordinateCalculator yCalc)
Updates the coordinate calculators and refreshes the annotation position on the parent ISciChartSurface
Declaration
protected void update(coordinateCalculators.ICoordinateCalculator xCalc, coordinateCalculators.ICoordinateCalculator yCalc)
Parameters
Type | Name | Description |
---|---|---|
coordinateCalculators.ICoordinateCalculator | xCalc | The current ICoordinateCalculator for XAxis |
coordinateCalculators.ICoordinateCalculator | yCalc | The current ICoordinateCalculator for YAxis |
update(IAxis xAxis, IAxis yAxis)
Updates the coordinate calculators and refreshes the annotation position on the parent ISciChartSurface
Declaration
public void update(IAxis xAxis, IAxis yAxis)
Parameters
Type | Name | Description |
---|---|---|
IAxis | xAxis | |
IAxis | yAxis |
updateAdorner()
Updates the adorner provider with latest values
Declaration
public void updateAdorner()
updateAnnotationCoordinates(AnnotationCoordinates annotationCoordinates, IAnnotationSurface annotationSurface, coordinateCalculators.ICoordinateCalculator xCalc, coordinateCalculators.ICoordinateCalculator yCalc)
Updates the AnnotationCoordinates instance associated with this annotation
Declaration
protected void updateAnnotationCoordinates(AnnotationCoordinates annotationCoordinates, IAnnotationSurface annotationSurface, coordinateCalculators.ICoordinateCalculator xCalc, coordinateCalculators.ICoordinateCalculator yCalc)
Parameters
Type | Name | Description |
---|---|---|
AnnotationCoordinates | annotationCoordinates | The AnnotationCoordinates to update |
IAnnotationSurface | annotationSurface | The parent IAnnotationSurface |
coordinateCalculators.ICoordinateCalculator | xCalc | The current ICoordinateCalculator for XAxis |
coordinateCalculators.ICoordinateCalculator | yCalc | The current ICoordinateCalculator for YAxis |
updateAnnotationPlacement()
Called internally to places annotation
Declaration
protected void updateAnnotationPlacement()
updatePointCoordinates(PointF coordPoint, Comparable xDataValue, Comparable yDataValue, IAnnotationSurface annotationSurface, coordinateCalculators.ICoordinateCalculator xCalc, coordinateCalculators.ICoordinateCalculator yCalc)
Updates coordinate point based on provided values
Declaration
protected void updatePointCoordinates(PointF coordPoint, Comparable xDataValue, Comparable yDataValue, IAnnotationSurface annotationSurface, coordinateCalculators.ICoordinateCalculator xCalc, coordinateCalculators.ICoordinateCalculator yCalc)
Parameters
Type | Name | Description |
---|---|---|
android.graphics.PointF | coordPoint | The coordinate point to update |
Comparable | xDataValue | The X data value |
Comparable | yDataValue | The Y Data value |
IAnnotationSurface | annotationSurface | The parent IAnnotationSurface |
coordinateCalculators.ICoordinateCalculator | xCalc | The current ICoordinateCalculator for XAxis |
coordinateCalculators.ICoordinateCalculator | yCalc | The current ICoordinateCalculator for YAxis |