import java.awt.*;
import java.awt.event.ActionListener;

/**
 * This class summarizes the components for entering the simulation specific parameters. 
 * In more modern progams this would be realized with an  inner class or evan an anonymous
 * inner class.
 * @author B.Düring
 * @author S.Holst
 */
public class ArgumentsPanel extends ControlPanel
{

    public ArgumentsPanel(ActionListener actionlistener)
    {
        add(new Label("Dauer Rotphase", 1));
        add(red = new TextField("0.5", 5));
        add(new Label("Dauer Gr\374nphase", 1));
        add(green = new TextField("0.5", 5));
        add(new Label("Anfangsdichte [0..1]", 1));
        add(rho = new TextField("0.4", 5));
        Button button = new Button("Berechnen");
        button.addActionListener(actionlistener);
        add(button);
        LegendPanel legendpanel = new LegendPanel();
        add(legendpanel);
        increaseDimension(new Dimension(130, 100));
        legendpanel.initLegend();
    }

    public String getGreen()
    {
        return green.getText();
    }

    public String getRed()
    {
        return red.getText();
    }

    public String getRho()
    {
        return rho.getText();
    }

    TextField red;
    TextField green;
    TextField rho;
}
