Java 类net.sf.jasperreports.engine.type.FooterPositionEnum 实例源码

项目:PDFReporter-Studio    文件:MGroup.java   
public void setPropertyValue(Object id, Object value) {
    JRDesignGroup jrGroup = (JRDesignGroup) getValue();
    if (id.equals(JRDesignGroup.PROPERTY_NAME)) {
        jrGroup.setName((String) value);
    }
    else if (id.equals(JRDesignGroup.PROPERTY_EXPRESSION))
        jrGroup.setExpression(ExprUtil.setValues(jrGroup.getExpression(), value, null));
    else if (id.equals(JRBaseGroup.PROPERTY_MIN_HEIGHT_TO_START_NEW_PAGE)) {
        int minH = 0;
        if (value != null)
            minH = Math.max(0, (Integer) value);
        jrGroup.setMinHeightToStartNewPage(minH);
    } else if (id.equals(JRDesignGroup.PROPERTY_START_NEW_COLUMN))
        jrGroup.setStartNewColumn((Boolean) value);
    else if (id.equals(JRDesignGroup.PROPERTY_START_NEW_PAGE))
        jrGroup.setStartNewPage((Boolean) value);
    else if (id.equals(JRDesignGroup.PROPERTY_RESET_PAGE_NUMBER))
        jrGroup.setResetPageNumber((Boolean) value);
    else if (id.equals(JRDesignGroup.PROPERTY_REPRINT_HEADER_ON_EACH_PAGE))
        jrGroup.setReprintHeaderOnEachPage((Boolean) value);
    else if (id.equals(JRDesignGroup.PROPERTY_KEEP_TOGETHER))
        jrGroup.setKeepTogether((Boolean) value);
    else if (id.equals(JRDesignGroup.PROPERTY_FOOTER_POSITION))
        jrGroup.setFooterPosition((FooterPositionEnum) positionD.getEnumValue(value));
}
项目:jasperreports    文件:JRBaseGroup.java   
@Override
public void setFooterPosition(FooterPositionEnum footerPositionValue)
{
    FooterPositionEnum old = this.footerPositionValue;
    this.footerPositionValue = footerPositionValue;
    getEventSupport().firePropertyChange(PROPERTY_FOOTER_POSITION, old, this.footerPositionValue);
}
项目:jasperreports    文件:JRBaseGroup.java   
@SuppressWarnings("deprecation")
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
{
    in.defaultReadObject();

    if (PSEUDO_SERIAL_VERSION_UID < JRConstants.PSEUDO_SERIAL_VERSION_UID_3_7_2)
    {
        if (footerPosition == 0)
        {
            // stream class didn't have footerPosition, use default.
            // ideally we should have used PSEUDO_SERIAL_VERSION_UID to 
            // detect this case, but there was no PSEUDO_SERIAL_VERSION_UID
            // when footerPosition was introduced
            footerPositionValue = FooterPositionEnum.NORMAL;
        }
        else
        {
            // convert stream byte value to enum
            footerPositionValue = FooterPositionEnum.getByValue(footerPosition);
        }
    }

    if (groupHeader != null)
    {
        groupHeaderSection = new JRBaseSection(groupHeader);
        groupHeader = null;
    }

    if (groupFooter != null)
    {
        groupFooterSection = new JRBaseSection(groupFooter);
        groupFooter = null;
    }
}
项目:jasperreports    文件:ElementRangeUtil.java   
/**
 *
 */
public static void moveContent(GroupFooterElementRange groupFooterElementRange, int columnFooterOffsetY)
{
    if (groupFooterElementRange.getMasterFooterPosition() != FooterPositionEnum.NORMAL)//FIXME is footerPosition testing required here?
    {
        ElementRange elementRange = groupFooterElementRange.getElementRange();
        int distanceToColumnFooter = columnFooterOffsetY - elementRange.getBottomY();
        //no page/column break occurred
        for (int i = elementRange.getFirstElementIndex(); i <= elementRange.getLastElementIndex(); i++)
        {
            JRPrintElement printElement = elementRange.getPage().getElements().get(i);
            printElement.setY(printElement.getY() + distanceToColumnFooter);
        }
    }
}
项目:jasperreports    文件:SimpleGroupFooterElementRange.java   
public SimpleGroupFooterElementRange(
    ElementRange elementRange,
    FooterPositionEnum masterFooterPosition
    )
{
    this.elementRange = elementRange;
    this.masterFooterPosition = masterFooterPosition;
}
项目:PDFReporter-Studio    文件:MGroupBand.java   
@Override
public void setPropertyValue(Object id, Object value) {
    JRDesignGroup jrGroup = (JRDesignGroup) getValue();

    if (id.equals(JasperDesign.PROPERTY_ORIENTATION))
        jrGroup
                .setFooterPosition((FooterPositionEnum) EnumHelper.getSetValue(FooterPositionEnum.values(), value, 1, true));

    else
        super.setPropertyValue(id, value);
}
项目:ireport-fork    文件:FooterPositionProperty.java   
@SuppressWarnings("unchecked")
public FooterPositionProperty(JRDesignGroup group)
{
    super(FooterPositionEnum.class, group);
    this.group = group;
    setValue("suppressCustomEditor", Boolean.TRUE);
}
项目:ireport-fork    文件:FooterPositionProperty.java   
public List getTagList()
{
    List tags = new java.util.ArrayList();
    tags.add(new Tag(FooterPositionEnum.NORMAL, I18n.getString("Global.Property.FooterPosition.normal")));
    tags.add(new Tag(FooterPositionEnum.STACK_AT_BOTTOM, I18n.getString("Global.Property.FooterPosition.stackAtBottom")));
    tags.add(new Tag(FooterPositionEnum.FORCE_AT_BOTTOM, I18n.getString("Global.Property.FooterPosition.forceAtBottom")));
    tags.add(new Tag(FooterPositionEnum.COLLATE_AT_BOTTOM, I18n.getString("Global.Property.FooterPosition.collateAtBottom")));

    return tags;
}
项目:dynamicreports-jasper    文件:ConstantTransform.java   
public static FooterPositionEnum groupFooterPosition(GroupFooterPosition footerPosition) {
    switch (footerPosition) {
    case NORMAL:
        return FooterPositionEnum.NORMAL;
    case COLLATE_AT_BOTTOM:
        return FooterPositionEnum.COLLATE_AT_BOTTOM;
    case FORCE_AT_BOTTOM:
        return FooterPositionEnum.FORCE_AT_BOTTOM;
    case STACK_AT_BOTTOM:
        return FooterPositionEnum.STACK_AT_BOTTOM;
    default:
        throw new JasperDesignException("GroupFooterPosition " + footerPosition.name() + " not supported");
    }
}
项目:jasperreports    文件:JRBaseGroup.java   
@Override
public FooterPositionEnum getFooterPositionValue()
{
    return this.footerPositionValue;
}
项目:jasperreports    文件:JRXmlWriter.java   
/**
 *
 */
private void writeGroup(JRGroup group) throws IOException
{
    writer.startElement(JRXmlConstants.ELEMENT_group);
    writer.addEncodedAttribute(JRXmlConstants.ATTRIBUTE_name, group.getName());
    writer.addAttribute(JRXmlConstants.ATTRIBUTE_isStartNewColumn, group.isStartNewColumn(), false);
    writer.addAttribute(JRXmlConstants.ATTRIBUTE_isStartNewPage, group.isStartNewPage(), false);
    writer.addAttribute(JRXmlConstants.ATTRIBUTE_isResetPageNumber, group.isResetPageNumber(), false);
    writer.addAttribute(JRXmlConstants.ATTRIBUTE_isReprintHeaderOnEachPage, group.isReprintHeaderOnEachPage(), false);
    if (isNewerVersionOrEqual(JRConstants.VERSION_6_5_1))
    {
        writer.addAttribute(JRXmlConstants.ATTRIBUTE_isReprintHeaderOnEachColumn, group.isReprintHeaderOnEachColumn(), false);
    }
    writer.addAttributePositive(JRXmlConstants.ATTRIBUTE_minHeightToStartNewPage, group.getMinHeightToStartNewPage());
    if (isNewerVersionOrEqual(JRConstants.VERSION_6_4_3))
    {
        writer.addAttributePositive(JRXmlConstants.ATTRIBUTE_minDetailsToStartFromTop, group.getMinDetailsToStartFromTop());
    }
    if (isNewerVersionOrEqual(JRConstants.VERSION_3_6_2))
    {
        writer.addAttribute(JRXmlConstants.ATTRIBUTE_footerPosition, group.getFooterPositionValue(), FooterPositionEnum.NORMAL);
        writer.addAttribute(JRXmlConstants.ATTRIBUTE_keepTogether, group.isKeepTogether(), false);
    }
    if (isNewerVersionOrEqual(JRConstants.VERSION_6_4_3))
    {
        writer.addAttribute(JRXmlConstants.ATTRIBUTE_preventOrphanFooter, group.isPreventOrphanFooter(), false);
    }

    writeExpression(JRXmlConstants.ELEMENT_groupExpression, group.getExpression(), false);

    JRSection groupHeader = group.getGroupHeaderSection();
    if (groupHeader != null)
    {
        writer.startElement(JRXmlConstants.ELEMENT_groupHeader);
        writeSection(groupHeader);
        writer.closeElement(true);
    }

    JRSection groupFooter = group.getGroupFooterSection();
    if (groupFooter != null)
    {
        writer.startElement(JRXmlConstants.ELEMENT_groupFooter);
        writeSection(groupFooter);
        writer.closeElement(true);
    }

    writer.closeElement();
}
项目:jasperreports    文件:JRGroupFactory.java   
@Override
public Object createObject(Attributes atts)
{
    JRDesignGroup group = new JRDesignGroup();

    group.setName(atts.getValue(JRXmlConstants.ATTRIBUTE_name));

    String isStartNewColumn = atts.getValue(JRXmlConstants.ATTRIBUTE_isStartNewColumn);
    if (isStartNewColumn != null && isStartNewColumn.length() > 0)
    {
        group.setStartNewColumn(Boolean.valueOf(isStartNewColumn).booleanValue());
    }

    String isStartNewPage = atts.getValue(JRXmlConstants.ATTRIBUTE_isStartNewPage);
    if (isStartNewPage != null && isStartNewPage.length() > 0)
    {
        group.setStartNewPage(Boolean.valueOf(isStartNewPage).booleanValue());
    }

    String isResetPageNumber = atts.getValue(JRXmlConstants.ATTRIBUTE_isResetPageNumber);
    if (isResetPageNumber != null && isResetPageNumber.length() > 0)
    {
        group.setResetPageNumber(Boolean.valueOf(isResetPageNumber).booleanValue());
    }

    String isReprintHeaderOnEachPage = atts.getValue(JRXmlConstants.ATTRIBUTE_isReprintHeaderOnEachPage);
    if (isReprintHeaderOnEachPage != null && isReprintHeaderOnEachPage.length() > 0)
    {
        group.setReprintHeaderOnEachPage(Boolean.valueOf(isReprintHeaderOnEachPage).booleanValue());
    }

    String isReprintHeaderOnEachColumn = atts.getValue(JRXmlConstants.ATTRIBUTE_isReprintHeaderOnEachColumn);
    if (isReprintHeaderOnEachColumn != null && isReprintHeaderOnEachColumn.length() > 0)
    {
        group.setReprintHeaderOnEachColumn(Boolean.valueOf(isReprintHeaderOnEachColumn).booleanValue());
    }

    String minHeightToStartNewPage = atts.getValue(JRXmlConstants.ATTRIBUTE_minHeightToStartNewPage);
    if (minHeightToStartNewPage != null && minHeightToStartNewPage.length() > 0)
    {
        group.setMinHeightToStartNewPage(Integer.parseInt(minHeightToStartNewPage));
    }

    String minDetailsToStartFromTop = atts.getValue(JRXmlConstants.ATTRIBUTE_minDetailsToStartFromTop);
    if (minDetailsToStartFromTop != null && minDetailsToStartFromTop.length() > 0)
    {
        group.setMinDetailsToStartFromTop(Integer.parseInt(minDetailsToStartFromTop));
    }

    FooterPositionEnum footerPosition = FooterPositionEnum.getByName(atts.getValue(JRXmlConstants.ATTRIBUTE_footerPosition));
    if (footerPosition != null)
    {
        group.setFooterPosition(footerPosition);
    }

    String keepTogether = atts.getValue(JRXmlConstants.ATTRIBUTE_keepTogether);
    if (keepTogether != null && keepTogether.length() > 0)
    {
        group.setKeepTogether(Boolean.valueOf(keepTogether).booleanValue());
    }

    String preventOrphanFooter = atts.getValue(JRXmlConstants.ATTRIBUTE_preventOrphanFooter);
    if (preventOrphanFooter != null && preventOrphanFooter.length() > 0)
    {
        group.setPreventOrphanFooter(Boolean.valueOf(preventOrphanFooter).booleanValue());
    }

    return group;
}
项目:jasperreports    文件:JRApiWriter.java   
/**
 *
 */
private void writeGroup( JRGroup group)
{
    String groupName = group.getName();

    groupsMap.put(groupName, groupName);

    write( "JRDesignGroup " + groupName + " = new JRDesignGroup();\n");
    write( groupName + ".setName(\"" + JRStringUtil.escapeJavaStringLiteral(groupName) + "\");\n");
    write( groupName + ".setStartNewColumn({0});\n", group.isStartNewColumn(), false);
    write( groupName + ".setStartNewPage({0});\n", group.isStartNewPage(), false);
    write( groupName + ".setReprintHeaderOnEachPage({0});\n", group.isReprintHeaderOnEachPage(), false);
    write( groupName + ".setReprintHeaderOnEachColumn({0});\n", group.isReprintHeaderOnEachColumn(), false);
    write( groupName + ".setMinHeightToStartNewPage({0});\n", group.getMinHeightToStartNewPage());
    write( groupName + ".setMinDetailsToStartFromTop({0});\n", group.getMinDetailsToStartFromTop());
    write( groupName + ".setFooterPosition({0});\n", group.getFooterPositionValue(), FooterPositionEnum.NORMAL);

    write( groupName + ".setKeepTogether({0});\n", group.isKeepTogether(), false);
    write( groupName + ".setPreventOrphanFooter({0});\n", group.isPreventOrphanFooter(), false);

    writeExpression( group.getExpression(), groupName, "Expression");

    JRSection groupHeader = group.getGroupHeaderSection();
    if (groupHeader != null)
    {
        writeSection(
                groupHeader, 
                groupName+"Header", 
                "((JRDesignSection)" + groupName + ".getGroupHeaderSection()).getBandsList()"
                );
    }

    JRSection groupFooter = group.getGroupFooterSection();
    if (groupFooter != null)
    {
        writeSection(
                groupFooter, 
                groupName+"Footer", 
                "((JRDesignSection)" + groupName + ".getGroupFooterSection()).getBandsList()"
                );
    }

    flush();
}
项目:jasperreports    文件:JRFillGroup.java   
@Override
public FooterPositionEnum getFooterPositionValue()
{
    return parent.getFooterPositionValue();
}
项目:jasperreports    文件:JRFillGroup.java   
@Override
public void setFooterPosition(FooterPositionEnum footerPosition)
{
    throw new UnsupportedOperationException();
}
项目:jasperreports    文件:SimpleGroupFooterElementRange.java   
@Override
public FooterPositionEnum getMasterFooterPosition()
{
    return masterFooterPosition;
}
项目:jasperreports    文件:SimpleGroupFooterElementRange.java   
@Override
public void setMasterFooterPosition(FooterPositionEnum masterFooterPosition)
{
    this.masterFooterPosition = masterFooterPosition;
}
项目:jasperreports    文件:SimpleGroupFooterElementRange.java   
@Override
public FooterPositionEnum getCurrentFooterPosition()
{
    return crtFooterPosition;
}
项目:jasperreports    文件:SimpleGroupFooterElementRange.java   
@Override
public void setCurrentFooterPosition(FooterPositionEnum crtFooterPosition)
{
    this.crtFooterPosition = crtFooterPosition;
}
项目:jasperreports    文件:TableReportGroup.java   
@Override
public FooterPositionEnum getFooterPositionValue()
{
    return datasetGroup.getFooterPositionValue();
}
项目:jasperreports    文件:TableReportGroup.java   
@Override
public void setFooterPosition(FooterPositionEnum footerPosition)
{
    throw new UnsupportedOperationException();
}
项目:PDFReporter-Studio    文件:MGroup.java   
/**
 * Creates the property descriptors.
 * 
 * @param desc
 *          the desc
 */
@Override
public void createPropertyDescriptors(List<IPropertyDescriptor> desc, Map<String, Object> defaultsMap) {
    validator = new GroupNameValidator();
    validator.setTargetNode(this);
    JSSTextPropertyDescriptor nameD = new JSSValidatedTextPropertyDescriptor(JRDesignGroup.PROPERTY_NAME, Messages.common_name, validator);
    nameD.setDescription(Messages.MGroup_name_description);
    desc.add(nameD);

    JRExpressionPropertyDescriptor expressionD = new JRExpressionPropertyDescriptor(JRDesignGroup.PROPERTY_EXPRESSION,
            Messages.common_expression);
    expressionD.setDescription(Messages.MGroup_expression_description);
    desc.add(expressionD);

    PixelPropertyDescriptor minhD = new PixelPropertyDescriptor(JRBaseGroup.PROPERTY_MIN_HEIGHT_TO_START_NEW_PAGE,
            Messages.MGroup_minHeightTitle);
    minhD.setDescription(Messages.MGroup_minHeightDescription);
    desc.add(minhD);

    CheckBoxPropertyDescriptor stNewColD = new CheckBoxPropertyDescriptor(JRBaseGroup.PROPERTY_START_NEW_COLUMN,
            Messages.MGroup_newColTitle);
    stNewColD.setDescription(Messages.MGroup_newColDescription);
    desc.add(stNewColD);

    CheckBoxPropertyDescriptor stNewPageD = new CheckBoxPropertyDescriptor(JRBaseGroup.PROPERTY_START_NEW_PAGE,
            Messages.MGroup_newPageTitle);
    stNewPageD.setDescription(Messages.MGroup_newPageDescription);
    desc.add(stNewPageD);

    CheckBoxPropertyDescriptor rPageNumD = new CheckBoxPropertyDescriptor(JRBaseGroup.PROPERTY_RESET_PAGE_NUMBER,
            Messages.MGroup_pageNumberTitle);
    rPageNumD.setDescription(Messages.MGroup_pageNumberDescription);
    desc.add(rPageNumD);

    CheckBoxPropertyDescriptor rHeadEPD = new CheckBoxPropertyDescriptor(
            JRBaseGroup.PROPERTY_REPRINT_HEADER_ON_EACH_PAGE, Messages.MGroup_reprintTitle);
    rHeadEPD.setDescription(Messages.MGroup_reprintPosition);
    desc.add(rHeadEPD);

    CheckBoxPropertyDescriptor keepToD = new CheckBoxPropertyDescriptor(JRBaseGroup.PROPERTY_KEEP_TOGETHER,
            Messages.MGroup_keepTitle);
    keepToD.setDescription(Messages.MGroup_keepDescription);
    desc.add(keepToD);

    positionD = new JSSEnumPropertyDescriptor(JRBaseGroup.PROPERTY_FOOTER_POSITION, Messages.MGroup_footerPosTitle,
            FooterPositionEnum.class, NullEnum.NOTNULL);
    positionD.setDescription(Messages.MGroup_footerPosDescription);
    desc.add(positionD);

    defaultsMap.put(JRDesignGroup.PROPERTY_MIN_HEIGHT_TO_START_NEW_PAGE, CONST_MIN_HEIGHT);
    defaultsMap.put(JRDesignGroup.PROPERTY_FOOTER_POSITION, FooterPositionEnum.NORMAL);
    defaultsMap.put(JRDesignGroup.PROPERTY_KEEP_TOGETHER, Boolean.FALSE);
    defaultsMap.put(JRDesignGroup.PROPERTY_REPRINT_HEADER_ON_EACH_PAGE, Boolean.FALSE);
    defaultsMap.put(JRDesignGroup.PROPERTY_RESET_PAGE_NUMBER, Boolean.FALSE);
    defaultsMap.put(JRDesignGroup.PROPERTY_START_NEW_COLUMN, Boolean.FALSE);
    defaultsMap.put(JRDesignGroup.PROPERTY_START_NEW_PAGE, Boolean.FALSE);

    setHelpPrefix(desc, "net.sf.jasperreports.doc/docs/schema.reference.html?cp=0_1#group"); //$NON-NLS-1$
}
项目:ireport-fork    文件:FooterPositionProperty.java   
@Override
public Object getDefaultValue() {
    return FooterPositionEnum.NORMAL;
}
项目:jasperreports    文件:JRGroup.java   
/**
 * Specifies how the group footer section behaves with regards to its position on the current page.
 */
public FooterPositionEnum getFooterPositionValue();
项目:jasperreports    文件:JRGroup.java   
/**
 * Specifies the group footer section behavior with regards to its position on the current page.
 */
public void setFooterPosition(FooterPositionEnum footerPosition);
项目:ireport-fork    文件:FooterPositionProperty.java   
@Override
public void setPropertyValue(Object value) {

    group.setFooterPosition((FooterPositionEnum)value);

}
项目:jasperreports    文件:GroupFooterElementRange.java   
public FooterPositionEnum getMasterFooterPosition();
项目:jasperreports    文件:GroupFooterElementRange.java   
public void setMasterFooterPosition(FooterPositionEnum footerPosition);
项目:jasperreports    文件:GroupFooterElementRange.java   
public FooterPositionEnum getCurrentFooterPosition();
项目:jasperreports    文件:GroupFooterElementRange.java   
public void setCurrentFooterPosition(FooterPositionEnum footerPosition);