net.sf.jasperreports.engine.base
Class JRBaseHyperlink

java.lang.Object
  extended by 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 of JRHyperlink.

Version:
$Id: JRBaseHyperlink.java 2000 2007-12-05 14:07:13Z teodord $
Author:
Lucian Chirita (lucianc@users.sourceforge.net)
See Also:
Serialized Form

Field Summary
protected  JRExpression hyperlinkAnchorExpression
           
protected  JRExpression hyperlinkPageExpression
           
protected  JRHyperlinkParameter[] hyperlinkParameters
           
protected  JRExpression hyperlinkReferenceExpression
           
protected  byte hyperlinkTarget
           
protected  JRExpression hyperlinkTooltipExpression
           
protected  java.lang.String linkType
           
 
Fields inherited from interface net.sf.jasperreports.engine.JRHyperlink
HYPERLINK_TARGET_BLANK, HYPERLINK_TARGET_SELF, HYPERLINK_TYPE_CUSTOM, HYPERLINK_TYPE_LOCAL_ANCHOR, HYPERLINK_TYPE_LOCAL_PAGE, HYPERLINK_TYPE_NONE, HYPERLINK_TYPE_NULL, HYPERLINK_TYPE_REFERENCE, HYPERLINK_TYPE_REMOTE_ANCHOR, HYPERLINK_TYPE_REMOTE_PAGE
 
Constructor Summary
  JRBaseHyperlink()
          Create an empty hyperlink.
protected JRBaseHyperlink(JRHyperlink link, JRBaseObjectFactory factory)
           
 
Method Summary
 java.lang.Object clone()
           
static JRHyperlinkParameter[] copyHyperlinkParameters(JRHyperlink link, JRBaseObjectFactory factory)
           
 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()
          Retrieves the hyperlink type for the element.
 java.lang.String getLinkType()
          Returns the hyperlink type.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

linkType

protected java.lang.String linkType

hyperlinkTarget

protected byte hyperlinkTarget

hyperlinkReferenceExpression

protected JRExpression hyperlinkReferenceExpression

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: 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

getHyperlinkTarget

public byte getHyperlinkTarget()
Description copied from interface: JRHyperlink
Retrieves the hyperlink target for the element.

Specified by:
getHyperlinkTarget in interface JRHyperlink
Returns:
one of the hyperlink target constants

getHyperlinkType

public byte 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, HYPERLINK_TYPE_CUSTOM is returned.

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

getLinkType

public java.lang.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

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 java.lang.Object clone()
Specified by:
clone in interface JRCloneable
Overrides:
clone in class java.lang.Object


© 2001-2006 JasperSoft Corporation www.jaspersoft.com