B4J Library jReflection library

Discussion in 'B4J Libraries & Classes' started by agraham, Dec 8, 2013.

  1. agraham

    agraham Expert Licensed User

    I already converted this library but I wasn't going to bother posting it as we have the JavaObject library. However user Theera appears to want it so here it is.

    EDIT :- Version 1.1 now posted. See post #4 for details.

    EDIT :- Version 1.2 now posted. See post #5 for details.
     

    Attached Files:

    Last edited: Dec 22, 2013
  2. positrom2

    positrom2 Active Member Licensed User

  3. agraham

    agraham Expert Licensed User

    Not by Reflection but I may have another way in a short while ;)
     
  4. agraham

    agraham Expert Licensed User

    Version 1.1 now posted adds two new methods to a Reflector. The comments in the xml have (a little) more information about them.

    AddChangeListener adds an event to a specified property of a target node so that the event is raised when the value of the property changes. The demo in the archive shows an event being raised when the text of a Label is changed. You will need to poke around the Javadoc of the native node type to see what changes a particular type of node supports - or you could ask on the forum!


    AddEventHandler adds an event to a specified target node. The demo in the archive shows a Button and the root Pane both monitoring keyboard key presses. You will need to poke around the Javadoc of the native node type to see what events are supported; usually only those of the base Node class - or you could ask on the forum!
     
    thedesolatesoul, Erel and stevel05 like this.
  5. agraham

    agraham Expert Licensed User

    Version 1.2 now posted adds AddEventFilter and AddEventHandler2 and some stack trace inspection methods. Note that the original AddEventHandler is renamed to AddEventHandler2.

    In JavaFX events start at the root of the scene graph and "filter" down to the individual nodes and then "bubble" back up to the root node again. An event filter can consume an event to stop it reaching any children and an event handler can consume an event to stop it reaching any parent.

    Using filters and handlers any node can monitor which events are occurring. For example the demo shows the root pane monitoring all keyboard events.
     
    Last edited: Dec 31, 2013
    raphaelcno and jmon like this.
  6. hookshy

    hookshy Well-Known Member Licensed User

    I have used this library to mouve nodes on screen using keyboard...
    The log keycode works but ..my problem is that pressing up and down arrows are catch by tab switch of a tabpane ...

    Any clues how can I disable the switching pane window ?


    it seems that e.consume solves this problem but I can not fill text in edit text any more

    so the problem is to solve only the switching tabs
     
    Last edited: Sep 17, 2014
  7. swissmade

    swissmade Active Member Licensed User

    Nice one agraham just need this.
    Many thanks;);););););):)
     
  8. juergen_pool

    juergen_pool Member Licensed User

    It is possible to have some touchevents in the future (SWIPE etc.)?
     
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