org.norther.tammi.sprig.chart.layout
Interface ChartLayout

All Known Implementing Classes:
ChartLayoutAdapter

public interface ChartLayout

An interface to chart layouts.

Author:
Ilkka Priha

Field Summary
static int AREA_CHART
          The area chart type.
static int BAR_3D_CHART
          The 3D bar chart type.
static int BAR_CHART
          The bar chart type.
static int BOTTOM
          The bottom location.
static int BOTTOM_LEFT
          The bottom-left location.
static int BOTTOM_RIGHT
          The bottom-right location.
static int CENTER
          The center location.
static int CORNER
          The corner location.
static int DATE_AREA_CHART
          The date area chart type.
static int DATE_LINE_CHART
          The date line chart type.
static int HORIZONTAL
          The horizontal orientation.
static int LEFT
          The left location.
static int LINE_3D_CHART
          The 3D line chart type.
static int LINE_CHART
          The line chart type.
static int MULTI_PIE_3D_CHART
          The 3D multi-pie chart type.
static int MULTI_PIE_CHART
          The multi-pie chart type.
static int PIE_3D_CHART
          The 3D pie chart type.
static int PIE_CHART
          The pie chart type.
static int RIGHT
          The right location.
static int STACKED_AREA_CHART
          The stacked area chart type.
static int STACKED_BAR_3D_CHART
          The 3D stacked bar chart type.
static int STACKED_BAR_CHART
          The stacked bar chart type.
static int STACKED_DATE_AREA_CHART
          The stacked date area chart type.
static int STACKED_XY_AREA_CHART
          The stacked xy area chart type.
static int TOP
          The top location.
static int TOP_LEFT
          The top-left location.
static int TOP_RIGHT
          The top-right location.
static int VERTICAL
          The vertical orientation.
static int XY_AREA_CHART
          The xy area chart type.
static int XY_LINE_CHART
          The xy line chart type.
 
Method Summary
 void addLabel(String label)
          Adds a label.
 void addLabel(String label, Paint paint)
          Adds a label with paint.
 void addLabel(String label, Paint paint, int style, int pos, int ho, int vo)
          Adds a label with attributes.
 void clearLabels()
          Clears all labels.
 int columnAxisCount()
          Returns the number of column axes.
 Paint getBackgroundPaint()
          Gets the background paint.
 int getBackgroundTransparency()
          Gets the transparency of the background.
 Paint getBorderPaint()
          Gets the border paint.
 Object getChart()
          Gets the implementation specific chart.
 int getChartType()
          Gets the type of the chart.
 ChartAxis getColumnAxis(int index)
          Gets the indexed column axis.
 int getColumnAxisPosition(int index)
          Gets the position of the indexed column axis.
 int getExplodePercent(int section)
          Gets the amount that a pie section should be 'exploded'.
 String getFontFace()
          Gets the font face.
 int getFontSize()
          Gets the font size.
 int getForegroundTransparency()
          Gets the transparency of the foreground.
 Paint getGridPaint()
          Gets the grid paint.
 int getHeight()
          Gets the height.
 Paint getLinePaint(int index, int series)
          Gets the line paint of the specified series.
 Stroke getLineStroke(int index, int series)
          Gets the line stroke of the specified series.
 Paint getPanelPaint()
          Gets the panel paint.
 ChartAxis getRowAxis(int index)
          Gets the indexed row axis.
 int getRowAxisPosition(int index)
          Gets the position of the indexed row axis.
 String getTitle()
          Gets the title.
 int getWidth()
          Gets the width.
 boolean isBorderVisible()
          Checks whether the border is visible.
 boolean isGridVisible()
          Checks whether the grid is visible.
 boolean isLinesVisible()
          Checks whether lines are visible.
 boolean isLinesVisible(int index)
          Checks whether lines are visible for the specified dataset.
 boolean isLinesVisible(int index, int series)
          Checks whether lines are visible for the specified series.
 boolean isShapesVisible()
          Checks whether shapes are visible.
 boolean isShapesVisible(int index)
          Checks whether shapes are visible for the specified dataset.
 boolean isShapesVisible(int index, int series)
          Checks whether shapes are visible for the specified series.
 int rowAxisCount()
          Returns the number of row axes.
 void setBackgroundPaint(Paint paint)
          Sets the background paint.
 void setBackgroundTransparency(int alpha)
          Sets the transparency of the background.
 void setBorderPaint(Paint paint)
          Sets the border paint.
 void setBorderVisible(boolean v)
          Sets whether the border is visible.
 void setColumnAxis(int index, ChartAxis axis)
          Sets the indexed the column axis.
 void setColumnAxisPosition(int index, int pos)
          Sets the position of the column axis.
 void setExplodePercent(int section, int percent)
          Sets the amount that a pie section should be 'exploded'.
 void setFontFace(String fn)
          Sets the font face.
 void setFontSize(int fs)
          Sets the font size.
 void setForegroundTransparency(int alpha)
          Sets the transparency of the foreground.
 void setGridPaint(Paint paint)
          Sets the grid paint.
 void setGridVisible(boolean v)
          Sets whether the grid is visible.
 void setHeight(int h)
          Sets the height.
 void setLinePaint(int index, int series, Paint paint)
          Sets the line paint of the specified series.
 void setLinePaint(int index, Paint paint)
          Sets the line paint for the specified dataset.
 void setLinePaint(Paint paint)
          Sets the line paint.
 void setLineStroke(int index, int series, Stroke stroke)
          Sets the line stroke of the specified series.
 void setLineStroke(int index, Stroke stroke)
          Sets the line stroke for the specified series.
 void setLineStroke(Stroke stroke)
          Sets the line stroke.
 void setLinesVisible(boolean v)
          Sets whether lines are visible.
 void setLinesVisible(int index, boolean v)
          Sets whether lines are visible for the specified dataset.
 void setLinesVisible(int index, int series, boolean v)
          Sets whether lines are visible for the specified series.
 void setModelColumnAxis(int model, int index)
          Sets the column axis of the indexed model.
 void setModelRowAxis(int model, int index)
          Sets the row axis of the indexed model.
 void setPanelPaint(Paint paint)
          Sets the panel paint.
 void setRowAxis(int index, ChartAxis axis)
          Sets the indexed row axis.
 void setRowAxisPosition(int index, int pos)
          Sets the position of the row axis.
 void setShapesVisible(boolean v)
          Sets whether shapes are visible.
 void setShapesVisible(int index, boolean v)
          Sets whether shapes are visible for the specified dataset.
 void setShapesVisible(int index, int series, boolean v)
          Sets whether shapes are visible for the specified series.
 void setTitle(String title)
          Sets the title.
 void setTitle(String title, Paint paint)
          Sets the title with paint.
 void setTitle(String title, Paint paint, int style, int pos, int ho, int vo)
          Sets the title with attributes.
 void setWidth(int w)
          Sets the width.
 

Field Detail

PIE_CHART

static final int PIE_CHART
The pie chart type.

See Also:
Constant Field Values

PIE_3D_CHART

static final int PIE_3D_CHART
The 3D pie chart type.

See Also:
Constant Field Values

MULTI_PIE_CHART

static final int MULTI_PIE_CHART
The multi-pie chart type.

See Also:
Constant Field Values

MULTI_PIE_3D_CHART

static final int MULTI_PIE_3D_CHART
The 3D multi-pie chart type.

See Also:
Constant Field Values

BAR_CHART

static final int BAR_CHART
The bar chart type.

See Also:
Constant Field Values

BAR_3D_CHART

static final int BAR_3D_CHART
The 3D bar chart type.

See Also:
Constant Field Values

STACKED_BAR_CHART

static final int STACKED_BAR_CHART
The stacked bar chart type.

See Also:
Constant Field Values

STACKED_BAR_3D_CHART

static final int STACKED_BAR_3D_CHART
The 3D stacked bar chart type.

See Also:
Constant Field Values

LINE_CHART

static final int LINE_CHART
The line chart type.

See Also:
Constant Field Values

LINE_3D_CHART

static final int LINE_3D_CHART
The 3D line chart type.

See Also:
Constant Field Values

XY_LINE_CHART

static final int XY_LINE_CHART
The xy line chart type.

See Also:
Constant Field Values

DATE_LINE_CHART

static final int DATE_LINE_CHART
The date line chart type.

See Also:
Constant Field Values

AREA_CHART

static final int AREA_CHART
The area chart type.

See Also:
Constant Field Values

XY_AREA_CHART

static final int XY_AREA_CHART
The xy area chart type.

See Also:
Constant Field Values

DATE_AREA_CHART

static final int DATE_AREA_CHART
The date area chart type.

See Also:
Constant Field Values

STACKED_AREA_CHART

static final int STACKED_AREA_CHART
The stacked area chart type.

See Also:
Constant Field Values

STACKED_XY_AREA_CHART

static final int STACKED_XY_AREA_CHART
The stacked xy area chart type.

See Also:
Constant Field Values

STACKED_DATE_AREA_CHART

static final int STACKED_DATE_AREA_CHART
The stacked date area chart type.

See Also:
Constant Field Values

CENTER

static final int CENTER
The center location.

See Also:
Constant Field Values

TOP

static final int TOP
The top location.

See Also:
Constant Field Values

LEFT

static final int LEFT
The left location.

See Also:
Constant Field Values

BOTTOM

static final int BOTTOM
The bottom location.

See Also:
Constant Field Values

RIGHT

static final int RIGHT
The right location.

See Also:
Constant Field Values

CORNER

static final int CORNER
The corner location.

See Also:
Constant Field Values

TOP_LEFT

static final int TOP_LEFT
The top-left location.

See Also:
Constant Field Values

BOTTOM_LEFT

static final int BOTTOM_LEFT
The bottom-left location.

See Also:
Constant Field Values

BOTTOM_RIGHT

static final int BOTTOM_RIGHT
The bottom-right location.

See Also:
Constant Field Values

TOP_RIGHT

static final int TOP_RIGHT
The top-right location.

See Also:
Constant Field Values

VERTICAL

static final int VERTICAL
The vertical orientation.

See Also:
Constant Field Values

HORIZONTAL

static final int HORIZONTAL
The horizontal orientation.

See Also:
Constant Field Values
Method Detail

getChart

Object getChart()
Gets the implementation specific chart.

Returns:
the chart instance.

getChartType

int getChartType()
Gets the type of the chart.

Returns:
the chart type.

getTitle

String getTitle()
Gets the title.

Returns:
the title.

setTitle

void setTitle(String title)
Sets the title.

Parameters:
title - the title.

setTitle

void setTitle(String title,
              Paint paint)
Sets the title with paint.

Parameters:
title - the title.
paint - the paint.

setTitle

void setTitle(String title,
              Paint paint,
              int style,
              int pos,
              int ho,
              int vo)
Sets the title with attributes.

Parameters:
title - the title.
paint - the paint (may be null).
style - the style (Font style).
pos - the position (TOP, LEFT, BOTTOM, RIGHT).
ho - the horizontal orientation (CENTER, LEFT, RIGHT).
vo - the vertical orientation (CENTER, TOP, BOTTOM).

addLabel

void addLabel(String label)
Adds a label.

Parameters:
label - the label.

addLabel

void addLabel(String label,
              Paint paint)
Adds a label with paint.

Parameters:
label - the label.
paint - the paint.

addLabel

void addLabel(String label,
              Paint paint,
              int style,
              int pos,
              int ho,
              int vo)
Adds a label with attributes.

Parameters:
label - the label.
paint - the paint.
style - the style (Font style).
pos - the position (TOP, LEFT, BOTTOM, RIGHT).
ho - the horizontal orientation (CENTER, LEFT, RIGHT).
vo - the vertical orientation (CENTER, TOP, BOTTOM).

clearLabels

void clearLabels()
Clears all labels.


getWidth

int getWidth()
Gets the width.

Returns:
the width.

setWidth

void setWidth(int w)
Sets the width.

Parameters:
w - the width.

getHeight

int getHeight()
Gets the height.

Returns:
the height.

setHeight

void setHeight(int h)
Sets the height.

Parameters:
h - the height.

getFontFace

String getFontFace()
Gets the font face.

Returns:
the font name.

setFontFace

void setFontFace(String fn)
Sets the font face.

Parameters:
fn - the font name.

getFontSize

int getFontSize()
Gets the font size.

Returns:
the font size in points.

setFontSize

void setFontSize(int fs)
Sets the font size.

Parameters:
fs - the font size in points.

rowAxisCount

int rowAxisCount()
Returns the number of row axes.

Returns:
the row axis count.

getRowAxis

ChartAxis getRowAxis(int index)
Gets the indexed row axis.

Parameters:
index - the index of the axis.
Returns:
the axis or null.

setRowAxis

void setRowAxis(int index,
                ChartAxis axis)
Sets the indexed row axis.

Parameters:
index - the index of the axis.
axis - the axis or null.

getRowAxisPosition

int getRowAxisPosition(int index)
Gets the position of the indexed row axis.

Parameters:
index - the index of the axis.
Returns:
the position of the axis.

setRowAxisPosition

void setRowAxisPosition(int index,
                        int pos)
Sets the position of the row axis.

Parameters:
index - the index of the axis.
pos - the position of the axis.

setModelRowAxis

void setModelRowAxis(int model,
                     int index)
Sets the row axis of the indexed model.

Parameters:
model - the model index.
index - the axis index.

columnAxisCount

int columnAxisCount()
Returns the number of column axes.

Returns:
the column axis count.

getColumnAxis

ChartAxis getColumnAxis(int index)
Gets the indexed column axis.

Parameters:
index - the index of the axis.
Returns:
the the axis or null.

setColumnAxis

void setColumnAxis(int index,
                   ChartAxis axis)
Sets the indexed the column axis.

Parameters:
index - the index of the axis.
axis - the axis or null.

getColumnAxisPosition

int getColumnAxisPosition(int index)
Gets the position of the indexed column axis.

Parameters:
index - the index of the axis.
Returns:
the position of the axis.

setColumnAxisPosition

void setColumnAxisPosition(int index,
                           int pos)
Sets the position of the column axis.

Parameters:
index - the index of the axis.
pos - the position of the axis.

setModelColumnAxis

void setModelColumnAxis(int model,
                        int index)
Sets the column axis of the indexed model.

Parameters:
model - the model index.
index - the axis index.

getExplodePercent

int getExplodePercent(int section)
Gets the amount that a pie section should be 'exploded'.

Parameters:
section - the index of the section.
Returns:
the explode percentage (0 - 100).

setExplodePercent

void setExplodePercent(int section,
                       int percent)
Sets the amount that a pie section should be 'exploded'.

Parameters:
section - the index of the section.
percent - the explode percentage (0 - 100).

getPanelPaint

Paint getPanelPaint()
Gets the panel paint.

Returns:
the panel paint.

setPanelPaint

void setPanelPaint(Paint paint)
Sets the panel paint.

Parameters:
paint - the panel paint.

getBackgroundPaint

Paint getBackgroundPaint()
Gets the background paint.

Returns:
the background paint.

setBackgroundPaint

void setBackgroundPaint(Paint paint)
Sets the background paint.

Parameters:
paint - the background paint.

getBackgroundTransparency

int getBackgroundTransparency()
Gets the transparency of the background.

Returns:
the transparency of the background (0-100).

setBackgroundTransparency

void setBackgroundTransparency(int alpha)
Sets the transparency of the background.

Parameters:
alpha - the transparency of the background (0-100).

getForegroundTransparency

int getForegroundTransparency()
Gets the transparency of the foreground.

Returns:
the transparency of the foreground (0-100).

setForegroundTransparency

void setForegroundTransparency(int alpha)
Sets the transparency of the foreground.

Parameters:
alpha - the transparency of the foreground (0-100).

getGridPaint

Paint getGridPaint()
Gets the grid paint.

Returns:
the grid paint.

setGridPaint

void setGridPaint(Paint paint)
Sets the grid paint.

Parameters:
paint - the grid paint.

isGridVisible

boolean isGridVisible()
Checks whether the grid is visible.

Returns:
the visibility of the grid.

setGridVisible

void setGridVisible(boolean v)
Sets whether the grid is visible.

Parameters:
v - the visibility of the grid.

getBorderPaint

Paint getBorderPaint()
Gets the border paint.

Returns:
the border paint.

setBorderPaint

void setBorderPaint(Paint paint)
Sets the border paint.

Parameters:
paint - the border paint.

isBorderVisible

boolean isBorderVisible()
Checks whether the border is visible.

Returns:
the visibility of the border.

setBorderVisible

void setBorderVisible(boolean v)
Sets whether the border is visible.

Parameters:
v - the visibility of the border.

isLinesVisible

boolean isLinesVisible()
Checks whether lines are visible.

Returns:
the visibility of lines.

setLinesVisible

void setLinesVisible(boolean v)
Sets whether lines are visible.

Parameters:
v - the visibility of lines.

isLinesVisible

boolean isLinesVisible(int index)
Checks whether lines are visible for the specified dataset.

Parameters:
index - the dataset index.
Returns:
the visibility of lines.

setLinesVisible

void setLinesVisible(int index,
                     boolean v)
Sets whether lines are visible for the specified dataset.

Parameters:
index - the dataset index.
v - the visibility of lines.

isLinesVisible

boolean isLinesVisible(int index,
                       int series)
Checks whether lines are visible for the specified series.

Parameters:
index - the dataset index.
series - the series index.
Returns:
the visibility of lines.

setLinesVisible

void setLinesVisible(int index,
                     int series,
                     boolean v)
Sets whether lines are visible for the specified series.

Parameters:
index - the dataset index.
series - the series index.
v - the visibility of lines.

isShapesVisible

boolean isShapesVisible()
Checks whether shapes are visible.

Returns:
the visibility of shapes.

setShapesVisible

void setShapesVisible(boolean v)
Sets whether shapes are visible.

Parameters:
v - the visibility of shapes.

isShapesVisible

boolean isShapesVisible(int index)
Checks whether shapes are visible for the specified dataset.

Parameters:
index - the dataset index.
Returns:
the visibility of shapes.

setShapesVisible

void setShapesVisible(int index,
                      boolean v)
Sets whether shapes are visible for the specified dataset.

Parameters:
index - the dataset index.
v - the visibility of shapes.

isShapesVisible

boolean isShapesVisible(int index,
                        int series)
Checks whether shapes are visible for the specified series.

Parameters:
index - the dataset index.
series - the series index.
Returns:
the visibility of shapes.

setShapesVisible

void setShapesVisible(int index,
                      int series,
                      boolean v)
Sets whether shapes are visible for the specified series.

Parameters:
index - the dataset index.
series - the series index.
v - the visibility of shapes.

setLinePaint

void setLinePaint(Paint paint)
Sets the line paint.

Parameters:
paint - the line paint.

setLinePaint

void setLinePaint(int index,
                  Paint paint)
Sets the line paint for the specified dataset.

Parameters:
index - the dataset index.
paint - the line paint.

getLinePaint

Paint getLinePaint(int index,
                   int series)
Gets the line paint of the specified series.

Parameters:
index - the dataset index.
series - the series index.
Returns:
the line paint.

setLinePaint

void setLinePaint(int index,
                  int series,
                  Paint paint)
Sets the line paint of the specified series.

Parameters:
index - the dataset index.
series - the series index.
paint - the line paint.

setLineStroke

void setLineStroke(Stroke stroke)
Sets the line stroke.

Parameters:
stroke - the line stroke.

setLineStroke

void setLineStroke(int index,
                   Stroke stroke)
Sets the line stroke for the specified series.

Parameters:
index - the dataset index.
stroke - the line stroke.

getLineStroke

Stroke getLineStroke(int index,
                     int series)
Gets the line stroke of the specified series.

Parameters:
index - the dataset index.
series - the series index.
Returns:
the line stroke.

setLineStroke

void setLineStroke(int index,
                   int series,
                   Stroke stroke)
Sets the line stroke of the specified series.

Parameters:
index - the dataset index.
series - the series index.
stroke - the line paint.


Copyright © 2004 The Norther Organization. All rights reserved.