package extractor.ui;

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.border.*;
import java.util.*;
import extractor.classToEjb.classToEntity.*;
import extractor.classToEjb.classToSession.*;
import extractor.ui.*;
import ui.*;



public class ExpectedUI extends JPanel
{
  
  	JLabel jLabel1 = new JLabel();
  	TitledBorder titledBorder1;
  	Border border1;
  	JTextArea jTextField1 = new JTextArea();
  	JLabel jLabel2 = new JLabel();
  	JTextArea jTextField2 = new JTextArea();
  	JButton jButton1 = new JButton();
  	JButton jButton2 = new JButton();
  	Vector entity = new Vector();
  	public static Vector sess = new Vector();
  	ExtractResultsPanel ejbName = null;
  
  	/**Construct the frame*/
  	public ExpectedUI()
  	{
  	}
  
  	public ExpectedUI(Vector entity, Vector sess, ExtractResultsPanel ejbName) 
  	{
  		this.entity = entity;
  		this.sess = sess;
  		this.ejbName = ejbName;
  	
    		try 
    		{
      			jbInit(entity, sess);
    		}
    		catch(Exception e) 
    		{
      			e.printStackTrace();
    		}
  	}
  
  	/**Component initialization*/
  	private void jbInit(Vector entity, Vector sess) throws Exception  
  	{
    		titledBorder1 = new TitledBorder("");
    		border1 = BorderFactory.createEtchedBorder(Color.white,Color.black);
    		jLabel1.setFont(new java.awt.Font("Serif", 1, 20));
    		jLabel1.setText("expected entitybeans");
    		jLabel1.setBounds(new Rectangle(19, 9, 225, 33));
    		
    		setLayout(null);
    		setBackground(Color.lightGray);
    		setForeground(Color.cyan);
    
    		jTextField1.setFont(new java.awt.Font("SansSerif", 1, 15));
    		String entityValues = "";
    		String sessionValues = "";
  	 	for(int i=0; i<entity.size(); i++)
  	 	{
  	 		entityValues += (String)entity.get(i) + System.getProperty("line.separator");
	   		jTextField1.setText(entityValues);
	 	}
	 
    		jTextField1.setBounds(new Rectangle(18, 43, 424, 128));
    		jLabel2.setFont(new java.awt.Font("Serif", 1, 20));
    		jLabel2.setText("expected sessionbeans");
    		jLabel2.setBounds(new Rectangle(23, 183, 190, 44));
    		jTextField2.setFont(new java.awt.Font("SansSerif", 1, 15));
  	 
  	 	for(int i=0; i<sess.size(); i++)
  	 	{
  	 		System.out.println(sess.get(i));
 	 		sessionValues += (String)sess.get(i) + System.getProperty("line.separator");
	   		jTextField2.setText(sessionValues);
	 	}   

    		jTextField2.setBounds(new Rectangle(21, 223, 429, 143));
 
    		add(jLabel1, null);
    		add(jTextField1, null);
    		add(jTextField2, null);
    		add(jLabel2, null);
  	}
  
  
  	void jTextField1_actionPerformed(ActionEvent e) 
  	{
  	}
}