//TimeChoicePanel.java
/* A Java class for
 * LossyWide.java
 * Electromagnetic Transmission Line Applet
 * Applet without Smith Chart - Prepared by Umberto Ravaioli 
 * for 6th edition of Fundamentals of Applied Electromagnetics Book
 * May 2009 - All Rights Reserved
 */ 
import java.awt.*;
import java.lang.*;  
import java.util.*;
import java.awt.event.*;

public class TimeChoicePanel extends Panel implements ItemListener{ 
	public Button button1, button2, button3;
        public boolean IsButtonOne, IsButtonTwo, IsButtonThree, IsEnvelope;
	
	private static final Color bgcolor = Color.white; 
        
	private static final Color tinta = new Color(236,236,221);
    //final Font labfont = new Font("Sanserif",Font.PLAIN,10);
    public static Font labfont;
    
	public TimeChoicePanel(){
		super();
		setLayout(null);
		setBackground(bgcolor);
		
		button1 = new Button("Incident");
		button2 = new Button("Reflected");
                button3 = new Button("Total");

                add(button1); add(button2); add(button3); 
		button1.setFont(labfont);
                button2.setFont(labfont);
                button3.setFont(labfont);
                
                button1.setBounds(7,0,60,18);
                button2.setBounds(7,21,60,18);
                button3.setBounds(7,42,60,18);
                
                IsButtonOne = false;
                IsButtonTwo = false;
                IsButtonThree = true; 
                IsEnvelope = true;
                
	}
        
	public void paint(Graphics g){
            g.setFont(labfont);
            g.setColor(Color.black);
            g.setColor(Color.red);
	    if(IsButtonOne){
                g.fillRect(0,7,4,4);
            }
            else if(IsButtonTwo){
                g.fillRect(0,28,4,4);
            }
            else if(IsButtonThree){
                g.fillRect(0,49,4,4);
            }
            
            
	}
        public void itemStateChanged(ItemEvent evt){
            
        }

} // TimeChoicePanel.java
