package b4j.example;

import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.pc.*;

public class main_subs_0 {


public static RemoteObject  _appstart(RemoteObject _form1,RemoteObject _args) throws Exception{
try {
		Debug.PushSubsStack("AppStart (main) ","main",0,main.ba,main.mostCurrent,11);
if (RapidSub.canDelegate("appstart")) return main.remoteMe.runUserSub(false, "main","appstart", _form1, _args);
Debug.locals.put("Form1", _form1);
Debug.locals.put("Args", _args);
 BA.debugLineNum = 11;BA.debugLine="Sub AppStart (Form1 As Form, Args() As String)";
Debug.ShouldStop(1024);
 BA.debugLineNum = 12;BA.debugLine="MainForm = Form1";
Debug.ShouldStop(2048);
main._mainform = _form1;
 BA.debugLineNum = 13;BA.debugLine="MainForm.RootPane.LoadLayout(\"Main\") 'Load the la";
Debug.ShouldStop(4096);
main._mainform.runMethod(false,"getRootPane").runMethodAndSync(false,"LoadLayout",main.ba,(Object)(RemoteObject.createImmutable("Main")));
 BA.debugLineNum = 14;BA.debugLine="MainForm.SetWindowSizeLimits(400, 250, 1500, 1200";
Debug.ShouldStop(8192);
main._mainform.runVoidMethod ("SetWindowSizeLimits",(Object)(BA.numberCast(double.class, 400)),(Object)(BA.numberCast(double.class, 250)),(Object)(BA.numberCast(double.class, 1500)),(Object)(BA.numberCast(double.class, 1200)));
 BA.debugLineNum = 15;BA.debugLine="MainForm.Show";
Debug.ShouldStop(16384);
main._mainform.runVoidMethodAndSync ("Show");
 BA.debugLineNum = 16;BA.debugLine="End Sub";
Debug.ShouldStop(32768);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			Debug.ErrorCaught(e);
			throw e;
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _mainform_resize(RemoteObject _width,RemoteObject _height) throws Exception{
try {
		Debug.PushSubsStack("MainForm_Resize (main) ","main",0,main.ba,main.mostCurrent,18);
if (RapidSub.canDelegate("mainform_resize")) return main.remoteMe.runUserSub(false, "main","mainform_resize", _width, _height);
Debug.locals.put("Width", _width);
Debug.locals.put("Height", _height);
 BA.debugLineNum = 18;BA.debugLine="Private Sub MainForm_Resize (Width As Double, Heig";
Debug.ShouldStop(131072);
 BA.debugLineNum = 19;BA.debugLine="MainForm.Title = \"Screen size: \" & Width & \" x \"";
Debug.ShouldStop(262144);
main._mainform.runMethod(true,"setTitle",RemoteObject.concat(RemoteObject.createImmutable("Screen size: "),_width,RemoteObject.createImmutable(" x "),_height));
 BA.debugLineNum = 20;BA.debugLine="End Sub";
Debug.ShouldStop(524288);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			Debug.ErrorCaught(e);
			throw e;
		} 
finally {
			Debug.PopSubsStack();
		}}

private static boolean processGlobalsRun;
public static void initializeProcessGlobals() {
    
    if (main.processGlobalsRun == false) {
	    main.processGlobalsRun = true;
		try {
		        main_subs_0._process_globals();
main.myClass = BA.getDeviceClass ("b4j.example.main");
		
        } catch (Exception e) {
			throw new RuntimeException(e);
		}
    }
}public static RemoteObject  _process_globals() throws Exception{
 //BA.debugLineNum = 6;BA.debugLine="Sub Process_Globals";
 //BA.debugLineNum = 7;BA.debugLine="Private fx As JFX";
main._fx = RemoteObject.createNew ("anywheresoftware.b4j.objects.JFX");
 //BA.debugLineNum = 8;BA.debugLine="Private MainForm As Form";
main._mainform = RemoteObject.createNew ("anywheresoftware.b4j.objects.Form");
 //BA.debugLineNum = 9;BA.debugLine="End Sub";
return RemoteObject.createImmutable("");
}
}