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

public class ObliqueControlPanel2 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 ObliqueControlPanel2(){
	super();
	setBackground(bgcolor);
        setLayout(null);
        
	cgrp = new CheckboxGroup();
	c1 = new Checkbox("Incident",cgrp,true);
	c2 = new Checkbox("Reflected",cgrp,false);
	c3 = new Checkbox("Total",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(2,5,73,20);
        c2.setBounds(75,5,78,20);
        c3.setBounds(153,5,60,20);
        
    }
    public void paint(Graphics g){
	Graphics2D g2d = (Graphics2D)g;
        g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);
        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.subscripterBsubsup2("H","//","i","",g,12,215,19);
            }
            else{
                g.setColor(Color.magenta.darker());
                MaestroG.subscripterBsubsup2("E","\u22a5","i","",g,12,215,19);
            }
    }
    
    public void setPolarization(boolean flag){
        this.isPolarizationParallel = flag;
    }

}


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

public class ObliqueControlPanel2 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 ObliqueControlPanel2(){
	super();
	setBackground(bgcolor);
        setLayout(null);
        
	cgrp = new CheckboxGroup();
	c1 = new Checkbox("Incident",cgrp,true);
	c2 = new Checkbox("Reflected",cgrp,false);
	c3 = new Checkbox("Total",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(5,5,65,20);
        c2.setBounds(70,5,68,20);
        c3.setBounds(145,5,50,20);
        
    }
    public void paint(Graphics g){
	Graphics2D g2d = (Graphics2D)g;
        g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);
        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.subscripterBsubsup2("H","//","i","",g,12,200,19);
            }
            else{
                g.setColor(Color.magenta.darker());
                MaestroG.subscripterBsubsup2("E","\u22a5","i","",g,12,200,19);
            }
    }
    
    public void setPolarization(boolean flag){
        this.isPolarizationParallel = flag;
    }

}
*/