org.jfree.report.layout
Class DefaultLayoutSupport

java.lang.Object
  |
  +--org.jfree.report.layout.DefaultLayoutSupport

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(boolean useMaxLineHeight, boolean imageResolutionMapping)
          Default-Constructor.
DefaultLayoutSupport(ContentFactory cf, boolean useMaxLineHeight, boolean imageResolutionMapping)
           
 
Method Summary
 SizeCalculator createTextSizeCalculator(FontDefinition font)
          Creates a size calculator for the current state of the output target.
 LayoutManagerCache getCache()
           
 ContentFactory getContentFactory()
          RetFixurns the assigned content factory for the target.
 float getHorizontalAlignmentBorder()
          Returns the element alignment.
 long getInternalHorizontalAlignmentBorder()
          Returns the element alignment.
 long getInternalVerticalAlignmentBorder()
          Returns the element alignment.
 float getVerticalAlignmentBorder()
          Returns the element alignment.
 boolean isImageResolutionMappingActive()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultLayoutSupport

public DefaultLayoutSupport(boolean useMaxLineHeight,
                            boolean imageResolutionMapping)
Default-Constructor.

DefaultLayoutSupport

public DefaultLayoutSupport(ContentFactory cf,
                            boolean useMaxLineHeight,
                            boolean imageResolutionMapping)
Method Detail

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

getInternalHorizontalAlignmentBorder

public long getInternalHorizontalAlignmentBorder()
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.

Q&D Hack: Save some cycles of processor time by computing that thing only once.

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

getInternalVerticalAlignmentBorder

public long getInternalVerticalAlignmentBorder()
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.

Q&D Hack: Save some cycles of processor time by computing that thing only once.

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

getContentFactory

public ContentFactory getContentFactory()
RetFixurns the assigned content factory for the target.
Specified by:
getContentFactory in interface LayoutSupport
Returns:
the content factory.

getCache

public LayoutManagerCache getCache()
Specified by:
getCache in interface LayoutSupport

isImageResolutionMappingActive

public boolean isImageResolutionMappingActive()
Specified by:
isImageResolutionMappingActive in interface LayoutSupport