org.jfree.report.content
Class AnchorContent

java.lang.Object
  |
  +--org.jfree.report.content.AnchorContent

public class AnchorContent
extends java.lang.Object
implements Content

The Anchor content encapsulates possible link targets. Anchors are bound to a certain point on the document and can be referenced using HREF's.

Author:
Thomas Morgner
See Also:
Anchor

Constructor Summary
AnchorContent(Anchor ancor, StrictPoint point)
          Creates a new Anchor content for the given anchor and position.
 
Method Summary
 Anchor getAnchor()
          Returns the anchor contained in this content.
 StrictBounds getBounds()
          Returns the bounds for the content.
 Content getContentForBounds(StrictBounds bounds)
          Returns the content for the given bounds.
 ContentType getContentType()
          Returns the content type (the types include TEXT, IMAGE, SHAPE and CONTAINER).
 StrictBounds getMinimumContentSize()
          Returns the minimum content size.
 void translate(long x, long y)
          Hack-Attack: Used for alignment of the content.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnchorContent

public AnchorContent(Anchor ancor,
                     StrictPoint point)
Creates a new Anchor content for the given anchor and position.
Parameters:
ancor - the anchor
point - the position of the anchor within the page/document.
Method Detail

getBounds

public StrictBounds getBounds()
Returns the bounds for the content. ContentBounds are always relative to the element bounds.
Specified by:
getBounds in interface Content
Returns:
the bounds.

getContentForBounds

public Content getContentForBounds(StrictBounds bounds)
Returns the content for the given bounds. The extracted content is the content that would be displayed in the specific bounds if the content would be printed with clipping enabled at the given boundary.

This method returns null if there is no content in these bounds.

Specified by:
getContentForBounds in interface Content
Parameters:
bounds - the bounds.
Returns:
the content (possibly null).

getContentType

public ContentType getContentType()
Returns the content type (the types include TEXT, IMAGE, SHAPE and CONTAINER).
Specified by:
getContentType in interface Content
Returns:
the content type.

getMinimumContentSize

public StrictBounds getMinimumContentSize()
Returns the minimum content size.
Specified by:
getMinimumContentSize in interface Content
Returns:
the minimum size.

getAnchor

public Anchor getAnchor()
Returns the anchor contained in this content.
Returns:
the anchor.

translate

public void translate(long x,
                      long y)
Hack-Attack: Used for alignment of the content.
Specified by:
translate in interface Content
Parameters:
x - the x translation.
y - the y translation.