|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.norther.tammi.core.pool.RecyclableSupport
org.norther.tammi.core.pool.PoolableSupport
org.norther.tammi.spray.engine.tool.GlobalTool
org.norther.tammi.spray.engine.tool.ContextTool
org.norther.tammi.sprig.chart.tool.ChartTool
public class ChartTool
A request context tool for chart generation.
| Constructor Summary | |
|---|---|
ChartTool()
Constructs a new tool. |
|
| Method Summary | |
|---|---|
void |
dispose()
Disposes the object by setting its disposed flag. |
String |
encode(ChartLayout layout,
String type)
Encodes the specified layout and caches it to the content filter. |
String |
encode(ChartLayout layout,
String type,
int quality)
Encodes the specified layout with the given quality and caches it to the content filter. |
ChartModel |
filter(ChartModel model,
OrderedMap<Comparable<?>,Comparable<?>> columns,
OrderedMap<Comparable<?>,Comparable<?>> rows)
Returns a filtered chart model. |
ChartLayout |
generate(ChartModel[] data,
String type,
String orientation)
Generates a chart layout from the specified models. |
ChartLayout |
generate(ChartModel[] data,
String type,
String orientation,
String order,
int index)
Generates an ordered chart from the specified models. |
ChartLayout |
generate(ChartModel data,
String type,
String orientation)
Generates a chart layout from the specified model. |
ChartLayout |
generate(ChartModel data,
String type,
String orientation,
String order,
int index)
Generates an ordered chart from the specified model. |
ChartLayout |
generate(List<? extends ChartModel> list,
String type,
String orientation)
Generates a chart layout from the specified list of models. |
ChartLayout |
generate(List<? extends ChartModel> list,
String type,
String orientation,
String order,
int index)
Generates an ordered chart from the specified list of models. |
protected ChartFilter |
getChartFilter()
Gets the chart filter from the filter stack. |
ChartModel |
rename(ChartModel model,
List<Comparable<?>> columns,
List<Comparable<?>> rows)
Returns a named chart model. |
ChartLayout.ChartType |
toChartType(String str)
Returns the specified chart type. |
ChartLayout.HAlignment |
toHAlignment(String str)
Returns the specified horizontal aligment. |
ChartLayout.Location |
toLocation(String str)
Returns the specified location. |
ChartGenerator.ModelOrder |
toModelOrder(String str)
Returns the specified model order. |
ChartGenerator.Orientation |
toOrientation(String str)
Returns the specified orientation. |
ChartLayout.Position |
toPosition(String str)
Returns the specified axis position. |
ChartLayout.VAlignment |
toVAlignment(String str)
Returns the specified vertical aligment. |
| Methods inherited from class org.norther.tammi.spray.engine.tool.ContextTool |
|---|
getFilter, getFilterChain, getFilterKey, getPrincipal, getRequest, getResponse, isFilterChanged |
| Methods inherited from class org.norther.tammi.spray.engine.tool.GlobalTool |
|---|
clone, getContext, getContextToolFilter, getMBeanServer, isBound, nop, toString, valueBound, valueUnbound |
| Methods inherited from class org.norther.tammi.core.pool.PoolableSupport |
|---|
disposed, recycled |
| Methods inherited from class org.norther.tammi.core.pool.RecyclableSupport |
|---|
isDisposed, recycle |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.norther.tammi.core.pool.Recyclable |
|---|
isDisposed, recycle |
| Constructor Detail |
|---|
public ChartTool()
| Method Detail |
|---|
public void dispose()
RecyclableSupport
dispose in interface Recyclabledispose in class ContextTool
public ChartModel filter(ChartModel model,
OrderedMap<Comparable<?>,Comparable<?>> columns,
OrderedMap<Comparable<?>,Comparable<?>> rows)
model - the chart model.rows - the row filter.columns - the column filter.
public ChartModel rename(ChartModel model,
List<Comparable<?>> columns,
List<Comparable<?>> rows)
model - the chart model.columns - the column names.rows - the row names.
public ChartLayout generate(ChartModel data,
String type,
String orientation)
data - the table model.type - the chart type.orientation - the orientation.
public ChartLayout generate(ChartModel[] data,
String type,
String orientation)
data - the table models.type - the chart type.orientation - the orientation.
public ChartLayout generate(List<? extends ChartModel> list,
String type,
String orientation)
list - the list of table models.type - the chart type.orientation - the orientation.
public ChartLayout generate(ChartModel data,
String type,
String orientation,
String order,
int index)
data - the table model.type - the chart type.orientation - the orientation.order - the table order.index - the model index.
public ChartLayout generate(ChartModel[] data,
String type,
String orientation,
String order,
int index)
data - the table models.type - the chart type.orientation - the orientation.order - the table order.index - the model index.
public ChartLayout generate(List<? extends ChartModel> list,
String type,
String orientation,
String order,
int index)
list - the list of table models.type - the chart type.orientation - the orientation.order - the table order.index - the model index.
public String encode(ChartLayout layout,
String type)
layout - the layout.type - the content type.
public String encode(ChartLayout layout,
String type,
int quality)
layout - the layout.type - the content type.quality - (0 - 100 %).
public ChartGenerator.Orientation toOrientation(String str)
str - the orientation as a string.
public ChartGenerator.ModelOrder toModelOrder(String str)
str - the orientation as a string.
public ChartLayout.ChartType toChartType(String str)
str - the chart type as a string.
public ChartLayout.Location toLocation(String str)
str - the location as a string.
public ChartLayout.HAlignment toHAlignment(String str)
str - the aligment as a string.
public ChartLayout.VAlignment toVAlignment(String str)
str - the aligment as a string.
public ChartLayout.Position toPosition(String str)
str - the position as a string.
protected ChartFilter getChartFilter()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||