package b4j.example;


import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.B4AClass;
import anywheresoftware.b4a.debug.*;

public class limitbar extends B4AClass.ImplB4AClass implements BA.SubDelegator{
    public static java.util.HashMap<String, java.lang.reflect.Method> htSubs;
    private void innerInitialize(BA _ba) throws Exception {
        if (ba == null) {
            ba = new  anywheresoftware.b4j.objects.FxBA("b4j.example", "b4j.example.limitbar", this);
            if (htSubs == null) {
                ba.loadHtSubs(this.getClass());
                htSubs = ba.htSubs;
            }
            ba.htSubs = htSubs;
             
        }
        if (BA.isShellModeRuntimeCheck(ba))
                this.getClass().getMethod("_class_globals", b4j.example.limitbar.class).invoke(this, new Object[] {null});
        else
            ba.raiseEvent2(null, true, "class_globals", false);
    }

 public anywheresoftware.b4a.keywords.Common __c = null;
public anywheresoftware.b4j.objects.JFX _fx = null;
public Object _mcallback = null;
public String _meventname = "";
public double _mwidth = 0;
public double _mheight = 0;
public double _mradius = 0;
public anywheresoftware.b4j.objects.PaneWrapper.ConcretePaneWrapper _ltbpanelback = null;
public anywheresoftware.b4j.objects.CanvasWrapper _cvsback = null;
public anywheresoftware.b4j.objects.CanvasWrapper _cvsfront = null;
public anywheresoftware.b4j.objects.JFX.PaintWrapper _mbackgroundcolor = null;
public anywheresoftware.b4j.objects.JFX.PaintWrapper _mbacklinecolor = null;
public anywheresoftware.b4j.objects.JFX.PaintWrapper _mfrontlinecolor = null;
public double _mmargin = 0;
public double _x0 = 0;
public double _y0 = 0;
public double _x1 = 0;
public double _y1 = 0;
public double _y2 = 0;
public int _mmaxvalue = 0;
public double _mscale = 0;
public int[] _mlimit = null;
public double[] _positionpixels = null;
public int _posindex = 0;
public anywheresoftware.b4j.object.JavaObject _graph = null;
public anywheresoftware.b4j.object.JavaObject _jcanvasfront = null;
public b4j.example.cssutils _cssutils = null;
public String  _addtoparent(anywheresoftware.b4j.objects.PaneWrapper.ConcretePaneWrapper _parent,int _left,int _top,int _width,int _height,anywheresoftware.b4j.objects.JFX.PaintWrapper _backgroundcolor,int _radius) throws Exception{
 //BA.debugLineNum = 101;BA.debugLine="Public Sub AddToParent(Parent As Pane, Left As Int";
 //BA.debugLineNum = 102;BA.debugLine="mWidth = Width";
_mwidth = _width;
 //BA.debugLineNum = 103;BA.debugLine="mHeight = Max(Height, 30)					' limits the height";
_mheight = __c.Max(_height,30);
 //BA.debugLineNum = 104;BA.debugLine="mHeight = Min(Height, 60)					' limits the height";
_mheight = __c.Min(_height,60);
 //BA.debugLineNum = 105;BA.debugLine="mRadius = Min(Radius, Height / 2)	' limits the ma";
_mradius = __c.Min(_radius,_height/(double)2);
 //BA.debugLineNum = 106;BA.debugLine="mBackgroundColor = BackgroundColor";
_mbackgroundcolor = _backgroundcolor;
 //BA.debugLineNum = 109;BA.debugLine="ltbPanelBack.Initialize(\"\")";
_ltbpanelback.Initialize(ba,"");
 //BA.debugLineNum = 110;BA.debugLine="Parent.AddNode(ltbPanelBack, Left, Top, Width, He";
_parent.AddNode((javafx.scene.Node)(_ltbpanelback.getObject()),_left,_top,_width,_height);
 //BA.debugLineNum = 112;BA.debugLine="InitClass		' initializes the common parts for Des";
_initclass();
 //BA.debugLineNum = 113;BA.debugLine="End Sub";
return "";
}
public String  _base_resize(double _width,double _height) throws Exception{
 //BA.debugLineNum = 85;BA.debugLine="Private Sub Base_Resize (Width As Double, Height A";
 //BA.debugLineNum = 86;BA.debugLine="mWidth = ltbPanelBack.Width";
_mwidth = _ltbpanelback.getWidth();
 //BA.debugLineNum = 87;BA.debugLine="mHeight = ltbPanelBack.Height";
_mheight = _ltbpanelback.getHeight();
 //BA.debugLineNum = 89;BA.debugLine="If cvsBack.IsInitialized = False Then";
if (_cvsback.IsInitialized()==__c.False) { 
 //BA.debugLineNum = 90;BA.debugLine="InitClass		' initializes the common parts for De";
_initclass();
 };
 //BA.debugLineNum = 92;BA.debugLine="setWidth(Width)";
_setwidth((int) (_width));
 //BA.debugLineNum = 93;BA.debugLine="End Sub";
return "";
}
public String  _class_globals() throws Exception{
 //BA.debugLineNum = 20;BA.debugLine="Sub Class_Globals";
 //BA.debugLineNum = 21;BA.debugLine="Private fx As JFX										' B4J specific";
_fx = new anywheresoftware.b4j.objects.JFX();
 //BA.debugLineNum = 22;BA.debugLine="Private mCallback As Object					' calling module";
_mcallback = new Object();
 //BA.debugLineNum = 23;BA.debugLine="Private mEventName As String				' event name";
_meventname = "";
 //BA.debugLineNum = 24;BA.debugLine="Private mWidth, mHeight, mRadius As Double";
_mwidth = 0;
_mheight = 0;
_mradius = 0;
 //BA.debugLineNum = 26;BA.debugLine="Private ltbPanelBack As Pane				' the background";
_ltbpanelback = new anywheresoftware.b4j.objects.PaneWrapper.ConcretePaneWrapper();
 //BA.debugLineNum = 27;BA.debugLine="Private cvsBack As Canvas						' the background c";
_cvsback = new anywheresoftware.b4j.objects.CanvasWrapper();
 //BA.debugLineNum = 28;BA.debugLine="Private cvsFront As Canvas					' the foreground c";
_cvsfront = new anywheresoftware.b4j.objects.CanvasWrapper();
 //BA.debugLineNum = 30;BA.debugLine="Private mBackgroundColor As Paint		' color for th";
_mbackgroundcolor = new anywheresoftware.b4j.objects.JFX.PaintWrapper();
 //BA.debugLineNum = 31;BA.debugLine="Private mBackLineColor As Paint			' color for the";
_mbacklinecolor = new anywheresoftware.b4j.objects.JFX.PaintWrapper();
 //BA.debugLineNum = 32;BA.debugLine="Private mFrontLineColor As Paint		' color for the";
_mfrontlinecolor = new anywheresoftware.b4j.objects.JFX.PaintWrapper();
 //BA.debugLineNum = 33;BA.debugLine="Private mMargin As Double						' left and right m";
_mmargin = 0;
 //BA.debugLineNum = 34;BA.debugLine="Private x0, y0, x1, y1, y2 As Double	' backline a";
_x0 = 0;
_y0 = 0;
_x1 = 0;
_y1 = 0;
_y2 = 0;
 //BA.debugLineNum = 35;BA.debugLine="Private mMaxValue As Int						' value of the Max";
_mmaxvalue = 0;
 //BA.debugLineNum = 36;BA.debugLine="Private mScale As Double						' scale between pos";
_mscale = 0;
 //BA.debugLineNum = 37;BA.debugLine="Private mLimit(2) As Int						' value of the limi";
_mlimit = new int[(int) (2)];
;
 //BA.debugLineNum = 38;BA.debugLine="Private PositionPixels(2) As Double	' left and ri";
_positionpixels = new double[(int) (2)];
;
 //BA.debugLineNum = 39;BA.debugLine="Private PosIndex As Int";
_posindex = 0;
 //BA.debugLineNum = 41;BA.debugLine="Private Graph, jCanvasFront As JavaObject		' B4J";
_graph = new anywheresoftware.b4j.object.JavaObject();
_jcanvasfront = new anywheresoftware.b4j.object.JavaObject();
 //BA.debugLineNum = 42;BA.debugLine="End Sub";
return "";
}
public String  _cvsfront_mousedragged(anywheresoftware.b4j.objects.NodeWrapper.MouseEventWrapper _eventdata) throws Exception{
 //BA.debugLineNum = 186;BA.debugLine="Private Sub cvsFront_MouseDragged (EventData As Mo";
 //BA.debugLineNum = 187;BA.debugLine="cvsFront_Touch (2, EventData.X)";
_cvsfront_touch((int) (2),_eventdata.getX());
 //BA.debugLineNum = 188;BA.debugLine="End Sub";
return "";
}
public String  _cvsfront_mousepressed(anywheresoftware.b4j.objects.NodeWrapper.MouseEventWrapper _eventdata) throws Exception{
 //BA.debugLineNum = 182;BA.debugLine="Private Sub cvsFront_MousePressed (EventData As Mo";
 //BA.debugLineNum = 183;BA.debugLine="cvsFront_Touch (0, EventData.X)";
_cvsfront_touch((int) (0),_eventdata.getX());
 //BA.debugLineNum = 184;BA.debugLine="End Sub";
return "";
}
public String  _cvsfront_mousereleased(anywheresoftware.b4j.objects.NodeWrapper.MouseEventWrapper _eventdata) throws Exception{
 //BA.debugLineNum = 190;BA.debugLine="Private Sub cvsFront_MouseReleased (EventData As M";
 //BA.debugLineNum = 191;BA.debugLine="cvsFront_Touch (1, EventData.X)";
_cvsfront_touch((int) (1),_eventdata.getX());
 //BA.debugLineNum = 192;BA.debugLine="End Sub";
return "";
}
public String  _cvsfront_touch(int _action,double _x) throws Exception{
int _val = 0;
 //BA.debugLineNum = 194;BA.debugLine="Private Sub cvsFront_Touch (Action As Int, X As Do";
 //BA.debugLineNum = 196;BA.debugLine="X = Max(x0, X)";
_x = __c.Max(_x0,_x);
 //BA.debugLineNum = 197;BA.debugLine="X = Min(x1, X)";
_x = __c.Min(_x1,_x);
 //BA.debugLineNum = 200;BA.debugLine="Select Action";
switch (_action) {
case 0: {
 //BA.debugLineNum = 202;BA.debugLine="If X < Abs(PositionPixels(0) + PositionPixels(1)";
if (_x<__c.Abs(_positionpixels[(int) (0)]+_positionpixels[(int) (1)])/(double)2) { 
 //BA.debugLineNum = 204;BA.debugLine="PosIndex = 0";
_posindex = (int) (0);
 }else {
 //BA.debugLineNum = 207;BA.debugLine="PosIndex = 1";
_posindex = (int) (1);
 };
 //BA.debugLineNum = 209;BA.debugLine="mLimit(PosIndex) = Floor((X - x0) / mScale + .5)";
_mlimit[_posindex] = (int) (__c.Floor((_x-_x0)/(double)_mscale+.5));
 //BA.debugLineNum = 210;BA.debugLine="PositionPixels(PosIndex) = X";
_positionpixels[_posindex] = _x;
 //BA.debugLineNum = 211;BA.debugLine="DrawCursors";
_drawcursors();
 break; }
case 2: {
 //BA.debugLineNum = 213;BA.debugLine="mLimit(PosIndex) = Floor((X - x0) / mScale + .5)";
_mlimit[_posindex] = (int) (__c.Floor((_x-_x0)/(double)_mscale+.5));
 //BA.debugLineNum = 214;BA.debugLine="PositionPixels(PosIndex) = X";
_positionpixels[_posindex] = _x;
 //BA.debugLineNum = 215;BA.debugLine="DrawCursors";
_drawcursors();
 break; }
case 1: {
 //BA.debugLineNum = 219;BA.debugLine="If mLimit(0) > mLimit(1) Then";
if (_mlimit[(int) (0)]>_mlimit[(int) (1)]) { 
 //BA.debugLineNum = 220;BA.debugLine="Private val As Int";
_val = 0;
 //BA.debugLineNum = 221;BA.debugLine="val = mLimit(0)";
_val = _mlimit[(int) (0)];
 //BA.debugLineNum = 222;BA.debugLine="mLimit(0) = mLimit(1)";
_mlimit[(int) (0)] = _mlimit[(int) (1)];
 //BA.debugLineNum = 223;BA.debugLine="mLimit(1) = val";
_mlimit[(int) (1)] = _val;
 //BA.debugLineNum = 224;BA.debugLine="PositionPixels(0) = mLimit(0) * mScale + x0";
_positionpixels[(int) (0)] = _mlimit[(int) (0)]*_mscale+_x0;
 //BA.debugLineNum = 225;BA.debugLine="PositionPixels(1) = mLimit(1) * mScale + x0";
_positionpixels[(int) (1)] = _mlimit[(int) (1)]*_mscale+_x0;
 //BA.debugLineNum = 226;BA.debugLine="DrawCursors";
_drawcursors();
 };
 break; }
}
;
 //BA.debugLineNum = 231;BA.debugLine="If SubExists(mCallback, mEventName & \"_ValuesChan";
if (__c.SubExists(ba,_mcallback,_meventname+"_ValuesChanged")) { 
 //BA.debugLineNum = 232;BA.debugLine="CallSub3(mCallback, mEventName & \"_ValuesChanged";
__c.CallSubNew3(ba,_mcallback,_meventname+"_ValuesChanged",(Object)(_mlimit[(int) (0)]),(Object)(_mlimit[(int) (1)]));
 };
 //BA.debugLineNum = 234;BA.debugLine="End Sub";
return "";
}
public String  _designercreateview(anywheresoftware.b4j.objects.PaneWrapper.ConcretePaneWrapper _base,anywheresoftware.b4j.objects.LabelWrapper _lbl,anywheresoftware.b4a.objects.collections.Map _props) throws Exception{
 //BA.debugLineNum = 63;BA.debugLine="Public Sub DesignerCreateView(Base As Pane, Lbl As";
 //BA.debugLineNum = 65;BA.debugLine="ltbPanelBack = Base";
_ltbpanelback = _base;
 //BA.debugLineNum = 68;BA.debugLine="mWidth = Base.Width";
_mwidth = _base.getWidth();
 //BA.debugLineNum = 69;BA.debugLine="mHeight = Base.Height";
_mheight = _base.getHeight();
 //BA.debugLineNum = 72;BA.debugLine="mMaxValue = Props.Get(\"Max\")";
_mmaxvalue = (int)(BA.ObjectToNumber(_props.Get((Object)("Max"))));
 //BA.debugLineNum = 73;BA.debugLine="mLimit(0) = Props.Get(\"LimitLeft\")";
_mlimit[(int) (0)] = (int)(BA.ObjectToNumber(_props.Get((Object)("LimitLeft"))));
 //BA.debugLineNum = 74;BA.debugLine="mLimit(0) = Max(0, mLimit(0))					' we check the";
_mlimit[(int) (0)] = (int) (__c.Max(0,_mlimit[(int) (0)]));
 //BA.debugLineNum = 76;BA.debugLine="mLimit(1) = Props.Get(\"LimitRight\")";
_mlimit[(int) (1)] = (int)(BA.ObjectToNumber(_props.Get((Object)("LimitRight"))));
 //BA.debugLineNum = 77;BA.debugLine="mLimit(1) = Min(mMaxValue, mLimit(1))	' we check";
_mlimit[(int) (1)] = (int) (__c.Min(_mmaxvalue,_mlimit[(int) (1)]));
 //BA.debugLineNum = 79;BA.debugLine="mRadius = Props.Get(\"Radius\")";
_mradius = (double)(BA.ObjectToNumber(_props.Get((Object)("Radius"))));
 //BA.debugLineNum = 80;BA.debugLine="mBackgroundColor = Props.Get(\"BackgroundColor\")";
_mbackgroundcolor.setObject((javafx.scene.paint.Paint)(_props.Get((Object)("BackgroundColor"))));
 //BA.debugLineNum = 81;BA.debugLine="mBackLineColor = Props.Get(\"BackLineColor\")";
_mbacklinecolor.setObject((javafx.scene.paint.Paint)(_props.Get((Object)("BackLineColor"))));
 //BA.debugLineNum = 82;BA.debugLine="mFrontLineColor = Props.Get(\"FrontLineColor\")";
_mfrontlinecolor.setObject((javafx.scene.paint.Paint)(_props.Get((Object)("FrontLineColor"))));
 //BA.debugLineNum = 83;BA.debugLine="End Sub";
return "";
}
public String  _drawbackground() throws Exception{
 //BA.debugLineNum = 151;BA.debugLine="Private Sub DrawBackGround";
 //BA.debugLineNum = 152;BA.debugLine="cvsBack.ClearRect(0, 0, mWidth, mHeight)";
_cvsback.ClearRect(0,0,_mwidth,_mheight);
 //BA.debugLineNum = 153;BA.debugLine="cvsBack.DrawLine(x0, y0, x1, y0, mBackLineColor,";
_cvsback.DrawLine(_x0,_y0,_x1,_y0,(javafx.scene.paint.Paint)(_mbacklinecolor.getObject()),2);
 //BA.debugLineNum = 154;BA.debugLine="End Sub";
return "";
}
public String  _drawcursors() throws Exception{
 //BA.debugLineNum = 156;BA.debugLine="Private Sub DrawCursors";
 //BA.debugLineNum = 158;BA.debugLine="cvsFront.ClearRect(0, 0, cvsFront.Width, cvsFront";
_cvsfront.ClearRect(0,0,_cvsfront.getWidth(),_cvsfront.getHeight());
 //BA.debugLineNum = 161;BA.debugLine="Graph.RunMethod(\"setFill\", Array As Object(mFront";
_graph.RunMethod("setFill",new Object[]{(Object)(_mfrontlinecolor.getObject())});
 //BA.debugLineNum = 162;BA.debugLine="Graph.RunMethod(\"beginPath\", Null)";
_graph.RunMethod("beginPath",(Object[])(__c.Null));
 //BA.debugLineNum = 163;BA.debugLine="Graph.RunMethod(\"moveTo\", Array As Object(Positio";
_graph.RunMethod("moveTo",new Object[]{(Object)(_positionpixels[(int) (0)]),(Object)(_y0)});
 //BA.debugLineNum = 164;BA.debugLine="Graph.RunMethod(\"lineTo\", Array As Object(Positio";
_graph.RunMethod("lineTo",new Object[]{(Object)(_positionpixels[(int) (0)]),(Object)(_y2)});
 //BA.debugLineNum = 165;BA.debugLine="Graph.RunMethod(\"lineTo\", Array As Object(Positio";
_graph.RunMethod("lineTo",new Object[]{(Object)(_positionpixels[(int) (0)]-12),(Object)(_y2)});
 //BA.debugLineNum = 166;BA.debugLine="Graph.RunMethod(\"lineTo\", Array As Object(Positio";
_graph.RunMethod("lineTo",new Object[]{(Object)(_positionpixels[(int) (0)]-12),(Object)(_y1)});
 //BA.debugLineNum = 167;BA.debugLine="Graph.RunMethod(\"fill\", Null)";
_graph.RunMethod("fill",(Object[])(__c.Null));
 //BA.debugLineNum = 170;BA.debugLine="Graph.RunMethod(\"setFill\", Array As Object(mFront";
_graph.RunMethod("setFill",new Object[]{(Object)(_mfrontlinecolor.getObject())});
 //BA.debugLineNum = 171;BA.debugLine="Graph.RunMethod(\"beginPath\", Null)";
_graph.RunMethod("beginPath",(Object[])(__c.Null));
 //BA.debugLineNum = 172;BA.debugLine="Graph.RunMethod(\"moveTo\", Array As Object(Positio";
_graph.RunMethod("moveTo",new Object[]{(Object)(_positionpixels[(int) (1)]),(Object)(_y0)});
 //BA.debugLineNum = 173;BA.debugLine="Graph.RunMethod(\"lineTo\", Array As Object(Positio";
_graph.RunMethod("lineTo",new Object[]{(Object)(_positionpixels[(int) (1)]),(Object)(_y2)});
 //BA.debugLineNum = 174;BA.debugLine="Graph.RunMethod(\"lineTo\", Array As Object(Positio";
_graph.RunMethod("lineTo",new Object[]{(Object)(_positionpixels[(int) (1)]+__c.DipToCurrent((int) (12))),(Object)(_y2)});
 //BA.debugLineNum = 175;BA.debugLine="Graph.RunMethod(\"lineTo\", Array As Object(Positio";
_graph.RunMethod("lineTo",new Object[]{(Object)(_positionpixels[(int) (1)]+__c.DipToCurrent((int) (12))),(Object)(_y1)});
 //BA.debugLineNum = 176;BA.debugLine="Graph.RunMethod(\"fill\", Null)";
_graph.RunMethod("fill",(Object[])(__c.Null));
 //BA.debugLineNum = 179;BA.debugLine="cvsFront.DrawLine(PositionPixels(0), y0, Position";
_cvsfront.DrawLine(_positionpixels[(int) (0)],_y0,_positionpixels[(int) (1)],_y0,(javafx.scene.paint.Paint)(_mfrontlinecolor.getObject()),__c.DipToCurrent((int) (3)));
 //BA.debugLineNum = 180;BA.debugLine="End Sub";
return "";
}
public anywheresoftware.b4j.objects.JFX.PaintWrapper  _getbacklinecolor() throws Exception{
 //BA.debugLineNum = 338;BA.debugLine="Public Sub getBackLineColor As Paint";
 //BA.debugLineNum = 339;BA.debugLine="Return mBackLineColor";
if (true) return _mbacklinecolor;
 //BA.debugLineNum = 340;BA.debugLine="End Sub";
return null;
}
public anywheresoftware.b4j.objects.JFX.PaintWrapper  _getfrontlinecolor() throws Exception{
 //BA.debugLineNum = 350;BA.debugLine="Public Sub getFrontLineColor As Paint";
 //BA.debugLineNum = 351;BA.debugLine="Return mFrontLineColor";
if (true) return _mfrontlinecolor;
 //BA.debugLineNum = 352;BA.debugLine="End Sub";
return null;
}
public int  _getheight() throws Exception{
 //BA.debugLineNum = 317;BA.debugLine="Public Sub getHeight As Int";
 //BA.debugLineNum = 318;BA.debugLine="Return ltbPanelBack.Height";
if (true) return (int) (_ltbpanelback.getHeight());
 //BA.debugLineNum = 319;BA.debugLine="End Sub";
return 0;
}
public int  _getleft() throws Exception{
 //BA.debugLineNum = 276;BA.debugLine="Public Sub getLeft As Int";
 //BA.debugLineNum = 277;BA.debugLine="Return ltbPanelBack.Left";
if (true) return (int) (_ltbpanelback.getLeft());
 //BA.debugLineNum = 278;BA.debugLine="End Sub";
return 0;
}
public int  _getlimitleft() throws Exception{
 //BA.debugLineNum = 255;BA.debugLine="Public Sub getLimitLeft As Int";
 //BA.debugLineNum = 256;BA.debugLine="Return mLimit(0)";
if (true) return _mlimit[(int) (0)];
 //BA.debugLineNum = 257;BA.debugLine="End Sub";
return 0;
}
public int  _getlimitright() throws Exception{
 //BA.debugLineNum = 267;BA.debugLine="Public Sub getLimitRight As Int";
 //BA.debugLineNum = 268;BA.debugLine="Return mLimit(1)";
if (true) return _mlimit[(int) (1)];
 //BA.debugLineNum = 269;BA.debugLine="End Sub";
return 0;
}
public int  _getmax() throws Exception{
 //BA.debugLineNum = 243;BA.debugLine="Public Sub getMax As Int";
 //BA.debugLineNum = 244;BA.debugLine="Return mMaxValue";
if (true) return _mmaxvalue;
 //BA.debugLineNum = 245;BA.debugLine="End Sub";
return 0;
}
public int  _gettop() throws Exception{
 //BA.debugLineNum = 285;BA.debugLine="Public Sub getTop As Int";
 //BA.debugLineNum = 286;BA.debugLine="Return ltbPanelBack.Top";
if (true) return (int) (_ltbpanelback.getTop());
 //BA.debugLineNum = 287;BA.debugLine="End Sub";
return 0;
}
public boolean  _getvisible() throws Exception{
 //BA.debugLineNum = 326;BA.debugLine="Public Sub getVisible As Boolean";
 //BA.debugLineNum = 327;BA.debugLine="Return ltbPanelBack.Visible";
if (true) return _ltbpanelback.getVisible();
 //BA.debugLineNum = 328;BA.debugLine="End Sub";
return false;
}
public int  _getwidth() throws Exception{
 //BA.debugLineNum = 301;BA.debugLine="Public Sub getWidth As Int";
 //BA.debugLineNum = 302;BA.debugLine="Return ltbPanelBack.Width";
if (true) return (int) (_ltbpanelback.getWidth());
 //BA.debugLineNum = 303;BA.debugLine="End Sub";
return 0;
}
public String  _initclass() throws Exception{
 //BA.debugLineNum = 115;BA.debugLine="Private Sub InitClass";
 //BA.debugLineNum = 117;BA.debugLine="CSSUtils.SetBackgroundColor(ltbPanelBack, mBackgr";
_cssutils._setbackgroundcolor((anywheresoftware.b4j.objects.NodeWrapper.ConcreteNodeWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4j.objects.NodeWrapper.ConcreteNodeWrapper(), (javafx.scene.Node)(_ltbpanelback.getObject())),_mbackgroundcolor);
 //BA.debugLineNum = 118;BA.debugLine="CSSUtils.SetBorder(ltbPanelBack, 0, mBackgroundCo";
_cssutils._setborder((anywheresoftware.b4j.objects.NodeWrapper.ConcreteNodeWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4j.objects.NodeWrapper.ConcreteNodeWrapper(), (javafx.scene.Node)(_ltbpanelback.getObject())),0,_mbackgroundcolor,_mradius);
 //BA.debugLineNum = 121;BA.debugLine="cvsBack.Initialize(\"cvsBack\")";
_cvsback.Initialize(ba,"cvsBack");
 //BA.debugLineNum = 122;BA.debugLine="ltbPanelBack.AddNode(cvsBack, 0, 0, mWidth, mHeig";
_ltbpanelback.AddNode((javafx.scene.Node)(_cvsback.getObject()),0,0,_mwidth,_mheight);
 //BA.debugLineNum = 126;BA.debugLine="cvsFront.Initialize(\"cvsFront\")";
_cvsfront.Initialize(ba,"cvsFront");
 //BA.debugLineNum = 127;BA.debugLine="ltbPanelBack.AddNode(cvsFront, 0, 0, mWidth, mHei";
_ltbpanelback.AddNode((javafx.scene.Node)(_cvsfront.getObject()),0,0,_mwidth,_mheight);
 //BA.debugLineNum = 130;BA.debugLine="jCanvasFront = cvsFront";
_jcanvasfront.setObject((java.lang.Object)(_cvsfront.getObject()));
 //BA.debugLineNum = 131;BA.debugLine="Graph = jCanvasFront.RunMethod(\"getGraphicsContex";
_graph.setObject((java.lang.Object)(_jcanvasfront.RunMethod("getGraphicsContext2D",(Object[])(__c.Null))));
 //BA.debugLineNum = 134;BA.debugLine="setMax(mMaxValue)";
_setmax(_mmaxvalue);
 //BA.debugLineNum = 136;BA.debugLine="DrawBackGround";
_drawbackground();
 //BA.debugLineNum = 137;BA.debugLine="End Sub";
return "";
}
public String  _initcursors() throws Exception{
 //BA.debugLineNum = 139;BA.debugLine="Private Sub InitCursors";
 //BA.debugLineNum = 140;BA.debugLine="x0 = mMargin";
_x0 = _mmargin;
 //BA.debugLineNum = 141;BA.debugLine="x1 = mWidth - mMargin";
_x1 = _mwidth-_mmargin;
 //BA.debugLineNum = 142;BA.debugLine="mScale = (x1 - x0) / mMaxValue";
_mscale = (_x1-_x0)/(double)_mmaxvalue;
 //BA.debugLineNum = 143;BA.debugLine="PositionPixels(0) = mLimit(0) * mScale + x0";
_positionpixels[(int) (0)] = _mlimit[(int) (0)]*_mscale+_x0;
 //BA.debugLineNum = 144;BA.debugLine="PositionPixels(1) = mLimit(1) * mScale + x0";
_positionpixels[(int) (1)] = _mlimit[(int) (1)]*_mscale+_x0;
 //BA.debugLineNum = 146;BA.debugLine="y0 = 0.2 * mHeight";
_y0 = 0.2*_mheight;
 //BA.debugLineNum = 147;BA.debugLine="y1 = y0 + 8dip + 0.05 * mHeight";
_y1 = _y0+__c.DipToCurrent((int) (8))+0.05*_mheight;
 //BA.debugLineNum = 148;BA.debugLine="y2 = 0.9 * mHeight";
_y2 = 0.9*_mheight;
 //BA.debugLineNum = 149;BA.debugLine="End Sub";
return "";
}
public String  _initialize(anywheresoftware.b4a.BA _ba,Object _callback,String _eventname) throws Exception{
innerInitialize(_ba);
 //BA.debugLineNum = 49;BA.debugLine="Public Sub Initialize(Callback As Object, EventNam";
 //BA.debugLineNum = 50;BA.debugLine="mCallback = Callback";
_mcallback = _callback;
 //BA.debugLineNum = 51;BA.debugLine="mEventName = EventName";
_meventname = _eventname;
 //BA.debugLineNum = 54;BA.debugLine="mBackgroundColor = fx.Colors.Blue";
_mbackgroundcolor.setObject((javafx.scene.paint.Paint)(_fx.Colors.Blue));
 //BA.debugLineNum = 55;BA.debugLine="mBackLineColor = fx.Colors.Black";
_mbacklinecolor.setObject((javafx.scene.paint.Paint)(_fx.Colors.Black));
 //BA.debugLineNum = 56;BA.debugLine="mFrontLineColor = fx.Colors.RGB(51, 181, 229)";
_mfrontlinecolor.setObject((javafx.scene.paint.Paint)(_fx.Colors.RGB((int) (51),(int) (181),(int) (229))));
 //BA.debugLineNum = 57;BA.debugLine="mMargin = 15";
_mmargin = 15;
 //BA.debugLineNum = 58;BA.debugLine="mMaxValue = 100";
_mmaxvalue = (int) (100);
 //BA.debugLineNum = 59;BA.debugLine="mLimit(0) = 0";
_mlimit[(int) (0)] = (int) (0);
 //BA.debugLineNum = 60;BA.debugLine="mLimit(1) = mMaxValue";
_mlimit[(int) (1)] = _mmaxvalue;
 //BA.debugLineNum = 61;BA.debugLine="End Sub";
return "";
}
public String  _setbacklinecolor(anywheresoftware.b4j.objects.JFX.PaintWrapper _backlinecolor) throws Exception{
 //BA.debugLineNum = 331;BA.debugLine="Public Sub setBackLineColor(BackLineColor As Paint";
 //BA.debugLineNum = 332;BA.debugLine="mBackLineColor = BackLineColor";
_mbacklinecolor = _backlinecolor;
 //BA.debugLineNum = 333;BA.debugLine="If ltbPanelBack.IsInitialized Then";
if (_ltbpanelback.IsInitialized()) { 
 //BA.debugLineNum = 334;BA.debugLine="DrawBackGround";
_drawbackground();
 };
 //BA.debugLineNum = 336;BA.debugLine="End Sub";
return "";
}
public String  _setfrontlinecolor(anywheresoftware.b4j.objects.JFX.PaintWrapper _frontlinecolor) throws Exception{
 //BA.debugLineNum = 343;BA.debugLine="Public Sub setFrontLineColor(FrontLineColor As Pai";
 //BA.debugLineNum = 344;BA.debugLine="mFrontLineColor = FrontLineColor";
_mfrontlinecolor = _frontlinecolor;
 //BA.debugLineNum = 345;BA.debugLine="If ltbPanelBack.IsInitialized Then";
if (_ltbpanelback.IsInitialized()) { 
 //BA.debugLineNum = 346;BA.debugLine="DrawCursors";
_drawcursors();
 };
 //BA.debugLineNum = 348;BA.debugLine="End Sub";
return "";
}
public String  _setheight(int _height) throws Exception{
 //BA.debugLineNum = 306;BA.debugLine="Public Sub setHeight(Height As Int)";
 //BA.debugLineNum = 307;BA.debugLine="mHeight = Max(Height, 30)";
_mheight = __c.Max(_height,30);
 //BA.debugLineNum = 308;BA.debugLine="ltbPanelBack.PrefHeight = mHeight";
_ltbpanelback.setPrefHeight(_mheight);
 //BA.debugLineNum = 309;BA.debugLine="cvsBack.PrefHeight = mHeight";
_cvsback.setPrefHeight(_mheight);
 //BA.debugLineNum = 310;BA.debugLine="cvsFront.PrefHeight = mHeight";
_cvsfront.setPrefHeight(_mheight);
 //BA.debugLineNum = 312;BA.debugLine="InitCursors";
_initcursors();
 //BA.debugLineNum = 313;BA.debugLine="DrawBackGround";
_drawbackground();
 //BA.debugLineNum = 314;BA.debugLine="DrawCursors";
_drawcursors();
 //BA.debugLineNum = 315;BA.debugLine="End Sub";
return "";
}
public String  _setleft(int _left) throws Exception{
 //BA.debugLineNum = 272;BA.debugLine="Public Sub setLeft(Left As Int)";
 //BA.debugLineNum = 273;BA.debugLine="ltbPanelBack.Left = Left";
_ltbpanelback.setLeft(_left);
 //BA.debugLineNum = 274;BA.debugLine="End Sub";
return "";
}
public String  _setlimitleft(int _pos) throws Exception{
 //BA.debugLineNum = 248;BA.debugLine="Public Sub setLimitLeft(Pos As Int)";
 //BA.debugLineNum = 250;BA.debugLine="mLimit(0) = Max(0, Pos)";
_mlimit[(int) (0)] = (int) (__c.Max(0,_pos));
 //BA.debugLineNum = 251;BA.debugLine="InitCursors";
_initcursors();
 //BA.debugLineNum = 252;BA.debugLine="DrawCursors";
_drawcursors();
 //BA.debugLineNum = 253;BA.debugLine="End Sub";
return "";
}
public String  _setlimitright(int _pos) throws Exception{
 //BA.debugLineNum = 260;BA.debugLine="Public Sub setLimitRight(Pos As Int)";
 //BA.debugLineNum = 262;BA.debugLine="mLimit(1) = Min(mMaxValue, Pos)";
_mlimit[(int) (1)] = (int) (__c.Min(_mmaxvalue,_pos));
 //BA.debugLineNum = 263;BA.debugLine="InitCursors";
_initcursors();
 //BA.debugLineNum = 264;BA.debugLine="DrawCursors";
_drawcursors();
 //BA.debugLineNum = 265;BA.debugLine="End Sub";
return "";
}
public String  _setmax(int _maxvalue) throws Exception{
 //BA.debugLineNum = 237;BA.debugLine="Public Sub setMax(MaxValue As Int)";
 //BA.debugLineNum = 238;BA.debugLine="mMaxValue = MaxValue";
_mmaxvalue = _maxvalue;
 //BA.debugLineNum = 239;BA.debugLine="InitCursors";
_initcursors();
 //BA.debugLineNum = 240;BA.debugLine="DrawCursors";
_drawcursors();
 //BA.debugLineNum = 241;BA.debugLine="End Sub";
return "";
}
public String  _settop(int _top) throws Exception{
 //BA.debugLineNum = 281;BA.debugLine="Public Sub setTop(Top As Int)";
 //BA.debugLineNum = 282;BA.debugLine="ltbPanelBack.Top = Top";
_ltbpanelback.setTop(_top);
 //BA.debugLineNum = 283;BA.debugLine="End Sub";
return "";
}
public String  _setvisible(boolean _isvisible) throws Exception{
 //BA.debugLineNum = 322;BA.debugLine="Public Sub setVisible(IsVisible As Boolean)";
 //BA.debugLineNum = 323;BA.debugLine="ltbPanelBack.Visible = IsVisible";
_ltbpanelback.setVisible(_isvisible);
 //BA.debugLineNum = 324;BA.debugLine="End Sub";
return "";
}
public String  _setwidth(int _width) throws Exception{
 //BA.debugLineNum = 290;BA.debugLine="Public Sub setWidth(Width As Int)";
 //BA.debugLineNum = 291;BA.debugLine="mWidth = Width";
_mwidth = _width;
 //BA.debugLineNum = 292;BA.debugLine="ltbPanelBack.PrefWidth = mWidth";
_ltbpanelback.setPrefWidth(_mwidth);
 //BA.debugLineNum = 293;BA.debugLine="cvsBack.PrefWidth = mWidth";
_cvsback.setPrefWidth(_mwidth);
 //BA.debugLineNum = 294;BA.debugLine="cvsFront.PrefWidth = mWidth";
_cvsfront.setPrefWidth(_mwidth);
 //BA.debugLineNum = 296;BA.debugLine="InitCursors";
_initcursors();
 //BA.debugLineNum = 297;BA.debugLine="DrawBackGround";
_drawbackground();
 //BA.debugLineNum = 298;BA.debugLine="setMax(mMaxValue)";
_setmax(_mmaxvalue);
 //BA.debugLineNum = 299;BA.debugLine="End Sub";
return "";
}
public Object callSub(String sub, Object sender, Object[] args) throws Exception {
BA.senderHolder.set(sender);
return BA.SubDelegator.SubNotFound;
}
}
