Permalink
Browse files

Merge branch 'master' of https://github.com/inaiat/jqplot4java.git

  • Loading branch information...
2 parents 146297a + 85b5894 commit e08bbb412a2d70ab175ee2167592961e19a49e05 @viniciuspc committed Apr 13, 2012
@@ -24,24 +24,30 @@
/**
- * Representa os dados do chart AreaFill
+ * Data Helper to build Area Charts.
+ *
+ * @param <T> Type of number. Ex.: Double, Integer, Float, etc.
+ *
* @author inaiat
*/
public class AreaFillData<T extends Number> extends AbstractCollectionData<List<T>> {
+ /** The Constant serialVersionUID. */
private static final long serialVersionUID = -2456625545492808162L;
+ /** The data. */
private List<List<T>> data = new ArrayList<List<T>>();
/**
- * Construtor
+ * Instantiates a new area fill data.
*/
public AreaFillData() {
}
/**
- * Construtor
- * @param values
+ * Instantiates a new area fill data.
+ *
+ * @param values the values
*/
public AreaFillData(List<T>... values) {
for (int i = 0; i < values.length; i++) {
@@ -50,17 +56,15 @@ public AreaFillData(List<T>... values) {
}
}
- /**
- *
- * @return Collection data
+ /* (non-Javadoc)
+ * @see br.com.digilabs.jqplot.data.ChartData#getData()
*/
public Collection<List<T>> getData() {
return data;
}
- /**
- * retorna o json
- * @return json
+ /* (non-Javadoc)
+ * @see br.com.digilabs.jqplot.data.ChartData#toJsonString()
*/
public String toJsonString() {
JSONArray jsonArray = new JSONArray(data);
@@ -23,40 +23,43 @@
/**
- * representa os dados de um chart de barra
+ * Data Helper to build Area Charts.
+ *
+ * @param <T> Type of number. Ex.: Double, Integer, Float, etc.
* @author inaiat
*/
public class BarData<T extends Number> extends AbstractCollectionData<Collection<T>> {
+ /** The Constant serialVersionUID. */
private static final long serialVersionUID = -2087356275172825289L;
+ /** The data. */
private Collection<Collection<T>> data = new ArrayList<Collection<T>>();
/**
- * Construtor
+ * Instantiates a new bar data.
*/
public BarData() {
}
/**
- *
- * @param values
+ * Instantiates a new bar data.
+ *
+ * @param values the values
*/
public BarData(Collection<T>... values) {
addValues(values);
}
- /**
- *
- * @return Collection
+ /* (non-Javadoc)
+ * @see br.com.digilabs.jqplot.data.ChartData#getData()
*/
public Collection<Collection<T>> getData() {
return data;
}
- /**
- * retorna o json
- * @return json
+ /* (non-Javadoc)
+ * @see br.com.digilabs.jqplot.data.ChartData#toJsonString()
*/
public String toJsonString() {
JSONArray jsonArray = new JSONArray(data);
@@ -23,26 +23,28 @@
import org.json.JSONArray;
/**
- * Dados de um chart bubble
+ * Data Helper to build Area Charts.
+ *
+ * @param <T> BubbleItem or something that extends BubbleItem.
* @author inaiat
*/
public class BubbleData<T extends BubbleItem> extends AbstractCollectionData<T> {
+ /** The Constant serialVersionUID. */
private static final long serialVersionUID = 5564319083971645500L;
+ /** The data. */
private Collection<T> data = new ArrayList<T>();
- /**
- *
- * @return Collection
+ /* (non-Javadoc)
+ * @see br.com.digilabs.jqplot.data.ChartData#getData()
*/
public Collection<T> getData() {
return data;
}
- /**
- * retorna o json
- * @return json
+ /* (non-Javadoc)
+ * @see br.com.digilabs.jqplot.data.ChartData#toJsonString()
*/
public String toJsonString() {
JSONArray outerArray = new JSONArray();
@@ -19,12 +19,24 @@
import java.io.Serializable;
/**
- * Interface que representa os dados de um chart
+ * Base interface to handle data.
+ *
+ * @param <T> the generic type
* @author inaiat
*/
public interface ChartData<T> extends Serializable {
+ /**
+ * Gets the data.
+ *
+ * @return the data
+ */
T getData();
+ /**
+ * To json string.
+ *
+ * @return the string
+ */
String toJsonString();
}
@@ -25,29 +25,36 @@
import org.json.JSONArray;
/**
+ * Data Helper to build Labeled Charts.
+ *
+ * @param <T> Type of number. Ex.: Double, Integer, Float, etc.
* @author inaiat
- * @param <T>
*/
public class LabeledData<T extends Number> extends AbstractCollectionData<LabeledItem<T>> {
+ /** The Constant serialVersionUID. */
private static final long serialVersionUID = -1202233319043142424L;
+ /** The data. */
private List<LabeledItem<T>> data = new ArrayList<LabeledItem<T>>();
+ /**
+ * Instantiates a new labeled data.
+ */
public LabeledData() {
}
/**
- * Construtor
- * @param values
+ * Instantiates a new labeled data.
+ *
+ * @param values the values
*/
public LabeledData(LabeledItem<T>... values) {
addValues(values);
}
- /**
- * Retorna o json
- * @return json
+ /* (non-Javadoc)
+ * @see br.com.digilabs.jqplot.data.ChartData#toJsonString()
*/
public String toJsonString() {
JSONArray jsonArray = new JSONArray();
@@ -62,9 +69,8 @@ public String toJsonString() {
return outerArray.toString();
}
- /**
- *
- * @return Collection
+ /* (non-Javadoc)
+ * @see br.com.digilabs.jqplot.data.ChartData#getData()
*/
public Collection<LabeledItem<T>> getData() {
return data;
@@ -24,17 +24,31 @@
import br.com.digilabs.jqplot.data.item.LineSeriesItem;
+/**
+ * The Class LineSeriesData.
+ *
+ * @param <I> {@link LineSeriesItem} Index type
+ * @param <V> {@link LineSeriesItem} Value type
+ */
public class LineSeriesData<I extends Number,V extends Number> extends AbstractCollectionData<Collection<LineSeriesItem<I, V>>> {
+ /** The Constant serialVersionUID. */
private static final long serialVersionUID = -8490476851004459871L;
+ /** The data. */
private List<Collection<LineSeriesItem<I, V>>> data = new ArrayList<Collection<LineSeriesItem<I, V>>>();
+ /* (non-Javadoc)
+ * @see br.com.digilabs.jqplot.data.ChartData#getData()
+ */
@Override
public Collection<Collection<LineSeriesItem<I, V>>> getData() {
return data;
}
+ /* (non-Javadoc)
+ * @see br.com.digilabs.jqplot.data.ChartData#toJsonString()
+ */
@Override
public String toJsonString() {
JSONArray jsonArray = new JSONArray();
@@ -21,43 +21,44 @@
import java.util.List;
import org.json.JSONArray;
-
-
/**
- * Dados de um chart Lined
+ * Data Helper to build Line Charts.
+ *
+ * @param <T> Type of number. Ex.: Double, Integer, Float, etc.
* @author inaiat
*/
public class LinedData<T extends Number> extends AbstractCollectionData<T> {
+ /** The Constant serialVersionUID. */
private static final long serialVersionUID = -550315213084815871L;
+ /** The data. */
private List<T> data = new ArrayList<T>();
/**
- * Construtor
+ * Instantiates a new lined data.
*/
public LinedData() {
}
/**
- * Construtor
- * @param values
+ * Instantiates a new lined data.
+ *
+ * @param values the values
*/
public LinedData(T... values) {
addValues(values);
}
- /**
- * Obtem os dados
- * @return data
+ /* (non-Javadoc)
+ * @see br.com.digilabs.jqplot.data.ChartData#getData()
*/
public Collection<T> getData() {
return data;
}
- /**
- * Retorno o json
- * @return String contendo o json
+ /* (non-Javadoc)
+ * @see br.com.digilabs.jqplot.data.ChartData#toJsonString()
*/
public String toJsonString() {
JSONArray jsonArray = new JSONArray();
@@ -18,32 +18,35 @@
import org.json.JSONArray;
+// TODO: Auto-generated Javadoc
/**
- * Representa os dados de um chart Meter
+ * Data Helper to build Meter Charts.
+ *
* @author inaiat
*/
public class MeterData extends NumberData<Float> {
+ /** The Constant serialVersionUID. */
private static final long serialVersionUID = -1543265764447003656L;
- /**
- * Construtor
+ /**
+ * Instantiates a new meter data.
*/
public MeterData() {
super(0F);
}
/**
- * Construtor
- * @param value
+ * Instantiates a new meter data.
+ *
+ * @param value the value
*/
public MeterData(Float value) {
super(value);
}
- /**
- * retorna o json
- * @return string correspondendo ao json
+ /* (non-Javadoc)
+ * @see br.com.digilabs.jqplot.data.NumberData#toJsonString()
*/
@Override
public String toJsonString() {
Oops, something went wrong.

0 comments on commit e08bbb4

Please sign in to comment.