B4J Library jGauges

Discussion in 'B4J Libraries & Classes' started by Erel, Aug 31, 2016.

  1. Erel

    Erel Administrator Staff Member Licensed User

    [​IMG]

    This is a wrapper for Medusa gauges library: https://github.com/HanSolo/Medusa
    License: https://github.com/HanSolo/Medusa/blob/master/license.txt

    It includes many types of gauges. The gauges are implemented as custom views.

    The gauges can be further customized. You can use JavaObject to access the various methods (see the source code of Gauge.java: https://github.com/HanSolo/Medusa/blob/master/src/main/java/eu/hansolo/medusa/Gauge.java).

    Library: www.b4x.com/b4j/files/jGauges.zip

    Example is attached.
     

    Attached Files:

    ZJP, Procesor, GMan and 26 others like this.
  2. Mashiane

    Mashiane Expert Licensed User

    Wow, this is brilliant...
     
  3. rbghongade

    rbghongade Active Member Licensed User

    Erel, that is truly fantastic! Wanted guages desperately! You are a mind-reader!
     
  4. vfafou

    vfafou Active Member Licensed User

    Truly needed for a newcoming telemetry project!
    Thank you Erel... You' ve just made me drop Microsoft Visual Studio once more!
     
    Erel likes this.
  5. rbghongade

    rbghongade Active Member Licensed User

    Dear Erel,
    Any possibility of creating the same library for B4A?
     
    Beja likes this.
  6. Erel

    Erel Administrator Staff Member Licensed User

    This library is based on a JavaFX project. It cannot be ported to Android.
     
  7. Harris

    Harris Well-Known Member Licensed User

    Hummm, wonder if these would be accessible in ABMaterial?
     
  8. Erel

    Erel Administrator Staff Member Licensed User

    No. These are JavaFX controls.
     
    Harris likes this.
  9. sz4t4n

    sz4t4n Member Licensed User

    it's fantastic!

    I have one question. Is there posibility to set min and max value in code or only in designer?
     
  10. Erel

    Erel Administrator Staff Member Licensed User

    You can use this code to set those values:
    Code:
    Dim minValue, maxValue As Double 'type is important
    minValue = 10
    maxValue = 
    200
    Dim jo As JavaObject = Gauge1
    jo.RunMethod(
    "setMinValue"Array(minValue))
    jo.RunMethod(
    "setMaxValue"Array(maxValue))
     
    jinyistudio likes this.
  11. sz4t4n

    sz4t4n Member Licensed User

    It's works perfect. One more question :) Where can i find all methods in this library? I have to look into source code?
     
  12. Erel

    Erel Administrator Staff Member Licensed User

    Yes.
     
  13. luke2012

    luke2012 Well-Known Member Licensed User

    Wonderful library! Is there a version (like this) for B4A ?
     
  14. Erel

    Erel Administrator Staff Member Licensed User

  15. micro

    micro Well-Known Member Licensed User

    Hi to all
    erel this is a fantastic library!
    Only a question:
    how to change the color of the percentage in the gauge object with skin LEVEL?
    The default color is white
    Thanks
     
  16. Erel

    Erel Administrator Staff Member Licensed User

    [​IMG]

    Code:
    Dim jo As JavaObject = Gauge1
    jo.RunMethod(
    "setValueColor"Array(fx.Colors.Red))
     
    Beja likes this.
  17. micro

    micro Well-Known Member Licensed User

    Thanks erel
     
  18. alienhunter

    alienhunter Active Member Licensed User

    There is a new update to this ;)
     
  19. CHAUVET

    CHAUVET Member Licensed User

    Thanks Erel,

    Hi evrybody,

    How can I find the list of methods available in this library?
    I do not know how to search in a library source code.
    sz4t4n did you find the list of methods in source code ? If so, do you have this list?
    thanks in advance
     
  20. jmon

    jmon Well-Known Member Licensed User

    I have a question, Can I add these gauges at run-time, by code? If not, can I kindly ask for the source of the wrapper, so I can modify it? Thank you.

    See this link:
    https://github.com/HanSolo/Medusa/blob/master/src/main/java/eu/hansolo/medusa/Gauge.java
    A method is anything named like this:
    you can call that method like this:
    Code:
    Dim jo As JavaObject = Gauge1
    jo.RunMethod(
    "setMinValue"Array(0.0))
    This will set the min value to 0.0

    to get:
    Code:
    Dim jo As JavaObject = Gauge1
    Dim Value As Double = jo.RunMethod("getMinValue"Null)
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice