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

public class ObliqueControlGraph extends Panel{
    private static final Color bgcolor = new Color(225,225,225);
    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);
    //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;
    private final Oblique_State state;
    public Button button1, button2, button3;
        
    public ObliqueControlGraph(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("| Reflection Coefficient \u0393 |",cgrp,true);
	c2 = new Checkbox("| Transmission Coefficient \u03c4 |",cgrp,false);
        c5 = new Checkbox("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(3,10,150,16);
        //======================================================================
        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);
        
        // CHANGE ==============================================================
        /*
        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);
        */
        
        c1.setBounds(40,2,200,20);
        //c1.setBackground(Color.yellow);
        c2.setBounds(250,2,200,20);
        //c2.setBackground(Color.pink);
        c5.setBounds(460,2,125,20);
        //c5.setBackground(Color.green);
        //======================================================================
        //button1 = new Button("| Reflection Coefficient  \u0393  |");
        //button2 = new Button("| Transmission Coefficient  \u03c4  |");
        button1 = new Button("| Reflection Coefficient |");
        button2 = new Button("| Transmission Coefficient |");
        button3 = new Button("Standing Wave");
        //button1.setBackground(Color.red);
        button1.setBackground(new Color(250,250,250));
        button2.setBackground(new Color(250,250,250));
        button3.setBackground(new Color(250,250,250));
        button1.setForeground(Color.red);
        button2.setForeground(Color.black);
        button3.setForeground(Color.black);
        button1.setFont(new Font("SanSerif",Font.ITALIC,state.s11));
        button2.setFont(new Font("SanSerif",Font.ITALIC,state.s11));
        button3.setFont(new Font("SanSerif",Font.ITALIC,state.s11));
        
        button1.setBounds(state.s20,state.s2,state.s180,state.s18);
        button2.setBounds(state.s200+state.s10,state.s2,state.s180,state.s18);
        button3.setBounds(state.s400,state.s2,state.s180,state.s18);
        add(button1); add(button2); add(button3);
    }
    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);
            
    }
}
*/