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

All Known Implementing Classes:
ChartLayoutAdapter

public interface ChartLayout

An interface to chart layouts.

Version:
$Id: ChartLayout.java,v 1.12 2009/11/27 14:06:06 cvsimp Exp $
Author:
Ilkka Priha

Nested Class Summary
static class ChartLayout.ChartType
          The chart type.
static class ChartLayout.HAlignment
          The horizontal alignment.
static class ChartLayout.Location
          The label location.
static class ChartLayout.Position
          The axis position.
static class ChartLayout.VAlignment
          The vertical alignment.
 
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, ChartLayout.Location pos, ChartLayout.HAlignment ho, ChartLayout.VAlignment 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 adaptee.
 ChartLayout.ChartType getChartType()
          Gets the type of the chart.
 ChartAxis getColumnAxis(int index)
          Gets the indexed column axis.
 ChartLayout.Position 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.
 NumberFormat getLabelNumberFormat()
          Gets the label number format.
 NumberFormat getLabelPercentFormat()
          Gets the label percent format.
 Paint getOutlinePaint(int index, int series)
          Gets the outline paint of the specified series.
 Stroke getOutlineStroke(int index, int series)
          Gets the outline stroke of the specified series.
 Paint getPaint(int index, int series)
          Gets the paint of the specified series.
 Paint getPanelPaint()
          Gets the panel paint.
 ChartAxis getRowAxis(int index)
          Gets the indexed row axis.
 ChartLayout.Position getRowAxisPosition(int index)
          Gets the position of the indexed row axis.
 Stroke getStroke(int index, int series)
          Gets the stroke of the specified series.
 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 isOutlinesVisible()
          Checks whether outlines are visible.
 boolean isOutlinesVisible(int index)
          Checks whether otulines are visible for the specified dataset.
 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, ChartLayout.Position 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 setLabelNumberFormat(NumberFormat format)
          Sets the label number format.
 void setLabelPercentFormat(NumberFormat format)
          Sets the label percent format.
 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 setOutlinePaint(int index, int series, Paint paint)
          Sets the outline paint of the specified series.
 void setOutlinePaint(int index, Paint paint)
          Sets the outline paint for the specified dataset.
 void setOutlinePaint(Paint paint)
          Sets the outline paint.
 void setOutlineStroke(int index, int series, Stroke stroke)
          Sets the outline stroke of the specified series.
 void setOutlineStroke(int index, Stroke stroke)
          Sets the outline stroke for the specified dataset.
 void setOutlineStroke(Stroke stroke)
          Sets the outline stroke.
 void setOutlinesVisible(boolean v)
          Sets whether outlines are visible.
 void setOutlinesVisible(int index, boolean v)
          Sets whether outlines are visible for the specified dataset.
 void setPaint(int index, int series, Paint paint)
          Sets the paint of the specified series.
 void setPaint(int index, Paint paint)
          Sets the paint for the specified dataset.
 void setPaint(Paint paint)
          Sets the paint.
 void setPanelPaint(Paint paint)
          Sets the panel paint.
 void setRowAxis(int index, ChartAxis axis)
          Sets the indexed row axis.
 void setRowAxisPosition(int index, ChartLayout.Position 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 setStroke(int index, int series, Stroke stroke)
          Sets the stroke of the specified series.
 void setStroke(int index, Stroke stroke)
          Sets the stroke for the specified dataset.
 void setStroke(Stroke stroke)
          Sets the stroke.
 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, ChartLayout.Location pos, ChartLayout.HAlignment ho, ChartLayout.VAlignment vo)
          Sets the title with attributes.
 void setWidth(int w)
          Sets the width.
 

Method Detail

getChart

Object getChart()
Gets the implementation specific chart adaptee.

Returns:
the adaptee.

getChartType

ChartLayout.ChartType getChartType()
Gets the type of the chart.

Returns:
the chart type or null.

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,
              ChartLayout.Location pos,
              ChartLayout.HAlignment ho,
              ChartLayout.VAlignment vo)
Sets the title with attributes.

Parameters:
title - the title.
paint - the paint (may be null).
style - the style (Font style).
pos - the position.
ho - the horizontal alignment.
vo - the vertical orientation.

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,
              ChartLayout.Location pos,
              ChartLayout.HAlignment ho,
              ChartLayout.VAlignment vo)
Adds a label with attributes.

Parameters:
label - the label.
paint - the paint.
style - the style (Font style).
pos - the position.
ho - the horizontal orientation.
vo - the vertical orientation.

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

ChartLayout.Position 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,
                        ChartLayout.Position 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

ChartLayout.Position 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,
                           ChartLayout.Position 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.

getLabelNumberFormat

NumberFormat getLabelNumberFormat()
Gets the label number format.

Returns:
the format for number labels.

setLabelNumberFormat

void setLabelNumberFormat(NumberFormat format)
Sets the label number format.

Parameters:
format - the format for number labels.

getLabelPercentFormat

NumberFormat getLabelPercentFormat()
Gets the label percent format.

Returns:
the format for percent labels.

setLabelPercentFormat

void setLabelPercentFormat(NumberFormat format)
Sets the label percent format.

Parameters:
format - the format for percent labels.

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.

isOutlinesVisible

boolean isOutlinesVisible()
Checks whether outlines are visible.

Returns:
the visibility of outlines.

setOutlinesVisible

void setOutlinesVisible(boolean v)
Sets whether outlines are visible.

Parameters:
v - the visibility of ooutlines.

isOutlinesVisible

boolean isOutlinesVisible(int index)
Checks whether otulines are visible for the specified dataset.

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

setOutlinesVisible

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

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

setPaint

void setPaint(Paint paint)
Sets the paint.

Parameters:
paint - the paint.

setPaint

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

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

getPaint

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

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

setPaint

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

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

setStroke

void setStroke(Stroke stroke)
Sets the stroke.

Parameters:
stroke - the stroke.

setStroke

void setStroke(int index,
               Stroke stroke)
Sets the stroke for the specified dataset.

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

getStroke

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

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

setStroke

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

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

setOutlinePaint

void setOutlinePaint(Paint paint)
Sets the outline paint.

Parameters:
paint - the paint.

setOutlinePaint

void setOutlinePaint(int index,
                     Paint paint)
Sets the outline paint for the specified dataset.

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

getOutlinePaint

Paint getOutlinePaint(int index,
                      int series)
Gets the outline paint of the specified series.

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

setOutlinePaint

void setOutlinePaint(int index,
                     int series,
                     Paint paint)
Sets the outline paint of the specified series.

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

setOutlineStroke

void setOutlineStroke(Stroke stroke)
Sets the outline stroke.

Parameters:
stroke - the stroke.

setOutlineStroke

void setOutlineStroke(int index,
                      Stroke stroke)
Sets the outline stroke for the specified dataset.

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

getOutlineStroke

Stroke getOutlineStroke(int index,
                        int series)
Gets the outline stroke of the specified series.

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

setOutlineStroke

void setOutlineStroke(int index,
                      int series,
                      Stroke stroke)
Sets the outline stroke of the specified series.

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


Copyright © 2004 The Norther Organization. All rights reserved.