Event target of mouse and drag-detected events

Werner Lehmann lehmann at media-interactive.de
Tue May 28 09:42:41 PDT 2013

Hi Pavel,

I like marking those controls with a property. UserData I would leave 
for external usage. I think it is a property anyway.

The main problem here is that this is a container for arbitrary nodes, 
including other containers. I can watch for changes in my list of 
immediate children but won't know about new children added to those. I 
can watch the subgraph with many listeners for 
Parent.childrenUnmodifiable and Parent.parent but still cannot 
generically know if a child node belongs to a skin or not: Pane children 
would be marked, ScrollPane children should not be marked.

The other option, adding all kinds of listeners directly on the nested 
child controls, has the same problem: I don't know when somebody adds a 
label to a vbox contained in my control so I cannot add listeners to the 

Seems as if there is just no way of having centralized mouse/key/drag 
event filters for all (nested) non-skin child nodes. Unless I introduce 
an explicit observable list of those nodes. This would be redundant and 
I cannot force users to actually keep it up-to-date.

Maybe I require a marker interface or annotation on child nodes instead. 
Forcing users to subclass each label, textfield, etc. I would have 
preferred to keep this as unobtrusive and versatile as possible.


On 27.05.2013 16:25, Pavel Safrata wrote:
> Hi Werner,
> so you need to distinguish "your" controls from "system" controls. Can
> you mark your controls somehow? For instance by node property or style
> or perhaps even userData or id?
> Regards,
> Pavel

More information about the openjfx-dev mailing list