package b4j.jLblCustomButton;


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.jLblCustomButton", "b4j.jLblCustomButton.main", null);
		ba.loadHtSubs(main.class);
        if (ba.getClass().getName().endsWith("ShellBA")) {
			anywheresoftware.b4a.ShellBA.delegateBA = new anywheresoftware.b4j.objects.FxBA("b4j.jLblCustomButton", null, null);
			ba.raiseEvent2(null, true, "SHELL", false);
			ba.raiseEvent2(null, true, "CREATE", true, "b4j.jLblCustomButton.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 {
            if (!false)
                System.setProperty("prism.lcdtext", "false");
            anywheresoftware.b4j.objects.FxBA.application = this;
		    anywheresoftware.b4a.keywords.Common.setDensity(javafx.stage.Screen.getPrimary().getDpi());
            anywheresoftware.b4a.keywords.Common.LogDebug("Program started.");
            initializeProcessGlobals();
            anywheresoftware.b4j.objects.Form frm = new anywheresoftware.b4j.objects.Form();
            frm.initWithStage(ba, stage, 600, 600);
            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 b4j.jClsCustomButton.custombutton _cbttest10 = null;
public static anywheresoftware.b4j.objects.LabelWrapper _lbldummy = 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.RootPane.LoadLayout(\"Main\") 'Load the la";
_mainform.getRootPane().LoadLayout(ba,"Main");
RDebugUtils.currentLine=65539;
 //BA.debugLineNum = 65539;BA.debugLine="MainForm.Show";
_mainform.Show();
RDebugUtils.currentLine=65541;
 //BA.debugLineNum = 65541;BA.debugLine="MainForm.Title = \"jClsCustomButton\"";
_mainform.setTitle("jClsCustomButton");
RDebugUtils.currentLine=65543;
 //BA.debugLineNum = 65543;BA.debugLine="cbtTest10.Initialize(Me, \"cbtTest\")";
_cbttest10._initialize(ba,main.getObject(),"cbtTest");
RDebugUtils.currentLine=65544;
 //BA.debugLineNum = 65544;BA.debugLine="cbtTest10.IconFont = lblDummy.Font";
_cbttest10._seticonfont(_lbldummy.getFont());
RDebugUtils.currentLine=65545;
 //BA.debugLineNum = 65545;BA.debugLine="cbtTest10.AddToParent(MainForm.RootPane, 100, 100";
_cbttest10._addtoparent((anywheresoftware.b4j.objects.PaneWrapper.ConcretePaneWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4j.objects.PaneWrapper.ConcretePaneWrapper(), (javafx.scene.layout.Pane)(_mainform.getRootPane().getObject())),(int) (100),(int) (100),(int) (60),(int) (60),(anywheresoftware.b4j.objects.JFX.PaintWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4j.objects.JFX.PaintWrapper(), (javafx.scene.paint.Paint)(_fx.Colors.RGB((int) (0),(int) (0),(int) (139)))),BA.ObjectToString(anywheresoftware.b4a.keywords.Common.Chr((int) (0xe05c))),"Test 10");
RDebugUtils.currentLine=65546;
 //BA.debugLineNum = 65546;BA.debugLine="cbtTest10.Tag = 10";
_cbttest10._settag((Object)(10));
RDebugUtils.currentLine=65547;
 //BA.debugLineNum = 65547;BA.debugLine="End Sub";
return "";
}
public static String  _cbttest_click() throws Exception{
RDebugUtils.currentModule="main";
if (Debug.shouldDelegate(ba, "cbttest_click"))
	return (String) Debug.delegate(ba, "cbttest_click", null);
b4j.jClsCustomButton.custombutton _cbt = null;
int _index = 0;
RDebugUtils.currentLine=131072;
 //BA.debugLineNum = 131072;BA.debugLine="Private Sub cbtTest_Click";
RDebugUtils.currentLine=131073;
 //BA.debugLineNum = 131073;BA.debugLine="Private cbt As CustomButton";
_cbt = new b4j.jClsCustomButton.custombutton();
RDebugUtils.currentLine=131074;
 //BA.debugLineNum = 131074;BA.debugLine="Private Index As Int";
_index = 0;
RDebugUtils.currentLine=131076;
 //BA.debugLineNum = 131076;BA.debugLine="cbt = Sender";
_cbt = (b4j.jClsCustomButton.custombutton)(anywheresoftware.b4a.keywords.Common.Sender(ba));
RDebugUtils.currentLine=131077;
 //BA.debugLineNum = 131077;BA.debugLine="Index = cbt.Tag";
_index = (int)(BA.ObjectToNumber(_cbt._gettag()));
RDebugUtils.currentLine=131079;
 //BA.debugLineNum = 131079;BA.debugLine="Select Index";
switch (_index) {
case 1: {
RDebugUtils.currentLine=131081;
 //BA.debugLineNum = 131081;BA.debugLine="Log(\"cbtTest1_Click\")";
anywheresoftware.b4a.keywords.Common.Log("cbtTest1_Click");
 break; }
case 2: {
RDebugUtils.currentLine=131083;
 //BA.debugLineNum = 131083;BA.debugLine="Log(\"cbtTest2_Click\")";
anywheresoftware.b4a.keywords.Common.Log("cbtTest2_Click");
 break; }
case 10: {
RDebugUtils.currentLine=131085;
 //BA.debugLineNum = 131085;BA.debugLine="Log(\"cbtTest10_Click\")";
anywheresoftware.b4a.keywords.Common.Log("cbtTest10_Click");
 break; }
default: {
RDebugUtils.currentLine=131087;
 //BA.debugLineNum = 131087;BA.debugLine="Log(\"cbtTest\" & Index & \"_Click\")";
anywheresoftware.b4a.keywords.Common.Log("cbtTest"+BA.NumberToString(_index)+"_Click");
 break; }
}
;
RDebugUtils.currentLine=131089;
 //BA.debugLineNum = 131089;BA.debugLine="End Sub";
return "";
}
public static String  _cbttest_longclick() throws Exception{
RDebugUtils.currentModule="main";
if (Debug.shouldDelegate(ba, "cbttest_longclick"))
	return (String) Debug.delegate(ba, "cbttest_longclick", null);
b4j.jClsCustomButton.custombutton _cbt = null;
int _index = 0;
RDebugUtils.currentLine=196608;
 //BA.debugLineNum = 196608;BA.debugLine="Private Sub cbtTest_LongClick";
RDebugUtils.currentLine=196609;
 //BA.debugLineNum = 196609;BA.debugLine="Private cbt As CustomButton";
_cbt = new b4j.jClsCustomButton.custombutton();
RDebugUtils.currentLine=196610;
 //BA.debugLineNum = 196610;BA.debugLine="Private Index As Int";
_index = 0;
RDebugUtils.currentLine=196612;
 //BA.debugLineNum = 196612;BA.debugLine="cbt = Sender";
_cbt = (b4j.jClsCustomButton.custombutton)(anywheresoftware.b4a.keywords.Common.Sender(ba));
RDebugUtils.currentLine=196613;
 //BA.debugLineNum = 196613;BA.debugLine="Index = cbt.Tag";
_index = (int)(BA.ObjectToNumber(_cbt._gettag()));
RDebugUtils.currentLine=196615;
 //BA.debugLineNum = 196615;BA.debugLine="Select Index";
switch (_index) {
case 1: {
RDebugUtils.currentLine=196617;
 //BA.debugLineNum = 196617;BA.debugLine="Log(\"cbtTest1_LongClick\")";
anywheresoftware.b4a.keywords.Common.Log("cbtTest1_LongClick");
 break; }
case 2: {
RDebugUtils.currentLine=196619;
 //BA.debugLineNum = 196619;BA.debugLine="Log(\"cbtTest2_LongClick\")";
anywheresoftware.b4a.keywords.Common.Log("cbtTest2_LongClick");
 break; }
case 10: {
RDebugUtils.currentLine=196621;
 //BA.debugLineNum = 196621;BA.debugLine="Log(\"cbtTest10_LongClick\")";
anywheresoftware.b4a.keywords.Common.Log("cbtTest10_LongClick");
 break; }
default: {
RDebugUtils.currentLine=196623;
 //BA.debugLineNum = 196623;BA.debugLine="Log(\"cbtTest\" & Index & \"_LongClick\")";
anywheresoftware.b4a.keywords.Common.Log("cbtTest"+BA.NumberToString(_index)+"_LongClick");
 break; }
}
;
RDebugUtils.currentLine=196625;
 //BA.debugLineNum = 196625;BA.debugLine="End Sub";
return "";
}
}