//ChoiceInput2.java
import java.awt.*;

public class ChoiceInput2 extends Panel{ 
	
	private  Label lab1, lab2;
        
        public Button outgo;
	public Button ingo;
	private Font rangefont, labelfont;
	public Button about;	
	private static final Color bgcolor = Color.white;
        private static final Color bgcolor2 = new Color(240,240,240);
	Trans_State state;
        
	public ChoiceInput2(Trans_State state){
		super();
		setLayout(null);
                this.state = state;
                
		setBackground(bgcolor);
		labelfont=new Font("SanSerif",Font.BOLD, state.font11);
		rangefont=new Font("SanSerif",Font.PLAIN,state.font12);
                
                outgo = new Button("Exit Input Panel");
                outgo.setForeground(Color.blue);
                outgo.setBackground(new Color(240,240,255));
                outgo.setBackground(Color.white);
                outgo.setVisible(true);
                //add(outgo);
                outgo.setBounds(state.s51,state.s3,state.s140,state.s19);
		               
                ingo = new Button("Return to Input Panel");
                ingo.setForeground(Color.blue);
                ingo.setBackground(new Color(240,240,255));
                ingo.setBackground(Color.white);
                ingo.setVisible(false);
                //add(ingo);
                ingo.setBounds(state.s51,state.s3,state.s140,state.s19);
                
                about = new Button("Instructions");
                about.setFont(rangefont);
                add(about);
                about.setBounds(state.s20,state.s400+state.s20,state.s100,state.s20);
                
                Panel pA = new Panel();
                pA.setBackground(Color.black);
                add(pA);
                pA.setBounds(state.s20-1,state.s400+state.s20-1,state.s100+2,state.s20+2);
                
                Panel p1 = new Panel();
                p1.setBackground(Color.black);
                //add(p1);
                p1.setBounds(0,state.s400+state.s13,state.s400+state.s65,state.s1);
        
	}
	public void paint(Graphics g){
            Graphics2D g2d = (Graphics2D)g;
                
	    g.clearRect(0,0,getSize().width,getSize().height);
	    g.setColor(Color.black);
            g.drawRect(0,0,getSize().width-1,getSize().height-1);
            
            g.setColor(Color.blue);
            
            int down = state.s400+state.s10;
            int left1 = state.s200+state.s7;
            int right1 = state.s400+state.s10;
            int tick_depth = state.s17;
            int arrow_depth = state.s12;
            int range_pos = state.s70;
            int range_vert= state.s15;
            
            g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);
                
            //left tick marks for width arrow
            g.drawLine(left1,down+state.s7,left1,down+tick_depth);
	    
            //right tick marks for width arrows
            g.drawLine(right1,down+state.s7,right1,down+tick_depth);
	    
            //arrow line
            g.drawLine(left1,down+arrow_depth,right1,down+arrow_depth);
            
            //arrow heads 
            //MaestroG.drawArrow(left1+state.s10,down+arrow_depth,8,g);
            MaestroG.drawArrowScaled(left1+state.s10,down+arrow_depth,4,state.sfactor, g);
            
            //MaestroG.drawArrow(right1-state.s10,down+arrow_depth,7,g);
            MaestroG.drawArrowScaled(right1-state.s10,down+arrow_depth,3,state.sfactor, g);
            
            g.setColor(Color.white);
            //g.fillRect(left1+range_pos-10,down+arrow_depth,27,14);
            
            g.setColor(Color.blue);
            g.setFont(rangefont);
            g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);
            g.drawString("Plot Range",left1+range_pos,down+arrow_depth+range_vert);
            
        }
	
} // ChoiceInput.java
