Class JRDesignHyperlink

java.lang.Object
net.sf.jasperreports.engine.base.JRBaseHyperlink
net.sf.jasperreports.engine.design.JRDesignHyperlink
All Implemented Interfaces:
Serializable, Cloneable, JRChangeEventsSupport, JRCloneable, JRHyperlink

public class JRDesignHyperlink extends JRBaseHyperlink implements JRChangeEventsSupport
Stand-alone implementation of JRHyperlink which should be used for report design purposes.
Author:
Lucian Chirita (lucianc@users.sourceforge.net)
See Also:
  • Field Details

  • Constructor Details

    • JRDesignHyperlink

      public JRDesignHyperlink()
  • Method Details

    • setHyperlinkType

      public void setHyperlinkType(HyperlinkTypeEnum hyperlinkType)
      Sets the link type as a built-in hyperlink type.
      Parameters:
      hyperlinkType - the built-in hyperlink type
      See Also:
    • setHyperlinkTarget

      public void setHyperlinkTarget(HyperlinkTargetEnum hyperlinkTarget)
      Sets the hyperlink target.
      Parameters:
      hyperlinkTarget - the hyperlink target, one of
      See Also:
    • setHyperlinkReferenceExpression

      public void setHyperlinkReferenceExpression(JRExpression hyperlinkReferenceExpression)
      Sets the expression that will generate the hyperlink reference URL or the referred document location.

      This expression is used when the hyperlink type is HyperlinkTypeEnum.REFERENCE, HyperlinkTypeEnum.REMOTE_ANCHOR or HyperlinkTypeEnum.REMOTE_PAGE. The type of the expression should be java.lang.String

      Parameters:
      hyperlinkReferenceExpression - the reference expression
      See Also:
    • setHyperlinkWhenExpression

      public void setHyperlinkWhenExpression(JRExpression hyperlinkWhenExpression)
      Sets the boolean expression that will specify if the hyperlink should be displayed or not.
    • setHyperlinkAnchorExpression

      public void setHyperlinkAnchorExpression(JRExpression hyperlinkAnchorExpression)
      Sets the expression that will generate the referred anchor.

      This expression is used when the hyperlink type is HyperlinkTypeEnum.LOCAL_ANCHOR or HyperlinkTypeEnum.REMOTE_ANCHOR. The type of the expression should be java.lang.String

      Parameters:
      hyperlinkAnchorExpression - the anchor expression
      See Also:
    • setHyperlinkPageExpression

      public void setHyperlinkPageExpression(JRExpression hyperlinkPageExpression)
      Sets the expression that will generate the referred page.

      This expression is used when the hyperlink type is HyperlinkTypeEnum.LOCAL_PAGE or HyperlinkTypeEnum.REMOTE_PAGE. The type of the expression should be java.lang.Integer

      Parameters:
      hyperlinkPageExpression - the page expression
      See Also:
    • setLinkType

      public void setLinkType(String type)
      Sets the hyperlink type.

      The type can be one of the built-in types (Reference, LocalAnchor, LocalPage, RemoteAnchor, RemotePage), or can be an arbitrary type.

      Parameters:
      type - the hyperlink type
    • setLinkTarget

      public void setLinkTarget(String target)
      Sets the hyperlink target name.

      The target name can be one of the built-in names (Self, Blank, Top, Parent), or can be an arbitrary name.

      Parameters:
      target - the hyperlink target name
    • getHyperlinkParameters

      public JRHyperlinkParameter[] getHyperlinkParameters()
      Description copied from interface: JRHyperlink
      Returns the list of hyperlink parameters.

      The parameters can be used by custom hyperlink types to generate dynamic links.

      Specified by:
      getHyperlinkParameters in interface JRHyperlink
      Overrides:
      getHyperlinkParameters in class JRBaseHyperlink
      Returns:
      the list of hyperlink parameters
    • getHyperlinkParametersList

      public List<JRHyperlinkParameter> getHyperlinkParametersList()
      Returns the list of custom hyperlink parameters.
      Returns:
      the list of custom hyperlink parameters
    • addHyperlinkParameter

      public void addHyperlinkParameter(JRHyperlinkParameter parameter)
      Adds a custom hyperlink parameter.
      Parameters:
      parameter - the parameter to add
    • removeHyperlinkParameter

      public void removeHyperlinkParameter(JRHyperlinkParameter parameter)
      Removes a custom hyperlink parameter.
      Parameters:
      parameter - the parameter to remove
    • removeHyperlinkParameter

      public void removeHyperlinkParameter(String parameterName)
      Removes a custom hyperlink parameter.

      If multiple parameters having the specified name exist, all of them will be removed

      Parameters:
      parameterName - the parameter name
    • setHyperlinkTooltipExpression

      public void setHyperlinkTooltipExpression(JRExpression hyperlinkTooltipExpression)
      Sets the expression which will be used to generate the hyperlink tooltip. The type of the expression should be java.lang.String.
      Parameters:
      hyperlinkTooltipExpression - the expression which will be used to generate the hyperlink tooltip
      See Also:
    • clone

      public Object clone()
      Specified by:
      clone in interface JRCloneable
      Overrides:
      clone in class JRBaseHyperlink
    • getEventSupport

      public JRPropertyChangeSupport getEventSupport()
      Description copied from interface: JRChangeEventsSupport
      Returns the property change support object for this instance.
      Specified by:
      getEventSupport in interface JRChangeEventsSupport
      Returns:
      the property change support object for this instance