package edu.calpoly.csc480.Entomo.Tile;

import java.awt.*;
import javax.swing.*;

import com.bcurry.www.swing.*;

import edu.calpoly.csc480.Entomo.Ant.*;
import edu.calpoly.csc480.Entomo.Tile.OdorTile.*;

public class Legend extends BasicPanel {
	public Legend() {
		super(new GridLayout(0, 1));

		OdorTile antTile;

		antTile = new OdorTile();
		antTile.setMeans(new BlindAnt().getMeans());

		add(new LegendLabel(antTile));
		add(new LegendLabel(new WallTile()));
		add(new LegendLabel(new HiveTile()));
		add(new LegendLabel(new DawnTile()));
		add(new LegendLabel(new DeadTile()));
		add(new LegendLabel(new OdorTile(OdorTile.maxOdor / 2)));
		add(new LegendLabel(new FoodTile(FoodTile.maxFood / 2)));
		add(new LegendLabel(new OdorTile()));
	}
	
	protected class LegendLabel extends JLabel {
		public LegendLabel(Tile tile) {
			super(tile.getName(), tile.getView(), JLabel.LEFT);
			setHorizontalTextPosition(JLabel.RIGHT);
		}
	}
}