public class JSONOutlet extends AbstractOutlet<JSONObject>
| 限定符和类型 | 字段和说明 |
|---|---|
Repository |
repo |
| 构造器和说明 |
|---|
JSONOutlet(ReportPageProvider reportPage,
Repository repo)
初始化一个JSON转化器
|
| 限定符和类型 | 方法和说明 |
|---|---|
JSONObject |
chartOutput(ClippedPageProvider page,
JSONObject parent,
BaseChartPainter chartPainter,
java.awt.Dimension dim,
NodeVisitor visitor)
输出图表对象
|
JSONObject |
clippedPageOutput(ClippedPageProvider page,
JSONObject parentJ,
java.lang.String ids,
NodeVisitor visitor)
剪切出的page页面
|
JSONObject |
footerOutput(ReportSettingsProvider reportSettings,
int left,
int bottom,
int right,
int width,
int height)
页脚 输出
|
JSONObject |
headerOutput(ReportSettingsProvider reportSettings,
int top,
int left,
int right,
int width)
表头输出
|
JSONObject |
out()
输出out
|
JSONObject |
pageContentOutput(java.awt.geom.Rectangle2D paintRectangle,
NodeVisitor toFindCharts)
detail的结构如下:
如果是格子块
{
detail : {
cells : {},
floats : {}
}
}
如果是图表块
{
detail : {
type : "simplechart"
}
}
|
out, pageContentOutputpublic Repository repo
public JSONOutlet(ReportPageProvider reportPage, Repository repo)
reportPage - 表示一个报表分页的对象repo - 模板上下文public JSONObject out() throws java.lang.Exception
java.lang.Exceptionpublic JSONObject headerOutput(ReportSettingsProvider reportSettings, int top, int left, int right, int width) throws JSONException
headerOutput 在接口中 Outlet<JSONObject>headerOutput 在类中 AbstractOutlet<JSONObject>reportSettings - 报表设置top - 上left - 左right - 右width - 宽度JSONExceptionpublic JSONObject footerOutput(ReportSettingsProvider reportSettings, int left, int bottom, int right, int width, int height) throws JSONException
footerOutput 在接口中 Outlet<JSONObject>footerOutput 在类中 AbstractOutlet<JSONObject>reportSettings - 报表设置left - 左bottom - 下right - 右width - 宽度height - 高度JSONExceptionpublic JSONObject pageContentOutput(java.awt.geom.Rectangle2D paintRectangle, NodeVisitor toFindCharts) throws java.lang.Exception
toFindCharts - 图表查找paintRectangle - 块所占据的区域java.lang.Exception - 转换为JSON对象出错时抛出此异常public JSONObject clippedPageOutput(ClippedPageProvider page, JSONObject parentJ, java.lang.String ids, NodeVisitor visitor) throws JSONException, OutputException
clippedPageOutput 在接口中 Outlet<JSONObject>clippedPageOutput 在类中 AbstractOutlet<JSONObject>page - 页面parentJ - 父jsonids - 名称idvisitor - 图表查找JSONExceptionOutputExceptionpublic JSONObject chartOutput(ClippedPageProvider page, JSONObject parent, BaseChartPainter chartPainter, java.awt.Dimension dim, NodeVisitor visitor) throws JSONException
chartOutput 在接口中 Outlet<JSONObject>chartOutput 在类中 AbstractOutlet<JSONObject>page - 图表块chartPainter - 图表绘图对象parent - 父jsondim - 图表尺寸visitor - 查找JSONException - 如果在输出过程中出现错误则抛出次异常