org.jfree.report.layout
Class DefaultLayoutSupport

java.lang.Object
  extended byorg.jfree.report.layout.DefaultLayoutSupport
All Implemented Interfaces:
LayoutSupport

public class DefaultLayoutSupport
extends java.lang.Object
implements LayoutSupport

The DefaultLayoutSupport uses the AWT to estaminate the content sizes. A LayoutSupport contains all methods required to estaminate sizes for the content-creation.

Author:
Thomas Morgner
See Also:
Content

Constructor Summary
DefaultLayoutSupport()
          Default-Constructor.
 
Method Summary
 SizeCalculator createTextSizeCalculator(FontDefinition font)
          Creates a size calculator for the current state of the output target.
 ContentFactory getContentFactory()
          Returns the assigned content factory for the target.
static DefaultLayoutSupport getDefaultInstance()
          Returns the single instance of this class.
 float getHorizontalAlignmentBorder()
          Returns the element alignment.
 float getVerticalAlignmentBorder()
          Returns the element alignment.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultLayoutSupport

public DefaultLayoutSupport()
Default-Constructor.

Method Detail

getDefaultInstance

public static DefaultLayoutSupport getDefaultInstance()
Returns the single instance of this class.

Returns:
The single instance of this class.

createTextSizeCalculator

public SizeCalculator createTextSizeCalculator(FontDefinition font)
                                        throws SizeCalculatorException
Creates a size calculator for the current state of the output target. The calculator is used to calculate the string width and line height and later maybe more...

Specified by:
createTextSizeCalculator in interface LayoutSupport
Parameters:
font - the font.
Returns:
the size calculator.
Throws:
SizeCalculatorException - if there is a problem with the output target.

getVerticalAlignmentBorder

public float getVerticalAlignmentBorder()
Returns the element alignment. Elements will be layouted aligned to this border, so that mod(X, horizontalAlignment) == 0 and mod(Y, verticalAlignment) == 0. Returning 0 will disable the alignment.

Specified by:
getVerticalAlignmentBorder in interface LayoutSupport
Returns:
the vertical alignment grid boundry

getHorizontalAlignmentBorder

public float getHorizontalAlignmentBorder()
Returns the element alignment. Elements will be layouted aligned to this border, so that mod(X, horizontalAlignment) == 0 and mod(Y, verticalAlignment) == 0. Returning 0 will disable the alignment.

Specified by:
getHorizontalAlignmentBorder in interface LayoutSupport
Returns:
the vertical alignment grid boundry

getContentFactory

public ContentFactory getContentFactory()
Returns the assigned content factory for the target.

Specified by:
getContentFactory in interface LayoutSupport
Returns:
the content factory.