Class CVElementJsonHandler
- java.lang.Object
-
- net.sf.jasperreports.customvisualization.export.CVElementAbstractGenericHandler
-
- net.sf.jasperreports.customvisualization.export.CVElementJsonHandler
-
- All Implemented Interfaces:
net.sf.jasperreports.engine.export.GenericElementHandler,net.sf.jasperreports.engine.export.GenericElementJsonHandler
public class CVElementJsonHandler extends CVElementAbstractGenericHandler implements net.sf.jasperreports.engine.export.GenericElementJsonHandler
- Author:
- Giulio Toffoli (gt78@users.sourceforge.net)
-
-
Constructor Summary
Constructors Constructor Description CVElementJsonHandler()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Map<String,Object>createConfigurationForJSON(Map<String,Object> configuration, net.sf.jasperreports.engine.export.HtmlResourceHandler htmlResourceHandler)Clean the configuration object.static CVElementJsonHandlergetInstance()StringgetJsonFragment(net.sf.jasperreports.engine.export.JsonExporterContext context, net.sf.jasperreports.engine.JRGenericPrintElement element)Creates the main component configuration.protected static StringgetResourceURL(String scriptResourceLocation, net.sf.jasperreports.engine.export.HtmlResourceHandler htmlResourceHandler)-
Methods inherited from class net.sf.jasperreports.customvisualization.export.CVElementAbstractGenericHandler
isUrl, toExport
-
-
-
-
Method Detail
-
getInstance
public static CVElementJsonHandler getInstance()
-
getJsonFragment
public String getJsonFragment(net.sf.jasperreports.engine.export.JsonExporterContext context, net.sf.jasperreports.engine.JRGenericPrintElement element)
Creates the main component configuration. This also includes the information about which renderer to use.- Specified by:
getJsonFragmentin interfacenet.sf.jasperreports.engine.export.GenericElementJsonHandler- Parameters:
context-element-- Returns:
-
createConfigurationForJSON
public static Map<String,Object> createConfigurationForJSON(Map<String,Object> configuration, net.sf.jasperreports.engine.export.HtmlResourceHandler htmlResourceHandler)
Clean the configuration object. This function removes objects in the configuration map that are not convertible in JSON (script object and design element). It also adds some useful properties for the element such as width, height and all the elements properties in form of property.xyz- Parameters:
configuration-- Returns:
-
-