//TransInputPanel
//author Umberto Ravaioli, 2005

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


public class TransInputPanel extends PC{
    private Trans_State state;
    //private static final Color bgcolor = new Color(216,216,191);
    private static final Color tinta = new Color(236,236,236);
    private static final Color bgcolor = new Color(236,236,236);
    //private static final Color bgcolor = new Color(200,200,200);
    
    public TransInputPanel(String titulo, String[] nome, String[] unidade, Trans_State state){
	super(titulo,nome,unidade);
	setLayout(null);
	setBackground(bgcolor);
	this.state = state;
	//titlelabel.setBounds(5,15,280,30);
	
	b1.setBounds(85,3,100,20);
        b1.setBackground(Color.white);
	
	//lab1[0].setBounds(52,31,10,9);
	text1[0].setBounds(85,25,60,18);
	lab3[0].setBounds(150,27,35,18);
	
	// This for complex characteristic impedance
	/*
	lab1[0].setBounds(6,32,10,9);
	text1[0].setBounds(32,30,60,18);
	lab2[0].setBounds(93,30,14,18);
	text2[0].setBounds(112,30,60,18);
	lab3[0].setBounds(175,30,25,18);
	*/
	
	text1[0].setText(""+state.Z0.Real());
	//text2[0].setText(""+state.Z0.Imaginary());
	
	//Listeners
    }
    
    public void paint(Graphics g){
        Graphics2D g2d = (Graphics2D)g;
        g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);
        
        g.clearRect(0,0,getSize().width,getSize().height);
        
        g.setColor(Color.black);	
        MaestroG.subscripterB("Set Line","","",g,12,10,15); 
        MaestroG.subscripterSerif(" Z","0"," =",g,12,50,40);
    }

}