Interface IAnnotation
Defines the interface to an annotation, a custom drawable element over or under the com.scichart.charting.visuals.SciChartSurface
Implements
Namespace:
Assembly: .dll
Syntax
public interface IAnnotation extends IServiceProvider, IThemeable, ISuspendable, IAttachable, IAdornerProvider, strategyManager.IStrategyManagerListener, layoutManagers.ILayoutManagerListener, IAxesChangeListener
Methods
getAnnotationSurface()
Gets the AnnotationSurfaceEnum to place the annotation on. The default is AnnotationSurfaceEnum#AboveChart
Declaration
public abstract AnnotationSurfaceEnum getAnnotationSurface()
Returns
Type | Description |
---|---|
AnnotationSurfaceEnum | The AnnotationSurfaceEnum value for this annotation |
getDragDirections()
Gets the Direction2D with the Drag direction for this annotation
Declaration
public abstract Direction2D getDragDirections()
Returns
Type | Description |
---|---|
Direction2D | The Direction2D value |
getIsEditable()
Gets the value indicating whether this annotation is editable or not
Declaration
public abstract boolean getIsEditable()
Returns
Type | Description |
---|---|
boolean | True if annotation is editable |
getResizeDirections()
Gets the Direction2D with the Resize direction for this annotation
Declaration
public abstract Direction2D getResizeDirections()
Returns
Type | Description |
---|---|
Direction2D | The Direction2D value |
getX1()
Gets the X1 Coordinate of the Annotation.
Declaration
public abstract Comparable getX1()
Returns
Type | Description |
---|---|
Comparable | The X1 Coordinate value |
getX2()
Gets the X2 Coordinate of the Annotation.
Declaration
public abstract Comparable getX2()
Returns
Type | Description |
---|---|
Comparable | The X2 Coordinate value |
getXAxis()
Gets the XAxis instance associated with this annotation
Declaration
public abstract IAxis getXAxis()
Returns
Type | Description |
---|---|
IAxis | The XAxis instance |
getXAxisId()
Gets the XAxis Id that this annotation is measured against. See Also: AxisCore#getAxisId()
Declaration
public abstract String getXAxisId()
Returns
Type | Description |
---|---|
String | The XAxis Id |
getY1()
Gets the Y1 Coordinate of the Annotation.
Declaration
public abstract Comparable getY1()
Returns
Type | Description |
---|---|
Comparable | The Y1 Coordinate value |
getY2()
Gets the Y2 Coordinate of the Annotation.
Declaration
public abstract Comparable getY2()
Returns
Type | Description |
---|---|
Comparable | The Y2 Coordinate value |
getYAxis()
Gets the YAxis instance associated with this annotation
Declaration
public abstract IAxis getYAxis()
Returns
Type | Description |
---|---|
IAxis | The YAxis instance |
getYAxisId()
Gets the YAxis Id that this annotation is measured against. See Also: AxisCore#getAxisId()
Declaration
public abstract String getYAxisId()
Returns
Type | Description |
---|---|
String | The YAxis Id |
hide()
Hides the Annotation by removing it and its adorner markers from the parent ISciChartSurface
Declaration
public abstract void hide()
isEditable()
Gets the value indicating whether this annotation is editable or not
Declaration
public abstract boolean isEditable()
Returns
Type | Description |
---|---|
boolean | True if annotation is editable |
isHidden()
Gets the value indicating whether this annotation is hidden or not
Declaration
public abstract boolean isHidden()
Returns
Type | Description |
---|---|
boolean | True if annotation is hidden |
isSelected()
Gets the value indicating whether this annotation is selected or not
Declaration
public abstract boolean isSelected()
Returns
Type | Description |
---|---|
boolean | True if annotation is selected |
moveAnnotation(float horizOffset, float vertOffset)
This method is used in internally to move annotation in X and Y direction
Declaration
public abstract void moveAnnotation(float horizOffset, float vertOffset)
Parameters
Type | Name | Description |
---|---|---|
float | horizOffset | The horizontal offset in pixels |
float | vertOffset | The vertical offset in pixels |
moveBasePointTo(float xCoord, float yCoord, int index)
This method is used in internally to set an adorner point position
Declaration
public abstract void moveBasePointTo(float xCoord, float yCoord, int index)
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 |
refresh()
Refreshes the annotation position on the parent ISciChartSurface, without causing a full redraw of the chart
Declaration
public abstract void refresh()
setAnnotationSurface(AnnotationSurfaceEnum annotationsSurface)
Sets the AnnotationSurfaceEnum to place the annotation on. The default is AnnotationSurfaceEnum#AboveChart
Declaration
public abstract void setAnnotationSurface(AnnotationSurfaceEnum annotationsSurface)
Parameters
Type | Name | Description |
---|---|---|
AnnotationSurfaceEnum | annotationsSurface | The AnnotationSurfaceEnum value for this annotation |
setDragDirections(Direction2D dragDirections)
Sets the Direction2D with the Drag direction for this annotation
Declaration
public abstract void setDragDirections(Direction2D dragDirections)
Parameters
Type | Name | Description |
---|---|---|
Direction2D | dragDirections | The Direction2D value |
setIsEditable(boolean isEditable)
Sets the value indicating whether this annotation is editable or not
Declaration
public abstract void setIsEditable(boolean isEditable)
Parameters
Type | Name | Description |
---|---|---|
boolean | isEditable | The new |
setIsHidden(boolean isHidden)
Sets the value indicating whether this annotation is hidden or not
Declaration
public abstract void setIsHidden(boolean isHidden)
Parameters
Type | Name | Description |
---|---|---|
boolean | isHidden | The new |
setOnAnnotationDragListener(OnAnnotationDragListener listener)
Sets the OnAnnotationDragListener which is called when drag event occurs on this annotation
Declaration
public abstract void setOnAnnotationDragListener(OnAnnotationDragListener listener)
Parameters
Type | Name | Description |
---|---|---|
OnAnnotationDragListener | listener | The listener to set |
setOnAnnotationIsHiddenChangeListener(OnAnnotationIsHiddenChangeListener listener)
Sets the OnAnnotationIsHiddenChangeListener which is called when IAnnotation#isHidden() property changes
Declaration
public abstract void setOnAnnotationIsHiddenChangeListener(OnAnnotationIsHiddenChangeListener listener)
Parameters
Type | Name | Description |
---|---|---|
OnAnnotationIsHiddenChangeListener | listener | The listener to set |
setOnAnnotationSelectionChangeListener(OnAnnotationSelectionChangeListener listener)
Sets the OnAnnotationSelectionChangeListener which is called when IAnnotation#isSelected() property changes
Declaration
public abstract void setOnAnnotationSelectionChangeListener(OnAnnotationSelectionChangeListener listener)
Parameters
Type | Name | Description |
---|---|---|
OnAnnotationSelectionChangeListener | listener | The listener to set |
setResizeDirections(Direction2D resizeDirections)
Sets the Direction2D with the Resize direction for this annotation
Declaration
public abstract void setResizeDirections(Direction2D resizeDirections)
Parameters
Type | Name | Description |
---|---|---|
Direction2D | resizeDirections | The Direction2D value |
setSelected(boolean isSelected)
Sets the value indicating whether this annotation is selected or not
Declaration
public abstract void setSelected(boolean isSelected)
Parameters
Type | Name | Description |
---|---|---|
boolean | isSelected | The new |
setX1(Comparable value)
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 abstract void setX1(Comparable value)
Parameters
Type | Name | Description |
---|---|---|
Comparable | value | The X1 Coordinate value |
setX2(Comparable value)
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 abstract void setX2(Comparable value)
Parameters
Type | Name | Description |
---|---|---|
Comparable | value | The X2 Coordinate value |
setXAxisId(String xAxisId)
Sets the XAxis Id that this annotation is measured against. See Also: AxisCore#getAxisId()
Declaration
public abstract void setXAxisId(String xAxisId)
Parameters
Type | Name | Description |
---|---|---|
String | xAxisId | The XAxis Id |
setY1(Comparable value)
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 abstract void setY1(Comparable value)
Parameters
Type | Name | Description |
---|---|---|
Comparable | value | The Y1 Coordinate value |
setY2(Comparable value)
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 abstract void setY2(Comparable value)
Parameters
Type | Name | Description |
---|---|---|
Comparable | value | The Y2 Coordinate value |
setYAxisId(String yAxisId)
Sets the YAxis Id that this annotation is measured against. See Also: AxisCore#getAxisId()
Declaration
public abstract void setYAxisId(String yAxisId)
Parameters
Type | Name | Description |
---|---|---|
String | yAxisId | The YAxis Id |
show()
Shows annotation which being hidden by IAnnotation#hide() call
Declaration
public abstract void show()
update(IAxis xAxis, IAxis yAxis)
Updates the coordinate calculators and refreshes the annotation position on the parent ISciChartSurface
Declaration
public abstract void update(IAxis xAxis, IAxis yAxis)
Parameters
Type | Name | Description |
---|---|---|
IAxis | xAxis | The XAxis instance |
IAxis | yAxis | The YAxis instance |