Package org.silverpeas.core.chart
Class AbstractAxisChartItem<XAXIS_DATA_TYPE,YAXIS_DATA_TYPE,ITEM_TYPE extends AbstractAxisChartItem<XAXIS_DATA_TYPE,YAXIS_DATA_TYPE,ITEM_TYPE>>
- java.lang.Object
-
- org.silverpeas.core.chart.AbstractChartItem<ITEM_TYPE>
-
- org.silverpeas.core.chart.AbstractAxisChartItem<XAXIS_DATA_TYPE,YAXIS_DATA_TYPE,ITEM_TYPE>
-
- All Implemented Interfaces:
ChartItem
- Direct Known Subclasses:
PeriodChartItem
public abstract class AbstractAxisChartItem<XAXIS_DATA_TYPE,YAXIS_DATA_TYPE,ITEM_TYPE extends AbstractAxisChartItem<XAXIS_DATA_TYPE,YAXIS_DATA_TYPE,ITEM_TYPE>> extends AbstractChartItem<ITEM_TYPE>
- Author:
- Yohann Chastagnier
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractAxisChartItem(XAXIS_DATA_TYPE x)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description ITEM_TYPE
add(YAXIS_DATA_TYPE y)
Add a y value associated to the x one.protected void
completeJsonData(JSONCodec.JSONObject itemAsJson)
Completes the given json object with the data of specific implementations.XAXIS_DATA_TYPE
getX()
Gets the data of x axis.List<YAXIS_DATA_TYPE>
getYValues()
Gets the valueprotected abstract void
performXValue(JSONCodec.JSONObject jsonObject, XAXIS_DATA_TYPE xValue)
Complete the given json object with the given X value.protected abstract void
performYValue(JSONCodec.JSONArray jsonArray, YAXIS_DATA_TYPE yValue)
Complete the given json array with the given Y value associated to the X one.-
Methods inherited from class org.silverpeas.core.chart.AbstractChartItem
addExtra, asJson, getExtra, getJsonProducer, getTitle, withTitle
-
-
-
-
Constructor Detail
-
AbstractAxisChartItem
protected AbstractAxisChartItem(XAXIS_DATA_TYPE x)
-
-
Method Detail
-
getX
public XAXIS_DATA_TYPE getX()
Gets the data of x axis.- Returns:
-
getYValues
public List<YAXIS_DATA_TYPE> getYValues()
Gets the value- Returns:
-
add
public ITEM_TYPE add(YAXIS_DATA_TYPE y)
Add a y value associated to the x one.- Parameters:
y
- the value to add- Returns:
- the instance of the chart item itself.
-
completeJsonData
protected void completeJsonData(JSONCodec.JSONObject itemAsJson)
Description copied from class:AbstractChartItem
Completes the given json object with the data of specific implementations.- Specified by:
completeJsonData
in classAbstractChartItem<ITEM_TYPE extends AbstractAxisChartItem<XAXIS_DATA_TYPE,YAXIS_DATA_TYPE,ITEM_TYPE>>
- Parameters:
itemAsJson
- the json object to complete.
-
performXValue
protected abstract void performXValue(JSONCodec.JSONObject jsonObject, XAXIS_DATA_TYPE xValue)
Complete the given json object with the given X value.- Parameters:
jsonObject
- the json object to complete.xValue
- the value on x axis.
-
performYValue
protected abstract void performYValue(JSONCodec.JSONArray jsonArray, YAXIS_DATA_TYPE yValue)
Complete the given json array with the given Y value associated to the X one.- Parameters:
jsonArray
- the json array to complete.yValue
- a y value fromgetYValues()
.
-
-