Class JRBaseHyperlink

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

public class JRBaseHyperlink extends Object implements JRHyperlink, Serializable
Read-only implementation of JRHyperlink.
Author:
Lucian Chirita (lucianc@users.sourceforge.net)
See Also:
  • Field Details

    • linkType

      protected String linkType
    • linkTarget

      protected 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 Details

    • JRBaseHyperlink

      public JRBaseHyperlink()
      Create an empty hyperlink.
    • JRBaseHyperlink

      protected JRBaseHyperlink(JRHyperlink link, JRBaseObjectFactory factory)
  • Method Details

    • copyHyperlinkParameters

      public static JRHyperlinkParameter[] copyHyperlinkParameters(JRHyperlink link, JRBaseObjectFactory factory)
    • getHyperlinkAnchorExpression

      public JRExpression getHyperlinkAnchorExpression()
      Description copied from interface: JRHyperlink
      Returns the expression whose value represents the anchor. It is only used when the hyperlink type is anchor.
      Specified by:
      getHyperlinkAnchorExpression in interface JRHyperlink
    • getHyperlinkPageExpression

      public JRExpression getHyperlinkPageExpression()
      Description copied from interface: JRHyperlink
      Returns 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:
      getHyperlinkPageExpression in interface JRHyperlink
    • 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
      Returns:
      the list of hyperlink parameters
    • getHyperlinkReferenceExpression

      public JRExpression getHyperlinkReferenceExpression()
      Description copied from interface: JRHyperlink
      Returns the expression whose value represents the hyperlink reference. It is only used when the hyperlink type is reference or anchor
      Specified by:
      getHyperlinkReferenceExpression in interface JRHyperlink
    • getHyperlinkWhenExpression

      public JRExpression getHyperlinkWhenExpression()
      Description copied from interface: JRHyperlink
      Returns the expression that is evaluated in order to decide if the hyperlink should be displayed. This expression always returns a boolean value.
      Specified by:
      getHyperlinkWhenExpression in interface JRHyperlink
    • getHyperlinkTarget

      public HyperlinkTargetEnum getHyperlinkTarget()
      Description copied from interface: JRHyperlink
      Retrieves 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.CUSTOM is returned.

      Specified by:
      getHyperlinkTarget in interface JRHyperlink
      Returns:
      one of the hyperlink target constants
      See Also:
    • getHyperlinkType

      public HyperlinkTypeEnum getHyperlinkType()
      Description copied from interface: JRHyperlink
      Retrieves 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, CUSTOM is returned.

      Specified by:
      getHyperlinkType in interface JRHyperlink
      Returns:
      one of the hyperlink type constants
      See Also:
    • getLinkType

      public String getLinkType()
      Description copied from interface: JRHyperlink
      Returns 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:
      getLinkType in interface JRHyperlink
      Returns:
      the hyperlink type
    • getLinkTarget

      public String getLinkTarget()
      Description copied from interface: JRHyperlink
      Returns 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:
      getLinkTarget in interface JRHyperlink
      Returns:
      the hyperlink target name
    • getHyperlinkTooltipExpression

      public JRExpression getHyperlinkTooltipExpression()
      Description copied from interface: JRHyperlink
      Returns the expression which will generate the hyperlink tooltip.
      Specified by:
      getHyperlinkTooltipExpression in interface JRHyperlink
      Returns:
      the expression which will generate the hyperlink tooltip
    • clone

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