public class ClassicLayoutManager extends AbstractLayoutManager
Modifier and Type | Field and Description |
---|---|
protected static String |
EXPRESSION_TRUE_WHEN_FIRST_PAGE |
protected static String |
EXPRESSION_TRUE_WHEN_NOT_FIRST_PAGE |
protected static String |
PAGE_BREAK_FOR_ |
protected Map |
referencesMap |
protected static int |
SUBREPORT_DEFAULT_HEIGHT |
EXPRESSION_TRUE_WHEN_EVEN, EXPRESSION_TRUE_WHEN_ODD, realGroups
Constructor and Description |
---|
ClassicLayoutManager() |
Modifier and Type | Method and Description |
---|---|
protected void |
applyBanners()
Create the image elements for the banners tha goes into the
title and header bands depending on the case
|
protected void |
applyFooterAutotexts() |
protected void |
applyFooterBanners() |
protected void |
applyHeaderAutotexts() |
protected void |
applyImageBannersToBand(net.sf.jasperreports.engine.design.JRDesignBand band,
Collection imageBanners,
net.sf.jasperreports.engine.design.JRDesignExpression printWhenExpression,
boolean placeOnTop)
Create the image elements for the banners tha goes into the
title band
|
protected int |
changeHeaderBandHeightForVariables(net.sf.jasperreports.engine.design.JRDesignBand headerBand,
DJGroup columnsGroup) |
protected net.sf.jasperreports.engine.design.JRDesignRectangle |
createBlankRectableCrosstab(int amount,
int yOffset) |
protected net.sf.jasperreports.engine.design.JRDesignTextField |
createColumnNameTextField(DJGroup columnsGroup,
AbstractColumn col) |
protected void |
endLayout() |
protected DJGroupVariable |
findLeftMostColumn(List variables) |
protected DJGroupVariable |
findRightMostColumn(List variables) |
protected int |
findTotalOffset(ArrayList aligments,
byte position)
Finds the highest sum of height for each possible alignment (left, center, right)
|
protected void |
generateHeaderBand() |
protected void |
generateTitleBand()
Adds title and subtitle to the TitleBand when it applies.
|
protected int |
getFooterVariableHeight(DJGroup columnsGroup) |
protected int |
getHeaderVariablesHeight(DJGroup columnsGroup) |
Map |
getReferencesMap()
Useful as shared object between RegistrationManagers and the LayOutManager.
|
protected List |
getVisibleColumns()
Returns a list with the columns that are visible.
|
protected boolean |
groupLabelsPresent(List groupVariables) |
protected void |
insertValueInHeader(net.sf.jasperreports.engine.design.JRDesignBand headerBand,
DJGroup djgroup,
int headerOffset) |
protected void |
layoutGroupCrosstabs(DJGroup columnsGroup,
net.sf.jasperreports.engine.design.JRDesignGroup jgroup)
Looks for crosstabs in the groups, if any, it does the layout
|
protected void |
layoutGroupFooterLabels(DJGroup djgroup,
net.sf.jasperreports.engine.design.JRDesignGroup jgroup,
int x,
int y,
int width,
int height)
Creates needed textfields for general label in footer groups.
|
protected void |
layoutGroups()
Layout columns in groups by reading the corresponding report options.
|
protected void |
layoutGroupSubreports(DJGroup columnsGroup,
net.sf.jasperreports.engine.design.JRDesignGroup jgroup)
If there is a SubReport on a Group, we do the layout here
|
protected void |
layoutGroupVariables(DJGroup group,
net.sf.jasperreports.engine.design.JRDesignGroup jgroup,
int labelOffset)
If variables are present for a given group, they are placed in it's
header/footer band.
|
protected void |
layOutSubReportInBand(DJGroup columnsGroup,
net.sf.jasperreports.engine.design.JRDesignBand band,
String position) |
protected void |
placeVariableInBand(List variables,
DJGroup djGroup,
net.sf.jasperreports.engine.design.JRDesignGroup jgroup,
String type,
net.sf.jasperreports.engine.design.JRDesignBand band,
int yOffset) |
protected void |
sendPageBreakToBottom(net.sf.jasperreports.engine.design.JRDesignBand band)
page breaks should be near the bottom of the band, this method used while adding subreports
which has the "start on new page" option.
|
protected void |
setTextAndClassToExpression(net.sf.jasperreports.engine.design.JRDesignExpression expression,
DJGroupVariable var,
AbstractColumn col,
String variableName)
If a variable has a DJValueFormatter, we must use it in the expression, otherwise, use plain $V{...}
|
protected void |
startLayout() |
protected void |
transformDetailBandTextField(AbstractColumn column,
net.sf.jasperreports.engine.design.JRDesignTextField textField) |
addStyleToDesign, applyLayout, applyStyleToElement, applyWaterMark, createChart, createChart, createGroupForChartAndGetBand, createGroupForChartAndGetBand, createUniqueStyleName, ensureDJStyles, generateHeaderBand, generateTextFieldFromColumn, getChartColumnsGroup, getDesign, getDJGroup, getJRGroupFromDJGroup, getParent, getReport, getReportStyles, interpeterOptions, layoutCharts, makeConditionalStyle, registerChartVariable, registerChartVariable, registerRemainingStyles, setBandFinalHeight, setBandsFinalHeight, setColumnsFinalWidth, setDesign, setReport, setReportStyles, setWhenNoDataBand, transformDetailBand
protected static final String PAGE_BREAK_FOR_
protected static final int SUBREPORT_DEFAULT_HEIGHT
protected static final String EXPRESSION_TRUE_WHEN_NOT_FIRST_PAGE
protected static final String EXPRESSION_TRUE_WHEN_FIRST_PAGE
protected final Map referencesMap
public Map getReferencesMap()
LayoutManager
protected void startLayout()
startLayout
in class AbstractLayoutManager
protected void applyHeaderAutotexts()
protected int findTotalOffset(ArrayList aligments, byte position)
aligments
- protected void endLayout()
endLayout
in class AbstractLayoutManager
protected void applyFooterAutotexts()
protected List getVisibleColumns()
getVisibleColumns
in class AbstractLayoutManager
protected void applyBanners()
protected void applyFooterBanners()
protected void applyImageBannersToBand(net.sf.jasperreports.engine.design.JRDesignBand band, Collection imageBanners, net.sf.jasperreports.engine.design.JRDesignExpression printWhenExpression, boolean placeOnTop)
printWhenExpression
- protected void generateTitleBand()
protected void layoutGroups()
LayoutException
protected void layoutGroupFooterLabels(DJGroup djgroup, net.sf.jasperreports.engine.design.JRDesignGroup jgroup, int x, int y, int width, int height)
djgroup
- jgroup
- protected void layoutGroupCrosstabs(DJGroup columnsGroup, net.sf.jasperreports.engine.design.JRDesignGroup jgroup)
columnsGroup
- jgroup
- protected net.sf.jasperreports.engine.design.JRDesignRectangle createBlankRectableCrosstab(int amount, int yOffset)
amount
- yOffset
- protected net.sf.jasperreports.engine.design.JRDesignTextField createColumnNameTextField(DJGroup columnsGroup, AbstractColumn col)
columnsGroup
- col
- protected void layoutGroupSubreports(DJGroup columnsGroup, net.sf.jasperreports.engine.design.JRDesignGroup jgroup)
columnsGroup
- jgroup
- protected void layOutSubReportInBand(DJGroup columnsGroup, net.sf.jasperreports.engine.design.JRDesignBand band, String position)
columnsGroup
- band
- position
- protected void sendPageBreakToBottom(net.sf.jasperreports.engine.design.JRDesignBand band)
band
- protected void layoutGroupVariables(DJGroup group, net.sf.jasperreports.engine.design.JRDesignGroup jgroup, int labelOffset)
group
- jgroup
- labelOffset
- LayoutException
protected boolean groupLabelsPresent(List groupVariables)
groupVariables
- protected void placeVariableInBand(List variables, DJGroup djGroup, net.sf.jasperreports.engine.design.JRDesignGroup jgroup, String type, net.sf.jasperreports.engine.design.JRDesignBand band, int yOffset)
variables
- djGroup
- jgroup
- type
- (header or footer)band
- yOffset
- protected int getHeaderVariablesHeight(DJGroup columnsGroup)
protected int getFooterVariableHeight(DJGroup columnsGroup)
protected void setTextAndClassToExpression(net.sf.jasperreports.engine.design.JRDesignExpression expression, DJGroupVariable var, AbstractColumn col, String variableName)
expression
- var
- col
- variableName
- protected DJGroupVariable findLeftMostColumn(List variables)
protected DJGroupVariable findRightMostColumn(List variables)
protected void insertValueInHeader(net.sf.jasperreports.engine.design.JRDesignBand headerBand, DJGroup djgroup, int headerOffset)
protected int changeHeaderBandHeightForVariables(net.sf.jasperreports.engine.design.JRDesignBand headerBand, DJGroup columnsGroup)
protected void generateHeaderBand()
protected void transformDetailBandTextField(AbstractColumn column, net.sf.jasperreports.engine.design.JRDesignTextField textField)
transformDetailBandTextField
in class AbstractLayoutManager
Copyright © 2006–2015 FDV Solutions. All rights reserved.