Summ:  Nested Constr. Methods    Details:  Constr. Methods      Class:  Prev Next
com.artfulbits.aiCharts.Base
Class ChartLegendItem

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

Declaration: public final class ChartLegendItem extends Object

 

Represents item that is held by the legend.

 

Since: 1.0

 

 

Nested Members Summary
static abstract class ChartLegendItem.Cell
    
Represents cell of the legend.
 class ChartLegendItem.ImageCell
    
Represents the draw able cell.
 class ChartLegendItem.TextCell
    
Represents text cell class.

 

 

Constructors Summary
ChartLegendItem()
    
Sole constructor.
ChartLegendItem(java.lang.Object[] cells)
    
Initialize new instance of ChartLegendItem with specified cells.

 

 

Methods Summary
void addCell()
    
Adds empty cell.
ChartLegendItem.ImageCell addCell(Bitmap image)
    
Adds the specified cell to the legend item.
ChartLegendItem.TextCell addCell(java.lang.String text)
    
Adds the specified cell to the legend item.
void clearCells()
    
Clears all cells in this item.
ChartCollection getCells()
    
Gets items cells.
void setCell(int index, Bitmap bitmap)
    
Sets bitmap that will be rendered in specified legend item's cell.
void setCell(int index, java.lang.String text)
    
Sets text that will be rendered in specified legend item's cell.

 

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

 

 

 

 

ChartLegendItem

 

public ChartLegendItem( )

 

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

 

Since: 1.0

 

 

 

ChartLegendItem

 

public ChartLegendItem( java.lang.Object[] cells)

 

Initialize new instance of ChartLegendItem with specified cells.

 

Parameters:
cells-
objects array representing legend item cells. Each cell is expected to be either Bitmap or text. If cell is not instance of Bitmap, java.lang.Object.toString() representation of cell will be used.

 

Since: 1.0

 

 

 

 

addCell

 

public void addCell( )

 

Adds empty cell.

 

Since: 1.0

 

 

 

addCell

 

public ChartLegendItem.TextCell addCell( java.lang.String text)

 

Adds the specified cell to the legend item.

 

Parameters:
text-
text representation of cell.
Returns:
instance of ChartLegendItem.TextCell.

 

Since: 1.0

 

 

 

addCell

 

public ChartLegendItem.ImageCell addCell( Bitmap image)

 

Adds the specified cell to the legend item.

 

Parameters:
image-
Bitmap visual representation of cell.
Returns:
instance of ChartLegendItem.ImageCell.

 

Since: 1.0

 

 

 

setCell

 

public void setCell( int index,
java.lang.String text)

 

Sets text that will be rendered in specified legend item's cell.

 

Parameters:
index-
cell index.
text-
desired text.

 

Since: 1.0
See also: setCell(int,Bitmap)

 

 

 

setCell

 

public void setCell( int index,
Bitmap bitmap)

 

Sets bitmap that will be rendered in specified legend item's cell.

 

Parameters:
index-
cell index.
bitmap-
instance of Bitmap that will be used to draw the cell.

 

Since: 1.0
See also: setCell(int,String)

 

 

 

getCells

 

public ChartCollection getCells( )

 

Gets items cells.

 

Returns:
instance of ChartCollection

 

Since: 1.0

 

 

 

clearCells

 

public void clearCells( )

 

Clears all cells in this item.

 

Since: 1.0

 

 

© 2005 - 2010 ArtfulBits. All rights reserved.