// Path: srcTools/magma/tools/benchmark/model/IModelReadOnly.java
// public interface IModelReadOnly {
// 	/**
// 	 * @return the results per team
// 	 */
// 	List<ITeamResult> getTeamResults();
// 
// 	boolean isRunning();
// 
// 	List<TeamConfiguration> loadConfigFile(File file) throws InvalidConfigFileException;
// 
// 	void attach(IObserver<IModelReadOnly> observer);
// 
// 	/**
// 	 * Removes an observer from the list of observers
// 	 *
// 	 * @param observer The observer that wants to be removed
// 	 * @return true if The observer has been in the list and was removed
// 	 */
// 	boolean detach(IObserver<IModelReadOnly> observer);
// }
// 
// Path: srcTools/magma/tools/benchmark/model/ITeamResult.java
// public interface ITeamResult extends ISingleResult {
// 	void addResult(ISingleResult result);
// 
// 	float getAverageScore();
// 
// 	int getFallenCount();
// 
// 	int getPenaltyCount();
// 
// 	@Override
// 	boolean isValid();
// 
// 	int size();
// 
// 	String getName();
// 
// 	@Override
// 	String getStatusText();
// 
// 	/** returns the nth result */
// 	ISingleResult getResult(int n);
// }
// 
// Path: srcTools/magma/tools/benchmark/model/TeamConfiguration.java
// public class TeamConfiguration
// {
// 	private final String name;
// 
// 	private final String path;
// 
// 	private final float dropHeight;
// 
// 	public TeamConfiguration(String name, String path, float dropHeight)
// 	{
// 		this.name = name;
// 		this.path = path;
// 		this.dropHeight = dropHeight;
// 	}
// 
// 	public String getName()
// 	{
// 		return name;
// 	}
// 
// 	public String getPath()
// 	{
// 		return path;
// 	}
// 
// 	/**
// 	 * @return the dropHeight of the player
// 	 */
// 	public float getDropHeight()
// 	{
// 		return dropHeight;
// 	}
// }


import hso.autonomy.util.observer.IObserver;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.Collections;
import java.util.List;
import javax.swing.AbstractCellEditor;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.JTextArea;
import javax.swing.table.TableCellEditor;
import javax.swing.table.TableCellRenderer;
import magma.tools.benchmark.model.IModelReadOnly;
import magma.tools.benchmark.model.ITeamResult;
import magma.tools.benchmark.model.TeamConfiguration;
/* Copyright 2009 Hochschule Offenburg
 * Klaus Dorer, Mathias Ehret, Stefan Glaser, Thomas Huber,
 * Simon Raffeiner, Srinivasa Ragavan, Thomas Rinklin,
 * Joachim Schilling, Rajit Shahi
 *
 * This file is part of magmaOffenburg.
 *
 * magmaOffenburg is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * magmaOffenburg is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with magmaOffenburg. If not, see <http://www.gnu.org/licenses/>.
 */

package magma.tools.benchmark.view.bench;


/**
 *
 * @author kdorer
 */
public abstract class BenchmarkTableView implements IObserver<IModelReadOnly>
{
	protected JTable table;

	protected final IModelReadOnly model;

	private final String startScriptFolder;

	protected BenchmarkTableView(IModelReadOnly model, String startScriptFolder)
	{
		this.model = model;
		this.startScriptFolder = startScriptFolder;
		createTeamTable();
	}

// Path: srcTools/magma/tools/benchmark/model/IModelReadOnly.java
// public interface IModelReadOnly {
// 	/**
// 	 * @return the results per team
// 	 */
// 	List<ITeamResult> getTeamResults();
// 
// 	boolean isRunning();
// 
// 	List<TeamConfiguration> loadConfigFile(File file) throws InvalidConfigFileException;
// 
// 	void attach(IObserver<IModelReadOnly> observer);
// 
// 	/**
// 	 * Removes an observer from the list of observers
// 	 *
// 	 * @param observer The observer that wants to be removed
// 	 * @return true if The observer has been in the list and was removed
// 	 */
// 	boolean detach(IObserver<IModelReadOnly> observer);
// }
// 
// Path: srcTools/magma/tools/benchmark/model/ITeamResult.java
// public interface ITeamResult extends ISingleResult {
// 	void addResult(ISingleResult result);
// 
// 	float getAverageScore();
// 
// 	int getFallenCount();
// 
// 	int getPenaltyCount();
// 
// 	@Override
// 	boolean isValid();
// 
// 	int size();
// 
// 	String getName();
// 
// 	@Override
// 	String getStatusText();
// 
// 	/** returns the nth result */
// 	ISingleResult getResult(int n);
// }
// 
// Path: srcTools/magma/tools/benchmark/model/TeamConfiguration.java
// public class TeamConfiguration
// {
// 	private final String name;
// 
// 	private final String path;
// 
// 	private final float dropHeight;
// 
// 	public TeamConfiguration(String name, String path, float dropHeight)
// 	{
// 		this.name = name;
// 		this.path = path;
// 		this.dropHeight = dropHeight;
// 	}
// 
// 	public String getName()
// 	{
// 		return name;
// 	}
// 
// 	public String getPath()
// 	{
// 		return path;
// 	}
// 
// 	/**
// 	 * @return the dropHeight of the player
// 	 */
// 	public float getDropHeight()
// 	{
// 		return dropHeight;
// 	}
// }


// Path: srcTools/magma/tools/benchmark/view/bench/BenchmarkTableView.java
import hso.autonomy.util.observer.IObserver;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.Collections;
import java.util.List;
import javax.swing.AbstractCellEditor;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.JTextArea;
import javax.swing.table.TableCellEditor;
import javax.swing.table.TableCellRenderer;
import magma.tools.benchmark.model.IModelReadOnly;
import magma.tools.benchmark.model.ITeamResult;
import magma.tools.benchmark.model.TeamConfiguration;

/* Copyright 2009 Hochschule Offenburg
 * Klaus Dorer, Mathias Ehret, Stefan Glaser, Thomas Huber,
 * Simon Raffeiner, Srinivasa Ragavan, Thomas Rinklin,
 * Joachim Schilling, Rajit Shahi
 *
 * This file is part of magmaOffenburg.
 *
 * magmaOffenburg is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * magmaOffenburg is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with magmaOffenburg. If not, see <http://www.gnu.org/licenses/>.
 */

package magma.tools.benchmark.view.bench;


/**
 *
 * @author kdorer
 */
public abstract class BenchmarkTableView implements IObserver<IModelReadOnly>
{
	protected JTable table;

	protected final IModelReadOnly model;

	private final String startScriptFolder;

	protected BenchmarkTableView(IModelReadOnly model, String startScriptFolder)
	{
		this.model = model;
		this.startScriptFolder = startScriptFolder;
		createTeamTable();
	}

	public abstract List<TeamConfiguration> getTeamConfiguration();