//ObliqueControlPanel.java
import java.awt.*;

public class ObliqueControlPanel extends Panel{
    private static final Color bgcolor = new Color(255,255,255);
    //private static final Color bgcolor = new Color(246,246,246);
    private static final Font labfont=new Font("SanSerif",Font.PLAIN,10);
    private static final Font labfont2=new Font("SanSerif",Font.PLAIN,12);
    private static final Font arrowfont=new Font("SanSerif",Font.PLAIN,25);
    public Checkbox c1, c2, c3, c4, c5, c6;
    CheckboxGroup cgrp, cgrp2;
    public Choice menuA;
    public Choice menuB;
    private Oblique_State state;
    
    public ObliqueControlPanel(Oblique_State state){
	super();
        this.state = state;
	setBackground(bgcolor);
        setLayout(null);
        Label arrowlab;	
        arrowlab = new Label("\u27a9",Label.CENTER);
	arrowlab.setFont(arrowfont);
	arrowlab.setBounds(270,8,20,20);
        
	cgrp = new CheckboxGroup();
	c1 = new Checkbox("Plot \u0393",cgrp,true);
	c2 = new Checkbox("Plot \u03c4",cgrp,false);
        c5 = new Checkbox("Plot Standing Wave",cgrp,false);
        c1.setBackground(bgcolor);
	c2.setBackground(bgcolor);
        c1.setFont(labfont);
        c2.setFont(labfont);
        c5.setBackground(bgcolor);
        c5.setFont(labfont);
        
        cgrp2 = new CheckboxGroup();  // this is not used
	c3 = new Checkbox("Vector Diagram",cgrp2,true);
	c4 = new Checkbox("\u22a5  Field Amplitude",cgrp2,false);
        c3.setBackground(bgcolor);
	c4.setBackground(bgcolor);
        c3.setFont(labfont);
        c4.setFont(labfont);
        
        menuA = new Choice();
	menuA.addItem(" Vector Diagrams");
	//menuA.addItem(" \u22a5 Field Amplitude");
        menuA.addItem(" Transverse Field");
        //menuA.addItem(" Boundary Conditions");
        menuA.addItem(" Instructions");
        add(menuA);
        // CHANGE ==============================================================
	menuA.setBounds(state.s50,state.s10,state.s200,state.s24);
        menuA.setFont(new java.awt.Font("SanSerif",Font.ITALIC,state.font12));
        //======================================================================
        
        menuA.setBackground(bgcolor.brighter());
	//menuA.setFont(labfont2);
        
        menuB = new Choice();// this menu is not used
	menuB.addItem(" Reflection");
	menuB.addItem(" Transmission");
        menuB.addItem(" \u22a5 Standing Wave");
        //add(menuB);
	menuB.setBounds(150,10,130,16);
        menuB.setBackground(bgcolor.brighter());
	
	//add(arrowlab);
        //add(c1);
	//add(c2);
        //add(c3);
        //add(c4);
        //add(c5);
        
        //c3.setBounds(10,3,100,15);
        //c4.setBounds(10,19,105,15);
        
        //c1.setBounds(150,2,60,20);
        //c1.setBackground(Color.yellow);
        //c2.setBounds(212,2,60,20);
        //c2.setBackground(Color.pink);
        //c5.setBounds(150,22,125,20);
        //c5.setBackground(Color.green);
    }
    public void paint(Graphics g){
	    g.draw3DRect(0,0,getSize().width-1,getSize().height-1,false);  
            /*
            int xshift = 7;
            int x1; int x2; int x3; 
            int y0;  int y1;  int y2;  int y3;  int y4;
            
            //construct arrow
            x1 = 270+xshift; x2 = 280+xshift; x3 = 286+xshift;
            y0 = 16; y1 = 19; y2 = 22; y3 = 25; y4 = 28;
            
            g.setColor(Color.black);
            g.drawLine(x1,y1,x1,y3);
            g.drawLine(x1,y1,x2,y1);
            g.drawLine(x1,y3,x2,y3);
            g.drawLine(x2,y1,x2,y0);
            g.drawLine(x2,y3,x2,y4);
            g.drawLine(x2,y0,x3,y2);
            g.drawLine(x2,y4,x3,y2);
            */
    }
}


/*
//ObliqueControlPanel.java
import java.awt.*;
import java.awt.event.*;
//import java.applet.*;
import java.lang.*;  
//import maestro.lib.math.*;
//import maestro.lib.graphics.*;


public class ObliqueControlPanel 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 Font arrowfont=new Font("SanSerif",Font.PLAIN,25);
    //private static final Color bgcolor = new Color(170,240,240);
    public Checkbox c1, c2, c3, c4, c5, c6;
    CheckboxGroup cgrp, cgrp2;
    public Choice menuA;
    public Choice menuB;
    
    public ObliqueControlPanel(){
	super();
	setBackground(bgcolor);
        setLayout(null);
        Label arrowlab;	
        arrowlab = new Label("\u27a9",Label.CENTER);
	arrowlab.setFont(arrowfont);
	arrowlab.setBounds(270,8,20,20);
        
	cgrp = new CheckboxGroup();
	c1 = new Checkbox("Plot \u0393",cgrp,true);
	c2 = new Checkbox("Plot \u03c4",cgrp,false);
        c5 = new Checkbox("Plot Standing Wave",cgrp,false);
        c1.setBackground(bgcolor);
	c2.setBackground(bgcolor);
        c1.setFont(labfont);
        c2.setFont(labfont);
        c5.setBackground(bgcolor);
        c5.setFont(labfont);
        
        cgrp2 = new CheckboxGroup();  // this is not used
	c3 = new Checkbox("Vector Diagrams",cgrp2,true);
	c4 = new Checkbox("\u22a5  Field Amplitude",cgrp2,false);
        c3.setBackground(bgcolor);
	c4.setBackground(bgcolor);
        c3.setFont(labfont);
        c4.setFont(labfont);
        
        menuA = new Choice();
	menuA.addItem(" Vector Diagrams");
	//menuA.addItem(" \u22a5 Field Amplitude");
        menuA.addItem(" Transverse Field");
        //menuA.addItem(" Boundary Conditions");
        menuA.addItem(" Instructions");
        add(menuA);
	menuA.setBounds(7,10,144,16);
        menuA.setBackground(bgcolor.brighter());
	
        menuB = new Choice();// this menu is not used
	menuB.addItem(" Reflection");
	menuB.addItem(" Transmission");
        menuB.addItem(" \u22a5 Standing Wave");
        //add(menuB);
	menuB.setBounds(155,10,130,16);
        menuB.setBackground(bgcolor.brighter());
	
	//add(arrowlab);
        add(c1);
	add(c2);
        //add(c3);
        //add(c4);
        add(c5);
        
        //c3.setBounds(10,3,100,15);
        //c4.setBounds(10,19,105,15);
        
        c1.setBounds(158,2,55,20);
        //c1.setBackground(Color.yellow);
        c2.setBounds(221,2,52,20);
        //c2.setBackground(Color.pink);
        c5.setBounds(158,22,115,20);
        //c5.setBackground(Color.green);
    }
    public void paint(Graphics g){
	    //g.draw3DRect(0,0,getSize().width-1,getSize().height-1,false);  
            int xshift = 7;
            int x1; int x2; int x3; 
            int y0;  int y1;  int y2;  int y3;  int y4;
            
            //construct arrow
            x1 = 270+xshift; x2 = 280+xshift; x3 = 286+xshift;
            y0 = 16; y1 = 19; y2 = 22; y3 = 25; y4 = 28;
            
            g.setColor(Color.black);
            g.drawLine(x1,y1,x1,y3);
            g.drawLine(x1,y1,x2,y1);
            g.drawLine(x1,y3,x2,y3);
            g.drawLine(x2,y1,x2,y0);
            g.drawLine(x2,y3,x2,y4);
            g.drawLine(x2,y0,x3,y2);
            g.drawLine(x2,y4,x3,y2);
            
    }
}
*/