public class DefaultRenderer
- Object
- DefaultRenderer
Known subtypesDialRenderer, XYMultipleSeriesRenderer
Fields
public static final int NO_COLOR = 0 | A no color constant. |
public static final int BACKGROUND_COLOR = 0 | The default background color. |
public static final int TEXT_COLOR = 15395562 | The default color for text. |
Constructors
public DefaultRenderer() |
Methods
public String getChartTitle() | Returns the chart title. |
public void setChartTitle(String title) | Sets the chart title. |
public float getChartTitleTextSize() | Returns the chart title text size. |
public void setChartTitleTextSize(float textSize) | Sets the chart title text size in pixels. |
public void setChartTitleTextFont(Font font) | Sets the chart title font size using a Font object instead of a point size. |
public void addSeriesRenderer(SimpleSeriesRenderer renderer) | Adds a simple renderer to the multiple renderer. |
public void addSeriesRenderer(int index, SimpleSeriesRenderer renderer) | Adds a simple renderer to the multiple renderer. |
public void removeSeriesRenderer(SimpleSeriesRenderer renderer) | Removes a simple renderer from the multiple renderer. |
public void removeAllRenderers() | Removes all renderers from the multiple renderer. |
public SimpleSeriesRenderer getSeriesRendererAt(int index) | Returns the simple renderer from the multiple renderer list. |
public int getSeriesRendererCount() | Returns the simple renderers count in the multiple renderer list. |
public SimpleSeriesRenderer[] getSeriesRenderers() | Returns an array of the simple renderers in the multiple renderer list. |
public int getBackgroundColor() | Returns the background color. |
public void setBackgroundColor(int color) | Sets the background color. |
public boolean isApplyBackgroundColor() | Returns if the background color should be applied. |
public void setApplyBackgroundColor(boolean apply) | Sets if the background color should be applied. |
public int getAxesColor() | Returns the axes color. |
public void setAxesColor(int color) | Sets the axes color. |
public int getYAxisColor() | Returns the color of the Y axis |
public void setYAxisColor(int color) | Sets the Y axis color. |
public int getXAxisColor() | Returns the color of the X axis |
public void setXAxisColor(int color) | Sets the X axis color. |
public int getLabelsColor() | Returns the labels color. |
public void setLabelsColor(int color) | Sets the labels color. |
public float getLabelsTextSize() | Returns the labels text size. |
public void setLabelsTextSize(float textSize) | Sets the labels text size. |
public void setLabelsTextFont(Font font) | Sets the label title font size using a Font object instead of a point size. |
public boolean isShowAxes() | Returns if the axes should be visible. |
public void setShowAxes(boolean showAxes) | Sets if the axes should be visible. |
public boolean isShowLabels() | Returns if the labels should be visible. |
public void setShowLabels(boolean showLabels) | Sets if the labels should be visible. |
public boolean isShowTickMarks() | Returns if the tick marks should be visible. |
public void setShowTickMarks(boolean mShowTickMarks) | Sets if the tick marks should be visible. |
public boolean isShowGridX() | Returns if the X axis grid should be visible. |
public void setShowGridX(boolean showGrid) | Sets if the X axis grid should be visible. |
public boolean isShowGridY() | Returns if the Y axis grid should be visible. |
public void setShowGridY(boolean showGrid) | Sets if the Y axis grid should be visible. |
public void setShowGrid(boolean showGrid) | Sets if the grid should be visible. |
public boolean isShowCustomTextGridX() | Returns if the X axis custom text grid should be visible. |
public void setShowCustomTextGridX(boolean showGrid) | Sets if the X axis custom text grid should be visible. |
public boolean isShowCustomTextGridY() | Returns if the Y axis custom text grid should be visible. |
public void setShowCustomTextGridY(boolean showGrid) | Sets if the Y axis custom text grid should be visible. |
public void setShowCustomTextGrid(boolean showGrid) | Sets if the grid for custom X or Y labels should be visible. |
public boolean isShowLegend() | Returns if the legend should be visible. |
public void setShowLegend(boolean showLegend) | Sets if the legend should be visible. |
public boolean isFitLegend() | Returns if the legend should size to fit. |
public void setFitLegend(boolean fit) | Sets if the legend should size to fit. |
public int getTextTypefaceName() | Returns the text typeface name. |
public int getTextTypefaceStyle() | Returns the text typeface style. |
public Font getTextTypeface() | Returns the text typeface. |
public void setTextTypeface(Font typeface) | Sets the text typeface. |
public float getLegendTextSize() | Returns the legend text size. |
public void setLegendTextSize(float textSize) | Sets the legend text size. |
public void setLegendTextFont(Font font) | Sets the legend text font size using a Font object instead of a point size. |
public void setTextTypeface(int typefaceName, int style) | Sets the text typeface name and style. |
public boolean isAntialiasing() | Returns the antialiasing flag value. |
public void setAntialiasing(boolean antialiasing) | Sets the antialiasing value. |
public float getScale() | Returns the value to be used for scaling the chart. |
public void setScale(float scale) | Sets the value to be used for scaling the chart. |
public float getOriginalScale() | Returns the original value to be used for scaling the chart. |
public boolean isZoomEnabled() | Returns the enabled state of the zoom. |
public void setZoomEnabled(boolean enabled) | Sets the enabled state of the zoom. |
public boolean isZoomButtonsVisible() | Returns the visible state of the zoom buttons. |
public void setZoomButtonsVisible(boolean visible) | Sets the visible state of the zoom buttons. |
public boolean isExternalZoomEnabled() | Returns the enabled state of the external (application implemented) zoom. |
public void setExternalZoomEnabled(boolean enabled) | Sets the enabled state of the external (application implemented) zoom. |
public float getZoomRate() | Returns the zoom rate. |
public void setZoomRate(float rate) | Sets the zoom rate. |
public boolean isPanEnabled() | Returns the enabled state of the pan. |
public void setPanEnabled(boolean enabled) | Sets the enabled state of the pan. |
public boolean isClickEnabled() | Returns the enabled state of the click. |
public void setClickEnabled(boolean enabled) | Sets the enabled state of the click. |
public int getSelectableBuffer() | Returns the selectable radius value around clickable points. |
public void setSelectableBuffer(int buffer) | Sets the selectable radius value around clickable points. |
public int getLegendHeight() | Returns the legend height. |
public void setLegendHeight(int height) | Sets the legend height, in pixels. |
public int[] getMargins() | Returns the margin sizes. |
public void setMargins(int[] margins) | Sets the margins, in pixels. |
public boolean isInScroll() | Returns if the chart is inside a scroll view and doesn’t need to shrink. |
public 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. |
public float getStartAngle() | Returns the start angle for circular charts such as pie, doughnut. |
public void setStartAngle(float startAngle) | Sets the start angle for circular charts such as pie, doughnut, etc. An angle of 0 degrees correspond to the geometric angle of 0 degrees (3 o’clock on a watch.) |
public boolean isDisplayValues() | Returns if the values should be displayed as text. |
public void setDisplayValues(boolean display) | Sets if the values should be displayed as text (supported by pie chart). |
Inherited methods
Field details
NO_COLOR
public static final int NO_COLOR = 0BACKGROUND_COLOR
public static final int BACKGROUND_COLOR = 0TEXT_COLOR
public static final int TEXT_COLOR = 15395562Constructor details
DefaultRenderer
public DefaultRenderer()Method details
getChartTitle
public String getChartTitle()Returns
setChartTitle
public void setChartTitle(String title)Parameters
titleString- the chart title
getChartTitleTextSize
public float getChartTitleTextSize()Returns
setChartTitleTextSize
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.Parameters
textSizefloat- the chart title text size
setChartTitleTextFont
public void setChartTitleTextFont(Font font)Sets the chart title font size using a Font object instead of a point size. This method is the preferred way to set font size because it allows you to more easily have fonts appear in an appropriate size for the target device.
Alternatively check out #setChartTitleTextSize(float) to set the text
size in pixels.
addSeriesRenderer
public void addSeriesRenderer(SimpleSeriesRenderer renderer)Parameters
rendererSimpleSeriesRenderer- the renderer to be added
addSeriesRenderer
public void addSeriesRenderer(int index, SimpleSeriesRenderer renderer)Parameters
indexint- the index in the renderers list
rendererSimpleSeriesRenderer- the renderer to be added
removeSeriesRenderer
public void removeSeriesRenderer(SimpleSeriesRenderer renderer)Parameters
rendererSimpleSeriesRenderer- the renderer to be removed
removeAllRenderers
public void removeAllRenderers()getSeriesRendererAt
public SimpleSeriesRenderer getSeriesRendererAt(int index)Parameters
indexint- the index in the simple renderers list
Returns
getSeriesRendererCount
public int getSeriesRendererCount()Returns
getSeriesRenderers
public SimpleSeriesRenderer[] getSeriesRenderers()Returns
getBackgroundColor
public int getBackgroundColor()Returns
setBackgroundColor
public void setBackgroundColor(int color)Parameters
colorint- the background color
isApplyBackgroundColor
public boolean isApplyBackgroundColor()Returns
setApplyBackgroundColor
public void setApplyBackgroundColor(boolean apply)Parameters
applyboolean- the apply flag for the background color
getAxesColor
public int getAxesColor()Returns
setAxesColor
public void setAxesColor(int color)Parameters
colorint- the axes color
getYAxisColor
public int getYAxisColor()Returns
setYAxisColor
public void setYAxisColor(int color)Parameters
colorint- the Y axis color
getXAxisColor
public int getXAxisColor()Returns
setXAxisColor
public void setXAxisColor(int color)Parameters
colorint- the X axis color
getLabelsColor
public int getLabelsColor()Returns
setLabelsColor
public void setLabelsColor(int color)Parameters
colorint- the labels color
getLabelsTextSize
public float getLabelsTextSize()Returns
setLabelsTextSize
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.Parameters
textSizefloat- the labels text size
setLabelsTextFont
public void setLabelsTextFont(Font font)Sets the label title font size using a Font object instead of a point size. This method is the preferred way to set font size because it allows you to more easily have fonts appear in an appropriate size for the target device.
Alternatively check out #setLabelsTextSize(float) to set the text
size in pixels.
isShowAxes
public boolean isShowAxes()Returns
setShowAxes
public void setShowAxes(boolean showAxes)Parameters
showAxesboolean- the visibility flag for the axes
isShowLabels
public boolean isShowLabels()Returns
setShowLabels
public void setShowLabels(boolean showLabels)Parameters
showLabelsboolean- the visibility flag for the labels
isShowTickMarks
public boolean isShowTickMarks()setShowTickMarks
public void setShowTickMarks(boolean mShowTickMarks)isShowGridX
public boolean isShowGridX()Returns
setShowGridX
public void setShowGridX(boolean showGrid)Parameters
showGridboolean- the visibility flag for the X axis grid
isShowGridY
public boolean isShowGridY()Returns
setShowGridY
public void setShowGridY(boolean showGrid)Parameters
showGridboolean- the visibility flag for the Y axis grid
setShowGrid
public void setShowGrid(boolean showGrid)Parameters
showGridboolean- the visibility flag for the grid
isShowCustomTextGridX
public boolean isShowCustomTextGridX()Returns
setShowCustomTextGridX
public void setShowCustomTextGridX(boolean showGrid)Parameters
showGridboolean- the visibility flag for the X axis custom text grid
isShowCustomTextGridY
public boolean isShowCustomTextGridY()Returns
setShowCustomTextGridY
public void setShowCustomTextGridY(boolean showGrid)Parameters
showGridboolean- the visibility flag for the Y axis custom text grid
setShowCustomTextGrid
public void setShowCustomTextGrid(boolean showGrid)Parameters
showGridboolean- the visibility flag for the custom text grid
isShowLegend
public boolean isShowLegend()Returns
setShowLegend
public void setShowLegend(boolean showLegend)Parameters
showLegendboolean- the visibility flag for the legend
isFitLegend
public boolean isFitLegend()Returns
setFitLegend
public void setFitLegend(boolean fit)Parameters
fitboolean- the fit behavior
getTextTypefaceName
public int getTextTypefaceName()Returns
getTextTypefaceStyle
public int getTextTypefaceStyle()Returns
getTextTypeface
public Font getTextTypeface()Returns
setTextTypeface
public void setTextTypeface(Font typeface)Parameters
typefaceFont- the typeface
getLegendTextSize
public float getLegendTextSize()Returns
setLegendTextSize
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.Parameters
textSizefloat- the legend text size
setLegendTextFont
public void setLegendTextFont(Font font)Sets the legend text font size using a Font object instead of a point size. This method is the preferred way to set font size because it allows you to more easily have fonts appear in an appropriate size for the target device.
Alternatively check out #setLegendTextSize(float) to set the text
size in pixels.
setTextTypeface
public void setTextTypeface(int typefaceName, int style)Parameters
typefaceNameint- the text typeface name
styleint- the text typeface style
isAntialiasing
public boolean isAntialiasing()Returns
setAntialiasing
public void setAntialiasing(boolean antialiasing)Parameters
antialiasingboolean- the antialiasing
getScale
public float getScale()Returns
setScale
public void setScale(float scale)Parameters
scalefloat- the scale value
getOriginalScale
public float getOriginalScale()Returns
isZoomEnabled
public boolean isZoomEnabled()Returns
setZoomEnabled
public void setZoomEnabled(boolean enabled)Parameters
enabledboolean- zoom enabled
isZoomButtonsVisible
public boolean isZoomButtonsVisible()Returns
setZoomButtonsVisible
public void setZoomButtonsVisible(boolean visible)Parameters
visibleboolean- if the zoom buttons are visible
isExternalZoomEnabled
public boolean isExternalZoomEnabled()Returns
setExternalZoomEnabled
public void setExternalZoomEnabled(boolean enabled)Parameters
enabledboolean- external zoom enabled
getZoomRate
public float getZoomRate()Returns
setZoomRate
public void setZoomRate(float rate)Parameters
ratefloat- the zoom rate
isPanEnabled
public boolean isPanEnabled()Returns
setPanEnabled
public void setPanEnabled(boolean enabled)Parameters
enabledboolean- pan enabled
isClickEnabled
public boolean isClickEnabled()Returns
setClickEnabled
public void setClickEnabled(boolean enabled)Parameters
enabledboolean- click enabled
getSelectableBuffer
public int getSelectableBuffer()Returns
setSelectableBuffer
public void setSelectableBuffer(int buffer)Parameters
bufferint- the selectable radius
getLegendHeight
public int getLegendHeight()Returns
setLegendHeight
public void setLegendHeight(int height)Parameters
heightint- the legend height
getMargins
public int[] getMargins()Returns
setMargins
public void setMargins(int[] margins)Parameters
marginsint[]- an array containing the margin size values, in this order: top, left, bottom, right
isInScroll
public boolean isInScroll()Returns
setInScroll
public void setInScroll(boolean inScroll)Parameters
inScrollboolean- if it is inside a scroll view
getStartAngle
public float getStartAngle()Returns
setStartAngle
public void setStartAngle(float startAngle)Parameters
startAnglefloat- the start angle in degrees
isDisplayValues
public boolean isDisplayValues()Returns
setDisplayValues
public void setDisplayValues(boolean display)Parameters
displayboolean- if the values should be displayed as text