/*
 * MeterInterval.java
 *
 * Created on September 28, 2006, 4:56 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package it.businesslogic.ireport.chart;

import java.awt.Color;

/**
 *
 * @author gtoffoli
 */
public class MeterInterval {
    
    private DataRange dataRange = new DataRange();
    private String label = "";
    private Color color = null;
    private double alpha = 1.0;
    
    /** Creates a new instance of MeterInterval */
    public MeterInterval() {
    }

    public MeterInterval cloneMe()
    {
        MeterInterval obj = new MeterInterval();
        if (getColor() != null) obj.setColor( new Color( getColor().getRGB()));
        obj.setLabel( new String( label ));
        obj.setAlpha( getAlpha() );
        obj.setDataRange(  getDataRange().cloneMe());
        
        return obj;
    }
    
    public DataRange getDataRange() {
        return dataRange;
    }

    public void setDataRange(DataRange dataRange) {
        this.dataRange = dataRange;
    }

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public Color getColor() {
        return color;
    }

    public void setColor(Color color) {
        this.color = color;
    }

    public double getAlpha() {
        return alpha;
    }

    public void setAlpha(double alpha) {
        this.alpha = alpha;
    }
    
}
