Summ:  Fields Constr. Methods    Details:  Fields Constr. Methods      Class:  Prev Next
com.artfulbits.aiCharts.Base
Class ChartEngine

java.lang.Object com.artfulbits.aiCharts.Base.ChartEngine

Declaration: public class ChartEngine extends Object

 

Represents Chart engine initially wrapped by ChartField class. Chart engine class is a top building block of aiCharts. Chart engine instantiated automatically by ChartField and takes responsibility for all rendering and layout operation.

 

Since: 1.0
See also: ChartField

 

 

Fields Summary
static com.artfulbits.licensing.LicenseData LICENSE
    
Get License Information which used by aiCharts library.

 

 

Constructors Summary
ChartEngine()
    
Initializes a new instance of Chart.

 

 

Methods Summary
void addInvalidateListener(IInvalidateListener listener)
    
Adds the invalidate listener that implements IInvalidateListener interface.
void draw(Graphics g)
    
Draws chart to canvas.
boolean getAntiAlias()
    
Gets value indicating that chart is drawn anti-aliased.
ChartNamedCollection getAreas()
    
Gets the collection containing areas of chart.
XYRect getBounds()
    
Gets the chart bounds.
ChartNamedCollection getLegends()
    
Gets the collection containing legends of chart.
ChartPalette getPalette()
    
Returns current palette assigned to chart.
ChartNamedCollection getSeries()
    
Gets the collection containing series of chart.
int getSpacing()
    
Gets value indicating distance between chart and its elements.
ChartCollection getTitles()
    
Gets the collection containing titles of chart.
void removeInvalidateListener(IInvalidateListener listener)
    
Removes previously added invalidate listener.
void setAntiAlias(boolean antiAlias)
    
Sets value indicating that chart is drawn anti-aliased.
void setBounds(int width, int height)
    
Sets the chart bounds
void setBounds(int x, int y, int width, int height)
    
Sets the chart bounds
void setPalette(ChartPalette palette)
    
Sets chart palette.
void setSpacing(int spacing)
    
Sets value indicating distance between chart and its elements.

 

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

 

 

 

 

LICENSE

 

public static final com.artfulbits.licensing.LicenseData LICENSE

 

Get License Information which used by aiCharts library.

 

 

 

 

ChartEngine

 

public ChartEngine( )

 

Initializes a new instance of Chart. Instantiates areas, series, axes, legends and titles collections. Initially, instance of Chart class is created by parent ChartField.

 

Throws:
com.artfulbits.licensing.LicenseValidationException -

 

Since: 1.0
See also: ChartField.getChart()

 

 

 

 

setAntiAlias

 

public void setAntiAlias( boolean antiAlias)

 

Sets value indicating that chart is drawn anti-aliased.
If AntiAlias is set to true, the chart might work more slowly. Should you experience performance issues, set this property to false.

 

Parameters:
antiAlias-
true if chart is to be drawn anti-aliased, otherwise false.

 

Since: 1.0

 

 

 

getAntiAlias

 

public boolean getAntiAlias( )

 

Gets value indicating that chart is drawn anti-aliased.

 

Returns:
true if chart is drawn anti-aliased, otherwise false.

 

Since: 1.0

 

 

 

getSeries

 

public ChartNamedCollection getSeries( )

 

Gets the collection containing series of chart.

 

Returns:
instance of series ChartNamedCollection.

 

Since: 1.0
See also: ChartField.getSeries()

 

 

 

getAreas

 

public ChartNamedCollection getAreas( )

 

Gets the collection containing areas of chart.

 

Returns:
Instance of chart area collection.

 

Since: 1.0
See also: ChartField.getAreas()

 

 

 

getLegends

 

public ChartNamedCollection getLegends( )

 

Gets the collection containing legends of chart.

 

Returns:
instance of legends collection.

 

Since: 1.0

 

 

 

getTitles

 

public ChartCollection getTitles( )

 

Gets the collection containing titles of chart.

 

Returns:
instance of title collection.

 

Since: 1.0
See also: ChartField.getTitles()

 

 

 

setBounds

 

public void setBounds( int width,
int height)

 

Sets the chart bounds

 

Parameters:
width-
desired width of chart.
height-
desired height of chart.

 

Since: 1.0

 

 

 

setBounds

 

public void setBounds( int x,
int y,
int width,
int height)

 

Sets the chart bounds

 

Parameters:
x-
X coordinate of chart.
y-
Y coordinate of chart.
width-
desired width of chart.
height-
desired height of chart.

 

Since: 1.0

 

 

 

getBounds

 

public XYRect getBounds( )

 

Gets the chart bounds.

 

Returns:
XYRect representing chart bounds.

 

Since: 1.0

 

 

 

setSpacing

 

public void setSpacing( int spacing)

 

Sets value indicating distance between chart and its elements.

 

Parameters:
spacing-
distance between chart elements.

 

Since: 1.0

 

 

 

getSpacing

 

public int getSpacing( )

 

Gets value indicating distance between chart and its elements.

 

Returns:
spacing distance between chart elements.

 

Since: 1.0
See also: setSpacing(int)

 

 

 

getPalette

 

public ChartPalette getPalette( )

 

Returns current palette assigned to chart.

 

Returns:
instance of ChartPalette class

 

Since: 1.0

 

 

 

setPalette

 

public void setPalette( ChartPalette palette)

 

Sets chart palette.

 

Parameters:
palette-
instance of ChartPalette class.

 

Since: 1.0
See also: ChartField.setPalette(ChartPalette)

 

 

 

draw

 

public void draw( Graphics g)

 

Draws chart to canvas. Generally, invoked via the recursive draw call from parent ChartField. However, this method could be used to draw chart on optionally supplied Graphics.

 

Parameters:
g-
instance of Graphics class.

 

Since: 1.0

 

 

 

addInvalidateListener

 

public void addInvalidateListener( IInvalidateListener listener)

 

Adds the invalidate listener that implements IInvalidateListener interface. Target IInvalidateListener.onInvalidate() is called when invalidation process was triggered.
 chart.addInvalidateListener(new IInvalidateListener()
 {
 	
 	public void onInvalidate()
 	{
 		//Desired actions to respond chart invalidation.
 	}
 });
 

 

Parameters:
listener-
instance of IInvalidateListener.

 

Since: 1.0

 

 

 

removeInvalidateListener

 

public void removeInvalidateListener( IInvalidateListener listener)

 

Removes previously added invalidate listener.

 

Parameters:
listener-
instance of previously added IInvalidateListener descendant.

 

Since: 1.0

 

 

© 2005 - 2010 ArtfulBits. All rights reserved.