| java.lang.Object org.jfree.report.layout.StaticLayoutManager
StaticLayoutManager | public class StaticLayoutManager implements BandLayoutManager(Code) | | An implementation of the BandLayoutManager interface.
Rule: Bands can have minimum, max and pref size defined. These values are hints for the
layout container, no restrictions. If min and pref are '0', they are ignored. MaxSize
is never ignored.
Elements that have the "dynamic" flag set, are checked for their content-bounds. This
operation is expensive, so this is only done if really needed. The dynamic flag will
influence the height of an element, a valid width must be already set.
Invisible elements within the layouted band are not evaluated. This layout manager will
ignore invisible child bands and -elements.
Note to everybody who tries to understand this class: This class is full of old
compatibility code, this class is not designed to be smart, or suitable for complex
layouts. The only purpose of this class is to maintain backward compatiblity with older
releases of JFreeReport.
The use of relative elements (the one's with 100% should be considered carefully, as
these elements are not fully predictable).
author: Thomas Morgner |
Field Summary | |
final public static StyleKey | ABSOLUTE_POS A key for the absolute position of an element. |
Method Summary | |
public synchronized void | doLayout(Band b, LayoutSupport support, ExpressionRuntime runtime) Layout a single band with all elements contained within the band.
The band has its BOUNDS already set and all elements are laid out within
these bounds. | public StrictDimension | minimumLayoutSize(Band b, StrictDimension containerBounds, StrictDimension maxUsableSize, LayoutSupport support, ExpressionRuntime runtime) Calculates the minimum layout size for a band. | public StrictDimension | preferredLayoutSize(Band b, StrictDimension containerDims, StrictDimension maxUsableSize, LayoutSupport support, ExpressionRuntime runtime) Calculates the preferred layout size for a band. |
ABSOLUTE_POS | final public static StyleKey ABSOLUTE_POS(Code) | | A key for the absolute position of an element.
|
StaticLayoutManager | public StaticLayoutManager()(Code) | | Creates a new layout manager.
|
doLayout | public synchronized void doLayout(Band b, LayoutSupport support, ExpressionRuntime runtime)(Code) | | Layout a single band with all elements contained within the band.
The band has its BOUNDS already set and all elements are laid out within
these bounds. The band's properties will not be changed during the layouting.
This layout manager requires that all direct child elements have the
ABSOLUTE_POS and MINIMUM_SIZE properties set to valid
values.
Parameters: b - the band to lay out. Parameters: support - the layout support used to compute sizes. throws: java.lang.IllegalStateException - if the bands has no bounds set. |
minimumLayoutSize | public StrictDimension minimumLayoutSize(Band b, StrictDimension containerBounds, StrictDimension maxUsableSize, LayoutSupport support, ExpressionRuntime runtime)(Code) | | Calculates the minimum layout size for a band. The width for the child elements are
not calculated, as we assume that the width's are defined fixed within the parent.
Parameters: b - the band. Parameters: containerBounds - the bounds of the bands parents. Parameters: maxUsableSize - Parameters: support - the layout support used to compute sizes. the minimum size. |
preferredLayoutSize | public StrictDimension preferredLayoutSize(Band b, StrictDimension containerDims, StrictDimension maxUsableSize, LayoutSupport support, ExpressionRuntime runtime)(Code) | | Calculates the preferred layout size for a band. The band is limited to the given
container bounds as well as to the own maximum size.
The preferred size of non-absolute elements is calculated by using the parents
dimensions supplied in containerDims. Elements with a width or height of 100% will
consume all available space of the parent.
Parameters: b - the band. Parameters: containerDims - the maximum size the band should use for that container. Parameters: maxUsableSize - Parameters: support - the layout support used to compute sizes. the preferred size. |
|
|