public class

AnnotationStyle

extends Object
java.lang.Object
   ↳ com.shinobicontrols.charts.AnnotationStyle

Class Overview

Visual style properties for annotations attached to the chart. The individual style properties that are relevant to an annotation depends on the type of annotation it is. For example, an annotation containing text, created using addTextAnnotation(String, Object, Object, Axis, Axis), will make use of all the properties in this style object. An annotation created using addHorizontalBandAnnotation(Range, Axis, Axis) will only make use of the background color. An annotation created using addViewAnnotation(View, Object, Object, Axis, Axis), containing a user-supplied view, will ignore the style object completely.

AnnotationsManager contains a number of convenience methods that take as parameters styling options. These options are automatically set on the annotation's style object when it is subsequently created.

If you make any styling changes after the chart has been displayed, you should call redrawChart().

Annotations are a shinobicharts Premium Edition-only feature. Attempting to add annotations via the annotations manager with the Standard Edition will result in an java.lang.UnsupportedOperationException being thrown.

Summary

Public Constructors
AnnotationStyle()
Public Methods
int getBackgroundColor()
Returns the int representation of the background color of the annotation.
int getTextColor()
Returns the int representation of the color of the text in the annotation.
float getTextSize()
Returns the size of the text in the annotation, in scaled pixels.
Typeface getTypeface()
Returns the android.graphics.Typeface of the text in the annotation.
void setBackgroundColor(int backgroundColor)
Sets the background color for the annotation.
void setTextColor(int textColor)
Sets the color for the text in the annotation.
void setTextSize(float textSize)
Sets the size for the text in the annotation, in scaled pixels.
void setTypeface(Typeface typeface)
Sets the android.graphics.Typeface for the text in the annotation.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public AnnotationStyle ()

Public Methods

public int getBackgroundColor ()

Returns the int representation of the background color of the annotation.

Returns
  • the int representation of the background color of the annotation

public int getTextColor ()

Returns the int representation of the color of the text in the annotation.

Returns
  • the int representation of the color of the text in the annotation

public float getTextSize ()

Returns the size of the text in the annotation, in scaled pixels.

Returns
  • the size of the text in the annotation, in scaled pixels

public Typeface getTypeface ()

Returns the android.graphics.Typeface of the text in the annotation.

Returns
  • the typeface of the text in the annotation

public void setBackgroundColor (int backgroundColor)

Sets the background color for the annotation.

Parameters
backgroundColor the int representation of the background color for the annotation

public void setTextColor (int textColor)

Sets the color for the text in the annotation.

Parameters
textColor the int representation of the color for the text in the annotation
See Also

public void setTextSize (float textSize)

Sets the size for the text in the annotation, in scaled pixels.

Parameters
textSize the size for the text in the annotation, in scaled pixels
See Also

public void setTypeface (Typeface typeface)

Sets the android.graphics.Typeface for the text in the annotation.

Parameters
typeface the typeface for the text in the annotation
See Also