package b4j.jLblCustomButton;

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,18);
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 = 18;BA.debugLine="Sub AppStart (Form1 As Form, Args() As String)";
Debug.ShouldStop(131072);
 BA.debugLineNum = 19;BA.debugLine="MainForm = Form1";
Debug.ShouldStop(262144);
main._mainform = _form1;
 BA.debugLineNum = 20;BA.debugLine="MainForm.RootPane.LoadLayout(\"Main\") 'Load the la";
Debug.ShouldStop(524288);
main._mainform.runMethod(false,"getRootPane").runMethodAndSync(false,"LoadLayout",main.ba,(Object)(RemoteObject.createImmutable("Main")));
 BA.debugLineNum = 21;BA.debugLine="MainForm.Show";
Debug.ShouldStop(1048576);
main._mainform.runVoidMethodAndSync ("Show");
 BA.debugLineNum = 23;BA.debugLine="MainForm.Title = \"jClsCustomButton\"";
Debug.ShouldStop(4194304);
main._mainform.runMethod(true,"setTitle",BA.ObjectToString("jClsCustomButton"));
 BA.debugLineNum = 25;BA.debugLine="cbtTest10.Initialize(Me, \"cbtTest\")";
Debug.ShouldStop(16777216);
main._cbttest10.runVoidMethod ("_initialize",main.ba,(Object)(main.getObject()),(Object)(RemoteObject.createImmutable("cbtTest")));
 BA.debugLineNum = 26;BA.debugLine="cbtTest10.IconFont = lblDummy.Font";
Debug.ShouldStop(33554432);
main._cbttest10.runVoidMethod ("_seticonfont",main._lbldummy.runMethod(false,"getFont"));
 BA.debugLineNum = 27;BA.debugLine="cbtTest10.AddToParent(MainForm.RootPane, 100, 100";
Debug.ShouldStop(67108864);
main._cbttest10.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, 100)),(Object)(BA.numberCast(int.class, 100)),(Object)(BA.numberCast(int.class, 60)),(Object)(BA.numberCast(int.class, 60)),RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4j.objects.JFX.PaintWrapper"), main._fx.getField(false,"Colors").runMethod(false,"RGB",(Object)(BA.numberCast(int.class, 0)),(Object)(BA.numberCast(int.class, 0)),(Object)(BA.numberCast(int.class, 139)))),(Object)(BA.ObjectToString(main.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 0xe05c))))),(Object)(RemoteObject.createImmutable("Test 10")));
 BA.debugLineNum = 28;BA.debugLine="cbtTest10.Tag = 10";
Debug.ShouldStop(134217728);
main._cbttest10.runMethod(false,"_settag",RemoteObject.createImmutable((10)));
 BA.debugLineNum = 29;BA.debugLine="End Sub";
Debug.ShouldStop(268435456);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			Debug.ErrorCaught(e);
			throw e;
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _cbttest_click() throws Exception{
try {
		Debug.PushSubsStack("cbtTest_Click (main) ","main",0,main.ba,main.mostCurrent,31);
if (RapidSub.canDelegate("cbttest_click")) return main.remoteMe.runUserSub(false, "main","cbttest_click");
RemoteObject _cbt = RemoteObject.declareNull("b4j.jClsCustomButton.custombutton");
RemoteObject _index = RemoteObject.createImmutable(0);
 BA.debugLineNum = 31;BA.debugLine="Private Sub cbtTest_Click";
Debug.ShouldStop(1073741824);
 BA.debugLineNum = 32;BA.debugLine="Private cbt As CustomButton";
Debug.ShouldStop(-2147483648);
_cbt = RemoteObject.createNew ("b4j.jClsCustomButton.custombutton");Debug.locals.put("cbt", _cbt);
 BA.debugLineNum = 33;BA.debugLine="Private Index As Int";
Debug.ShouldStop(1);
_index = RemoteObject.createImmutable(0);Debug.locals.put("Index", _index);
 BA.debugLineNum = 35;BA.debugLine="cbt = Sender";
Debug.ShouldStop(4);
_cbt = (main.__c.runMethod(false,"Sender",main.ba));Debug.locals.put("cbt", _cbt);
 BA.debugLineNum = 36;BA.debugLine="Index = cbt.Tag";
Debug.ShouldStop(8);
_index = BA.numberCast(int.class, _cbt.runMethod(false,"_gettag"));Debug.locals.put("Index", _index);
 BA.debugLineNum = 38;BA.debugLine="Select Index";
Debug.ShouldStop(32);
switch (BA.switchObjectToInt(_index,BA.numberCast(int.class, 1),BA.numberCast(int.class, 2),BA.numberCast(int.class, 10))) {
case 0: {
 BA.debugLineNum = 40;BA.debugLine="Log(\"cbtTest1_Click\")";
Debug.ShouldStop(128);
main.__c.runVoidMethod ("Log",(Object)(RemoteObject.createImmutable("cbtTest1_Click")));
 break; }
case 1: {
 BA.debugLineNum = 42;BA.debugLine="Log(\"cbtTest2_Click\")";
Debug.ShouldStop(512);
main.__c.runVoidMethod ("Log",(Object)(RemoteObject.createImmutable("cbtTest2_Click")));
 break; }
case 2: {
 BA.debugLineNum = 44;BA.debugLine="Log(\"cbtTest10_Click\")";
Debug.ShouldStop(2048);
main.__c.runVoidMethod ("Log",(Object)(RemoteObject.createImmutable("cbtTest10_Click")));
 break; }
default: {
 BA.debugLineNum = 46;BA.debugLine="Log(\"cbtTest\" & Index & \"_Click\")";
Debug.ShouldStop(8192);
main.__c.runVoidMethod ("Log",(Object)(RemoteObject.concat(RemoteObject.createImmutable("cbtTest"),_index,RemoteObject.createImmutable("_Click"))));
 break; }
}
;
 BA.debugLineNum = 48;BA.debugLine="End Sub";
Debug.ShouldStop(32768);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			Debug.ErrorCaught(e);
			throw e;
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _cbttest_longclick() throws Exception{
try {
		Debug.PushSubsStack("cbtTest_LongClick (main) ","main",0,main.ba,main.mostCurrent,50);
if (RapidSub.canDelegate("cbttest_longclick")) return main.remoteMe.runUserSub(false, "main","cbttest_longclick");
RemoteObject _cbt = RemoteObject.declareNull("b4j.jClsCustomButton.custombutton");
RemoteObject _index = RemoteObject.createImmutable(0);
 BA.debugLineNum = 50;BA.debugLine="Private Sub cbtTest_LongClick";
Debug.ShouldStop(131072);
 BA.debugLineNum = 51;BA.debugLine="Private cbt As CustomButton";
Debug.ShouldStop(262144);
_cbt = RemoteObject.createNew ("b4j.jClsCustomButton.custombutton");Debug.locals.put("cbt", _cbt);
 BA.debugLineNum = 52;BA.debugLine="Private Index As Int";
Debug.ShouldStop(524288);
_index = RemoteObject.createImmutable(0);Debug.locals.put("Index", _index);
 BA.debugLineNum = 54;BA.debugLine="cbt = Sender";
Debug.ShouldStop(2097152);
_cbt = (main.__c.runMethod(false,"Sender",main.ba));Debug.locals.put("cbt", _cbt);
 BA.debugLineNum = 55;BA.debugLine="Index = cbt.Tag";
Debug.ShouldStop(4194304);
_index = BA.numberCast(int.class, _cbt.runMethod(false,"_gettag"));Debug.locals.put("Index", _index);
 BA.debugLineNum = 57;BA.debugLine="Select Index";
Debug.ShouldStop(16777216);
switch (BA.switchObjectToInt(_index,BA.numberCast(int.class, 1),BA.numberCast(int.class, 2),BA.numberCast(int.class, 10))) {
case 0: {
 BA.debugLineNum = 59;BA.debugLine="Log(\"cbtTest1_LongClick\")";
Debug.ShouldStop(67108864);
main.__c.runVoidMethod ("Log",(Object)(RemoteObject.createImmutable("cbtTest1_LongClick")));
 break; }
case 1: {
 BA.debugLineNum = 61;BA.debugLine="Log(\"cbtTest2_LongClick\")";
Debug.ShouldStop(268435456);
main.__c.runVoidMethod ("Log",(Object)(RemoteObject.createImmutable("cbtTest2_LongClick")));
 break; }
case 2: {
 BA.debugLineNum = 63;BA.debugLine="Log(\"cbtTest10_LongClick\")";
Debug.ShouldStop(1073741824);
main.__c.runVoidMethod ("Log",(Object)(RemoteObject.createImmutable("cbtTest10_LongClick")));
 break; }
default: {
 BA.debugLineNum = 65;BA.debugLine="Log(\"cbtTest\" & Index & \"_LongClick\")";
Debug.ShouldStop(1);
main.__c.runVoidMethod ("Log",(Object)(RemoteObject.concat(RemoteObject.createImmutable("cbtTest"),_index,RemoteObject.createImmutable("_LongClick"))));
 break; }
}
;
 BA.debugLineNum = 67;BA.debugLine="End Sub";
Debug.ShouldStop(4);
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.jLblCustomButton.main");
		
        } catch (Exception e) {
			throw new RuntimeException(e);
		}
    }
}public static RemoteObject  _process_globals() throws Exception{
 //BA.debugLineNum = 10;BA.debugLine="Sub Process_Globals";
 //BA.debugLineNum = 11;BA.debugLine="Private fx As JFX";
main._fx = RemoteObject.createNew ("anywheresoftware.b4j.objects.JFX");
 //BA.debugLineNum = 12;BA.debugLine="Private MainForm As Form";
main._mainform = RemoteObject.createNew ("anywheresoftware.b4j.objects.Form");
 //BA.debugLineNum = 14;BA.debugLine="Private cbtTest10 As CustomButton";
main._cbttest10 = RemoteObject.createNew ("b4j.jClsCustomButton.custombutton");
 //BA.debugLineNum = 15;BA.debugLine="Private lblDummy As Label";
main._lbldummy = RemoteObject.createNew ("anywheresoftware.b4j.objects.LabelWrapper");
 //BA.debugLineNum = 16;BA.debugLine="End Sub";
return RemoteObject.createImmutable("");
}
}