// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: packimports(3) space 
// Source File Name:   ConnectedSeries.java

package lt.monarch.charts;

import java.awt.*;

// Referenced classes of package lt.monarch.charts:
//            ChartPointSeries, ChartPoint, ChartPointProvider, XAxis, 
//            YAxis

public class ConnectedSeries extends ChartPointSeries
{

    public ConnectedSeries(ChartPointProvider chartpointprovider, XAxis xaxis, YAxis yaxis)
    {
        super(chartpointprovider, xaxis, yaxis);
        lineColor = Color.red;
    }

    public void draw(Graphics g, Rectangle rectangle)
    {
        Point point = null;
        for (int i = 0; i < super.provider.pointCount(); i++)
        {
            Point point1 = super.provider.point(i).draw(g, this, rectangle);
            g.setColor(lineColor);
            if (point1 != null && point != null)
                g.drawLine(point.x, point.y, point1.x, point1.y);
            point = point1;
        }

    }

    public void setColor(Color color)
    {
        lineColor = color;
    }

    Color lineColor;
}
