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,15);
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 = 15;BA.debugLine="Sub AppStart (Form1 As Form, Args() As String)";
Debug.ShouldStop(16384);
 BA.debugLineNum = 16;BA.debugLine="MainForm = Form1";
Debug.ShouldStop(32768);
main._mainform = _form1;
 BA.debugLineNum = 17;BA.debugLine="MainForm.RootPane.LoadLayout(\"main\") 'Load the la";
Debug.ShouldStop(65536);
main._mainform.runMethod(false,"getRootPane").runMethodAndSync(false,"LoadLayout",main.ba,(Object)(RemoteObject.createImmutable("main")));
 BA.debugLineNum = 18;BA.debugLine="MainForm.Show";
Debug.ShouldStop(131072);
main._mainform.runVoidMethodAndSync ("Show");
 BA.debugLineNum = 19;BA.debugLine="MainForm.SetWindowSizeLimits(370, 320, 1200, 1000";
Debug.ShouldStop(262144);
main._mainform.runVoidMethod ("SetWindowSizeLimits",(Object)(BA.numberCast(double.class, 370)),(Object)(BA.numberCast(double.class, 320)),(Object)(BA.numberCast(double.class, 1200)),(Object)(BA.numberCast(double.class, 1000)));
 BA.debugLineNum = 21;BA.debugLine="ltbTest1.Initialize(Me, \"ltbTest1\")";
Debug.ShouldStop(1048576);
main._ltbtest1.runVoidMethod ("_initialize",main.ba,(Object)(main.getObject()),(Object)(RemoteObject.createImmutable("ltbTest1")));
 BA.debugLineNum = 22;BA.debugLine="ltbTest1.AddToParent(MainForm.RootPane, 40, 120,";
Debug.ShouldStop(2097152);
main._ltbtest1.runVoidMethod ("_addtoparent",RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4j.objects.PaneWrapper.ConcretePaneWrapper"), main._mainform.runMethod(false,"getRootPane").getObject()),(Object)(BA.numberCast(int.class, 40)),(Object)(BA.numberCast(int.class, 120)),(Object)(BA.numberCast(int.class, RemoteObject.solve(new RemoteObject[] {main._mainform.runMethod(false,"getRootPane").runMethod(true,"getWidth"),RemoteObject.createImmutable(80)}, "-",1, 0))),(Object)(BA.numberCast(int.class, 40)),RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4j.objects.JFX.PaintWrapper"), main._fx.getField(false,"Colors").getField(false,"Red")),(Object)(BA.numberCast(int.class, 5)));
 BA.debugLineNum = 23;BA.debugLine="lblLimitLeft.Text = ltbTest.LimitLeft";
Debug.ShouldStop(4194304);
main._lbllimitleft.runMethod(true,"setText",BA.NumberToString(main._ltbtest.runMethod(true,"_getlimitleft")));
 BA.debugLineNum = 24;BA.debugLine="lblLimitRight.Text = ltbTest.LimitRight";
Debug.ShouldStop(8388608);
main._lbllimitright.runMethod(true,"setText",BA.NumberToString(main._ltbtest.runMethod(true,"_getlimitright")));
 BA.debugLineNum = 25;BA.debugLine="End Sub";
Debug.ShouldStop(16777216);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			Debug.ErrorCaught(e);
			throw e;
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _btnchangeproperties_action() throws Exception{
try {
		Debug.PushSubsStack("btnChangeProperties_Action (main) ","main",0,main.ba,main.mostCurrent,38);
if (RapidSub.canDelegate("btnchangeproperties_action")) return main.remoteMe.runUserSub(false, "main","btnchangeproperties_action");
 BA.debugLineNum = 38;BA.debugLine="Private Sub btnChangeProperties_Action";
Debug.ShouldStop(32);
 BA.debugLineNum = 39;BA.debugLine="ltbTest1.Left = 200";
Debug.ShouldStop(64);
main._ltbtest1.runMethod(true,"_setleft",BA.numberCast(int.class, 200));
 BA.debugLineNum = 40;BA.debugLine="ltbTest1.Width = 300";
Debug.ShouldStop(128);
main._ltbtest1.runMethod(true,"_setwidth",BA.numberCast(int.class, 300));
 BA.debugLineNum = 41;BA.debugLine="ltbTest1.Height = 70";
Debug.ShouldStop(256);
main._ltbtest1.runMethod(true,"_setheight",BA.numberCast(int.class, 70));
 BA.debugLineNum = 42;BA.debugLine="ltbTest1.BackLineColor = fx.Colors.Blue";
Debug.ShouldStop(512);
main._ltbtest1.runMethod(false,"_setbacklinecolor",RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4j.objects.JFX.PaintWrapper"), main._fx.getField(false,"Colors").getField(false,"Blue")));
 BA.debugLineNum = 43;BA.debugLine="ltbTest1.FrontLineColor = fx.Colors.Green";
Debug.ShouldStop(1024);
main._ltbtest1.runMethod(false,"_setfrontlinecolor",RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4j.objects.JFX.PaintWrapper"), main._fx.getField(false,"Colors").getField(false,"Green")));
 BA.debugLineNum = 44;BA.debugLine="ltbTest1.Max = 150";
Debug.ShouldStop(2048);
main._ltbtest1.runMethod(true,"_setmax",BA.numberCast(int.class, 150));
 BA.debugLineNum = 45;BA.debugLine="ltbTest1.LimitLeft = 20";
Debug.ShouldStop(4096);
main._ltbtest1.runMethod(true,"_setlimitleft",BA.numberCast(int.class, 20));
 BA.debugLineNum = 46;BA.debugLine="ltbTest1.LimitRight = 120";
Debug.ShouldStop(8192);
main._ltbtest1.runMethod(true,"_setlimitright",BA.numberCast(int.class, 120));
 BA.debugLineNum = 47;BA.debugLine="End Sub";
Debug.ShouldStop(16384);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			Debug.ErrorCaught(e);
			throw e;
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _ltbtest_valueschanged(RemoteObject _limitleft,RemoteObject _limitright) throws Exception{
try {
		Debug.PushSubsStack("ltbTest_ValuesChanged (main) ","main",0,main.ba,main.mostCurrent,33);
if (RapidSub.canDelegate("ltbtest_valueschanged")) return main.remoteMe.runUserSub(false, "main","ltbtest_valueschanged", _limitleft, _limitright);
Debug.locals.put("LimitLeft", _limitleft);
Debug.locals.put("LimitRight", _limitright);
 BA.debugLineNum = 33;BA.debugLine="Private Sub ltbTest_ValuesChanged(LimitLeft As Int";
Debug.ShouldStop(1);
 BA.debugLineNum = 34;BA.debugLine="lblLimitLeft.Text = LimitLeft";
Debug.ShouldStop(2);
main._lbllimitleft.runMethod(true,"setText",BA.NumberToString(_limitleft));
 BA.debugLineNum = 35;BA.debugLine="lblLimitRight.Text = LimitRight";
Debug.ShouldStop(4);
main._lbllimitright.runMethod(true,"setText",BA.NumberToString(_limitright));
 BA.debugLineNum = 36;BA.debugLine="End Sub";
Debug.ShouldStop(8);
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,27);
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 = 27;BA.debugLine="Private Sub MainForm_Resize (Width As Double, Heig";
Debug.ShouldStop(67108864);
 BA.debugLineNum = 30;BA.debugLine="ltbTest1.Width = Width - 80";
Debug.ShouldStop(536870912);
main._ltbtest1.runMethod(true,"_setwidth",BA.numberCast(int.class, RemoteObject.solve(new RemoteObject[] {_width,RemoteObject.createImmutable(80)}, "-",1, 0)));
 BA.debugLineNum = 31;BA.debugLine="End Sub";
Debug.ShouldStop(1073741824);
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 ltbTest, ltbTest1 as LimitBar";
main._ltbtest = RemoteObject.createNew ("b4j.example.limitbar");
main._ltbtest1 = RemoteObject.createNew ("b4j.example.limitbar");
 //BA.debugLineNum = 11;BA.debugLine="Private lblLimitLeft, lblLimitRight As Label";
main._lbllimitleft = RemoteObject.createNew ("anywheresoftware.b4j.objects.LabelWrapper");
main._lbllimitright = RemoteObject.createNew ("anywheresoftware.b4j.objects.LabelWrapper");
 //BA.debugLineNum = 12;BA.debugLine="Private btnChangeProperties As Button";
main._btnchangeproperties = RemoteObject.createNew ("anywheresoftware.b4j.objects.ButtonWrapper");
 //BA.debugLineNum = 13;BA.debugLine="End Sub";
return RemoteObject.createImmutable("");
}
}