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

net.sf.dynamicreports.report.base.chart.plot.DRMeterPlot Maven / Gradle / Ivy

Go to download

DynamicReports is an open source Java reporting library based on JasperReports. It allows to create dynamic report designs and it doesn't need a visual report designer. You can very quickly create reports and produce documents that can be displayed, printed or exported into many popular formats such as PDF, Excel, Word and others.

The newest version!
/*
 * DynamicReports - Free Java reporting library for creating reports dynamically
 *
 * Copyright (C) 2010 - 2018 Ricardo Mariaca and the Dynamic Reports Contributors
 *
 * 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.report.base.chart.plot;

import net.sf.dynamicreports.report.base.style.DRFont;
import net.sf.dynamicreports.report.constant.Constants;
import net.sf.dynamicreports.report.constant.MeterShape;
import net.sf.dynamicreports.report.definition.chart.plot.DRIMeterInterval;
import net.sf.dynamicreports.report.definition.chart.plot.DRIMeterPlot;
import net.sf.dynamicreports.report.definition.expression.DRIExpression;
import org.apache.commons.lang3.Validate;

import java.awt.Color;
import java.util.ArrayList;
import java.util.List;

/**
 * 

DRMeterPlot class.

* * @author Ricardo Mariaca * */ public class DRMeterPlot implements DRIMeterPlot { private static final long serialVersionUID = Constants.SERIAL_VERSION_UID; private DRIExpression dataRangeLowExpression; private DRIExpression dataRangeHighExpression; private Color valueColor; private String valueMask; private DRFont valueFont; private MeterShape shape; private List intervals; private Integer meterAngle; private String units; private Double tickInterval; private Color meterBackgroundColor; private Color needleColor; private Color tickColor; private DRFont tickLabelFont; /** *

Constructor for DRMeterPlot.

*/ public DRMeterPlot() { intervals = new ArrayList(); } /** {@inheritDoc} */ @Override public DRIExpression getDataRangeLowExpression() { return dataRangeLowExpression; } /** *

Setter for the field dataRangeLowExpression.

* * @param dataRangeLowExpression a {@link net.sf.dynamicreports.report.definition.expression.DRIExpression} object. */ public void setDataRangeLowExpression(DRIExpression dataRangeLowExpression) { this.dataRangeLowExpression = dataRangeLowExpression; } /** {@inheritDoc} */ @Override public DRIExpression getDataRangeHighExpression() { return dataRangeHighExpression; } /** *

Setter for the field dataRangeHighExpression.

* * @param dataRangeHighExpression a {@link net.sf.dynamicreports.report.definition.expression.DRIExpression} object. */ public void setDataRangeHighExpression(DRIExpression dataRangeHighExpression) { this.dataRangeHighExpression = dataRangeHighExpression; } /** {@inheritDoc} */ @Override public Color getValueColor() { return valueColor; } /** *

Setter for the field valueColor.

* * @param valueColor a {@link java.awt.Color} object. */ public void setValueColor(Color valueColor) { this.valueColor = valueColor; } /** {@inheritDoc} */ @Override public String getValueMask() { return valueMask; } /** *

Setter for the field valueMask.

* * @param valueMask a {@link java.lang.String} object. */ public void setValueMask(String valueMask) { this.valueMask = valueMask; } /** {@inheritDoc} */ @Override public DRFont getValueFont() { return valueFont; } /** *

Setter for the field valueFont.

* * @param valueFont a {@link net.sf.dynamicreports.report.base.style.DRFont} object. */ public void setValueFont(DRFont valueFont) { this.valueFont = valueFont; } /** {@inheritDoc} */ @Override public MeterShape getShape() { return shape; } /** *

Setter for the field shape.

* * @param shape a {@link net.sf.dynamicreports.report.constant.MeterShape} object. */ public void setShape(MeterShape shape) { this.shape = shape; } /** {@inheritDoc} */ @Override public List getIntervals() { return intervals; } /** *

Setter for the field intervals.

* * @param intervals a {@link java.util.List} object. */ public void setIntervals(List intervals) { this.intervals = intervals; } /** *

addInterval.

* * @param interval a {@link net.sf.dynamicreports.report.definition.chart.plot.DRIMeterInterval} object. */ public void addInterval(DRIMeterInterval interval) { Validate.notNull(interval, "interval must not be null"); intervals.add(interval); } /** {@inheritDoc} */ @Override public Integer getMeterAngle() { return meterAngle; } /** *

Setter for the field meterAngle.

* * @param meterAngle a {@link java.lang.Integer} object. */ public void setMeterAngle(Integer meterAngle) { this.meterAngle = meterAngle; } /** {@inheritDoc} */ @Override public String getUnits() { return units; } /** *

Setter for the field units.

* * @param units a {@link java.lang.String} object. */ public void setUnits(String units) { this.units = units; } /** {@inheritDoc} */ @Override public Double getTickInterval() { return tickInterval; } /** *

Setter for the field tickInterval.

* * @param tickInterval a {@link java.lang.Double} object. */ public void setTickInterval(Double tickInterval) { this.tickInterval = tickInterval; } /** {@inheritDoc} */ @Override public Color getMeterBackgroundColor() { return meterBackgroundColor; } /** *

Setter for the field meterBackgroundColor.

* * @param meterBackgroundColor a {@link java.awt.Color} object. */ public void setMeterBackgroundColor(Color meterBackgroundColor) { this.meterBackgroundColor = meterBackgroundColor; } /** {@inheritDoc} */ @Override public Color getNeedleColor() { return needleColor; } /** *

Setter for the field needleColor.

* * @param needleColor a {@link java.awt.Color} object. */ public void setNeedleColor(Color needleColor) { this.needleColor = needleColor; } /** {@inheritDoc} */ @Override public Color getTickColor() { return tickColor; } /** *

Setter for the field tickColor.

* * @param tickColor a {@link java.awt.Color} object. */ public void setTickColor(Color tickColor) { this.tickColor = tickColor; } /** {@inheritDoc} */ @Override public DRFont getTickLabelFont() { return tickLabelFont; } /** *

Setter for the field tickLabelFont.

* * @param tickLabelFont a {@link net.sf.dynamicreports.report.base.style.DRFont} object. */ public void setTickLabelFont(DRFont tickLabelFont) { this.tickLabelFont = tickLabelFont; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy