Summ:  Constr. Methods    Details:  Constr. Methods      Class:  Next
com.artfulbits.aiCharts.Annotations
Class ChartAnnotation

java.lang.Object com.artfulbits.aiCharts.Annotations.ChartAnnotation

Declaration: public abstract class ChartAnnotation extends Object
Direct Subclasses: ChartDrawableAnnotation, ChartTextAnnotation

 

Represents base class for chart annotations. Derived classes are to be added to chart's annotations collection.

 

Since: 1.0

 

 

Constructors Summary
ChartAnnotation()
    
Sole constructor.

 

 

Methods Summary
abstract void draw(android.graphics.Canvas canvas, ChartEngine chart)
    
Draws annotation of specified canvas.
java.lang.String getDescription()
    
Gets custom description of annotation.
int getOffset()
    
Gets value used to offset annotation from position specified by setPosition(ChartAnnotationPosition)
ChartAnnotationPosition getPosition()
    
Gets instance of ChartAnnotationPosition class used to determine annotation's location on chart.
void setDescription(java.lang.String description)
    
Sets custom description of annotation.
void setOffset(int offset)
    
Sets the annotation's offset from position specified by getPosition().
void setPosition(ChartAnnotationPosition position)
    
Sets position that determines annotation's location on chart.

 

Methods inherited from class: java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

 

 

 

ChartAnnotation

 

public ChartAnnotation( )

 

Sole constructor. (For invocation by subclass constructors, typically implicit.)

 

Since: 1.0

 

 

 

 

setOffset

 

public void setOffset( int offset)

 

Sets the annotation's offset from position specified by getPosition().

 

Parameters:
offset-
value of annotation's offset.

 

Since: 1.0

 

 

 

getOffset

 

public int getOffset( )

 

Gets value used to offset annotation from position specified by setPosition(ChartAnnotationPosition)

 

Returns:
offset value.

 

Since: 1.0

 

 

 

draw

 

public abstract void draw( android.graphics.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.

 

Since: 1.0

 

 

 

getPosition

 

public ChartAnnotationPosition getPosition( )

 

Gets instance of ChartAnnotationPosition class used to determine annotation's location on chart.

 

Returns:
instance of ChartAnnotationPosition.

 

Since: 1.0

 

 

 

setPosition

 

public void setPosition( ChartAnnotationPosition position)

 

Sets position that determines annotation's location on chart. See members of ChartAnnotationPosition class for ready solutions of create a new one.

 

Parameters:
position-
instance of ChartAnnotationPosition class that is used to determine annotation's location on.

 

Since: 1.0

 

 

 

setDescription

 

public void setDescription( java.lang.String description)

 

Sets custom description of annotation. This value is used to draw annotation's description if the one is displayed on legend.

 

Parameters:
description-
custom annotation's description.

 

Since: 1.0

 

 

 

getDescription

 

public java.lang.String getDescription( )

 

Gets custom description of annotation. This value is used to draw annotation's description if the one is displayed on legend.

 

Returns:
value of annotation's description.

 

Since: 1.0

 

 

© 2005 - 2010 ArtfulBits. All rights reserved.