package com.artenum.cassandra.plugin.cad;

import java.awt.Frame;
import java.awt.event.ActionEvent;
import java.awt.event.ItemEvent;

import javax.swing.BoxLayout;
import javax.swing.JTextField;
import javax.swing.event.ChangeEvent;

import com.artenum.cassandra.plugin.PlugInControlUI;

public class CADImporterPluginUI extends PlugInControlUI{

	/**
	 * 
	 */
	private static final long serialVersionUID = -6274770465361743956L;

	
	static public String UPLOAD_ACTION_CMD = "upload.action.cmd";
	static public String CREATE_SESSION_ACTION_CMD = "creation.session.action.cmd";
	static public String OPEN_CLIENT_ACTION_CMD = "open.client.action.cmd";
	
	private CADImporterPlugin plugin= null;
	
	private JTextField urlTextField = null;

	public CADImporterPluginUI(CADImporterPlugin plugin, Frame owner){
		
		this.plugin = plugin;
		
		this.getContentPane().setLayout(new BoxLayout(getContentPane(), BoxLayout.PAGE_AXIS));
		
		
		//JButton uploadButton = new JButton("Upload to Cloud");
		//uploadButton.addActionListener(this);
		//uploadButton.setActionCommand(CADImporterPluginUI.UPLOAD_ACTION_CMD);
		//this.add(uploadButton);
	}
	
	@Override
	public void actionPerformed(ActionEvent evt) {
		String cmd = evt.getActionCommand();
		
		
//		if(cmd.equals(CloudControlUI.UPLOAD_ACTION_CMD)){
//			plugin.uploadScene();
//		} else if(cmd.equals(CloudControlUI.CREATE_SESSION_ACTION_CMD)){
//			plugin.createSharedSession();
//		} else if(cmd.equals(CloudControlUI.OPEN_CLIENT_ACTION_CMD)){
//			plugin.connectToSession();
//		} else {
//			System.out.println("Not supported yet.");
//		}
     
	}

	@Override
	public void stateChanged(ChangeEvent arg0) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void itemStateChanged(ItemEvent arg0) {
		// TODO Auto-generated method stub
		
	}

}
