net.sf.jasperreports.engine
Interface JRHyperlink

All Known Subinterfaces:
JRChart, JRImage, JRTextField
All Known Implementing Classes:
JRBaseChart, JRBaseImage, JRBaseTextField, JRDesignChart, JRDesignImage, JRDesignTextField, JRFillChart, JRFillImage, JRFillTextField

public interface JRHyperlink

An interface providing hyperlink functionality. It must be implemented by elements that can contain hyperlinks. There are three types of hyperlinks: reference, anchor and page. The reference type just points to an external resource. The anchor type can point to an anchor in the current document or inside an external referenced document. In the latter case, users have to specify both an anchor expression and a reference expression. The page type can point to the beginning of a specific page in the current document or an external document (in the same way that anchor type does).

Version:
$Id: JRHyperlink.java,v 1.10 2005/06/27 07:16:27 teodord Exp $
Author:
Teodor Danciu (teodord@users.sourceforge.net)
See Also:
JRAnchor

Field Summary
static byte HYPERLINK_TARGET_BLANK
          Constant useful for specifying that the hyperlink will be opened in a new window.
static byte HYPERLINK_TARGET_SELF
          Constant useful for specifying that the hyperlink will be opened in the same window.
static byte HYPERLINK_TYPE_LOCAL_ANCHOR
          Constant useful for specifying that the hyperlink points to a local anchor, specified by the hyperlink anchor expression.
static byte HYPERLINK_TYPE_LOCAL_PAGE
          Constant useful for specifying that the hyperlink points to a 1 based page index within the current document.
static byte HYPERLINK_TYPE_NONE
          Constant useful for specifying that the element does not contain a hyperlink.
static byte HYPERLINK_TYPE_REFERENCE
          Constant useful for specifying that the hyperlink points to an external resource specified by the hyperlink reference expression.
static byte HYPERLINK_TYPE_REMOTE_ANCHOR
          Constant useful for specifying that the hyperlink points to a remote anchor (specified by the hyperlink anchor expression) within an external document (specified by the hyperlink reference expression).
static byte HYPERLINK_TYPE_REMOTE_PAGE
          Constant useful for specifying that the hyperlink points to a 1 based page index within an external document (specified by the hyperlink reference expression).
 
Method Summary
 JRExpression getHyperlinkAnchorExpression()
          Returns the expression whose value represents the anchor.
 JRExpression getHyperlinkPageExpression()
          Returns an integer representing the page index of the link.
 JRExpression getHyperlinkReferenceExpression()
          Returns the expression whose value represents the hyperlink reference.
 byte getHyperlinkTarget()
          Retrieves the hyperlink target for the element.
 byte getHyperlinkType()
          Retrieves the hyperlink type for the element.
 

Field Detail

HYPERLINK_TYPE_NONE

public static final byte HYPERLINK_TYPE_NONE
Constant useful for specifying that the element does not contain a hyperlink. This is the default value for a hyperlink type.

See Also:
Constant Field Values

HYPERLINK_TYPE_REFERENCE

public static final byte HYPERLINK_TYPE_REFERENCE
Constant useful for specifying that the hyperlink points to an external resource specified by the hyperlink reference expression.

See Also:
getHyperlinkReferenceExpression(), Constant Field Values

HYPERLINK_TYPE_LOCAL_ANCHOR

public static final byte HYPERLINK_TYPE_LOCAL_ANCHOR
Constant useful for specifying that the hyperlink points to a local anchor, specified by the hyperlink anchor expression.

See Also:
getHyperlinkAnchorExpression(), Constant Field Values

HYPERLINK_TYPE_LOCAL_PAGE

public static final byte HYPERLINK_TYPE_LOCAL_PAGE
Constant useful for specifying that the hyperlink points to a 1 based page index within the current document.

See Also:
Constant Field Values

HYPERLINK_TYPE_REMOTE_ANCHOR

public static final byte HYPERLINK_TYPE_REMOTE_ANCHOR
Constant useful for specifying that the hyperlink points to a remote anchor (specified by the hyperlink anchor expression) within an external document (specified by the hyperlink reference expression).

See Also:
getHyperlinkAnchorExpression(), getHyperlinkReferenceExpression(), Constant Field Values

HYPERLINK_TYPE_REMOTE_PAGE

public static final byte HYPERLINK_TYPE_REMOTE_PAGE
Constant useful for specifying that the hyperlink points to a 1 based page index within an external document (specified by the hyperlink reference expression).

See Also:
Constant Field Values

HYPERLINK_TARGET_SELF

public static final byte HYPERLINK_TARGET_SELF
Constant useful for specifying that the hyperlink will be opened in the same window.

See Also:
Constant Field Values

HYPERLINK_TARGET_BLANK

public static final byte HYPERLINK_TARGET_BLANK
Constant useful for specifying that the hyperlink will be opened in a new window.

See Also:
Constant Field Values
Method Detail

getHyperlinkType

public byte getHyperlinkType()
Retrieves the hyperlink type for the element.

Returns:
one of the hyperlink type constants

getHyperlinkTarget

public byte getHyperlinkTarget()
Retrieves the hyperlink target for the element.

Returns:
one of the hyperlink target constants

getHyperlinkReferenceExpression

public JRExpression getHyperlinkReferenceExpression()
Returns the expression whose value represents the hyperlink reference. It is only used when the hyperlink type is reference or anchor


getHyperlinkAnchorExpression

public JRExpression getHyperlinkAnchorExpression()
Returns the expression whose value represents the anchor. It is only used when the hyperlink type is anchor.


getHyperlinkPageExpression

public JRExpression getHyperlinkPageExpression()
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.



© 2001-2005 JasperSoft Corporation www.jaspersoft.com