|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.jasperreports.engine.export.FlashPrintElement
public final class FlashPrintElement
Utility class that creates generic print elements of Flash type.
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
Field Summary | |
---|---|
static java.lang.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 java.util.regex.Pattern |
LINK_PATTERN
|
static java.lang.String |
PARAMETER_FLASH_VAR_PREFIX
The prefix of parameter names that acts as Flash variables. |
static java.lang.String |
PARAMETER_SWF_URL
The name of the parameter that provides the URL of the SWF movie. |
static java.lang.String |
PROPERTY_ALLOW_SCRIPT_ACCESS
Property that determines the value of the allowScriptAccess parameter for Flash elements. |
static java.lang.String |
PROPERTY_IGNORE_SIZE
Boolean property used to avoid setting the width and height of the SWFLoader control in the Flash report viewer. |
Method Summary | |
---|---|
static GenericElementHandlerBundle |
getHandlerBundle()
Returns the bundle of export handlers for Flash elements. |
static JRGenericPrintElement |
makeFlashElement(JRPrintElement template,
java.lang.String swfUrl,
java.util.Map<java.lang.String,java.lang.Object> flashVars,
java.util.Map<java.lang.String,java.lang.Object> elementParameters)
Creates a Flash generic element by copying all base element attributes from a template instance. |
static java.lang.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 java.lang.String |
makeLinkPlaceholder(JRPrintHyperlink hyperlink)
Returns a placeholder to be used in a Flash variable for a hyperlink. |
static java.lang.String |
makeLinkPlaceholder(java.lang.String linkId)
Returns a placeholder to be used in a Flash variable for a hyperlink. |
static java.lang.String |
resolveLinks(java.lang.String text,
JRGenericPrintElement element,
JRHyperlinkProducer linkProducer)
Resolves hyperlink placeholders to URLs in a Flash variable. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String FLASH_ELEMENT_NAME
public static final JRGenericElementType FLASH_ELEMENT_TYPE
public static final java.lang.String PARAMETER_SWF_URL
public static final java.lang.String PARAMETER_FLASH_VAR_PREFIX
public static final java.lang.String PROPERTY_IGNORE_SIZE
Defaults to false
.
public static final java.lang.String PROPERTY_ALLOW_SCRIPT_ACCESS
The property can be set at element, report and system levels.
protected static final java.util.regex.Pattern LINK_PATTERN
protected static final int LINK_PARAM_NAME_GROUP
Method Detail |
---|
public static GenericElementHandlerBundle getHandlerBundle()
public static JRGenericPrintElement makeFlashElement(JRPrintElement template, java.lang.String swfUrl, java.util.Map<java.lang.String,java.lang.Object> flashVars, java.util.Map<java.lang.String,java.lang.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 java.lang.String makeLinkParameterName(JRPrintHyperlink hyperlink)
makeLinkPlaceholder(JRPrintHyperlink)
and
resolveLinks(String, JRGenericPrintElement, JRHyperlinkProducer)
.
hyperlink
- the hyperlink
makeLinkPlaceholder(JRPrintHyperlink)
public static java.lang.String makeLinkPlaceholder(JRPrintHyperlink hyperlink)
This method uses System.identityHashCode(hyperlink)
as link Id.
hyperlink
- the hyperlink
makeLinkPlaceholder(String)
public static java.lang.String makeLinkPlaceholder(java.lang.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 name
public static java.lang.String resolveLinks(java.lang.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 URLs
makeLinkPlaceholder(String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |