本文整理汇总了Java中net.sf.jasperreports.engine.JRBand类的典型用法代码示例。如果您正苦于以下问题:Java JRBand类的具体用法?Java JRBand怎么用?Java JRBand使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
JRBand类属于net.sf.jasperreports.engine包,在下文中一共展示了JRBand类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getBand
import net.sf.jasperreports.engine.JRBand; //导入依赖的package包/类
/**
*
*/
protected JRBaseBand getBand(JRBand band)
{
JRBaseBand baseBand = null;
if (band != null)
{
baseBand = (JRBaseBand)get(band);
if (baseBand == null)
{
baseBand = new JRBaseBand(band, this);
}
}
return baseBand;
}
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:19,代码来源:JRBaseObjectFactory.java
示例2: JRBaseBand
import net.sf.jasperreports.engine.JRBand; //导入依赖的package包/类
/**
*
*/
protected JRBaseBand(JRBand band, JRBaseObjectFactory factory)
{
super(band, factory);
height = band.getHeight();
splitTypeValue = band.getSplitTypeValue();
printWhenExpression = factory.getExpression(band.getPrintWhenExpression());
this.propertiesMap = JRPropertiesMap.getPropertiesClone(band);
List<ExpressionReturnValue> bandReturnValues = band.getReturnValues();
if (bandReturnValues != null && !bandReturnValues.isEmpty())
{
this.returnValues = new ArrayList<ExpressionReturnValue>(bandReturnValues.size());
for (ExpressionReturnValue bandReturnValue : bandReturnValues)
{
BaseExpressionReturnValue returnValue = factory.getReturnValue(bandReturnValue);
this.returnValues.add(returnValue);
}
}
}
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:25,代码来源:JRBaseBand.java
示例3: writeSection
import net.sf.jasperreports.engine.JRBand; //导入依赖的package包/类
/**
*
*/
protected void writeSection( JRSection section, String sectionName, String sectionBandListGetterName)
{
if (section != null)
{
JRBand[] bands = section.getBands();
if (bands != null && bands.length > 0)
{
write( "//" + sectionName + "\n\n");
for(int i = 0; i < bands.length; i++)
{
writeBand( bands[i], sectionName + i);
write( sectionBandListGetterName + ".add(" + i + ", " + sectionName + i + ");\n\n");
}
}
flush();
}
}
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:21,代码来源:JRApiWriter.java
示例4: getBreakHeight
import net.sf.jasperreports.engine.JRBand; //导入依赖的package包/类
private static int getBreakHeight(JRBand band)
{
int breakHeight = 0;
if (band != null)
{
breakHeight = band.getHeight();
JRElement[] elements = band.getElements();
if (
SplitTypeEnum.IMMEDIATE == band.getSplitTypeValue()
&& elements != null && elements.length > 0
)
{
for(int i = 0; i < elements.length; i++)
{
JRElement element = elements[i];
int bottom = element.getY() + element.getHeight();
breakHeight = bottom < breakHeight ? bottom : breakHeight;
}
}
}
return breakHeight;
}
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:25,代码来源:JRVerifier.java
示例5: getBand
import net.sf.jasperreports.engine.JRBand; //导入依赖的package包/类
/**
*
*/
protected JRFillBand getBand(JRBand band)
{
JRFillBand fillBand = null;
if (band == null)
{
fillBand = filler.missingFillBand;
}
else
{
fillBand = (JRFillBand)get(band);
if (fillBand == null)
{
fillBand = new JRFillBand(filler, band, this);
}
}
return fillBand;
}
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:23,代码来源:JRFillObjectFactory.java
示例6: createBoundElemementMaps
import net.sf.jasperreports.engine.JRBand; //导入依赖的package包/类
private void createBoundElemementMaps()
{
createBoundElementMaps(JREvaluationTime.EVALUATION_TIME_MASTER);
createBoundElementMaps(JREvaluationTime.EVALUATION_TIME_REPORT);
createBoundElementMaps(JREvaluationTime.EVALUATION_TIME_PAGE);
createBoundElementMaps(JREvaluationTime.EVALUATION_TIME_COLUMN);
if (groups != null)
{
for (int i = 0; i < groups.length; i++)
{
createBoundElementMaps(JREvaluationTime.getGroupEvaluationTime(groups[i].getName()));
}
}
for (Iterator<JRBand> i = bands.iterator(); i.hasNext();)
{
JRFillBand band = (JRFillBand) i.next();
createBoundElementMaps(JREvaluationTime.getBandEvaluationTime(band));
}
}
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:22,代码来源:JRBaseFiller.java
示例7: inScope
import net.sf.jasperreports.engine.JRBand; //导入依赖的package包/类
protected boolean inScope(PropertyMetadata propertyMetadata, JRElementGroup container)
{
if (container instanceof JRFrame)
{
return inScope(propertyMetadata, (JRElement) container);
}
List<PropertyScope> scopes = propertyMetadata.getScopes();
if (container instanceof JRBand)
{
return scopes.contains(PropertyScope.BAND);
}
if (container instanceof Cell)
{
return scopes.contains(PropertyScope.TABLE_CELL);
}
if (container instanceof JRCellContents)
{
return scopes.contains(PropertyScope.CROSSTAB_CELL);
}
return false;
}
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:27,代码来源:PropertiesMetadataUtil.java
示例8: createDetailBand
import net.sf.jasperreports.engine.JRBand; //导入依赖的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;
}
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:20,代码来源:TableReport.java
示例9: createGroupHeader
import net.sf.jasperreports.engine.JRBand; //导入依赖的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;
}
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:24,代码来源:TableReport.java
示例10: createGroupFooter
import net.sf.jasperreports.engine.JRBand; //导入依赖的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;
}
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:24,代码来源:TableReport.java
示例11: setGroupBands
import net.sf.jasperreports.engine.JRBand; //导入依赖的package包/类
private void setGroupBands(List<FillColumn> fillColumns)
{
TableReportGroup[] groups = mainDataset.getTableGroups();
if (groups != null)
{
for (TableReportGroup group : groups)
{
JRBand header = createGroupHeader(group.getName(), fillColumns);
if (header != null)
{
group.setGroupHeader(header);
}
JRBand footer = createGroupFooter(group.getName(), fillColumns);
if (footer != null)
{
group.setGroupFooter(footer);
}
}
}
}
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:23,代码来源:TableReport.java
示例12: getBandLocation
import net.sf.jasperreports.engine.JRBand; //导入依赖的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;
}
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:34,代码来源:ModelUtils.java
示例13: MBandGroup
import net.sf.jasperreports.engine.JRBand; //导入依赖的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();
}
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:18,代码来源:MBandGroup.java
示例14: doExecute
import net.sf.jasperreports.engine.JRBand; //导入依赖的package包/类
private void doExecute() {
int newInd = 0;
List<JRBand> bList = jrDesignSection.getBandsList();
int oldInd = bList.indexOf(jrBand);
if (oldInd == 0) oldUpperBand = null;
else oldUpperBand = bList.get(oldInd-1);
bList.remove(jrBand);
if (newUpperBand != null){
newInd = bList.indexOf(newUpperBand) + 1;
}
if (newInd >= 0 && newInd < bList.size())
bList.add(newInd, jrBand);
else {
bList.add(jrBand);
newInd = bList.size() - 1;
}
//This event will not change the listener on the model, but only changes its position
jrDesignSection.getEventSupport().fireIndexedPropertyChange(MReport.CHANGE_BAND_POSITION, newInd, oldInd, -1);
}
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:20,代码来源:ReorderBandCommandBySibling.java
示例15: undo
import net.sf.jasperreports.engine.JRBand; //导入依赖的package包/类
@Override
public void undo() {
List<JRBand> bList = jrDesignSection.getBandsList();
int oldInd = bList.indexOf(jrBand);
int newInd = 0;
bList.remove(jrBand);
if (oldUpperBand != null){
newInd = bList.indexOf(oldUpperBand) + 1;
}
if (newInd >= 0 && newInd < bList.size())
bList.add(newInd, jrBand);
else {
bList.add(jrBand);
newInd = bList.size() - 1;
}
//This event will not change the listener on the model, but only changes its position
jrDesignSection.getEventSupport().fireIndexedPropertyChange(MReport.CHANGE_BAND_POSITION, newInd, oldInd, -1);
}
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:20,代码来源:ReorderBandCommandBySibling.java
示例16: handleChangeOrder
import net.sf.jasperreports.engine.JRBand; //导入依赖的package包/类
/**
* Handle the change of the position of a band
*
* @param evt the event that changed the band position
*/
private void handleChangeOrder(PropertyChangeEvent evt) {
if (evt instanceof IndexedPropertyChangeEvent && evt.getNewValue() instanceof Integer) {
JRDesignSection source = (JRDesignSection) evt.getSource();
int newInd = ((IndexedPropertyChangeEvent) evt).getIndex();
JRBand b = source.getBandsList().get(newInd);
MBand mb = null;
for (INode n : getChildren()) {
if (n.getValue() == b) {
mb = (MBand) n;
break;
}
}
if (mb != null) {
newInd = getChildren().indexOf(mb) + (newInd - (Integer) evt.getOldValue());
getChildren().remove(mb);
getChildren().add(newInd, mb);
}
}
}
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:25,代码来源:MReport.java
示例17: setupPageFigure
import net.sf.jasperreports.engine.JRBand; //导入依赖的package包/类
/**
* Setup page figure.
*
* @param jd
* the jasper design
* @param figure2
* the figure2
*/
protected void setupPageFigure(APageFigure figure2) {
JasperDesign jd = getJasperDesign();
List<JRBand> bands = ModelUtils.getAllBands(jd);
int dh = ModelUtils.getDesignHeight(bands);
int designHeight = dh + jd.getTopMargin() + jd.getBottomMargin();
int w = jd.getPageWidth() + 20;
int h = designHeight + 10;
ReportPageFigure rpFig = (ReportPageFigure) figure2;
rpFig.setBandsHeight(designHeight);
setupPagePreferences(figure2);
figure2.setSize(w, h);
}
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:24,代码来源:ReportPageEditPart.java
示例18: updateRullers
import net.sf.jasperreports.engine.JRBand; //导入依赖的package包/类
public void updateRullers() {
JasperDesign jd = getJasperDesign();
List<JRBand> bands = ModelUtils.getAllBands(jd);
int dh = ModelUtils.getDesignHeight(bands);
int tx = jd.getLeftMargin() + ReportPageFigure.PAGE_BORDER.left;
int ty = jd.getTopMargin() + ReportPageFigure.PAGE_BORDER.top;
getViewer().setProperty(ReportRuler.PROPERTY_HOFFSET, tx);
getViewer().setProperty(ReportRuler.PROPERTY_VOFFSET, ty);
getViewer().setProperty(ReportRuler.PROPERTY_HEND, jd.getPageWidth() - jd.getLeftMargin() - jd.getRightMargin());
getViewer().setProperty(ReportRuler.PROPERTY_VEND, dh);
getViewer().setProperty(SnapToGrid.PROPERTY_GRID_ORIGIN,
new Point(tx, ReportPageFigure.PAGE_BORDER.top + jd.getTopMargin()));
}
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:17,代码来源:ReportPageEditPart.java
示例19: getBandLocation
import net.sf.jasperreports.engine.JRBand; //导入依赖的package包/类
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() == BandTypeEnum.BACKGROUND)
{
if (IReportManager.getInstance().isBackgroundSeparated())
{
yLocation += jd.getTopMargin();
yLocation += jd.getBottomMargin();
yLocation += 40;
}
}
}
if (tmpBand == b) return yLocation;
yLocation += tmpBand.getHeight();
}
return yLocation;
}
开发者ID:JockiHendry,项目名称:ireport-fork,代码行数:27,代码来源:ModelUtils.java
示例20: bandOfElement
import net.sf.jasperreports.engine.JRBand; //导入依赖的package包/类
public static JRBand bandOfElement(JRElement element, JasperDesign jd)
{
if (element == null || jd == null) return null;
List<JRBand> bands = ModelUtils.getBands(jd);
for (JRBand tmpBand : bands)
{
JRElement[] elements = tmpBand.getElements();
for (int i=0; i<elements.length; ++i)
{
if (element == elements[i])
{
return tmpBand;
}
}
}
return null;
}
开发者ID:JockiHendry,项目名称:ireport-fork,代码行数:21,代码来源:ModelUtils.java
注:本文中的net.sf.jasperreports.engine.JRBand类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论