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

net.sf.dynamicreports.design.base.component.DRDesignComponent Maven / Gradle / Ivy

/*
 * DynamicReports - Free Java reporting library for creating reports dynamically
 *
 * Copyright (C) 2010 - 2018 Ricardo Mariaca and the Dynamic Reports Contributors
 * http://www.dynamicreports.org
 *
 * This file is part of DynamicReports.
 *
 * DynamicReports is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * DynamicReports is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with DynamicReports. If not, see .
 */
package net.sf.dynamicreports.design.base.component;

import net.sf.dynamicreports.design.base.DRDesignTableOfContentsHeading;
import net.sf.dynamicreports.design.base.style.DRDesignStyle;
import net.sf.dynamicreports.design.definition.DRIDesignGroup;
import net.sf.dynamicreports.design.definition.component.DRIDesignComponent;
import net.sf.dynamicreports.design.definition.expression.DRIDesignExpression;
import net.sf.dynamicreports.design.definition.expression.DRIDesignPropertyExpression;
import net.sf.dynamicreports.report.constant.ComponentPositionType;
import net.sf.dynamicreports.report.constant.Constants;
import net.sf.dynamicreports.report.constant.StretchType;

import java.util.ArrayList;
import java.util.List;

/**
 * 

Abstract DRDesignComponent class.

* * @author Ricardo Mariaca ([email protected]) * @version $Id: $Id */ public abstract class DRDesignComponent implements DRIDesignComponent { private static final long serialVersionUID = Constants.SERIAL_VERSION_UID; private String name; private String uniqueName; private DRDesignStyle style; private Integer x; private Integer y; private Integer width; private Integer height; private DRIDesignExpression printWhenExpression; private boolean isRemoveLineWhenBlank; private List propertyExpressions; private ComponentPositionType positionType; private StretchType stretchType; private boolean printInFirstWholeBand; private boolean printWhenDetailOverflows; private DRIDesignGroup printWhenGroupChanges; private DRDesignTableOfContentsHeading tableOfContentsHeading; /** *

Constructor for DRDesignComponent.

* * @param name a {@link java.lang.String} object. */ protected DRDesignComponent(String name) { this.name = name; this.uniqueName = name; init(); } /** *

init.

*/ protected void init() { propertyExpressions = new ArrayList(); } /** {@inheritDoc} */ @Override public String getName() { return name; } /** {@inheritDoc} */ @Override public String getUniqueName() { return uniqueName; } /** *

Setter for the field uniqueName.

* * @param uniqueName a {@link java.lang.String} object. */ public void setUniqueName(String uniqueName) { this.uniqueName = uniqueName; } /** {@inheritDoc} */ @Override public DRDesignStyle getStyle() { return style; } /** *

Setter for the field style.

* * @param style a {@link net.sf.dynamicreports.design.base.style.DRDesignStyle} object. */ public void setStyle(DRDesignStyle style) { this.style = style; } /** {@inheritDoc} */ @Override public Integer getX() { return x; } /** *

Setter for the field x.

* * @param x a {@link java.lang.Integer} object. */ public void setX(Integer x) { this.x = x; } /** {@inheritDoc} */ @Override public Integer getY() { return y; } /** *

Setter for the field y.

* * @param y a {@link java.lang.Integer} object. */ public void setY(Integer y) { this.y = y; } /** {@inheritDoc} */ @Override public Integer getWidth() { return width; } /** *

Setter for the field width.

* * @param width a {@link java.lang.Integer} object. */ public void setWidth(Integer width) { this.width = width; } /** {@inheritDoc} */ @Override public Integer getHeight() { return height; } /** *

Setter for the field height.

* * @param height a {@link java.lang.Integer} object. */ public void setHeight(Integer height) { this.height = height; } /** {@inheritDoc} */ @Override public DRIDesignExpression getPrintWhenExpression() { return printWhenExpression; } /** *

Setter for the field printWhenExpression.

* * @param printWhenExpression a {@link net.sf.dynamicreports.design.definition.expression.DRIDesignExpression} object. */ public void setPrintWhenExpression(DRIDesignExpression printWhenExpression) { this.printWhenExpression = printWhenExpression; } /** {@inheritDoc} */ @Override public boolean isRemoveLineWhenBlank() { return isRemoveLineWhenBlank; } /** *

setRemoveLineWhenBlank.

* * @param isRemoveLineWhenBlank a boolean. */ public void setRemoveLineWhenBlank(boolean isRemoveLineWhenBlank) { this.isRemoveLineWhenBlank = isRemoveLineWhenBlank; } /** {@inheritDoc} */ @Override public List getPropertyExpressions() { return propertyExpressions; } /** *

Setter for the field propertyExpressions.

* * @param propertyExpressions a {@link java.util.List} object. */ public void setPropertyExpressions(List propertyExpressions) { this.propertyExpressions = propertyExpressions; } /** {@inheritDoc} */ @Override public ComponentPositionType getPositionType() { return positionType; } /** *

Setter for the field positionType.

* * @param positionType a {@link net.sf.dynamicreports.report.constant.ComponentPositionType} object. */ public void setPositionType(ComponentPositionType positionType) { this.positionType = positionType; } /** {@inheritDoc} */ @Override public StretchType getStretchType() { return stretchType; } /** *

Setter for the field stretchType.

* * @param stretchType a {@link net.sf.dynamicreports.report.constant.StretchType} object. */ public void setStretchType(StretchType stretchType) { this.stretchType = stretchType; } /** {@inheritDoc} */ @Override public boolean isPrintInFirstWholeBand() { return printInFirstWholeBand; } /** *

Setter for the field printInFirstWholeBand.

* * @param printInFirstWholeBand a boolean. */ public void setPrintInFirstWholeBand(boolean printInFirstWholeBand) { this.printInFirstWholeBand = printInFirstWholeBand; } /** {@inheritDoc} */ @Override public boolean isPrintWhenDetailOverflows() { return printWhenDetailOverflows; } /** *

Setter for the field printWhenDetailOverflows.

* * @param printWhenDetailOverflows a boolean. */ public void setPrintWhenDetailOverflows(boolean printWhenDetailOverflows) { this.printWhenDetailOverflows = printWhenDetailOverflows; } /** {@inheritDoc} */ @Override public DRIDesignGroup getPrintWhenGroupChanges() { return printWhenGroupChanges; } /** *

Setter for the field printWhenGroupChanges.

* * @param printWhenGroupChanges a {@link net.sf.dynamicreports.design.definition.DRIDesignGroup} object. */ public void setPrintWhenGroupChanges(DRIDesignGroup printWhenGroupChanges) { this.printWhenGroupChanges = printWhenGroupChanges; } /** {@inheritDoc} */ @Override public DRDesignTableOfContentsHeading getTableOfContentsHeading() { return tableOfContentsHeading; } /** *

Setter for the field tableOfContentsHeading.

* * @param tableOfContentsHeading a {@link net.sf.dynamicreports.design.base.DRDesignTableOfContentsHeading} object. */ public void setTableOfContentsHeading(DRDesignTableOfContentsHeading tableOfContentsHeading) { this.tableOfContentsHeading = tableOfContentsHeading; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy