package b4j.ScrollPane;

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="ScrollPane1.LoadLayout(\"ScrollPane1\", 0, 0) 'need";
Debug.ShouldStop(32768);
main._scrollpane1.runVoidMethodAndSync ("LoadLayout",main.ba,(Object)(BA.ObjectToString("ScrollPane1")),(Object)(BA.numberCast(double.class, 0)),(Object)(BA.numberCast(double.class, 0)));
 BA.debugLineNum = 17;BA.debugLine="FillScrollPane";
Debug.ShouldStop(65536);
_fillscrollpane();
 BA.debugLineNum = 18;BA.debugLine="MainForm.Show";
Debug.ShouldStop(131072);
main._mainform.runVoidMethodAndSync ("Show");
 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  _cell_mouseclicked(RemoteObject _eventdata) throws Exception{
try {
		Debug.PushSubsStack("Cell_MouseClicked (main) ","main",0,main.ba,main.mostCurrent,48);
if (RapidSub.canDelegate("cell_mouseclicked")) return main.remoteMe.runUserSub(false, "main","cell_mouseclicked", _eventdata);
RemoteObject _lbl = RemoteObject.declareNull("anywheresoftware.b4j.objects.LabelWrapper");
RemoteObject _rc = RemoteObject.declareNull("b4j.ScrollPane.main._rowcol");
Debug.locals.put("EventData", _eventdata);
 BA.debugLineNum = 48;BA.debugLine="Private Sub Cell_MouseClicked (EventData As MouseE";
Debug.ShouldStop(32768);
 BA.debugLineNum = 49;BA.debugLine="Private lbl As Label";
Debug.ShouldStop(65536);
_lbl = RemoteObject.createNew ("anywheresoftware.b4j.objects.LabelWrapper");Debug.locals.put("lbl", _lbl);
 BA.debugLineNum = 50;BA.debugLine="Private rc As RowCol";
Debug.ShouldStop(131072);
_rc = RemoteObject.createNew ("b4j.ScrollPane.main._rowcol");Debug.locals.put("rc", _rc);
 BA.debugLineNum = 52;BA.debugLine="lbl = Sender";
Debug.ShouldStop(524288);
_lbl.setObject(main.__c.runMethod(false,"Sender",main.ba));
 BA.debugLineNum = 53;BA.debugLine="rc = lbl.Tag";
Debug.ShouldStop(1048576);
_rc = (_lbl.runMethod(false,"getTag"));Debug.locals.put("rc", _rc);
 BA.debugLineNum = 54;BA.debugLine="Log(rc.row)";
Debug.ShouldStop(2097152);
main.__c.runVoidMethod ("Log",(Object)(BA.NumberToString(_rc.getField(true,"row"))));
 BA.debugLineNum = 55;BA.debugLine="Log(rc.col)";
Debug.ShouldStop(4194304);
main.__c.runVoidMethod ("Log",(Object)(BA.NumberToString(_rc.getField(true,"col"))));
 BA.debugLineNum = 56;BA.debugLine="End Sub";
Debug.ShouldStop(8388608);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			Debug.ErrorCaught(e);
			throw e;
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _fillscrollpane() throws Exception{
try {
		Debug.PushSubsStack("FillScrollPane (main) ","main",0,main.ba,main.mostCurrent,21);
if (RapidSub.canDelegate("fillscrollpane")) return main.remoteMe.runUserSub(false, "main","fillscrollpane");
RemoteObject _col = RemoteObject.createImmutable(0);
RemoteObject _row = RemoteObject.createImmutable(0);
RemoteObject _w = RemoteObject.createImmutable(0);
RemoteObject _h = RemoteObject.createImmutable(0);
RemoteObject _innerpane = RemoteObject.declareNull("anywheresoftware.b4j.objects.PaneWrapper.ConcretePaneWrapper");
RemoteObject _rc = RemoteObject.declareNull("b4j.ScrollPane.main._rowcol");
RemoteObject _lbl = RemoteObject.declareNull("anywheresoftware.b4j.objects.LabelWrapper");
 BA.debugLineNum = 21;BA.debugLine="Private Sub FillScrollPane";
Debug.ShouldStop(1048576);
 BA.debugLineNum = 22;BA.debugLine="Private col, row As Int";
Debug.ShouldStop(2097152);
_col = RemoteObject.createImmutable(0);Debug.locals.put("col", _col);
_row = RemoteObject.createImmutable(0);Debug.locals.put("row", _row);
 BA.debugLineNum = 23;BA.debugLine="Private w = 150 As Double";
Debug.ShouldStop(4194304);
_w = BA.numberCast(double.class, 150);Debug.locals.put("w", _w);Debug.locals.put("w", _w);
 BA.debugLineNum = 24;BA.debugLine="Private h = 50 As Double";
Debug.ShouldStop(8388608);
_h = BA.numberCast(double.class, 50);Debug.locals.put("h", _h);Debug.locals.put("h", _h);
 BA.debugLineNum = 25;BA.debugLine="Private innerPane As Pane";
Debug.ShouldStop(16777216);
_innerpane = RemoteObject.createNew ("anywheresoftware.b4j.objects.PaneWrapper.ConcretePaneWrapper");Debug.locals.put("innerPane", _innerpane);
 BA.debugLineNum = 26;BA.debugLine="innerPane = ScrollPane1.InnerNode	'gets the innet";
Debug.ShouldStop(33554432);
_innerpane.setObject(main._scrollpane1.runMethod(false,"getInnerNode").getObject());
 BA.debugLineNum = 27;BA.debugLine="ScrollPane1.SetVScrollVisibility(\"ALWAYS\")	'shows";
Debug.ShouldStop(67108864);
main._scrollpane1.runVoidMethod ("SetVScrollVisibility",(Object)(BA.getEnumFromString(BA.getDeviceClass("javafx.scene.control.ScrollPane.ScrollBarPolicy"),RemoteObject.createImmutable("ALWAYS"))));
 BA.debugLineNum = 28;BA.debugLine="ScrollPane1.SetHScrollVisibility(\"ALWAYS\")	'shows";
Debug.ShouldStop(134217728);
main._scrollpane1.runVoidMethod ("SetHScrollVisibility",(Object)(BA.getEnumFromString(BA.getDeviceClass("javafx.scene.control.ScrollPane.ScrollBarPolicy"),RemoteObject.createImmutable("ALWAYS"))));
 BA.debugLineNum = 29;BA.debugLine="ScrollPane1.Pannable = True	'allows moving with t";
Debug.ShouldStop(268435456);
main._scrollpane1.runMethod(true,"setPannable",main.__c.getField(true,"True"));
 BA.debugLineNum = 30;BA.debugLine="For row = 0 To 20";
Debug.ShouldStop(536870912);
{
final int step9 = 1;
final int limit9 = 20;
for (_row = BA.numberCast(int.class, 0) ; (step9 > 0 && _row.<Integer>get().intValue() <= limit9) || (step9 < 0 && _row.<Integer>get().intValue() >= limit9); _row = RemoteObject.createImmutable((int)(0 + _row.<Integer>get().intValue() + step9)) ) {
Debug.locals.put("row", _row);
 BA.debugLineNum = 31;BA.debugLine="For col = 0 To 10";
Debug.ShouldStop(1073741824);
{
final int step10 = 1;
final int limit10 = 10;
for (_col = BA.numberCast(int.class, 0) ; (step10 > 0 && _col.<Integer>get().intValue() <= limit10) || (step10 < 0 && _col.<Integer>get().intValue() >= limit10); _col = RemoteObject.createImmutable((int)(0 + _col.<Integer>get().intValue() + step10)) ) {
Debug.locals.put("col", _col);
 BA.debugLineNum = 32;BA.debugLine="Private rc As RowCol";
Debug.ShouldStop(-2147483648);
_rc = RemoteObject.createNew ("b4j.ScrollPane.main._rowcol");Debug.locals.put("rc", _rc);
 BA.debugLineNum = 33;BA.debugLine="Private lbl As Label";
Debug.ShouldStop(1);
_lbl = RemoteObject.createNew ("anywheresoftware.b4j.objects.LabelWrapper");Debug.locals.put("lbl", _lbl);
 BA.debugLineNum = 34;BA.debugLine="lbl.Initialize(\"Cell\")";
Debug.ShouldStop(2);
_lbl.runVoidMethod ("Initialize",main.ba,(Object)(RemoteObject.createImmutable("Cell")));
 BA.debugLineNum = 35;BA.debugLine="CSSUtils.SetBorder(lbl, 1, fx.Colors.DarkGray,";
Debug.ShouldStop(4);
main._cssutils.runVoidMethod ("_setborder",RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4j.objects.NodeWrapper.ConcreteNodeWrapper"), _lbl.getObject()),(Object)(BA.numberCast(double.class, 1)),RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4j.objects.JFX.PaintWrapper"), main._fx.getField(false,"Colors").getField(false,"DarkGray")),(Object)(BA.numberCast(double.class, 5)));
 BA.debugLineNum = 36;BA.debugLine="lbl.Alignment = \"CENTER\"";
Debug.ShouldStop(8);
_lbl.runMethod(true,"setAlignment",BA.ObjectToString("CENTER"));
 BA.debugLineNum = 37;BA.debugLine="innerPane.AddNode(lbl, col * w, row * h, w - 1,";
Debug.ShouldStop(16);
_innerpane.runVoidMethod ("AddNode",(Object)((_lbl.getObject())),(Object)(RemoteObject.solve(new RemoteObject[] {_col,_w}, "*",0, 0)),(Object)(RemoteObject.solve(new RemoteObject[] {_row,_h}, "*",0, 0)),(Object)(RemoteObject.solve(new RemoteObject[] {_w,RemoteObject.createImmutable(1)}, "-",1, 0)),(Object)(RemoteObject.solve(new RemoteObject[] {_h,RemoteObject.createImmutable(1)}, "-",1, 0)));
 BA.debugLineNum = 38;BA.debugLine="lbl.Text = \"Test_\" & row & \"_\" & col";
Debug.ShouldStop(32);
_lbl.runMethod(true,"setText",RemoteObject.concat(RemoteObject.createImmutable("Test_"),_row,RemoteObject.createImmutable("_"),_col));
 BA.debugLineNum = 39;BA.debugLine="rc.row = row";
Debug.ShouldStop(64);
_rc.setField ("row",_row);
 BA.debugLineNum = 40;BA.debugLine="rc.col = col";
Debug.ShouldStop(128);
_rc.setField ("col",_col);
 BA.debugLineNum = 41;BA.debugLine="lbl.Tag = rc";
Debug.ShouldStop(256);
_lbl.runMethod(false,"setTag",(_rc));
 }
}Debug.locals.put("col", _col);
;
 }
}Debug.locals.put("row", _row);
;
 BA.debugLineNum = 44;BA.debugLine="innerPane.PrefWidth = col * w";
Debug.ShouldStop(2048);
_innerpane.runMethod(true,"setPrefWidth",RemoteObject.solve(new RemoteObject[] {_col,_w}, "*",0, 0));
 BA.debugLineNum = 45;BA.debugLine="innerPane.PrefHeight = row * h";
Debug.ShouldStop(4096);
_innerpane.runMethod(true,"setPrefHeight",RemoteObject.solve(new RemoteObject[] {_row,_h}, "*",0, 0));
 BA.debugLineNum = 46;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.ScrollPane.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="Private ScrollPane1 As ScrollPane";
main._scrollpane1 = RemoteObject.createNew ("anywheresoftware.b4j.objects.ScrollPaneWrapper");
 //BA.debugLineNum = 10;BA.debugLine="Type RowCol(row As Int, col As Int)";
;
 //BA.debugLineNum = 11;BA.debugLine="End Sub";
return RemoteObject.createImmutable("");
}
}