public class DefaultRenderer extends Object
Modifier and Type | Field and Description |
---|---|
static int |
BACKGROUND_COLOR
The default background color.
|
static int |
NO_COLOR
A no color constant.
|
static int |
TEXT_COLOR
The default color for text.
|
Constructor and Description |
---|
DefaultRenderer() |
Modifier and Type | Method and Description |
---|---|
void |
addSeriesRenderer(int index,
SimpleSeriesRenderer renderer)
Adds a simple renderer to the multiple renderer.
|
void |
addSeriesRenderer(SimpleSeriesRenderer renderer)
Adds a simple renderer to the multiple renderer.
|
int |
getAxesColor()
Returns the axes color.
|
int |
getBackgroundColor()
Returns the background color.
|
String |
getChartTitle()
Returns the chart title.
|
float |
getChartTitleTextSize()
Returns the chart title text size.
|
int |
getLabelsColor()
Returns the labels color.
|
float |
getLabelsTextSize()
Returns the labels text size.
|
int |
getLegendHeight()
Returns the legend height.
|
float |
getLegendTextSize()
Returns the legend text size.
|
int[] |
getMargins()
Returns the margin sizes.
|
float |
getOriginalScale()
Returns the original value to be used for scaling the chart.
|
float |
getScale()
Returns the value to be used for scaling the chart.
|
int |
getSelectableBuffer()
Returns the selectable radius value around clickable points.
|
SimpleSeriesRenderer |
getSeriesRendererAt(int index)
Returns the simple renderer from the multiple renderer list.
|
int |
getSeriesRendererCount()
Returns the simple renderers count in the multiple renderer list.
|
SimpleSeriesRenderer[] |
getSeriesRenderers()
Returns an array of the simple renderers in the multiple renderer list.
|
float |
getStartAngle()
Returns the start angle for circular charts such as pie, doughnut.
|
Font |
getTextTypeface()
Returns the text typeface.
|
int |
getTextTypefaceName()
Returns the text typeface name.
|
int |
getTextTypefaceStyle()
Returns the text typeface style.
|
int |
getXAxisColor()
Returns the color of the X axis
|
int |
getYAxisColor()
Returns the color of the Y axis
|
float |
getZoomRate()
Deprecated.
|
boolean |
isAntialiasing()
Returns the antialiasing flag value.
|
boolean |
isApplyBackgroundColor()
Returns if the background color should be applied.
|
boolean |
isClickEnabled()
Deprecated.
|
boolean |
isDisplayValues()
Returns if the values should be displayed as text.
|
boolean |
isExternalZoomEnabled()
Deprecated.
|
boolean |
isFitLegend()
Returns if the legend should size to fit.
|
boolean |
isInScroll()
Returns if the chart is inside a scroll view and doesn't need to shrink.
|
boolean |
isPanEnabled()
Deprecated.
|
boolean |
isShowAxes()
Returns if the axes should be visible.
|
boolean |
isShowCustomTextGridX()
Returns if the X axis custom text grid should be visible.
|
boolean |
isShowCustomTextGridY()
Returns if the Y axis custom text grid should be visible.
|
boolean |
isShowGridX()
Returns if the X axis grid should be visible.
|
boolean |
isShowGridY()
Returns if the Y axis grid should be visible.
|
boolean |
isShowLabels()
Returns if the labels should be visible.
|
boolean |
isShowLegend()
Returns if the legend should be visible.
|
boolean |
isShowTickMarks()
Returns if the tick marks should be visible.
|
boolean |
isZoomButtonsVisible()
Deprecated.
|
boolean |
isZoomEnabled()
Deprecated.
|
void |
removeAllRenderers()
Removes all renderers from the multiple renderer.
|
void |
removeSeriesRenderer(SimpleSeriesRenderer renderer)
Removes a simple renderer from the multiple renderer.
|
void |
setAntialiasing(boolean antialiasing)
Sets the antialiasing value.
|
void |
setApplyBackgroundColor(boolean apply)
Sets if the background color should be applied.
|
void |
setAxesColor(int color)
Sets the axes color.
|
void |
setBackgroundColor(int color)
Sets the background color.
|
void |
setChartTitle(String title)
Sets the chart title.
|
void |
setChartTitleTextFont(Font font)
Sets the chart title font size using a Font object instead of a point size.
|
void |
setChartTitleTextSize(float textSize)
Sets the chart title text size in pixels.
|
void |
setClickEnabled(boolean enabled)
Deprecated.
|
void |
setDisplayValues(boolean display)
Sets if the values should be displayed as text (supported by pie chart).
|
void |
setExternalZoomEnabled(boolean enabled)
Deprecated.
|
void |
setFitLegend(boolean fit)
Sets if the legend should size to fit.
|
void |
setInScroll(boolean inScroll)
To be set if the chart is inside a scroll view and doesn't need to shrink
when not enough space.
|
void |
setLabelsColor(int color)
Sets the labels color.
|
void |
setLabelsTextFont(Font font)
Sets the label title font size using a Font object instead of a point size.
|
void |
setLabelsTextSize(float textSize)
Sets the labels text size.
|
void |
setLegendHeight(int height)
Sets the legend height, in pixels.
|
void |
setLegendTextFont(Font font)
Sets the legend text font size using a Font object instead of a point size.
|
void |
setLegendTextSize(float textSize)
Sets the legend text size.
|
void |
setMargins(int[] margins)
Sets the margins, in pixels.
|
void |
setPanEnabled(boolean enabled)
Deprecated.
|
void |
setScale(float scale)
Sets the value to be used for scaling the chart.
|
void |
setSelectableBuffer(int buffer)
Sets the selectable radius value around clickable points.
|
void |
setShowAxes(boolean showAxes)
Sets if the axes should be visible.
|
void |
setShowCustomTextGrid(boolean showGrid)
Sets if the grid for custom X or Y labels should be visible.
|
void |
setShowCustomTextGridX(boolean showGrid)
Sets if the X axis custom text grid should be visible.
|
void |
setShowCustomTextGridY(boolean showGrid)
Sets if the Y axis custom text grid should be visible.
|
void |
setShowGrid(boolean showGrid)
Sets if the grid should be visible.
|
void |
setShowGridX(boolean showGrid)
Sets if the X axis grid should be visible.
|
void |
setShowGridY(boolean showGrid)
Sets if the Y axis grid should be visible.
|
void |
setShowLabels(boolean showLabels)
Sets if the labels should be visible.
|
void |
setShowLegend(boolean showLegend)
Sets if the legend should be visible.
|
void |
setShowTickMarks(boolean mShowTickMarks)
Sets if the tick marks should be visible.
|
void |
setStartAngle(float startAngle)
Sets the start angle for circular charts such as pie, doughnut, etc.
|
void |
setTextTypeface(Font typeface)
Sets the text typeface.
|
void |
setTextTypeface(int typefaceName,
int style)
Sets the text typeface name and style.
|
void |
setXAxisColor(int color)
Sets the X axis color.
|
void |
setYAxisColor(int color)
Sets the Y axis color.
|
void |
setZoomButtonsVisible(boolean visible)
Deprecated.
|
void |
setZoomEnabled(boolean enabled)
Deprecated.
|
void |
setZoomRate(float rate)
Deprecated.
|
public static final int NO_COLOR
public static final int BACKGROUND_COLOR
public static final int TEXT_COLOR
public String getChartTitle()
public void setChartTitle(String title)
title
- the chart titlepublic float getChartTitleTextSize()
public void setChartTitleTextSize(float textSize)
setChartTitleTextFont(com.codename1.ui.Font)
instead of this method to allow the text to be sized appropriately for the
device resolution.textSize
- the chart title text sizepublic void setChartTitleTextFont(Font font)
setChartTitleTextSize(float)
to set the text
size in pixels.font
- public void addSeriesRenderer(SimpleSeriesRenderer renderer)
renderer
- the renderer to be addedpublic void addSeriesRenderer(int index, SimpleSeriesRenderer renderer)
index
- the index in the renderers listrenderer
- the renderer to be addedpublic void removeSeriesRenderer(SimpleSeriesRenderer renderer)
renderer
- the renderer to be removedpublic void removeAllRenderers()
public SimpleSeriesRenderer getSeriesRendererAt(int index)
index
- the index in the simple renderers listpublic int getSeriesRendererCount()
public SimpleSeriesRenderer[] getSeriesRenderers()
public int getBackgroundColor()
public void setBackgroundColor(int color)
color
- the background colorpublic boolean isApplyBackgroundColor()
public void setApplyBackgroundColor(boolean apply)
apply
- the apply flag for the background colorpublic int getAxesColor()
public void setAxesColor(int color)
color
- the axes colorpublic int getYAxisColor()
public void setYAxisColor(int color)
color
- the Y axis colorpublic int getXAxisColor()
public void setXAxisColor(int color)
color
- the X axis colorpublic int getLabelsColor()
public void setLabelsColor(int color)
color
- the labels colorpublic float getLabelsTextSize()
public void setLabelsTextSize(float textSize)
setLabelsTextFont(com.codename1.ui.Font)
instead to allow the font size to to be adjusted appropriately for the display
resolution.textSize
- the labels text sizepublic void setLabelsTextFont(Font font)
setLabelsTextSize(float)
to set the text
size in pixels.font
- public boolean isShowAxes()
public void setShowAxes(boolean showAxes)
showAxes
- the visibility flag for the axespublic boolean isShowLabels()
public void setShowLabels(boolean showLabels)
showLabels
- the visibility flag for the labelspublic boolean isShowTickMarks()
public void setShowTickMarks(boolean mShowTickMarks)
showTickMarks
- the visibility flag for the tick markspublic boolean isShowGridX()
public boolean isShowGridY()
public void setShowGridX(boolean showGrid)
showGrid
- the visibility flag for the X axis gridpublic void setShowGridY(boolean showGrid)
showGrid
- the visibility flag for the Y axis gridpublic void setShowGrid(boolean showGrid)
showGrid
- the visibility flag for the gridpublic boolean isShowCustomTextGridX()
public boolean isShowCustomTextGridY()
public void setShowCustomTextGridX(boolean showGrid)
showGrid
- the visibility flag for the X axis custom text gridpublic void setShowCustomTextGridY(boolean showGrid)
showGrid
- the visibility flag for the Y axis custom text gridpublic void setShowCustomTextGrid(boolean showGrid)
showGrid
- the visibility flag for the custom text gridpublic boolean isShowLegend()
public void setShowLegend(boolean showLegend)
showLegend
- the visibility flag for the legendpublic boolean isFitLegend()
public void setFitLegend(boolean fit)
fit
- the fit behaviorpublic int getTextTypefaceName()
public int getTextTypefaceStyle()
public Font getTextTypeface()
public float getLegendTextSize()
public void setLegendTextSize(float textSize)
setLegendTextFont(com.codename1.ui.Font)
instead to allow the font size to to be adjusted appropriately for the display
resolution.textSize
- the legend text sizepublic void setLegendTextFont(Font font)
setLegendTextSize(float)
to set the text
size in pixels.font
- public void setTextTypeface(int typefaceName, int style)
typefaceName
- the text typeface namestyle
- the text typeface stylepublic void setTextTypeface(Font typeface)
typeface
- the typefacepublic boolean isAntialiasing()
public void setAntialiasing(boolean antialiasing)
antialiasing
- the antialiasingpublic float getScale()
public float getOriginalScale()
public void setScale(float scale)
scale
- the scale valuepublic boolean isZoomEnabled()
public void setZoomEnabled(boolean enabled)
enabled
- zoom enabledpublic boolean isZoomButtonsVisible()
public void setZoomButtonsVisible(boolean visible)
visible
- if the zoom buttons are visiblepublic boolean isExternalZoomEnabled()
public void setExternalZoomEnabled(boolean enabled)
enabled
- external zoom enabledpublic float getZoomRate()
public boolean isPanEnabled()
public void setPanEnabled(boolean enabled)
enabled
- pan enabledpublic void setZoomRate(float rate)
rate
- the zoom ratepublic boolean isClickEnabled()
public void setClickEnabled(boolean enabled)
enabled
- click enabledpublic int getSelectableBuffer()
public void setSelectableBuffer(int buffer)
buffer
- the selectable radiuspublic int getLegendHeight()
public void setLegendHeight(int height)
height
- the legend heightpublic int[] getMargins()
public void setMargins(int[] margins)
margins
- an array containing the margin size values, in this order:
top, left, bottom, rightpublic boolean isInScroll()
public void setInScroll(boolean inScroll)
inScroll
- if it is inside a scroll viewpublic float getStartAngle()
public void setStartAngle(float startAngle)
startAngle
- the start angle in degreespublic boolean isDisplayValues()
public void setDisplayValues(boolean display)
display
- if the values should be displayed as text