|
||||||||||
| 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.
| Field Summary | |
|---|---|
static String |
BY_COLUMN
The column based model order. |
static String |
BY_ROW
The row based model order. |
| Constructor Summary | |
|---|---|
ChartTool()
Constructs a new tool. |
|
| Method Summary | |
|---|---|
void |
dispose()
Disposes the object by setting its disposed flag. |
String |
encode(ChartLayout layout,
String extension)
Encodes the specified layout and caches it to the content filter. |
String |
encode(ChartLayout layout,
String extension,
int quality)
Encodes the specified layout with the given quality and caches it to the content filter. |
ChartModel |
filter(ChartModel model,
OrderedMap rows,
OrderedMap columns)
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 list,
String type,
String orientation)
Generates a chart layout from the specified list of models. |
ChartLayout |
generate(List 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 rows,
List columns)
Returns a named chart model. |
protected int |
toChartType(String type)
Returns the chart type from its string representation. |
protected int |
toModelOrder(String order)
Returns the model order from its string representation. |
protected int |
toOrientation(String orientation)
Returns the chart orientation from its string representation. |
| 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, getName, 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 |
| Field Detail |
|---|
public static final String BY_COLUMN
public static final String BY_ROW
| Constructor Detail |
|---|
public ChartTool()
| Method Detail |
|---|
public void dispose()
RecyclableSupport
dispose in interface Recyclabledispose in class ContextTool
public ChartModel filter(ChartModel model,
OrderedMap rows,
OrderedMap columns)
model - the chart model.rows - the row filter.columns - the column filter.
public ChartModel rename(ChartModel model,
List rows,
List columns)
model - the chart model.rows - the row names.columns - the column 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 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 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 extension)
layout - the layout.extension - the encode type.
public String encode(ChartLayout layout,
String extension,
int quality)
layout - the layout.extension - the encode type.quality - (0 - 100 %).
protected ChartFilter getChartFilter()
protected int toChartType(String type)
type - the string type.
protected int toOrientation(String orientation)
orientation - the string type.
protected int toModelOrder(String order)
order - the string order.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||