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

package lt.ktu.gmj.analysis;

import java.awt.*;
import javax.swing.*;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
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
{

	protected ResultRepository results;

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

			public void windowClosing(WindowEvent e)
			{
				results.removeObserver(ResultFrame.this);
				//e.getWindow().dispose();
				e.getWindow().hide();
			}

		});
		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;
	}
}
