B4J Library jReflection library

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.
 

Attachments

  • jReflectionDemo1.2.zip
    16.5 KB · Views: 4,486
Last edited:

agraham

Expert
Licensed User
Longtime 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!
 

agraham

Expert
Licensed User
Longtime 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:

hookshy

Well-Known Member
Licensed User
Longtime 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:

Swissmade

Well-Known Member
Licensed User
Longtime User
Nice one agraham just need this.
Many thanks;);););););):)
 
Top