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

package lt.ktu.gmj.analysis;

import java.awt.*;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import javax.swing.JFrame;
import lt.ktu.gmj.ResultObserver;
import lt.ktu.gmj.ResultRepository;

// Referenced classes of package lt.ktu.gmj.analysis:
//            ResultAnalyzer

public abstract class ResultFrame extends JFrame
    implements ResultAnalyzer, ResultObserver
{

    public ResultFrame(String s)
    {
        super(s);
        results = null;
        setDefaultCloseOperation(0);
        addWindowListener(new WindowAdapter() {

            public void windowClosing(WindowEvent windowevent)
            {
                results.removeObserver(ResultFrame.this);
                dispose();
            }

        });
        setFont(new Font("dialog", 0, 10));
        setSize(400, 300);
    }

    public abstract void finalResult(ResultRepository resultrepository);

    public void logDisposed(ResultRepository resultrepository)
    {
        dispose();
    }

    public synchronized void logStarted(ResultRepository resultrepository)
    {
        repaint();
    }

    public abstract void newProgressResult(ResultRepository resultrepository);

    public abstract void newResult(ResultRepository resultrepository);

    public void prepare(ResultRepository resultrepository)
    {
        results = resultrepository;
    }

    protected ResultRepository results;
}
