public class XYMultipleSeriesRenderer extends DefaultRenderer
| Modifier and Type | Class and Description |
|---|---|
static class |
XYMultipleSeriesRenderer.Orientation
An enum for the XY chart orientation of the X axis.
|
BACKGROUND_COLOR, NO_COLOR, TEXT_COLOR| Constructor and Description |
|---|
XYMultipleSeriesRenderer() |
XYMultipleSeriesRenderer(int scaleNumber) |
| Modifier and Type | Method and Description |
|---|---|
void |
addTextLabel(double x,
String text)
Deprecated.
use addXTextLabel instead
|
void |
addXTextLabel(double x,
String text)
Adds a new text label for the specified X axis value.
|
void |
addYTextLabel(double y,
String text)
Adds a new text label for the specified Y axis value.
|
void |
addYTextLabel(double y,
String text,
int scale)
Adds a new text label for the specified Y axis value.
|
void |
clearTextLabels()
Deprecated.
use clearXTextLabels instead
|
void |
clearXTextLabels()
Clears the existing text labels on the X axis.
|
void |
clearYTextLabels()
Clears the existing text labels on the Y axis.
|
void |
clearYTextLabels(int scale)
Clears the existing text labels on the Y axis.
|
float |
getAxisTitleTextSize()
Returns the axis title text size.
|
double |
getBarSpacing()
Returns the spacing between bars, in bar charts.
|
double |
getBarsSpacing()
Deprecated.
use getBarSpacing instead
|
float |
getBarWidth()
Returns the constant bar chart item width in pixels.
|
int |
getGridColor(int scale)
Returns the grid color.
|
double[] |
getInitialRange()
Returns the initial range.
|
double[] |
getInitialRange(int scale)
Returns the initial range.
|
NumberFormat |
getLabelFormat()
Deprecated.
use getXLabelFormat and getYLabelFormat instead
|
int |
getMarginsColor()
Returns the margins color.
|
XYMultipleSeriesRenderer.Orientation |
getOrientation()
Returns the current orientation of the chart X axis.
|
double[] |
getPanLimits()
Returns the pan limits.
|
float |
getPointSize()
Returns the size of the points, for charts displaying points.
|
int |
getScalesCount() |
double |
getXAxisMax()
Returns the end value of the X axis range.
|
double |
getXAxisMax(int scale)
Returns the end value of the X axis range.
|
double |
getXAxisMin()
Returns the start value of the X axis range.
|
double |
getXAxisMin(int scale)
Returns the start value of the X axis range.
|
NumberFormat |
getXLabelFormat()
Returns the number format for displaying X axis labels.
|
int |
getXLabels()
Returns the approximate number of labels for the X axis.
|
int |
getXLabelsAlign()
Returns the X axis labels alignment.
|
float |
getXLabelsAngle()
Returns the rotation angle of labels for the X axis.
|
int |
getXLabelsColor()
Returns the X axis labels color.
|
float |
getXLabelsPadding()
Returns the X labels padding.
|
String |
getXTextLabel(Double x)
Returns the X axis text label at the specified X axis value.
|
Double[] |
getXTextLabelLocations()
Returns the X text label locations.
|
String |
getXTitle()
Returns the title for the X axis.
|
int |
getYAxisAlign(int scale) |
double |
getYAxisMax()
Returns the end value of the Y axis range.
|
double |
getYAxisMax(int scale)
Returns the end value of the Y axis range.
|
double |
getYAxisMin()
Returns the start value of the Y axis range.
|
double |
getYAxisMin(int scale)
Returns the start value of the Y axis range.
|
NumberFormat |
getYLabelFormat(int scale)
Returns the number format for Y axis displaying labels.
|
int |
getYLabels()
Returns the approximate number of labels for the Y axis.
|
int |
getYLabelsAlign(int scale)
Returns the Y axis labels alignment.
|
float |
getYLabelsAngle()
Returns the rotation angle of labels for the Y axis.
|
int |
getYLabelsColor(int scale)
Returns the Y axis labels color.
|
float |
getYLabelsPadding()
Returns the Y labels padding.
|
float |
getYLabelsVerticalPadding()
Returns the Y labels vertical padding.
|
String |
getYTextLabel(Double y)
Returns the Y axis text label at the specified Y axis value.
|
String |
getYTextLabel(Double y,
int scale)
Returns the Y axis text label at the specified Y axis value.
|
Double[] |
getYTextLabelLocations()
Returns the Y text label locations.
|
Double[] |
getYTextLabelLocations(int scale)
Returns the Y text label locations.
|
String |
getYTitle()
Returns the title for the Y axis.
|
String |
getYTitle(int scale)
Returns the title for the Y axis.
|
double |
getZoomInLimitX()
Returns the zoom in limit permitted in the axis X.
|
double |
getZoomInLimitY()
Returns the zoom in limit permitted in the axis Y.
|
double[] |
getZoomLimits()
Returns the zoom limits as a 4-element array, or null if there
are no limits applied.
|
void |
initAxesRange(int scales) |
void |
initAxesRangeForScale(int i) |
boolean |
isInitialRangeSet() |
boolean |
isInitialRangeSet(int scale)
Returns if the initial range is set.
|
boolean |
isMaxXSet()
Returns if the maximum X value was set.
|
boolean |
isMaxXSet(int scale)
Returns if the maximum X value was set.
|
boolean |
isMaxYSet()
Returns if the maximum Y value was set.
|
boolean |
isMaxYSet(int scale)
Returns if the maximum Y value was set.
|
boolean |
isMinXSet()
Returns if the minimum X value was set.
|
boolean |
isMinXSet(int scale)
Returns if the minimum X value was set.
|
boolean |
isMinYSet()
Returns if the minimum Y value was set.
|
boolean |
isMinYSet(int scale)
Returns if the minimum Y value was set.
|
boolean |
isPanEnabled()
Returns the enabled state of the pan on at least one axis.
|
boolean |
isPanXEnabled()
Returns the enabled state of the pan on X axis.
|
boolean |
isPanYEnabled()
Returns the enabled state of the pan on Y axis.
|
boolean |
isXRoundedLabels()
If X axis labels should be rounded.
|
boolean |
isZoomEnabled()
Returns the enabled state of the zoom on at least one axis.
|
boolean |
isZoomXEnabled()
Returns the enabled state of the zoom on X axis.
|
boolean |
isZoomYEnabled()
Returns the enabled state of the zoom on Y axis.
|
void |
removeXTextLabel(double x)
Removes text label for the specified X axis value.
|
void |
removeYTextLabel(double y)
Removes text label for the specified Y axis value.
|
void |
removeYTextLabel(double y,
int scale)
Removes text label for the specified Y axis value.
|
void |
setAxisTitleTextFont(Font font)
Sets the Axis title text font size using a Font object instead of a point size.
|
void |
setAxisTitleTextSize(float textSize)
Sets the axis title text size.
|
void |
setBarSpacing(double spacing)
Sets the spacing between bars, in bar charts.
|
void |
setBarWidth(float width)
Sets the bar chart item constant width in pixels.
|
void |
setGridColor(int color)
Sets the color of the grid.
|
void |
setGridColor(int color,
int scale)
Sets the color of the grid.
|
void |
setInitialRange(double[] range)
Sets the axes initial range values.
|
void |
setInitialRange(double[] range,
int scale)
Sets the axes initial range values.
|
void |
setMarginsColor(int color)
Sets the color of the margins.
|
void |
setOrientation(XYMultipleSeriesRenderer.Orientation orientation)
Sets the current orientation of the chart X axis.
|
void |
setPanEnabled(boolean enabled)
Override
DefaultRenderer.setPanEnabled(boolean) so it can be
delegated to setPanEnabled(boolean, boolean). |
void |
setPanEnabled(boolean enabledX,
boolean enabledY)
Sets the enabled state of the pan.
|
void |
setPanLimits(double[] panLimits)
Sets the pan limits as an array of 4 values.
|
void |
setPointSize(float size)
Sets the size of the points, for charts displaying points.
|
void |
setRange(double[] range)
Sets the axes range values.
|
void |
setRange(double[] range,
int scale)
Sets the axes range values.
|
void |
setXAxisMax(double max)
Sets the end value of the X axis range.
|
void |
setXAxisMax(double max,
int scale)
Sets the end value of the X axis range.
|
void |
setXAxisMin(double min)
Sets the start value of the X axis range.
|
void |
setXAxisMin(double min,
int scale)
Sets the start value of the X axis range.
|
void |
setXLabelFormat(NumberFormat format)
Sets the number format for X axis displaying labels.
|
void |
setXLabels(int xLabels)
Sets the approximate number of labels for the X axis.
|
void |
setXLabelsAlign(int align)
Sets the X axis labels alignment.
|
void |
setXLabelsAngle(float angle)
Sets the rotation angle (in degrees) of labels for the X axis.
|
void |
setXLabelsColor(int color)
Sets the X axis labels color.
|
void |
setXLabelsPadding(float padding)
Sets the X labels padding
|
void |
setXRoundedLabels(boolean rounded)
Sets if X axis rounded time values to be used.
|
void |
setXTitle(String title)
Sets the title for the X axis.
|
void |
setYAxisAlign(int align,
int scale) |
void |
setYAxisMax(double max)
Sets the end value of the Y axis range.
|
void |
setYAxisMax(double max,
int scale)
Sets the end value of the Y axis range.
|
void |
setYAxisMin(double min)
Sets the start value of the Y axis range.
|
void |
setYAxisMin(double min,
int scale)
Sets the start value of the Y axis range.
|
void |
setYLabelFormat(NumberFormat format,
int scale)
Sets the number format for Y axis displaying labels.
|
void |
setYLabels(int yLabels)
Sets the approximate number of labels for the Y axis.
|
void |
setYLabelsAlign(int align) |
void |
setYLabelsAlign(int align,
int scale)
Sets the Y axis labels alignment.
|
void |
setYLabelsAngle(float angle)
Sets the rotation angle (in degrees) of labels for the Y axis.
|
void |
setYLabelsColor(int scale,
int color)
Sets the Y axis labels color.
|
void |
setYLabelsPadding(float padding)
Sets the Y labels padding
|
void |
setYLabelsVerticalPadding(float padding)
Sets the Y labels vertical padding
|
void |
setYTitle(String title)
Sets the title for the Y axis.
|
void |
setYTitle(String title,
int scale)
Sets the title for the Y axis.
|
void |
setZoomEnabled(boolean enabledX,
boolean enabledY)
Sets the enabled state of the zoom.
|
void |
setZoomInLimitX(double zoomInLimitX)
Sets the zoom in limit permitted in the axis X.
|
void |
setZoomInLimitY(double zoomInLimitY)
Sets zoom in limit permitted in the axis Y.
|
void |
setZoomLimits(double[] zoomLimits)
Sets the zoom limits as an array of 4 values.
|
addSeriesRenderer, addSeriesRenderer, getAxesColor, getBackgroundColor, getChartTitle, getChartTitleTextSize, getLabelsColor, getLabelsTextSize, getLegendHeight, getLegendTextSize, getMargins, getOriginalScale, getScale, getSelectableBuffer, getSeriesRendererAt, getSeriesRendererCount, getSeriesRenderers, getStartAngle, getTextTypeface, getTextTypefaceName, getTextTypefaceStyle, getXAxisColor, getYAxisColor, getZoomRate, isAntialiasing, isApplyBackgroundColor, isClickEnabled, isDisplayValues, isExternalZoomEnabled, isFitLegend, isInScroll, isShowAxes, isShowCustomTextGridX, isShowCustomTextGridY, isShowGridX, isShowGridY, isShowLabels, isShowLegend, isShowTickMarks, isZoomButtonsVisible, removeAllRenderers, removeSeriesRenderer, setAntialiasing, setApplyBackgroundColor, setAxesColor, setBackgroundColor, setChartTitle, setChartTitleTextFont, setChartTitleTextSize, setClickEnabled, setDisplayValues, setExternalZoomEnabled, setFitLegend, setInScroll, setLabelsColor, setLabelsTextFont, setLabelsTextSize, setLegendHeight, setLegendTextFont, setLegendTextSize, setMargins, setScale, setSelectableBuffer, setShowAxes, setShowCustomTextGrid, setShowCustomTextGridX, setShowCustomTextGridY, setShowGrid, setShowGridX, setShowGridY, setShowLabels, setShowLegend, setShowTickMarks, setStartAngle, setTextTypeface, setTextTypeface, setXAxisColor, setYAxisColor, setZoomButtonsVisible, setZoomEnabled, setZoomRatepublic XYMultipleSeriesRenderer()
public XYMultipleSeriesRenderer(int scaleNumber)
public void initAxesRange(int scales)
public void initAxesRangeForScale(int i)
public XYMultipleSeriesRenderer.Orientation getOrientation()
public void setOrientation(XYMultipleSeriesRenderer.Orientation orientation)
orientation - the chart orientationpublic String getXTitle()
public void setXTitle(String title)
title - the X axis titlepublic String getYTitle()
public String getYTitle(int scale)
scale - the renderer scalepublic void setYTitle(String title)
title - the Y axis titlepublic void setYTitle(String title, int scale)
title - the Y axis titlescale - the renderer scalepublic float getAxisTitleTextSize()
public void setAxisTitleTextSize(float textSize)
setAxisTitleTextFont(com.codename1.ui.Font)
instead to allow the font size to to be adjusted appropriately for the display
resolution.textSize - the chart axis text sizepublic void setAxisTitleTextFont(Font font)
setAxisTitleTextSize(float) to set the text
size in pixels.font - public double getXAxisMin()
public void setXAxisMin(double min)
min - the X axis range start valuepublic boolean isMinXSet()
public double getXAxisMax()
public void setXAxisMax(double max)
max - the X axis range end valuepublic boolean isMaxXSet()
public double getYAxisMin()
public void setYAxisMin(double min)
min - the Y axis range start valuepublic boolean isMinYSet()
public double getYAxisMax()
public void setYAxisMax(double max)
max - the Y axis range end valuepublic boolean isMaxYSet()
public double getXAxisMin(int scale)
scale - the renderer scalepublic void setXAxisMin(double min,
int scale)
min - the X axis range start valuescale - the renderer scalepublic boolean isMinXSet(int scale)
scale - the renderer scalepublic double getXAxisMax(int scale)
scale - the renderer scalepublic void setXAxisMax(double max,
int scale)
max - the X axis range end valuescale - the renderer scalepublic boolean isMaxXSet(int scale)
scale - the renderer scalepublic double getYAxisMin(int scale)
scale - the renderer scalepublic void setYAxisMin(double min,
int scale)
min - the Y axis range start valuescale - the renderer scalepublic boolean isMinYSet(int scale)
scale - the renderer scalepublic double getYAxisMax(int scale)
scale - the renderer scalepublic void setYAxisMax(double max,
int scale)
max - the Y axis range end valuescale - the renderer scalepublic boolean isMaxYSet(int scale)
scale - the renderer scalepublic int getXLabels()
public void setXLabels(int xLabels)
xLabels - the approximate number of labels for the X axispublic void addTextLabel(double x,
String text)
x - the X axis valuetext - the text labelpublic void addXTextLabel(double x,
String text)
x - the X axis valuetext - the text labelpublic void removeXTextLabel(double x)
x - the X axis valuepublic String getXTextLabel(Double x)
x - the X axis valuepublic Double[] getXTextLabelLocations()
public void clearTextLabels()
public void clearXTextLabels()
public boolean isXRoundedLabels()
public void setXRoundedLabels(boolean rounded)
rounded - rounded values to be usedpublic void addYTextLabel(double y,
String text)
y - the Y axis valuetext - the text labelpublic void removeYTextLabel(double y)
y - the Y axis valuepublic void addYTextLabel(double y,
String text,
int scale)
y - the Y axis valuetext - the text labelscale - the renderer scalepublic void removeYTextLabel(double y,
int scale)
y - the Y axis valuescale - the renderer scalepublic String getYTextLabel(Double y)
y - the Y axis valuepublic String getYTextLabel(Double y, int scale)
y - the Y axis valuescale - the renderer scalepublic Double[] getYTextLabelLocations()
public Double[] getYTextLabelLocations(int scale)
scale - the renderer scalepublic void clearYTextLabels()
public void clearYTextLabels(int scale)
scale - the renderer scalepublic int getYLabels()
public void setYLabels(int yLabels)
yLabels - the approximate number of labels for the Y axispublic float getBarWidth()
public void setBarWidth(float width)
width - width in pixelspublic boolean isPanEnabled()
isPanEnabled in class DefaultRendererpublic boolean isPanXEnabled()
public boolean isPanYEnabled()
public void setPanEnabled(boolean enabledX,
boolean enabledY)
enabledX - pan enabled on X axisenabledY - pan enabled on Y axispublic void setPanEnabled(boolean enabled)
DefaultRenderer.setPanEnabled(boolean) so it can be
delegated to setPanEnabled(boolean, boolean).setPanEnabled in class DefaultRendererenabled - pan enabledpublic boolean isZoomEnabled()
isZoomEnabled in class DefaultRendererpublic boolean isZoomXEnabled()
public boolean isZoomYEnabled()
public void setZoomEnabled(boolean enabledX,
boolean enabledY)
enabledX - zoom enabled on X axisenabledY - zoom enabled on Y axispublic double getBarsSpacing()
public double getBarSpacing()
public void setBarSpacing(double spacing)
spacing - the spacing between bars coefficientpublic int getMarginsColor()
public void setMarginsColor(int color)
color - the margins colorpublic int getGridColor(int scale)
scale - the renderer indexpublic void setGridColor(int color)
color - the grid colorpublic void setGridColor(int color,
int scale)
color - the grid colorscale - the renderer scalepublic double[] getPanLimits()
public void setPanLimits(double[] panLimits)
panLimits - the pan limitspublic double[] getZoomLimits()
Array elements are:
getZoomInLimitX()getZoomInLimitY()public void setZoomLimits(double[] zoomLimits)
Array elements are:
getZoomInLimitX()getZoomInLimitY()Setting this value as null will turn off all limits so that, if zoom is enabled, users can zoom and and out as much as they like.
zoomLimits - the zoom limitspublic float getXLabelsAngle()
public void setXLabelsAngle(float angle)
angle - the rotation angle of labels for the X axispublic float getYLabelsAngle()
public void setYLabelsAngle(float angle)
angle - the rotation angle of labels for the Y axispublic float getPointSize()
public void setPointSize(float size)
size - the point sizepublic void setRange(double[] range)
range - an array having the values in this order: minX, maxX, minY,
maxYpublic void setRange(double[] range,
int scale)
range - an array having the values in this order: minX, maxX, minY,
maxYscale - the renderer scalepublic boolean isInitialRangeSet()
public boolean isInitialRangeSet(int scale)
scale - the renderer scalepublic double[] getInitialRange()
public double[] getInitialRange(int scale)
scale - the renderer scalepublic void setInitialRange(double[] range)
range - an array having the values in this order: minX, maxX, minY,
maxYpublic void setInitialRange(double[] range,
int scale)
range - an array having the values in this order: minX, maxX, minY,
maxYscale - the renderer scalepublic int getXLabelsColor()
public int getYLabelsColor(int scale)
public void setXLabelsColor(int color)
color - the X axis labels colorpublic void setYLabelsColor(int scale,
int color)
scale - the renderer scalecolor - the Y axis labels colorpublic int getXLabelsAlign()
public void setXLabelsAlign(int align)
align - the X labels alignmentpublic int getYLabelsAlign(int scale)
scale - the renderer scalepublic void setYLabelsAlign(int align)
public int getYAxisAlign(int scale)
public void setYAxisAlign(int align,
int scale)
public void setYLabelsAlign(int align,
int scale)
align - the Y labels alignmentpublic float getXLabelsPadding()
public void setXLabelsPadding(float padding)
padding - the amount of padding between the axis and the labelpublic float getYLabelsPadding()
public void setYLabelsVerticalPadding(float padding)
padding - the amount of vertical paddingpublic float getYLabelsVerticalPadding()
public void setYLabelsPadding(float padding)
padding - the amount of padding between the axis and the labelpublic NumberFormat getLabelFormat()
public NumberFormat getXLabelFormat()
public void setXLabelFormat(NumberFormat format)
format - the number format for X axis labelspublic NumberFormat getYLabelFormat(int scale)
scale - the renderer scalepublic void setYLabelFormat(NumberFormat format, int scale)
format - the number format for labelsscale - the renderer scalepublic double getZoomInLimitX()
getXAxisMin() and getXAxisMax().setZoomInLimitX(double)public void setZoomInLimitX(double zoomInLimitX)
getXAxisMin() and
getXAxisMax() can't be greater or equal than
getZoomInLimitX()zoomInLimitX - the maximum distance permitted between
getXAxisMin() and getXAxisMax().public double getZoomInLimitY()
getYAxisMin() and getYAxisMax().setZoomInLimitY(double)public void setZoomInLimitY(double zoomInLimitY)
getYAxisMin() and
getYAxisMax() can't be greater or equal than
getZoomInLimitY()zoomInLimitY - the maximum distance permitted between
getYAxisMin() and getYAxisMax()public int getScalesCount()