create changelog entry
[debian/openrocket] / android-libraries / achartengine / src / org / achartengine / renderer / XYSeriesRenderer.java
1 /**\r
2  * Copyright (C) 2009 - 2012 SC 4ViewSoft SRL\r
3  *  \r
4  * Licensed under the Apache License, Version 2.0 (the "License");\r
5  * you may not use this file except in compliance with the License.\r
6  * You may obtain a copy of the License at\r
7  *  \r
8  *      http://www.apache.org/licenses/LICENSE-2.0\r
9  *  \r
10  * Unless required by applicable law or agreed to in writing, software\r
11  * distributed under the License is distributed on an "AS IS" BASIS,\r
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
13  * See the License for the specific language governing permissions and\r
14  * limitations under the License.\r
15  */\r
16 package org.achartengine.renderer;\r
17 \r
18 import org.achartengine.chart.PointStyle;\r
19 \r
20 import android.graphics.Color;\r
21 \r
22 /**\r
23  * A renderer for the XY type series.\r
24  */\r
25 public class XYSeriesRenderer extends SimpleSeriesRenderer {\r
26   /** If the chart points should be filled. */\r
27   private boolean mFillPoints = false;\r
28   /** If the chart should be filled below its line. */\r
29   private boolean mFillBelowLine = false;\r
30   /** The fill below the chart line color. */\r
31   private int mFillColor = Color.argb(125, 0, 0, 200);\r
32   /** The point style. */\r
33   private PointStyle mPointStyle = PointStyle.POINT;\r
34   /** The chart line width. */\r
35   private float mLineWidth = 1;\r
36 \r
37   /**\r
38    * Returns if the chart should be filled below the line.\r
39    * \r
40    * @return the fill below line status\r
41    */\r
42   public boolean isFillBelowLine() {\r
43     return mFillBelowLine;\r
44   }\r
45 \r
46   /**\r
47    * Sets if the line chart should be filled below its line. Filling below the\r
48    * line transforms a line chart into an area chart.\r
49    * \r
50    * @param fill the fill below line flag value\r
51    */\r
52   public void setFillBelowLine(boolean fill) {\r
53     mFillBelowLine = fill;\r
54   }\r
55 \r
56   /**\r
57    * Returns if the chart points should be filled.\r
58    * \r
59    * @return the points fill status\r
60    */\r
61   public boolean isFillPoints() {\r
62     return mFillPoints;\r
63   }\r
64 \r
65   /**\r
66    * Sets if the chart points should be filled.\r
67    * \r
68    * @param fill the points fill flag value\r
69    */\r
70   public void setFillPoints(boolean fill) {\r
71     mFillPoints = fill;\r
72   }\r
73 \r
74   /**\r
75    * Returns the fill below line color.\r
76    * \r
77    * @return the fill below line color\r
78    */\r
79   public int getFillBelowLineColor() {\r
80     return mFillColor;\r
81   }\r
82 \r
83   /**\r
84    * Sets the fill below the line color.\r
85    * \r
86    * @param color the fill below line color\r
87    */\r
88   public void setFillBelowLineColor(int color) {\r
89     mFillColor = color;\r
90   }\r
91 \r
92   /**\r
93    * Returns the point style.\r
94    * \r
95    * @return the point style\r
96    */\r
97   public PointStyle getPointStyle() {\r
98     return mPointStyle;\r
99   }\r
100 \r
101   /**\r
102    * Sets the point style.\r
103    * \r
104    * @param style the point style\r
105    */\r
106   public void setPointStyle(PointStyle style) {\r
107     mPointStyle = style;\r
108   }\r
109 \r
110   /**\r
111    * Returns the chart line width.\r
112    * \r
113    * @return the line width\r
114    */\r
115   public float getLineWidth() {\r
116     return mLineWidth;\r
117   }\r
118 \r
119   /**\r
120    * Sets the chart line width.\r
121    * \r
122    * @param lineWidth the line width\r
123    */\r
124   public void setLineWidth(float lineWidth) {\r
125     mLineWidth = lineWidth;\r
126   }\r
127   \r
128 }\r