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,13);
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 = 13;BA.debugLine="Sub AppStart (Form1 As Form, Args() As String)";
Debug.ShouldStop(4096);
 BA.debugLineNum = 14;BA.debugLine="MainForm = Form1";
Debug.ShouldStop(8192);
main._mainform = _form1;
 BA.debugLineNum = 15;BA.debugLine="MainForm.RootPane.LoadLayout(\"Main\") 'Load the la";
Debug.ShouldStop(16384);
main._mainform.runMethod(false,"getRootPane").runMethodAndSync(false,"LoadLayout",main.ba,(Object)(RemoteObject.createImmutable("Main")));
 BA.debugLineNum = 16;BA.debugLine="MainForm.Show";
Debug.ShouldStop(32768);
main._mainform.runVoidMethodAndSync ("Show");
 BA.debugLineNum = 18;BA.debugLine="Drawing";
Debug.ShouldStop(131072);
_drawing();
 BA.debugLineNum = 19;BA.debugLine="End Sub";
Debug.ShouldStop(262144);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			Debug.ErrorCaught(e);
			throw e;
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _drawcross(RemoteObject _x,RemoteObject _y,RemoteObject _l) throws Exception{
try {
		Debug.PushSubsStack("DrawCross (main) ","main",0,main.ba,main.mostCurrent,80);
if (RapidSub.canDelegate("drawcross")) return main.remoteMe.runUserSub(false, "main","drawcross", _x, _y, _l);
Debug.locals.put("x", _x);
Debug.locals.put("y", _y);
Debug.locals.put("l", _l);
 BA.debugLineNum = 80;BA.debugLine="Private Sub DrawCross(x As Double, y As Double, l";
Debug.ShouldStop(32768);
 BA.debugLineNum = 82;BA.debugLine="cvsGraph.DrawLine(x - l, y, x + l, y, fx.Colors.R";
Debug.ShouldStop(131072);
main._cvsgraph.runVoidMethod ("DrawLine",(Object)(RemoteObject.solve(new RemoteObject[] {_x,_l}, "-",1, 0)),(Object)(_y),(Object)(RemoteObject.solve(new RemoteObject[] {_x,_l}, "+",1, 0)),(Object)(_y),(Object)(main._fx.getField(false,"Colors").getField(false,"Red")),(Object)(BA.numberCast(double.class, 1)));
 BA.debugLineNum = 83;BA.debugLine="cvsGraph.DrawLine(x, y - l, x, y +l, fx.Colors.Re";
Debug.ShouldStop(262144);
main._cvsgraph.runVoidMethod ("DrawLine",(Object)(_x),(Object)(RemoteObject.solve(new RemoteObject[] {_y,_l}, "-",1, 0)),(Object)(_x),(Object)(RemoteObject.solve(new RemoteObject[] {_y,_l}, "+",1, 0)),(Object)(main._fx.getField(false,"Colors").getField(false,"Red")),(Object)(BA.numberCast(double.class, 1)));
 BA.debugLineNum = 84;BA.debugLine="End Sub";
Debug.ShouldStop(524288);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			Debug.ErrorCaught(e);
			throw e;
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _drawing() throws Exception{
try {
		Debug.PushSubsStack("Drawing (main) ","main",0,main.ba,main.mostCurrent,21);
if (RapidSub.canDelegate("drawing")) return main.remoteMe.runUserSub(false, "main","drawing");
RemoteObject _centerx = RemoteObject.createImmutable(0);
RemoteObject _centery = RemoteObject.createImmutable(0);
RemoteObject _radius = RemoteObject.createImmutable(0);
RemoteObject _refx = RemoteObject.createImmutable(0);
RemoteObject _refy = RemoteObject.createImmutable(0);
RemoteObject _hl = RemoteObject.createImmutable(0);
RemoteObject _font1 = RemoteObject.declareNull("anywheresoftware.b4j.objects.JFX.FontWrapper");
 BA.debugLineNum = 21;BA.debugLine="Private Sub Drawing";
Debug.ShouldStop(1048576);
 BA.debugLineNum = 23;BA.debugLine="cvsGraph.DrawLine(20, 20, 150, 20, fx.Colors.Red,";
Debug.ShouldStop(4194304);
main._cvsgraph.runVoidMethod ("DrawLine",(Object)(BA.numberCast(double.class, 20)),(Object)(BA.numberCast(double.class, 20)),(Object)(BA.numberCast(double.class, 150)),(Object)(BA.numberCast(double.class, 20)),(Object)(main._fx.getField(false,"Colors").getField(false,"Red")),(Object)(BA.numberCast(double.class, 3)));
 BA.debugLineNum = 26;BA.debugLine="cvsGraph.DrawRect(20, 80, 100, 60, fx.Colors.Blue";
Debug.ShouldStop(33554432);
main._cvsgraph.runVoidMethod ("DrawRect",(Object)(BA.numberCast(double.class, 20)),(Object)(BA.numberCast(double.class, 80)),(Object)(BA.numberCast(double.class, 100)),(Object)(BA.numberCast(double.class, 60)),(Object)(main._fx.getField(false,"Colors").getField(false,"Blue")),(Object)(main.__c.getField(true,"False")),(Object)(BA.numberCast(double.class, 3)));
 BA.debugLineNum = 29;BA.debugLine="cvsGraph.DrawRect(150, 80, 100, 60, fx.Colors.Blu";
Debug.ShouldStop(268435456);
main._cvsgraph.runVoidMethod ("DrawRect",(Object)(BA.numberCast(double.class, 150)),(Object)(BA.numberCast(double.class, 80)),(Object)(BA.numberCast(double.class, 100)),(Object)(BA.numberCast(double.class, 60)),(Object)(main._fx.getField(false,"Colors").getField(false,"Blue")),(Object)(main.__c.getField(true,"True")),(Object)(BA.numberCast(double.class, 3)));
 BA.debugLineNum = 32;BA.debugLine="cvsGraph.DrawCircle(330, 110, 30, fx.Colors.Green";
Debug.ShouldStop(-2147483648);
main._cvsgraph.runVoidMethod ("DrawCircle",(Object)(BA.numberCast(double.class, 330)),(Object)(BA.numberCast(double.class, 110)),(Object)(BA.numberCast(double.class, 30)),(Object)(main._fx.getField(false,"Colors").getField(false,"Green")),(Object)(main.__c.getField(true,"False")),(Object)(BA.numberCast(double.class, 3)));
 BA.debugLineNum = 35;BA.debugLine="Private centerX, centerY, radius As Double";
Debug.ShouldStop(4);
_centerx = RemoteObject.createImmutable(0);Debug.locals.put("centerX", _centerx);
_centery = RemoteObject.createImmutable(0);Debug.locals.put("centerY", _centery);
_radius = RemoteObject.createImmutable(0);Debug.locals.put("radius", _radius);
 BA.debugLineNum = 36;BA.debugLine="centerX = 450";
Debug.ShouldStop(8);
_centerx = BA.numberCast(double.class, 450);Debug.locals.put("centerX", _centerx);
 BA.debugLineNum = 37;BA.debugLine="centerY = 110";
Debug.ShouldStop(16);
_centery = BA.numberCast(double.class, 110);Debug.locals.put("centerY", _centery);
 BA.debugLineNum = 38;BA.debugLine="radius = 30";
Debug.ShouldStop(32);
_radius = BA.numberCast(double.class, 30);Debug.locals.put("radius", _radius);
 BA.debugLineNum = 39;BA.debugLine="cvsGraph.DrawCircle(centerX, centerY, radius, fx.";
Debug.ShouldStop(64);
main._cvsgraph.runVoidMethod ("DrawCircle",(Object)(_centerx),(Object)(_centery),(Object)(_radius),(Object)(main._fx.getField(false,"Colors").getField(false,"Green")),(Object)(main.__c.getField(true,"True")),(Object)(BA.numberCast(double.class, 3)));
 BA.debugLineNum = 40;BA.debugLine="cvsGraph.DrawCircle(centerX, centerY, radius, fx.";
Debug.ShouldStop(128);
main._cvsgraph.runVoidMethod ("DrawCircle",(Object)(_centerx),(Object)(_centery),(Object)(_radius),(Object)(main._fx.getField(false,"Colors").getField(false,"Red")),(Object)(main.__c.getField(true,"False")),(Object)(BA.numberCast(double.class, 3)));
 BA.debugLineNum = 42;BA.debugLine="Private refX, refY, hl As Double";
Debug.ShouldStop(512);
_refx = RemoteObject.createImmutable(0);Debug.locals.put("refX", _refx);
_refy = RemoteObject.createImmutable(0);Debug.locals.put("refY", _refy);
_hl = RemoteObject.createImmutable(0);Debug.locals.put("hl", _hl);
 BA.debugLineNum = 43;BA.debugLine="refX = 150";
Debug.ShouldStop(1024);
_refx = BA.numberCast(double.class, 150);Debug.locals.put("refX", _refx);
 BA.debugLineNum = 44;BA.debugLine="refY = 190";
Debug.ShouldStop(2048);
_refy = BA.numberCast(double.class, 190);Debug.locals.put("refY", _refy);
 BA.debugLineNum = 45;BA.debugLine="hl = 5";
Debug.ShouldStop(4096);
_hl = BA.numberCast(double.class, 5);Debug.locals.put("hl", _hl);
 BA.debugLineNum = 47;BA.debugLine="Private Font1 As Font";
Debug.ShouldStop(16384);
_font1 = RemoteObject.createNew ("anywheresoftware.b4j.objects.JFX.FontWrapper");Debug.locals.put("Font1", _font1);
 BA.debugLineNum = 48;BA.debugLine="Font1 = fx.CreateFont(\"Arial\", 20, False, False)";
Debug.ShouldStop(32768);
_font1 = main._fx.runMethod(false,"CreateFont",(Object)(BA.ObjectToString("Arial")),(Object)(BA.numberCast(double.class, 20)),(Object)(main.__c.getField(true,"False")),(Object)(main.__c.getField(true,"False")));Debug.locals.put("Font1", _font1);
 BA.debugLineNum = 49;BA.debugLine="cvsGraph.DrawText(\"Test text\", refX, refY, Font1,";
Debug.ShouldStop(65536);
main._cvsgraph.runVoidMethod ("DrawText",(Object)(BA.ObjectToString("Test text")),(Object)(_refx),(Object)(_refy),(Object)((_font1.getObject())),(Object)(main._fx.getField(false,"Colors").getField(false,"Black")),(Object)(BA.getEnumFromString(BA.getDeviceClass("javafx.scene.text.TextAlignment"),RemoteObject.createImmutable("LEFT"))));
 BA.debugLineNum = 50;BA.debugLine="DrawCross(refX, refY, hl)";
Debug.ShouldStop(131072);
_drawcross(_refx,_refy,_hl);
 BA.debugLineNum = 52;BA.debugLine="refY = 240";
Debug.ShouldStop(524288);
_refy = BA.numberCast(double.class, 240);Debug.locals.put("refY", _refy);
 BA.debugLineNum = 53;BA.debugLine="cvsGraph.DrawText(\"Test text\", refX, refY, Font1,";
Debug.ShouldStop(1048576);
main._cvsgraph.runVoidMethod ("DrawText",(Object)(BA.ObjectToString("Test text")),(Object)(_refx),(Object)(_refy),(Object)((_font1.getObject())),(Object)(main._fx.getField(false,"Colors").getField(false,"Black")),(Object)(BA.getEnumFromString(BA.getDeviceClass("javafx.scene.text.TextAlignment"),RemoteObject.createImmutable("CENTER"))));
 BA.debugLineNum = 54;BA.debugLine="DrawCross(refX, refY, hl)";
Debug.ShouldStop(2097152);
_drawcross(_refx,_refy,_hl);
 BA.debugLineNum = 56;BA.debugLine="refY = 290";
Debug.ShouldStop(8388608);
_refy = BA.numberCast(double.class, 290);Debug.locals.put("refY", _refy);
 BA.debugLineNum = 57;BA.debugLine="cvsGraph.DrawText(\"Test text\", refX, refY, Font1,";
Debug.ShouldStop(16777216);
main._cvsgraph.runVoidMethod ("DrawText",(Object)(BA.ObjectToString("Test text")),(Object)(_refx),(Object)(_refy),(Object)((_font1.getObject())),(Object)(main._fx.getField(false,"Colors").getField(false,"Black")),(Object)(BA.getEnumFromString(BA.getDeviceClass("javafx.scene.text.TextAlignment"),RemoteObject.createImmutable("RIGHT"))));
 BA.debugLineNum = 58;BA.debugLine="DrawCross(refX, refY, hl)";
Debug.ShouldStop(33554432);
_drawcross(_refx,_refy,_hl);
 BA.debugLineNum = 60;BA.debugLine="refX = 350";
Debug.ShouldStop(134217728);
_refx = BA.numberCast(double.class, 350);Debug.locals.put("refX", _refx);
 BA.debugLineNum = 61;BA.debugLine="refY = 190";
Debug.ShouldStop(268435456);
_refy = BA.numberCast(double.class, 190);Debug.locals.put("refY", _refy);
 BA.debugLineNum = 63;BA.debugLine="cvsGraph.DrawTextRotated(\"Test text\", refX, refY,";
Debug.ShouldStop(1073741824);
main._cvsgraph.runVoidMethod ("DrawTextRotated",(Object)(BA.ObjectToString("Test text")),(Object)(_refx),(Object)(_refy),(Object)((_font1.getObject())),(Object)(main._fx.getField(false,"Colors").getField(false,"Black")),(Object)(BA.getEnumFromString(BA.getDeviceClass("javafx.scene.text.TextAlignment"),"LEFT")),(Object)(BA.numberCast(double.class, 45)));
 BA.debugLineNum = 65;BA.debugLine="DrawCross(refX, refY, hl)";
Debug.ShouldStop(1);
_drawcross(_refx,_refy,_hl);
 BA.debugLineNum = 67;BA.debugLine="refY = 240";
Debug.ShouldStop(4);
_refy = BA.numberCast(double.class, 240);Debug.locals.put("refY", _refy);
 BA.debugLineNum = 69;BA.debugLine="cvsGraph.DrawTextRotated(\"Test text\", refX, refY,";
Debug.ShouldStop(16);
main._cvsgraph.runVoidMethod ("DrawTextRotated",(Object)(BA.ObjectToString("Test text")),(Object)(_refx),(Object)(_refy),(Object)((_font1.getObject())),(Object)(main._fx.getField(false,"Colors").getField(false,"Black")),(Object)(BA.getEnumFromString(BA.getDeviceClass("javafx.scene.text.TextAlignment"),"CENTER")),(Object)(BA.numberCast(double.class, 45)));
 BA.debugLineNum = 71;BA.debugLine="DrawCross(refX, refY, hl)";
Debug.ShouldStop(64);
_drawcross(_refx,_refy,_hl);
 BA.debugLineNum = 73;BA.debugLine="refY = 290";
Debug.ShouldStop(256);
_refy = BA.numberCast(double.class, 290);Debug.locals.put("refY", _refy);
 BA.debugLineNum = 75;BA.debugLine="cvsGraph.DrawTextRotated(\"Test text\", refX, refY,";
Debug.ShouldStop(1024);
main._cvsgraph.runVoidMethod ("DrawTextRotated",(Object)(BA.ObjectToString("Test text")),(Object)(_refx),(Object)(_refy),(Object)((_font1.getObject())),(Object)(main._fx.getField(false,"Colors").getField(false,"Black")),(Object)(BA.getEnumFromString(BA.getDeviceClass("javafx.scene.text.TextAlignment"),"RIGHT")),(Object)(BA.numberCast(double.class, 45)));
 BA.debugLineNum = 77;BA.debugLine="DrawCross(refX, refY, hl)";
Debug.ShouldStop(4096);
_drawcross(_refx,_refy,_hl);
 BA.debugLineNum = 78;BA.debugLine="End Sub";
Debug.ShouldStop(8192);
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 = 10;BA.debugLine="Private cvsGraph As Canvas";
main._cvsgraph = RemoteObject.createNew ("anywheresoftware.b4j.objects.CanvasWrapper");
 //BA.debugLineNum = 11;BA.debugLine="End Sub";
return RemoteObject.createImmutable("");
}
}