|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.silverpeas.chart.AbstractChart<CHART_ITEM_TYPE>
public abstract class AbstractChart<CHART_ITEM_TYPE extends ChartItem>
Common implementation between each chart.
Constructor Summary | |
---|---|
AbstractChart()
|
Method Summary | ||
---|---|---|
protected
|
add(CHART_ITEM_TYPE item)
Adds an item into the list of chart items. |
|
|
addExtra(String key,
Object value)
Adds an extra information associated to the chart, but not necessary for the chart rendering. |
|
String |
asJson()
Gets data list as a json array. |
|
protected void |
computeExtraDataAsJson(org.json.JSONObject jsonChart)
Overriding this method if necessary. |
|
Object |
getExtra(String key)
Gets the value of an information associated to the chart, but not necessary for the chart rendering. |
|
List<CHART_ITEM_TYPE> |
getItems()
Gets all items that constitutes the chart. |
|
String |
getTitle()
Gets the title of the chart. |
|
|
withTitle(String title)
Sets the title of the chart. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.silverpeas.chart.Chart |
---|
getType |
Constructor Detail |
---|
public AbstractChart()
Method Detail |
---|
public String getTitle()
Chart
getTitle
in interface Chart<CHART_ITEM_TYPE extends ChartItem>
public <T extends AbstractChart<CHART_ITEM_TYPE>> T addExtra(String key, Object value)
T
- key
- the key at which the given information is registered.value
- the value registered.
public Object getExtra(String key)
key
- the ket at which the extra data is registered.
public final <T extends AbstractChart<CHART_ITEM_TYPE>> T withTitle(String title)
title
- the title of the chart.
public final String asJson()
Chart
asJson
in interface Chart<CHART_ITEM_TYPE extends ChartItem>
protected void computeExtraDataAsJson(org.json.JSONObject jsonChart)
jsonChart
- the json object that represents the chart.public final List<CHART_ITEM_TYPE> getItems()
Chart
getItems
in interface Chart<CHART_ITEM_TYPE extends ChartItem>
protected <T extends AbstractChart<CHART_ITEM_TYPE>> T add(CHART_ITEM_TYPE item)
T
- item
- the chart item to add.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |