net.sf.jasperreports.engine
Interface JRHyperlink

All Superinterfaces:
java.lang.Cloneable, JRCloneable
All Known Subinterfaces:
ChartSettings, JRChart, JRImage, JRTextField
All Known Implementing Classes:
FillChartSettings, JRBaseChart, JRBaseHyperlink, JRBaseImage, JRBaseTextField, JRDesignChart, JRDesignHyperlink, JRDesignImage, JRDesignTextField, JRFillChart, JRFillImage, JRFillTextField, StandardChartSettings

public interface JRHyperlink
extends JRCloneable

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 3502 2010-03-04 11:05:10Z teodord $
Author:
Teodor Danciu (teodord@users.sourceforge.net)
See Also:
JRAnchor

Field Summary
static byte HYPERLINK_TARGET_BLANK
          Deprecated. Replaced by HyperlinkTargetEnum.BLANK.
static byte HYPERLINK_TARGET_CUSTOM
          Deprecated. Replaced by HyperlinkTargetEnum.CUSTOM.
static byte HYPERLINK_TARGET_PARENT
          Deprecated. Replaced by HyperlinkTargetEnum.PARENT.
static byte HYPERLINK_TARGET_SELF
          Deprecated. Replaced by HyperlinkTargetEnum.SELF.
static byte HYPERLINK_TARGET_TOP
          Deprecated. Replaced by HyperlinkTargetEnum.TOP.
static byte HYPERLINK_TYPE_CUSTOM
          Deprecated. Replaced by HyperlinkTypeEnum.CUSTOM.
static byte HYPERLINK_TYPE_LOCAL_ANCHOR
          Deprecated. Replaced by HyperlinkTypeEnum.LOCAL_ANCHOR.
static byte HYPERLINK_TYPE_LOCAL_PAGE
          Deprecated. Replaced by HyperlinkTypeEnum.LOCAL_PAGE.
static byte HYPERLINK_TYPE_NONE
          Deprecated. Replaced by HyperlinkTypeEnum.NONE.
static byte HYPERLINK_TYPE_NULL
          Deprecated. Replaced by HyperlinkTypeEnum.NULL.
static byte HYPERLINK_TYPE_REFERENCE
          Deprecated. Replaced by HyperlinkTypeEnum.REFERENCE.
static byte HYPERLINK_TYPE_REMOTE_ANCHOR
          Deprecated. Replaced by HyperlinkTypeEnum.REMOTE_ANCHOR.
static byte HYPERLINK_TYPE_REMOTE_PAGE
          Deprecated. Replaced by HyperlinkTypeEnum.REMOTE_PAGE.
 
Method Summary
 JRExpression getHyperlinkAnchorExpression()
          Returns the expression whose value represents the anchor.
 JRExpression getHyperlinkPageExpression()
          Returns an integer representing the page index of the link.
 JRHyperlinkParameter[] getHyperlinkParameters()
          Returns the list of hyperlink parameters.
 JRExpression getHyperlinkReferenceExpression()
          Returns the expression whose value represents the hyperlink reference.
 byte getHyperlinkTarget()
          Retrieves the hyperlink target for the element.
 JRExpression getHyperlinkTooltipExpression()
          Returns the expression which will generate the hyperlink tooltip.
 byte getHyperlinkType()
          Deprecated. Replaced by getHyperlinkTypeValue().
 HyperlinkTypeEnum getHyperlinkTypeValue()
          Retrieves the hyperlink type for the element.
 java.lang.String getLinkTarget()
          Returns the hyperlink target name.
 java.lang.String getLinkType()
          Returns the hyperlink type.
 
Methods inherited from interface net.sf.jasperreports.engine.JRCloneable
clone
 

Field Detail

HYPERLINK_TYPE_NONE

static final byte HYPERLINK_TYPE_NONE
Deprecated. Replaced by HyperlinkTypeEnum.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

static final byte HYPERLINK_TYPE_REFERENCE
Deprecated. Replaced by HyperlinkTypeEnum.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

static final byte HYPERLINK_TYPE_LOCAL_ANCHOR
Deprecated. Replaced by HyperlinkTypeEnum.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

static final byte HYPERLINK_TYPE_LOCAL_PAGE
Deprecated. Replaced by HyperlinkTypeEnum.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

static final byte HYPERLINK_TYPE_REMOTE_ANCHOR
Deprecated. Replaced by HyperlinkTypeEnum.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

static final byte HYPERLINK_TYPE_REMOTE_PAGE
Deprecated. Replaced by HyperlinkTypeEnum.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_TYPE_NULL

static final byte HYPERLINK_TYPE_NULL
Deprecated. Replaced by HyperlinkTypeEnum.NULL.
Not set hyperlink type.

See Also:
Constant Field Values

HYPERLINK_TYPE_CUSTOM

static final byte HYPERLINK_TYPE_CUSTOM
Deprecated. Replaced by HyperlinkTypeEnum.CUSTOM.
Custom hyperlink type.

The specific type is determined by getLinkType().

See Also:
Constant Field Values

HYPERLINK_TARGET_SELF

static final byte HYPERLINK_TARGET_SELF
Deprecated. Replaced by HyperlinkTargetEnum.SELF.
Constant useful for specifying that the hyperlink will be opened in the same window.

See Also:
Constant Field Values

HYPERLINK_TARGET_BLANK

static final byte HYPERLINK_TARGET_BLANK
Deprecated. Replaced by HyperlinkTargetEnum.BLANK.
Constant useful for specifying that the hyperlink will be opened in a new window.

See Also:
Constant Field Values

HYPERLINK_TARGET_PARENT

static final byte HYPERLINK_TARGET_PARENT
Deprecated. Replaced by HyperlinkTargetEnum.PARENT.
Constant useful for specifying that the hyperlink will be opened in the parent frame.

See Also:
Constant Field Values

HYPERLINK_TARGET_TOP

static final byte HYPERLINK_TARGET_TOP
Deprecated. Replaced by HyperlinkTargetEnum.TOP.
Constant useful for specifying that the hyperlink will be opened in the top frame.

See Also:
Constant Field Values

HYPERLINK_TARGET_CUSTOM

static final byte HYPERLINK_TARGET_CUSTOM
Deprecated. Replaced by HyperlinkTargetEnum.CUSTOM.
Custom hyperlink target name.

The specific target name is determined by getLinkTarget().

See Also:
Constant Field Values
Method Detail

getHyperlinkType

byte getHyperlinkType()
Deprecated. Replaced by getHyperlinkTypeValue().


getHyperlinkTypeValue

HyperlinkTypeEnum getHyperlinkTypeValue()
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.

Returns:
one of the hyperlink type constants
See Also:
getLinkType()

getHyperlinkTarget

byte getHyperlinkTarget()
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, HYPERLINK_TYPE_CUSTOM is returned.

Returns:
one of the hyperlink target constants
See Also:
getLinkTarget()

getHyperlinkReferenceExpression

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


getHyperlinkAnchorExpression

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


getHyperlinkPageExpression

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.


getLinkType

java.lang.String getLinkType()
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.

Returns:
the hyperlink type

getLinkTarget

java.lang.String getLinkTarget()
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.

Returns:
the hyperlink target name

getHyperlinkParameters

JRHyperlinkParameter[] getHyperlinkParameters()
Returns the list of hyperlink parameters.

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

Returns:
the list of hyperlink parameters

getHyperlinkTooltipExpression

JRExpression getHyperlinkTooltipExpression()
Returns the expression which will generate the hyperlink tooltip.

Returns:
the expression which will generate the hyperlink tooltip


© 2001-2010 Jaspersoft Corporation www.jaspersoft.com