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 hold by the legend.

 

Since: 1.0

 

 

Nested Members Summary
static abstract class ChartLegendItem.Cell
    
Represents cell of the legend.
 class ChartLegendItem.DrawableCell
    
Represents the drawable 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.DrawableCell addCell(android.graphics.drawable.Drawable drawable)
    
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.
java.util.List<ChartLegendItem.Cell> getCells()
    
Gets cells of this legend item.
void setCell(int index, android.graphics.drawable.Drawable drawable)
    
Sets drawable 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 android.graphics.drawable.Drawable or text. If cell is not instance of android.graphics.drawable.Drawable, java.lang.Object.toString() representation of cell will be used.

 

Since: 1.5

 

 

 

 

addCell

 

public void addCell( )

 

Adds empty cell.

 

Since: 1.5

 

 

 

addCell

 

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

 

Adds the specified cell to the legend item.

 

Parameters:
text-
text representation of cell.

 

Since: 1.5

 

 

 

addCell

 

public ChartLegendItem.DrawableCell addCell( android.graphics.drawable.Drawable drawable)

 

Adds the specified cell to the legend item.

 

Parameters:
drawable-
visual representation of cell.

 

Since: 1.5

 

 

 

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.5
See also: setCell(int,Drawable)

 

 

 

setCell

 

public void setCell( int index,
android.graphics.drawable.Drawable drawable)

 

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

 

Parameters:
index-
cell index.
drawable-
instance of android.graphics.drawable.Drawable that will be used to draw the cell.

 

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

 

 

 

getCells

 

public java.util.List<ChartLegendItem.Cell> getCells( )

 

Gets cells of this legend item.

 

Returns:
list containing item's cells.

 

Since: 1.5

 

 

 

clearCells

 

public void clearCells( )

 

Clears all cells in this item.

 

Since: 1.0

 

 

© 2005 - 2010 ArtfulBits. All rights reserved.