public final class FlashPrintElement extends Object
Such an element has a parameter that provides the URL of the SWF movie, and a list of parameters that acts a Flash variables.
FlashHtmlHandler
Modifier and Type | Field and Description |
---|---|
static String |
FLASH_ELEMENT_NAME
The name of Flash generic elements.
|
static JRGenericElementType |
FLASH_ELEMENT_TYPE
The qualified type of Flash generic elements.
|
protected static int |
LINK_PARAM_NAME_GROUP |
protected static Pattern |
LINK_PATTERN |
static String |
PARAMETER_FLASH_VAR_PREFIX
The prefix of parameter names that acts as Flash variables.
|
static String |
PARAMETER_SWF_URL
The name of the parameter that provides the URL of the SWF movie.
|
static String |
PROPERTY_ALLOW_SCRIPT_ACCESS
Property that determines the value of the allowScriptAccess parameter for Flash elements.
|
static String |
PROPERTY_IGNORE_SIZE
Boolean property used to avoid setting the width and height of the SWFLoader control in the Flash report viewer.
|
Modifier and Type | Method and Description |
---|---|
static GenericElementHandlerBundle |
getHandlerBundle()
Returns the bundle of export handlers for Flash elements.
|
static JRGenericPrintElement |
makeFlashElement(JRPrintElement template,
String swfUrl,
Map<String,Object> flashVars,
Map<String,Object> elementParameters)
Creates a Flash generic element by copying all base element attributes
from a template instance.
|
static String |
makeLinkParameterName(JRPrintHyperlink hyperlink)
Returns the name of the parameter to be used for a hyperlink, as used
by
makeLinkPlaceholder(JRPrintHyperlink) and
resolveLinks(String, JRGenericPrintElement, JRHyperlinkProducer) . |
static String |
makeLinkPlaceholder(JRPrintHyperlink hyperlink)
Returns a placeholder to be used in a Flash variable for a hyperlink.
|
static String |
makeLinkPlaceholder(String linkId)
Returns a placeholder to be used in a Flash variable for a hyperlink.
|
static String |
resolveLinks(String text,
JRGenericPrintElement element,
JRHyperlinkProducer linkProducer)
Resolves hyperlink placeholders to URLs in a Flash variable.
|
public static final String FLASH_ELEMENT_NAME
public static final JRGenericElementType FLASH_ELEMENT_TYPE
public static final String PARAMETER_SWF_URL
public static final String PARAMETER_FLASH_VAR_PREFIX
public static final String PROPERTY_IGNORE_SIZE
Defaults to false
.
public static final String PROPERTY_ALLOW_SCRIPT_ACCESS
The property can be set at element, report and system levels.
protected static final Pattern LINK_PATTERN
protected static final int LINK_PARAM_NAME_GROUP
public static GenericElementHandlerBundle getHandlerBundle()
public static JRGenericPrintElement makeFlashElement(JRPrintElement template, String swfUrl, Map<String,Object> flashVars, Map<String,Object> elementParameters)
template
- the element from which to copy base attributesswfUrl
- the URL of the SWF movieflashVars
- a map of Flash variableselementParameters
- additional parameters to be set on the Flash element.
Hyperlink objects need to be set as element parameters.public static String makeLinkParameterName(JRPrintHyperlink hyperlink)
makeLinkPlaceholder(JRPrintHyperlink)
and
resolveLinks(String, JRGenericPrintElement, JRHyperlinkProducer)
.hyperlink
- the hyperlinkmakeLinkPlaceholder(JRPrintHyperlink)
public static String makeLinkPlaceholder(JRPrintHyperlink hyperlink)
This method uses System.identityHashCode(hyperlink)
as link Id.
hyperlink
- the hyperlinkmakeLinkPlaceholder(String)
public static String makeLinkPlaceholder(String linkId)
The placeholders will be resolved to links at export time by
resolveLinks(String, JRGenericPrintElement, JRHyperlinkProducer)
.
linkId
- the Id of the link, which needs to be used as hyperlink
parameter namepublic static String resolveLinks(String text, JRGenericPrintElement element, JRHyperlinkProducer linkProducer)
text
- the text in which hyperlink placeholders are to be replacedelement
- the print element where hyperlink parameters will be looked forlinkProducer
- the hyperlink producer which transforms hyperlink
objects to String URLsmakeLinkPlaceholder(String)
Copyright © 2013. All Rights Reserved.