|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ujac.chart.BaseChart
public abstract class BaseChart
Name: BaseChart
Description: Base Chart implementation.
Field Summary | |
---|---|
protected ChartAttributes |
attributes
The chart attributes. |
static float |
DEFAULT_BORDER_WIDTH
The default border width. |
static Color |
DEFAULT_DESCRIPTION_COLOR
The default description color. |
static Font |
DEFAULT_DESCRIPTION_FONT
The default description font. |
static float |
DEFAULT_DESCRIPTION_LINE_WIDTH
The default description line width. |
static String |
DEFAULT_DESCRIPTION_PATTERN
The default description pattern. |
static float |
DEFAULT_PADDING
The default padding. |
static Color |
DEFAULT_SHADOW_COLOR
The default grid color. |
static float |
DEFAULT_SHADOW_OFFSET
The default shadow offset. |
static Font |
DEFAULT_TITLE_FONT
The default title font. |
NumberFormat |
defaultPercentFormat
The default percent format. |
NumberFormat |
defaultValueFormat
The default value format. |
protected ChartModel |
model
The chart model. |
Constructor Summary | |
---|---|
BaseChart()
|
Method Summary | |
---|---|
protected void |
addAttributeDefinition(List attributeDefinitions,
String name,
int type,
boolean list,
boolean optional)
Adds an attribute definition to the list of supported attributes for the chart. |
Rectangle2D |
draw(Rectangle2D viewport,
Graphics2D graphics)
Draws the chart to the given chart output. |
protected void |
fillSupportedAttributes(List attrDefs)
Fills the list of supported attributes for the chart. |
String[] |
getAreaLabels()
Gets the area labels. |
ChartAttributes |
getAttributes()
Gets the chart attributes. |
Color |
getBackgroundColor()
Gets the background color. |
float |
getBorderWidth()
Gets the border width. |
float |
getBottomPadding()
Gets the top padding. |
Color |
getDescriptionColor()
Gets the description line color. |
Font |
getDescriptionFont()
Gets the description font. |
float |
getDescriptionLineWidth()
Gets the description line width. |
String |
getDescriptionPattern()
Gets the description pattern. |
float |
getLeftPadding()
Gets the left padding. |
protected double |
getMaxValue()
Gets the maximum value from the chart data. |
protected double |
getMinValue()
Gets the minimum value from the chart data. |
ChartModel |
getModel()
Gets the chart model. |
NumberFormat |
getPercentFormat()
Gets the number format for percent output. |
float |
getRightPadding()
Gets the right padding. |
String[] |
getSegmentLabels()
Gets the segment labels. |
Color |
getShadowColor()
Computes the fill color for value area. |
float |
getShadowLength()
Gets the shadow length. |
List |
getSupportedAttributes()
Gets a list of supported attributes for the chart. |
Font |
getTitleFont()
Gets the title font. |
float |
getTopPadding()
Gets the top padding. |
NumberFormat |
getValueFormat()
Gets the number format for value output. |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final float DEFAULT_BORDER_WIDTH
public static final float DEFAULT_PADDING
public static final Font DEFAULT_TITLE_FONT
public static final float DEFAULT_DESCRIPTION_LINE_WIDTH
public static final Color DEFAULT_DESCRIPTION_COLOR
public static final String DEFAULT_DESCRIPTION_PATTERN
public static final Color DEFAULT_SHADOW_COLOR
public static final float DEFAULT_SHADOW_OFFSET
public static final Font DEFAULT_DESCRIPTION_FONT
public transient NumberFormat defaultValueFormat
public transient NumberFormat defaultPercentFormat
protected ChartModel model
protected ChartAttributes attributes
Constructor Detail |
---|
public BaseChart()
Method Detail |
---|
public List getSupportedAttributes()
getSupportedAttributes
in interface Chart
protected void addAttributeDefinition(List attributeDefinitions, String name, int type, boolean list, boolean optional)
attributeDefinitions
- The list of supported attributes for the chart to fill.name
- The name of the attribute definition.type
- The attribute type.list
- The list flag.optional
- The optional flag.protected void fillSupportedAttributes(List attrDefs)
attrDefs
- The list of supported attributes for the chart to fill.public ChartAttributes getAttributes()
getAttributes
in interface Chart
public void setAttributes(ChartAttributes attributes)
setAttributes
in interface Chart
attributes
- The chart attributes to set.public Color getBackgroundColor()
public float getBorderWidth()
public float getDescriptionLineWidth()
public Color getDescriptionColor()
public String getDescriptionPattern()
public Color getShadowColor()
public float getShadowLength()
public NumberFormat getValueFormat()
public NumberFormat getPercentFormat()
public float getLeftPadding()
public float getRightPadding()
public float getTopPadding()
public float getBottomPadding()
public Font getTitleFont()
public Font getDescriptionFont()
public String[] getSegmentLabels()
public String[] getAreaLabels()
public ChartModel getModel()
getModel
in interface Chart
public void setModel(ChartModel model) throws ChartException
setModel
in interface Chart
model
- The chart model to set.
ChartException
- In case the model contained invalid data for the chart.public boolean supportsNegativeValues()
supportsNegativeValues
in interface Chart
protected double getMinValue()
protected double getMaxValue()
public Rectangle2D draw(Rectangle2D viewport, Graphics2D graphics) throws ChartException
draw
in interface Chart
viewport
- The viewport for chart output.graphics
- The graphics object used for chart output.
ChartException
- In case the rendering failed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |