All Downloads are FREE. Search and download functionalities are using the official Maven repository.

it.discovery.jasperreports.jasper2word.J2WReportConfiguration Maven / Gradle / Ivy

The newest version!
package it.discovery.jasperreports.jasper2word;

import it.discovery.jasperreports.jasper2word.J2WGridPageLayout.ISimplifierGrid;
import net.sf.jasperreports.export.ReportExportConfiguration;

/**
 * The report export configuration interface.
 * @author discovery
 * @date 10/08/15 11.17
 */
public interface J2WReportConfiguration extends ReportExportConfiguration {
    /**
     * Set the simplifier grid.
     * @param simplifier The simplifier grid. Can be {@code null}.
     */
    void setSimplifierGrid(ISimplifierGrid simplifier);

    /**
     * Set a {@link it.discovery.jasperreports.jasper2word.J2WGridPageLayout.GapSimplifierGrid GapSimplifierGrid} simplifier.
     * @param gapX The x gap.
     * @param gapY The y gap.
     */
    void setSimplifierGrid(int gapX, int gapY);

    /**
     * Set a {@link it.discovery.jasperreports.jasper2word.J2WGridPageLayout.PercentageSimplifierGrid PercentageSimplifierGrid} simplifier.
     * @param baseX The baseX.
     * @param baseY The baseY.
     * @param percentX The x percentage.
     * @param percentY The y percentage.
     */
    void setSimplifierGrid(int baseX, int baseY, double percentX, double percentY);

    /**
     * Return the current simplifier.
     * @return The current simplifier (always not {@code null}).
     */
    ISimplifierGrid getSimplifierGrid();

    /**
     * Set the {@link it.discovery.jasperreports.jasper2word.J2WReportConfiguration.ESpacingPolicy spacing policy}.
     * @param policy The spacing policy.
     * @see it.discovery.jasperreports.jasper2word.J2WReportConfiguration.ESpacingPolicy
     */
    void setSpacingPolicy(ESpacingPolicy policy);

    /**
     * Return the spacing policy.
     * @return The spacing policy (default {@link it.discovery.jasperreports.jasper2word.J2WReportConfiguration.ESpacingPolicy#EDITABLE EDITABLE}).
     * @see it.discovery.jasperreports.jasper2word.J2WReportConfiguration.ESpacingPolicy
     */
    ESpacingPolicy getSpacingPolicy();

    /**
     * Policy for spacing rules: in a word document it can be specify left and right margin of a text element to place it horizontally,
     * but nor top and bottom to place it vertically. So, to move down a text element there are two methods:
     * 
    *
  1. increase top or bottom paragraph spacing
  2. *
  3. append one or more empty paragraphs under the text
  4. *
* First choice produces a document that is very similar the original report, but it can't be easily editable; * the second produces a document less similar but more editable. */ enum ESpacingPolicy { /** Increase top or bottom paragraph spacing */ EXACT, /** Append empty paragraphs */ EDITABLE } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy