package b4j.example;
import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.debug.*;
public class main extends javafx.application.Application{
public static main mostCurrent = new main();
public static BA ba;
static {
ba = new anywheresoftware.b4a.ShellBA("b4j.example", "b4j.example.main", null);
ba.loadHtSubs(main.class);
if (ba.getClass().getName().endsWith("ShellBA")) {
anywheresoftware.b4a.ShellBA.delegateBA = new anywheresoftware.b4j.objects.FxBA("b4j.example", null, null);
ba.raiseEvent2(null, true, "SHELL", false);
ba.raiseEvent2(null, true, "CREATE", true, "b4j.example.main", ba);
}
}
public static Class<?> getObject() {
return main.class;
}
public static void main(String[] args) {
launch(args);
}
public void start (javafx.stage.Stage stage) {
try {
anywheresoftware.b4j.objects.FxBA.application = this;
anywheresoftware.b4a.keywords.Common.setDensity(javafx.stage.Screen.getPrimary().getDpi());
BA.Log("Program started.");
initializeProcessGlobals();
anywheresoftware.b4j.objects.Form frm = new anywheresoftware.b4j.objects.Form();
frm.initWithStage(ba, stage, 600, 400);
ba.raiseEvent(null, "appstart", frm, (String[])getParameters().getRaw().toArray(new String[0]));
} catch (Throwable t) {
BA.printException(t, true);
System.exit(1);
}
}
private static boolean processGlobalsRun;
public static void initializeProcessGlobals() {
if (main.processGlobalsRun == false) {
main.processGlobalsRun = true;
try {
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}public static anywheresoftware.b4a.keywords.Common __c = null;
public static anywheresoftware.b4j.objects.JFX _fx = null;
public static anywheresoftware.b4j.objects.Form _mainform = null;
public static String _appstart(anywheresoftware.b4j.objects.Form _form1,String[] _args) throws Exception{
RDebugUtils.currentModule="main";
if (Debug.shouldDelegate(ba, "appstart"))
return (String) Debug.delegate(ba, "appstart", new Object[] {_form1,_args});
RDebugUtils.currentLine=65536;
//BA.debugLineNum = 65536;BA.debugLine="Sub AppStart (Form1 As Form, Args() As String)";
RDebugUtils.currentLine=65537;
//BA.debugLineNum = 65537;BA.debugLine="MainForm = Form1";
_mainform = _form1;
RDebugUtils.currentLine=65538;
//BA.debugLineNum = 65538;BA.debugLine="MainForm.SetFormStyle(\"UNIFIED\")";
_mainform.SetFormStyle("UNIFIED");
RDebugUtils.currentLine=65540;
//BA.debugLineNum = 65540;BA.debugLine="MainForm.Show";
_mainform.Show();
RDebugUtils.currentLine=65542;
//BA.debugLineNum = 65542;BA.debugLine="Log(\"Test\")";
anywheresoftware.b4a.keywords.Common.Log("Test");
RDebugUtils.currentLine=65543;
//BA.debugLineNum = 65543;BA.debugLine="End Sub";
return "";
}
}