// 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:   AbstractChartPointProvider.java

package lt.monarch.chart.chart2D;

import java.util.Vector;

// Referenced classes of package lt.monarch.chart.chart2D:
//            ChartPointProvider, ChartPoint

public abstract class AbstractChartPointProvider
    implements ChartPointProvider
{

    public AbstractChartPointProvider()
    {
        listeners = new Vector();
    }

    public void addListener(ChartPointProvider.Listener listener)
    {
        listeners.addElement(listener);
    }

    protected void firePointAdded(ChartPoint chartpoint)
    {
        for (int i = 0; i < listeners.size(); i++)
            ((ChartPointProvider.Listener)listeners.elementAt(i)).pointAdded(this, chartpoint);

    }

    protected void firePointsChanged()
    {
        for (int i = 0; i < listeners.size(); i++)
            ((ChartPointProvider.Listener)listeners.elementAt(i)).pointsChanged(this);

    }

    public abstract ChartPoint point(int i);

    public abstract int pointCount();

    public void removeListener(ChartPointProvider.Listener listener)
    {
        listeners.removeElement(listener);
    }

    private Vector listeners;
}
