//ObliqueBoundaryControlPanel2.java
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
import java.lang.*;  

public class ObliqueBoundaryControlPanel extends Panel{
    private static final Color bgcolor = new Color(246,246,246);
    private static final Font labfont=new Font("SanSerif",Font.PLAIN,10);
    //private static final Color bgcolor = new Color(170,240,240);
    public Checkbox c1, c2, c3, c4;
    public CheckboxGroup cgrp, cgrp2;
    private boolean isPolarizationParallel = true;
    
    public ObliqueBoundaryControlPanel(){
	super();
	setBackground(bgcolor);
        setLayout(null);
        
	cgrp = new CheckboxGroup();
	c1 = new Checkbox("H y",cgrp,true);
	c2 = new Checkbox("E x",cgrp,false);
	c3 = new Checkbox("E z",cgrp,false);
	c1.setBackground(bgcolor);
	c2.setBackground(bgcolor);
        c3.setBackground(bgcolor);
	c1.setFont(labfont);
        c2.setFont(labfont);
        c3.setFont(labfont);
        
	add(c1);
	add(c2);
        add(c3);
        c1.setBounds(15,5,65,20);
        c2.setBounds(85,5,65,20);
        c3.setBounds(155,5,55,20);
        
    }
    public void paint(Graphics g){
	    
        g.setColor(Color.black);
        //g.draw3DRect(0,0,getSize().width-1,getSize().height-1,false);  
        g.drawRect(0,0,getSize().width-1,getSize().height-1);  
            if(isPolarizationParallel){
                //g.setColor(Color.blue);
                //MaestroG.subscripterB("H","\u22a5","",g,12,200,13);
            }
            else{
                //g.setColor(Color.magenta.darker());
                //MaestroG.subscripterB("E","\u22a5","",g,12,200,13);
            }
    }
    
    public void setPolarization(boolean flag){
        this.isPolarizationParallel = flag;
    }

}