Class JRBaseHyperlink
- java.lang.Object
-
- net.sf.jasperreports.engine.base.JRBaseHyperlink
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,JRCloneable,JRHyperlink
- Direct Known Subclasses:
JRDesignHyperlink
public class JRBaseHyperlink extends java.lang.Object implements JRHyperlink, java.io.Serializable
Read-only implementation ofJRHyperlink.- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected JRExpressionhyperlinkAnchorExpressionprotected JRExpressionhyperlinkPageExpressionprotected JRHyperlinkParameter[]hyperlinkParametersprotected JRExpressionhyperlinkReferenceExpressionprotected JRExpressionhyperlinkTooltipExpressionprotected JRExpressionhyperlinkWhenExpressionprotected java.lang.StringlinkTargetprotected java.lang.StringlinkType
-
Constructor Summary
Constructors Modifier Constructor Description JRBaseHyperlink()Create an empty hyperlink.protectedJRBaseHyperlink(JRHyperlink link, JRBaseObjectFactory factory)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.Objectclone()static JRHyperlinkParameter[]copyHyperlinkParameters(JRHyperlink link, JRBaseObjectFactory factory)JRExpressiongetHyperlinkAnchorExpression()Returns the expression whose value represents the anchor.JRExpressiongetHyperlinkPageExpression()Returns an integer representing the page index of the link.JRHyperlinkParameter[]getHyperlinkParameters()Returns the list of hyperlink parameters.JRExpressiongetHyperlinkReferenceExpression()Returns the expression whose value represents the hyperlink reference.bytegetHyperlinkTarget()Deprecated.Replaced bygetHyperlinkTypeValue().HyperlinkTargetEnumgetHyperlinkTargetValue()Retrieves the hyperlink target for the element.JRExpressiongetHyperlinkTooltipExpression()Returns the expression which will generate the hyperlink tooltip.bytegetHyperlinkType()Deprecated.Replaced bygetHyperlinkTypeValue().HyperlinkTypeEnumgetHyperlinkTypeValue()Retrieves the hyperlink type for the element.JRExpressiongetHyperlinkWhenExpression()Returns the expression that is evaluated in order to decide if the hyperlink should be displayed.java.lang.StringgetLinkTarget()Returns the hyperlink target name.java.lang.StringgetLinkType()Returns the hyperlink type.
-
-
-
Field Detail
-
linkType
protected java.lang.String linkType
-
linkTarget
protected java.lang.String linkTarget
-
hyperlinkReferenceExpression
protected JRExpression hyperlinkReferenceExpression
-
hyperlinkWhenExpression
protected JRExpression hyperlinkWhenExpression
-
hyperlinkAnchorExpression
protected JRExpression hyperlinkAnchorExpression
-
hyperlinkPageExpression
protected JRExpression hyperlinkPageExpression
-
hyperlinkTooltipExpression
protected JRExpression hyperlinkTooltipExpression
-
hyperlinkParameters
protected JRHyperlinkParameter[] hyperlinkParameters
-
-
Constructor Detail
-
JRBaseHyperlink
public JRBaseHyperlink()
Create an empty hyperlink.
-
JRBaseHyperlink
protected JRBaseHyperlink(JRHyperlink link, JRBaseObjectFactory factory)
-
-
Method Detail
-
copyHyperlinkParameters
public static JRHyperlinkParameter[] copyHyperlinkParameters(JRHyperlink link, JRBaseObjectFactory factory)
-
getHyperlinkAnchorExpression
public JRExpression getHyperlinkAnchorExpression()
Description copied from interface:JRHyperlinkReturns the expression whose value represents the anchor. It is only used when the hyperlink type is anchor.- Specified by:
getHyperlinkAnchorExpressionin interfaceJRHyperlink
-
getHyperlinkPageExpression
public JRExpression getHyperlinkPageExpression()
Description copied from interface:JRHyperlinkReturns an integer representing the page index of the link. It is only used when the hyperlink type is page. If the expression does not evaluate to an integer, an exception will be thrown.- Specified by:
getHyperlinkPageExpressionin interfaceJRHyperlink
-
getHyperlinkParameters
public JRHyperlinkParameter[] getHyperlinkParameters()
Description copied from interface:JRHyperlinkReturns the list of hyperlink parameters.The parameters can be used by custom hyperlink types to generate dynamic links.
- Specified by:
getHyperlinkParametersin interfaceJRHyperlink- Returns:
- the list of hyperlink parameters
-
getHyperlinkReferenceExpression
public JRExpression getHyperlinkReferenceExpression()
Description copied from interface:JRHyperlinkReturns the expression whose value represents the hyperlink reference. It is only used when the hyperlink type is reference or anchor- Specified by:
getHyperlinkReferenceExpressionin interfaceJRHyperlink
-
getHyperlinkWhenExpression
public JRExpression getHyperlinkWhenExpression()
Description copied from interface:JRHyperlinkReturns the expression that is evaluated in order to decide if the hyperlink should be displayed. This expression always returns a boolean value.- Specified by:
getHyperlinkWhenExpressionin interfaceJRHyperlink
-
getHyperlinkTarget
public byte getHyperlinkTarget()
Deprecated.Replaced bygetHyperlinkTypeValue().- Specified by:
getHyperlinkTargetin interfaceJRHyperlink
-
getHyperlinkTargetValue
public HyperlinkTargetEnum getHyperlinkTargetValue()
Description copied from interface:JRHyperlinkRetrieves the hyperlink target for the element.The actual hyperlink target is determined by
getLinkTarget(). This method can is used to determine whether the hyperlink target is one of the built-in target names or a custom one. When hyperlink has a custom target name,HyperlinkTargetEnum.CUSTOMis returned.- Specified by:
getHyperlinkTargetValuein interfaceJRHyperlink- Returns:
- one of the hyperlink target constants
- See Also:
JRHyperlink.getLinkTarget()
-
getHyperlinkType
public byte getHyperlinkType()
Deprecated.Replaced bygetHyperlinkTypeValue().
-
getHyperlinkTypeValue
public HyperlinkTypeEnum getHyperlinkTypeValue()
Description copied from interface:JRHyperlinkRetrieves the hyperlink type for the element.The actual hyperlink type is determined by
getLinkType(). This method can is used to determine whether the hyperlink type is one of the built-in types or a custom type. When hyperlink is of custom type,CUSTOMis returned.- Specified by:
getHyperlinkTypeValuein interfaceJRHyperlink- Returns:
- one of the hyperlink type constants
- See Also:
JRHyperlink.getLinkType()
-
getLinkType
public java.lang.String getLinkType()
Description copied from interface:JRHyperlinkReturns the hyperlink type.The type can be one of the built-in types (Reference, LocalAnchor, LocalPage, RemoteAnchor, RemotePage), or can be an arbitrary type.
- Specified by:
getLinkTypein interfaceJRHyperlink- Returns:
- the hyperlink type
-
getLinkTarget
public java.lang.String getLinkTarget()
Description copied from interface:JRHyperlinkReturns the hyperlink target name.The type can be one of the built-in names (Self, Blank, Top, Parent), or can be an arbitrary name.
- Specified by:
getLinkTargetin interfaceJRHyperlink- Returns:
- the hyperlink target name
-
getHyperlinkTooltipExpression
public JRExpression getHyperlinkTooltipExpression()
Description copied from interface:JRHyperlinkReturns the expression which will generate the hyperlink tooltip.- Specified by:
getHyperlinkTooltipExpressionin interfaceJRHyperlink- Returns:
- the expression which will generate the hyperlink tooltip
-
clone
public java.lang.Object clone()
- Specified by:
clonein interfaceJRCloneable- Overrides:
clonein classjava.lang.Object
-
-