--- /dev/null
+/**\r
+ * Copyright (C) 2009 - 2012 SC 4ViewSoft SRL\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package org.achartengine.renderer;\r
+\r
+import java.io.Serializable;\r
+\r
+import android.graphics.Color;\r
+import android.graphics.Paint.Align;\r
+\r
+/**\r
+ * A simple series renderer.\r
+ */\r
+public class SimpleSeriesRenderer implements Serializable {\r
+ /** The series color. */\r
+ private int mColor = Color.BLUE;\r
+ /** If the values should be displayed above the chart points. */\r
+ private boolean mDisplayChartValues;\r
+ /** The chart values text size. */\r
+ private float mChartValuesTextSize = 10;\r
+ /** The chart values text alignment. */\r
+ private Align mChartValuesTextAlign = Align.CENTER;\r
+ /** The chart values spacing from the data point. */\r
+ private float mChartValuesSpacing = 5f;\r
+ /** The stroke style. */\r
+ private BasicStroke mStroke;\r
+ /** If gradient is enabled. */\r
+ private boolean mGradientEnabled = false;\r
+ /** The gradient start value. */\r
+ private double mGradientStartValue;\r
+ /** The gradient start color. */\r
+ private int mGradientStartColor;\r
+ /** The gradient stop value. */\r
+ private double mGradientStopValue;\r
+ /** The gradient stop color. */\r
+ private int mGradientStopColor;\r
+\r
+ /**\r
+ * Returns the series color.\r
+ * \r
+ * @return the series color\r
+ */\r
+ public int getColor() {\r
+ return mColor;\r
+ }\r
+\r
+ /**\r
+ * Sets the series color.\r
+ * \r
+ * @param color the series color\r
+ */\r
+ public void setColor(int color) {\r
+ mColor = color;\r
+ }\r
+\r
+ /**\r
+ * Returns if the chart point values should be displayed as text.\r
+ * \r
+ * @return if the chart point values should be displayed as text\r
+ */\r
+ public boolean isDisplayChartValues() {\r
+ return mDisplayChartValues;\r
+ }\r
+\r
+ /**\r
+ * Sets if the chart point values should be displayed as text.\r
+ * \r
+ * @param display if the chart point values should be displayed as text\r
+ */\r
+ public void setDisplayChartValues(boolean display) {\r
+ mDisplayChartValues = display;\r
+ }\r
+\r
+ /**\r
+ * Returns the chart values text size.\r
+ * \r
+ * @return the chart values text size\r
+ */\r
+ public float getChartValuesTextSize() {\r
+ return mChartValuesTextSize;\r
+ }\r
+\r
+ /**\r
+ * Sets the chart values text size.\r
+ * \r
+ * @param textSize the chart values text size\r
+ */\r
+ public void setChartValuesTextSize(float textSize) {\r
+ mChartValuesTextSize = textSize;\r
+ }\r
+\r
+ /**\r
+ * Returns the chart values text align.\r
+ * \r
+ * @return the chart values text align\r
+ */\r
+ public Align getChartValuesTextAlign() {\r
+ return mChartValuesTextAlign;\r
+ }\r
+\r
+ /**\r
+ * Sets the chart values text align.\r
+ * \r
+ * @param align the chart values text align\r
+ */\r
+ public void setChartValuesTextAlign(Align align) {\r
+ mChartValuesTextAlign = align;\r
+ }\r
+\r
+ /**\r
+ * Returns the chart values spacing from the data point.\r
+ * \r
+ * @return the chart values spacing\r
+ */\r
+ public float getChartValuesSpacing() {\r
+ return mChartValuesSpacing;\r
+ }\r
+\r
+ /**\r
+ * Sets the chart values spacing from the data point.\r
+ * \r
+ * @param spacing the chart values spacing (in pixels) from the chart data\r
+ * point\r
+ */\r
+ public void setChartValuesSpacing(float spacing) {\r
+ mChartValuesSpacing = spacing;\r
+ }\r
+\r
+ /**\r
+ * Returns the stroke style.\r
+ * \r
+ * @return the stroke style\r
+ */\r
+ public BasicStroke getStroke() {\r
+ return mStroke;\r
+ }\r
+\r
+ /**\r
+ * Sets the stroke style.\r
+ * \r
+ * @param stroke the stroke style\r
+ */\r
+ public void setStroke(BasicStroke stroke) {\r
+ mStroke = stroke;\r
+ }\r
+\r
+ /**\r
+ * Returns the gradient is enabled value.\r
+ * \r
+ * @return the gradient enabled\r
+ */\r
+ public boolean isGradientEnabled() {\r
+ return mGradientEnabled;\r
+ }\r
+\r
+ /**\r
+ * Sets the gradient enabled value.\r
+ * \r
+ * @param enabled the gradient enabled\r
+ */\r
+ public void setGradientEnabled(boolean enabled) {\r
+ mGradientEnabled = enabled;\r
+ }\r
+\r
+ /**\r
+ * Returns the gradient start value.\r
+ * \r
+ * @return the gradient start value\r
+ */\r
+ public double getGradientStartValue() {\r
+ return mGradientStartValue;\r
+ }\r
+\r
+ /**\r
+ * Returns the gradient start color.\r
+ * \r
+ * @return the gradient start color\r
+ */\r
+ public int getGradientStartColor() {\r
+ return mGradientStartColor;\r
+ }\r
+\r
+ /**\r
+ * Sets the gradient start value and color.\r
+ * \r
+ * @param start the gradient start value\r
+ * @param color the gradient start color\r
+ */\r
+ public void setGradientStart(double start, int color) {\r
+ mGradientStartValue = start;\r
+ mGradientStartColor = color;\r
+ }\r
+\r
+ /**\r
+ * Returns the gradient stop value.\r
+ * \r
+ * @return the gradient stop value\r
+ */\r
+ public double getGradientStopValue() {\r
+ return mGradientStopValue;\r
+ }\r
+\r
+ /**\r
+ * Returns the gradient stop color.\r
+ * \r
+ * @return the gradient stop color\r
+ */\r
+ public int getGradientStopColor() {\r
+ return mGradientStopColor;\r
+ }\r
+\r
+ /**\r
+ * Sets the gradient stop value and color.\r
+ * \r
+ * @param start the gradient stop value\r
+ * @param color the gradient stop color\r
+ */\r
+ public void setGradientStop(double start, int color) {\r
+ mGradientStopValue = start;\r
+ mGradientStopColor = color;\r
+ }\r
+\r
+}\r