org.ujac.chart
Interface Chart

All Known Implementing Classes:
BarChart2D, Base2DScaleChart, Base2DStackedChart, BaseChart, BasePieChart, BasePieChart3D, DonutChart3D, LineChart2D, PieChart2D, PieChart3D, StackedAreaChart2D, StackedBarChart2D

public interface Chart

Name: Chart
Description: Base interface for all UJAC charts.

Author:
lauerc

Field Summary
static String ATTR_AREA_LABELS
          Deprecated. Use property ChartModel.areaLabels instead
static String ATTR_BACKGROUND_COLOR
          Constant for the attribute 'background-color'.
static String ATTR_BORDER_WIDTH
          Constant for the attribute 'border-width'.
static String ATTR_DESCRIPTION_COLOR
          Constant for the attribute 'description-color'.
static String ATTR_DESCRIPTION_FONT
          Constant for the attribute 'description-font'.
static String ATTR_DESCRIPTION_LINE_WIDTH
          Constant for the attribute 'description-line-width'.
static String ATTR_DESCRIPTION_PATTERN
          Constant for the attribute name 'description-pattern'.
static String ATTR_FILL_AREA
          Constant for the attribute 'fill-area', only supported for line chart.
static String ATTR_GRID_BACKGROUND_COLOR
          Constant for the attribute 'grid-bgcolor', only supported for 2D scale charts.
static String ATTR_GRID_COLOR
          Constant for the attribute 'grid-color', only supported for 2D scale charts.
static String ATTR_LINE_WIDTH
          Constant for the attribute 'line-width', only supported for 2D scale charts.
static String ATTR_PADDING
          Constant for the attribute 'padding'.
static String ATTR_PADDING_BOTTOM
          Constant for the attribute 'padding-bottom'.
static String ATTR_PADDING_LEFT
          Constant for the attribute 'padding-left'.
static String ATTR_PADDING_RIGHT
          Constant for the attribute 'padding-right'.
static String ATTR_PADDING_TOP
          Constant for the attribute 'padding-top'.
static String ATTR_PERCENT_FORMAT
          Constant for the attribute 'percent-format'.
static String ATTR_PIE_DESCRIPTION_ANCHOR_RATIO
          Constant for the attribute 'pie-description-anchor-ratio', only supported for pie charts.
static String ATTR_PIE_DESCRIPTION_BASELINE_RATIO
          Constant for the attribute 'pie-description-baseline-ratiot', only supported for pie charts.
static String ATTR_PIE_DESCRIPTION_LAYOUT
          Constant for the attribute 'pie-description-layout', only supported for pie charts.
static String ATTR_PIE_HEIGHT
          Constant for the attribute 'pie-height', only supported for 3D pie charts.
static String ATTR_SCALE_ARROWHEAD_LENGTH
          Constant for the attribute 'scale-arrowhead-length', only supported for 2D scale charts.
static String ATTR_SCALE_ARROWHEAD_STYLE
          Constant for the attribute 'scale-arrowhead-style', only supported for 2D scale charts.
static String ATTR_SCALE_ARROWHEAD_WIDTH
          Constant for the attribute 'scale-arrowhead-length', only supported for 2D scale charts.
static String ATTR_SCALE_MARK_LENGTH
          Constant for the attribute 'scale-mark-length', only supported for 2D scale charts.
static String ATTR_SCALE_VALUE_FORMAT
          Constant for the attribute 'scale-value-format'.
static String ATTR_SEGMENT_COLORS
          Constant for the attribute 'segment-colors'.
static String ATTR_SEGMENT_LABELS
          Deprecated. Use property ChartModel.segmentLabels instead
static String ATTR_SEGMENT_MARK_STYLE
          Constant for the attribute 'segment-mark-style', only supported for 2D scale charts.
static String ATTR_SEGMENT_SCALE_DESCRIPTION
          Constant for the attribute 'segment-scale-description'.
static String ATTR_SHADOW_COLOR
          Constant for the attribute 'shadow-color'.
static String ATTR_SHADOW_OFFSET
          Constant for the attribute 'shadow-offset'.
static String ATTR_TITLE_FONT
          Constant for the attribute 'title-font'.
static String ATTR_VALUE_FORMAT
          Constant for the attribute 'value-format'.
static String ATTR_VALUE_SCALE_DESCRIPTION
          Constant for the attribute 'value-scale-description'.
static String ATTR_VALUE_STEP_SIZE
          Constant for the attribute 'value-step-size', only supported for 2D scale charts.
static String ATTR_VIEW_GRID
          Constant for the attribute 'view-grid', only supported for 2D scale charts.
static String ATTR_VIEW_LEGEND
          Constant for the attribute 'view-legend', only supported for 2D scale charts.
static String ATTR_VIEW_SCALE_ARROWS
          Constant for the attribute 'view-scale-arrows', only supported for 2D scale charts.
 
Method Summary
 Rectangle2D draw(Rectangle2D viewport, Graphics2D graphics)
          Draws the chart to the given chart output.
 ChartAttributes getAttributes()
          Gets the chart attributes.
 ChartModel getModel()
          Gets the chart model.
 List getSupportedAttributes()
          Gets a list of supported attributes for the chart.
 void setAttributes(ChartAttributes attributes)
          Sets the chart attributes.
 void setModel(ChartModel model)
          Sets the chart model.
 boolean supportsNegativeValues()
          Tells, whether the chart supports negative values or not.
 

Field Detail

ATTR_BACKGROUND_COLOR

static final String ATTR_BACKGROUND_COLOR
Constant for the attribute 'background-color'.

See Also:
Constant Field Values

ATTR_BORDER_WIDTH

static final String ATTR_BORDER_WIDTH
Constant for the attribute 'border-width'.

See Also:
Constant Field Values

ATTR_TITLE_FONT

static final String ATTR_TITLE_FONT
Constant for the attribute 'title-font'.

See Also:
Constant Field Values

ATTR_AREA_LABELS

static final String ATTR_AREA_LABELS
Deprecated. Use property ChartModel.areaLabels instead
Constant for the attribute 'area-labels'.

See Also:
Constant Field Values

ATTR_SEGMENT_LABELS

static final String ATTR_SEGMENT_LABELS
Deprecated. Use property ChartModel.segmentLabels instead
Constant for the attribute 'segment-labels'.

See Also:
Constant Field Values

ATTR_DESCRIPTION_FONT

static final String ATTR_DESCRIPTION_FONT
Constant for the attribute 'description-font'.

See Also:
Constant Field Values

ATTR_DESCRIPTION_PATTERN

static final String ATTR_DESCRIPTION_PATTERN
Constant for the attribute name 'description-pattern'.

See Also:
Constant Field Values

ATTR_DESCRIPTION_LINE_WIDTH

static final String ATTR_DESCRIPTION_LINE_WIDTH
Constant for the attribute 'description-line-width'.

See Also:
Constant Field Values

ATTR_DESCRIPTION_COLOR

static final String ATTR_DESCRIPTION_COLOR
Constant for the attribute 'description-color'.

See Also:
Constant Field Values

ATTR_VALUE_FORMAT

static final String ATTR_VALUE_FORMAT
Constant for the attribute 'value-format'.

See Also:
Constant Field Values

ATTR_PERCENT_FORMAT

static final String ATTR_PERCENT_FORMAT
Constant for the attribute 'percent-format'.

See Also:
Constant Field Values

ATTR_SEGMENT_COLORS

static final String ATTR_SEGMENT_COLORS
Constant for the attribute 'segment-colors'.

See Also:
Constant Field Values

ATTR_PADDING

static final String ATTR_PADDING
Constant for the attribute 'padding'.

See Also:
Constant Field Values

ATTR_PADDING_LEFT

static final String ATTR_PADDING_LEFT
Constant for the attribute 'padding-left'.

See Also:
Constant Field Values

ATTR_PADDING_RIGHT

static final String ATTR_PADDING_RIGHT
Constant for the attribute 'padding-right'.

See Also:
Constant Field Values

ATTR_PADDING_TOP

static final String ATTR_PADDING_TOP
Constant for the attribute 'padding-top'.

See Also:
Constant Field Values

ATTR_PADDING_BOTTOM

static final String ATTR_PADDING_BOTTOM
Constant for the attribute 'padding-bottom'.

See Also:
Constant Field Values

ATTR_SHADOW_COLOR

static final String ATTR_SHADOW_COLOR
Constant for the attribute 'shadow-color'.

See Also:
Constant Field Values

ATTR_SHADOW_OFFSET

static final String ATTR_SHADOW_OFFSET
Constant for the attribute 'shadow-offset'.

See Also:
Constant Field Values

ATTR_PIE_HEIGHT

static final String ATTR_PIE_HEIGHT
Constant for the attribute 'pie-height', only supported for 3D pie charts.

See Also:
Constant Field Values

ATTR_PIE_DESCRIPTION_LAYOUT

static final String ATTR_PIE_DESCRIPTION_LAYOUT
Constant for the attribute 'pie-description-layout', only supported for pie charts. Possible values are: 'BORDER', 'ROUND'.

See Also:
Constant Field Values

ATTR_PIE_DESCRIPTION_ANCHOR_RATIO

static final String ATTR_PIE_DESCRIPTION_ANCHOR_RATIO
Constant for the attribute 'pie-description-anchor-ratio', only supported for pie charts.

See Also:
Constant Field Values

ATTR_PIE_DESCRIPTION_BASELINE_RATIO

static final String ATTR_PIE_DESCRIPTION_BASELINE_RATIO
Constant for the attribute 'pie-description-baseline-ratiot', only supported for pie charts.

See Also:
Constant Field Values

ATTR_LINE_WIDTH

static final String ATTR_LINE_WIDTH
Constant for the attribute 'line-width', only supported for 2D scale charts.

See Also:
Constant Field Values

ATTR_SCALE_MARK_LENGTH

static final String ATTR_SCALE_MARK_LENGTH
Constant for the attribute 'scale-mark-length', only supported for 2D scale charts.

See Also:
Constant Field Values

ATTR_VIEW_LEGEND

static final String ATTR_VIEW_LEGEND
Constant for the attribute 'view-legend', only supported for 2D scale charts.

See Also:
Constant Field Values

ATTR_VALUE_STEP_SIZE

static final String ATTR_VALUE_STEP_SIZE
Constant for the attribute 'value-step-size', only supported for 2D scale charts.

See Also:
Constant Field Values

ATTR_VIEW_SCALE_ARROWS

static final String ATTR_VIEW_SCALE_ARROWS
Constant for the attribute 'view-scale-arrows', only supported for 2D scale charts.

See Also:
Constant Field Values

ATTR_SCALE_ARROWHEAD_LENGTH

static final String ATTR_SCALE_ARROWHEAD_LENGTH
Constant for the attribute 'scale-arrowhead-length', only supported for 2D scale charts.

See Also:
Constant Field Values

ATTR_SCALE_ARROWHEAD_WIDTH

static final String ATTR_SCALE_ARROWHEAD_WIDTH
Constant for the attribute 'scale-arrowhead-length', only supported for 2D scale charts.

See Also:
Constant Field Values

ATTR_SCALE_ARROWHEAD_STYLE

static final String ATTR_SCALE_ARROWHEAD_STYLE
Constant for the attribute 'scale-arrowhead-style', only supported for 2D scale charts.

See Also:
Constant Field Values

ATTR_SCALE_VALUE_FORMAT

static final String ATTR_SCALE_VALUE_FORMAT
Constant for the attribute 'scale-value-format'.

See Also:
Constant Field Values

ATTR_SEGMENT_MARK_STYLE

static final String ATTR_SEGMENT_MARK_STYLE
Constant for the attribute 'segment-mark-style', only supported for 2D scale charts. Valid values are: 'border' and 'center'.

See Also:
Constant Field Values

ATTR_VIEW_GRID

static final String ATTR_VIEW_GRID
Constant for the attribute 'view-grid', only supported for 2D scale charts.

See Also:
Constant Field Values

ATTR_GRID_COLOR

static final String ATTR_GRID_COLOR
Constant for the attribute 'grid-color', only supported for 2D scale charts.

See Also:
Constant Field Values

ATTR_GRID_BACKGROUND_COLOR

static final String ATTR_GRID_BACKGROUND_COLOR
Constant for the attribute 'grid-bgcolor', only supported for 2D scale charts.

See Also:
Constant Field Values

ATTR_FILL_AREA

static final String ATTR_FILL_AREA
Constant for the attribute 'fill-area', only supported for line chart.

See Also:
Constant Field Values

ATTR_VALUE_SCALE_DESCRIPTION

static final String ATTR_VALUE_SCALE_DESCRIPTION
Constant for the attribute 'value-scale-description'.

See Also:
Constant Field Values

ATTR_SEGMENT_SCALE_DESCRIPTION

static final String ATTR_SEGMENT_SCALE_DESCRIPTION
Constant for the attribute 'segment-scale-description'.

See Also:
Constant Field Values
Method Detail

getModel

ChartModel getModel()
Gets the chart model.

Returns:
The chart model.

setModel

void setModel(ChartModel model)
              throws ChartException
Sets the chart model.

Parameters:
model - The chart model to set.
Throws:
ChartException - In case the model contained invalid data for the chart.

supportsNegativeValues

boolean supportsNegativeValues()
Tells, whether the chart supports negative values or not.

Returns:
true, in case the chart supports negative values else false.

getSupportedAttributes

List getSupportedAttributes()
Gets a list of supported attributes for the chart.

Returns:
The map of supported attributes for the chart.

getAttributes

ChartAttributes getAttributes()
Gets the chart attributes.

Returns:
The attribute set.

setAttributes

void setAttributes(ChartAttributes attributes)
Sets the chart attributes.

Parameters:
attributes - The chart attributes to set.

draw

Rectangle2D draw(Rectangle2D viewport,
                 Graphics2D graphics)
                 throws ChartException
Draws the chart to the given chart output.

Parameters:
viewport - The viewport for chart output.
graphics - The graphics object used for chart output.
Returns:
The effective drawing area for the chart.
Throws:
ChartException - In case the rendering failed.


Copyright © 2003-2004 UJAC.org. All Rights Reserved.