本文整理汇总了Java中net.sf.jasperreports.engine.type.BandTypeEnum类的典型用法代码示例。如果您正苦于以下问题:Java BandTypeEnum类的具体用法?Java BandTypeEnum怎么用?Java BandTypeEnum使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
BandTypeEnum类属于net.sf.jasperreports.engine.type包,在下文中一共展示了BandTypeEnum类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createDetailBand
import net.sf.jasperreports.engine.type.BandTypeEnum; //导入依赖的package包/类
protected JRBand createDetailBand(List<FillColumn> fillColumns)
{
final JRDesignBand detailBand = new JRDesignBand();
detailBand.setSplitType(SplitTypeEnum.PREVENT);
ReportBandInfo bandInfo = new ReportBandInfo(detailBand, BandTypeEnum.DETAIL.getName());
int xOffset = 0;
for (FillColumn subcolumn : fillColumns)
{
DetailBandCreator subVisitor = new DetailBandCreator(
bandInfo, subcolumn, xOffset, 0, 0);
subVisitor.visit();
xOffset = subVisitor.xOffset;
}
setPdfTags(bandInfo, false);
return detailBand;
}
示例2: createColumnHeader
import net.sf.jasperreports.engine.type.BandTypeEnum; //导入依赖的package包/类
protected JRDesignBand createColumnHeader(List<FillColumn> fillColumns)
{
JRDesignBand columnHeader = new JRDesignBand();
columnHeader.setSplitType(SplitTypeEnum.PREVENT);
ReportBandInfo bandInfo = new ReportBandInfo(columnHeader, BandTypeEnum.COLUMN_HEADER.getName());
int xOffset = 0;
for (FillColumn subcolumn : fillColumns)
{
ColumnHeaderCreator subVisitor = new ColumnHeaderCreator(
bandInfo, subcolumn, xOffset, 0, 0, headerHtmlBaseProperties,
new AtomicBoolean());
subVisitor.visit();
xOffset = subVisitor.xOffset;
}
setPdfTags(bandInfo, true);
if (columnHeader.getHeight() == 0)
{
columnHeader = null;
}
return columnHeader;
}
示例3: createPageFooter
import net.sf.jasperreports.engine.type.BandTypeEnum; //导入依赖的package包/类
protected JRDesignBand createPageFooter(List<FillColumn> fillColumns)
{
JRDesignBand pageFooter = new JRDesignBand();
pageFooter.setSplitType(SplitTypeEnum.PREVENT);
ReportBandInfo bandInfo = new ReportBandInfo(pageFooter, BandTypeEnum.PAGE_FOOTER.getName());
int xOffset = 0;
for (FillColumn subcolumn : fillColumns)
{
PageFooterCreator subVisitor = new PageFooterCreator(
bandInfo, subcolumn, xOffset, 0, 0);
subVisitor.visit();
xOffset = subVisitor.xOffset;
}
setPdfTags(bandInfo, false);
if (pageFooter.getHeight() == 0)
{
pageFooter = null;
}
return pageFooter;
}
示例4: createTitle
import net.sf.jasperreports.engine.type.BandTypeEnum; //导入依赖的package包/类
protected JRDesignBand createTitle(List<FillColumn> fillColumns)
{
JRDesignBand title = new JRDesignBand();
title.setSplitType(SplitTypeEnum.PREVENT);
ReportBandInfo bandInfo = new ReportBandInfo(title, BandTypeEnum.TITLE.getName());
int xOffset = 0;
for (FillColumn subcolumn : fillColumns)
{
TitleCreator subVisitor = new TitleCreator(
bandInfo, subcolumn, xOffset, 0, 0);
subVisitor.visit();
xOffset = subVisitor.xOffset;
}
setPdfTags(bandInfo, false);
if (title.getHeight() == 0) //FIXMETABLE not sure we actually need this; maybe check the section is truly empty; do the same for the other sections as well
{
title = null;
}
return title;
}
示例5: createSummary
import net.sf.jasperreports.engine.type.BandTypeEnum; //导入依赖的package包/类
protected JRDesignBand createSummary(List<FillColumn> fillColumns)
{
JRDesignBand summary = new JRDesignBand();
summary.setSplitType(SplitTypeEnum.PREVENT);
ReportBandInfo bandInfo = new ReportBandInfo(summary, BandTypeEnum.SUMMARY.getName());
int xOffset = 0;
for (FillColumn subcolumn : fillColumns)
{
SummaryCreator subVisitor = new SummaryCreator(
bandInfo, subcolumn, xOffset, 0, 0);
subVisitor.visit();
xOffset = subVisitor.xOffset;
}
setPdfTags(bandInfo, false);
if (summary.getHeight() == 0)
{
summary = null;
}
return summary;
}
示例6: createGroupHeader
import net.sf.jasperreports.engine.type.BandTypeEnum; //导入依赖的package包/类
protected JRBand createGroupHeader(String groupName, List<FillColumn> fillColumns)
{
JRDesignBand header = new JRDesignBand();
header.setSplitType(SplitTypeEnum.PREVENT);
ReportBandInfo bandInfo = new ReportBandInfo(header, BandTypeEnum.GROUP_HEADER + "-" + groupName);
int xOffset = 0;
for (FillColumn subcolumn : fillColumns)
{
GroupHeaderCreator subVisitor = new GroupHeaderCreator(groupName,
bandInfo, subcolumn, xOffset, 0, 0);
subVisitor.visit();
xOffset = subVisitor.xOffset;
}
setPdfTags(bandInfo, false);
if (header.getHeight() == 0)
{
header = null;
}
return header;
}
示例7: createGroupFooter
import net.sf.jasperreports.engine.type.BandTypeEnum; //导入依赖的package包/类
protected JRBand createGroupFooter(String groupName, List<FillColumn> fillColumns)
{
JRDesignBand footer = new JRDesignBand();
footer.setSplitType(SplitTypeEnum.PREVENT);
ReportBandInfo bandInfo = new ReportBandInfo(footer, BandTypeEnum.GROUP_FOOTER + "-" + groupName);
int xOffset = 0;
for (FillColumn subcolumn : fillColumns)
{
GroupFooterCreator subVisitor = new GroupFooterCreator(groupName,
bandInfo, subcolumn, xOffset, 0, 0);
subVisitor.visit();
xOffset = subVisitor.xOffset;
}
setPdfTags(bandInfo, false);
if (footer.getHeight() == 0)
{
footer = null;
}
return footer;
}
示例8: stringMasks
import net.sf.jasperreports.engine.type.BandTypeEnum; //导入依赖的package包/类
@DataProvider
public Object[][] stringMasks()
{
return new Object[][] {
{""},
{"foo"},
{"bar"},
{BandTypeEnum.TITLE.name()},
{BandTypeEnum.SUMMARY.name()},
{BandTypeEnum.PAGE_HEADER.name()},
{BandTypeEnum.PAGE_FOOTER.name()},
{BandTypeEnum.COLUMN_FOOTER.name()},
{BandTypeEnum.COLUMN_HEADER.name()},
{BandTypeEnum.DETAIL.name()},
{BandTypeEnum.GROUP_HEADER.name() + "-foo"},
{BandTypeEnum.GROUP_FOOTER.name() + "-foo"},
};
}
示例9: getBandLocation
import net.sf.jasperreports.engine.type.BandTypeEnum; //导入依赖的package包/类
/**
* Gets the band location.
*
* @param b
* the b
* @param jd
* the jd
* @return the band location
*/
public static int getBandLocation(JRBand b, JasperDesign jd) {
int yLocation = jd.getTopMargin();
List<JRBand> bands = ModelUtils.getBands(jd);
for (JRBand tmpBand : bands) {
// Detached background...
if (tmpBand instanceof JRDesignBand) {
if (((JRDesignBand) tmpBand).getOrigin().getBandTypeValue().equals(BandTypeEnum.BACKGROUND)) {
// if (IReportManager.getInstance().isBackgroundSeparated())
// {
// yLocation += jd.getTopMargin();
// yLocation += jd.getBottomMargin();
// yLocation += 40;
// }
}
}
if (tmpBand == b)
return yLocation;
yLocation += tmpBand.getHeight();
}
return yLocation;
}
示例10: getDisplayText
import net.sf.jasperreports.engine.type.BandTypeEnum; //导入依赖的package包/类
public String getDisplayText() {
JRDesignBand value = (JRDesignBand) getValue();
String hiddenText = new String();
if (!isVisible()){
hiddenText = Messages.MBand_hiddenLabel;
}
if (bandType.equals(BandTypeEnum.DETAIL)) {
String index = ""; //$NON-NLS-1$
if (bandIndex != -1)
index = " " + String.valueOf(bandIndex); //$NON-NLS-1$
if (value != null)
return Messages.MBand_detail + index + " [" + value.getHeight() + "px]"+hiddenText;// + value.hashCode(); //$NON-NLS-1$ //$NON-NLS-2$
return Messages.MBand_detail + index + " "; //$NON-NLS-1$
}
if (value == null)
return MessagesByKeys.getString(bandType.getName());
return MessagesByKeys.getString(value.getOrigin().getBandTypeValue().getName()+hiddenText);
}
示例11: MBandGroup
import net.sf.jasperreports.engine.type.BandTypeEnum; //导入依赖的package包/类
public MBandGroup(ANode parent, JRDesignGroup jrGroup, JRBand jrband, BandTypeEnum bandtype, int newIndex){
super(parent, jrband, bandtype, newIndex);
this.jrGroup = jrGroup;
mGroup = new MGroup(null, jrGroup, -1);
setChildListener(mGroup);
mGroupBand = new MGroupBand(jrGroup);
// Fix missing jasper configuration
if (parent != null) {
JasperReportsConfiguration jconfig = parent.getJasperConfiguration();
if (jconfig != null) {
mGroup.setJasperConfiguration(jconfig);
mGroupBand.setJasperConfiguration(jconfig);
}
}
bandIndex = -1;
refreshIndex();
}
示例12: createFigure
import net.sf.jasperreports.engine.type.BandTypeEnum; //导入依赖的package包/类
protected IFigure createFigure() {
JRDesignBand jrBand = getBand();
BandTypeEnum bandTypeValue = jrBand.getOrigin().getBandTypeValue();
boolean drawColumns = bandTypeValue.equals(BandTypeEnum.COLUMN_FOOTER)
|| bandTypeValue.equals(BandTypeEnum.COLUMN_HEADER) || bandTypeValue.equals(BandTypeEnum.GROUP_FOOTER)
|| bandTypeValue.equals(BandTypeEnum.GROUP_HEADER) || bandTypeValue.equals(BandTypeEnum.COLUMN_HEADER)
|| bandTypeValue.equals(BandTypeEnum.DETAIL);
BandFigure rect = new BandFigure(drawColumns, getModel());
rect.setForegroundColor(ColorConstants.blue);
setupBandFigure(rect);
figure = rect;
setBandNameShowing(rect);
setMarginColor();
return rect;
}
示例13: createCommand
import net.sf.jasperreports.engine.type.BandTypeEnum; //导入依赖的package包/类
@Override
protected Command createCommand() {
List<Object> bands = editor.getSelectionCache().getSelectionModelForType(MBand.class);
if (bands.isEmpty()) return null;
MBand firstBand = (MBand)bands.get(0);
JSSCompoundCommand cmd = new JSSCompoundCommand(firstBand);
for(Object obj : bands){
MBand bandNode = (MBand)obj;
if ( bandNode.getBandType() == BandTypeEnum.GROUP_FOOTER || bandNode.getBandType() == BandTypeEnum.GROUP_HEADER){
cmd.add(new ReorderBandCommandByRelativeIndex((MBandGroupFooter) bandNode, 1));
} else if (bandNode.getBandType() == BandTypeEnum.DETAIL) {
cmd.add(new ReorderBandCommandByRelativeIndex(bandNode, (MReport) bandNode.getParent(), 1));
}
}
return cmd.isEmpty() ? null : cmd;
}
示例14: createCommand
import net.sf.jasperreports.engine.type.BandTypeEnum; //导入依赖的package包/类
@Override
protected Command createCommand() {
List<Object> bands = editor.getSelectionCache().getSelectionModelForType(MBand.class);
if (bands.isEmpty()) return null;
MBand firstBand = (MBand)bands.get(0);
JSSCompoundCommand cmd = new JSSCompoundCommand(firstBand);
for(Object obj : bands){
MBand bandNode = (MBand)obj;
if ( bandNode.getBandType() == BandTypeEnum.GROUP_FOOTER || bandNode.getBandType() == BandTypeEnum.GROUP_HEADER){
cmd.add(new ReorderBandCommandByRelativeIndex((MBandGroupFooter) bandNode, -1));
} else if (bandNode.getBandType() == BandTypeEnum.DETAIL) {
cmd.add(new ReorderBandCommandByRelativeIndex(bandNode, (MReport) bandNode.getParent(), -1));
}
}
return cmd.isEmpty() ? null : cmd;
}
示例15: dropFieldElementAt
import net.sf.jasperreports.engine.type.BandTypeEnum; //导入依赖的package包/类
public void dropFieldElementAt(Scene theScene, JasperDesign jasperDesign, JRDesignComponentElement element, Point location)
{
if (theScene instanceof ReportObjectScene)
{
Point p = theScene.convertViewToScene( location );
// find the band...
JRDesignBand b = ModelUtils.getBandAt(jasperDesign, p);
int yLocation = ModelUtils.getBandLocation(b, jasperDesign);
Point pLocationInBand = new Point(p.x - jasperDesign.getLeftMargin(),
p.y - yLocation);
if (b != null)
{
// if the band is not a detail, propose to aggregate the value...
if (b.getOrigin().getBandTypeValue() == BandTypeEnum.TITLE)
{
((StandardMapComponent)(element.getComponent())).setEvaluationTime(EvaluationTimeEnum.REPORT);
}
}
}
super.dropElementAt(theScene, jasperDesign, element, location);
}