import com.ptc.cipjava.*;
import com.ptc.pfc.pfcSession.*;
import com.ptc.pfc.pfcGlobal.*;
import com.ptc.pfc.pfcCommand.*;


public class KickOff {
	private static Session curSession=null;

	public static void start() {

	try{
		curSession = pfcGlobal.GetProESession();
		}
	catch (jxthrowable x){
      		printMsg ("something wrong: " + x);
      		x.printStackTrace ();
      		System.out.println ("------------------------------------");
    	}
	addInputButton(curSession);
	printMsg ("Started");
	}

	public static void stop() {
	}

	private static void printMsg (String msg){
    	System.out.println ("Start param test: " + msg);
  	}


public static void addInputButton(Session curSession){
	UICommand inputCommand = null;
	try {
		inputCommand=curSession.UICreateCommand("INPUT",new GatherInputListener ());
	}
	catch(jxthrowable x) {
		System.out.println("Exception in UICreateCommand():"+x);
		return;
	}
	try {
		curSession.UIAddButton(inputCommand, "Utilities","Utilities.psh_util_aux","USER Hello World", "USER Dead simple","mymessages.txt");
	}
	catch(jxthrowable x){
		System.out.println("Exception in UIAddButton():"+x);
		return;
	}
}
}
/**
* This class will be user by the "Input info" menu selection.
*/

class GatherInputListener extends DefaultUICommandActionListener {

	HWorld hw;

	public GatherInputListener () {
	}

	public void gatherInputs() {
	}

	public void OnCommand () {
		hw=new HWorld();
	}
}
