public class

ChartDrawableAnnotation

extends ChartAnnotation
java.lang.Object
   ↳ com.artfulbits.aiCharts.Annotations.ChartAnnotation
     ↳ com.artfulbits.aiCharts.Annotations.ChartDrawableAnnotation

Class Overview

Represents drawable annotation. Instance of this class is considered to be added to chart's collection.

Summary

Public Constructors
ChartDrawableAnnotation(Drawable drawable)
Initializes a new instance of drawable annotation.
ChartDrawableAnnotation(Drawable drawable, String description)
Initializes a new instance of drawable annotation with specified description.
Public Methods
void draw(Canvas canvas, ChartEngine chart)
Draws annotation of specified canvas.
Drawable getDrawable()
Gets drawable object that is to be used to present this annotation.
Alignment getHorizontalAlignment()
Gets the horizontal alignment for this annotation.
Alignment getVerticalAlignment()
Gets the vertical alignment for this annotation.
void setAlignment(Alignment horizontalAlignment, Alignment verticalAlignment)
Sets alignment for this annotation.
void setHorizontalAlignment(Alignment alignment)
Sets the vertical alignment for annotation.
void setVerticalAlignment(Alignment alignment)
Sets the vertical alignment for annotation.
[Expand]
Inherited Methods
From class com.artfulbits.aiCharts.Annotations.ChartAnnotation
From class java.lang.Object

Public Constructors

public ChartDrawableAnnotation (Drawable drawable)

Initializes a new instance of drawable annotation.

Parameters
drawable instance of Drawable that is to be used to present annotation.

public ChartDrawableAnnotation (Drawable drawable, String description)

Initializes a new instance of drawable annotation with specified description.

Parameters
drawable instance of Drawable that is to be used to present annotation.
description text description of annotation.
Throws
NullPointerException for drawable that is.

Public Methods

public void draw (Canvas canvas, ChartEngine chart)

Draws annotation of specified canvas.

Parameters
canvas instance of canvas that is used to draw annotation.
chart instance of parent chart.

public Drawable getDrawable ()

Gets drawable object that is to be used to present this annotation.

Returns

public Alignment getHorizontalAlignment ()

Gets the horizontal alignment for this annotation.

Returns
  • instance of Alignment enumeration containing current alignment value.

public Alignment getVerticalAlignment ()

Gets the vertical alignment for this annotation.

Returns
  • instance of Alignment enumeration containing current alignment value.

public void setAlignment (Alignment horizontalAlignment, Alignment verticalAlignment)

Sets alignment for this annotation.

Parameters
horizontalAlignment Alignment

public void setHorizontalAlignment (Alignment alignment)

Sets the vertical alignment for annotation.

Parameters
alignment instance of Alignment enumeration containing current alignment value.

public void setVerticalAlignment (Alignment alignment)

Sets the vertical alignment for annotation.

Parameters
alignment instance of Alignment enumeration containing current alignment value.