Should the processEventXXX method should be in the UI? Why not in JXLayer?
Let's say I want to swap different UIs depending on whether let's say the component is focused or not.
But, since the processFocusEvent method is at the UI layer itself (not in JXLayer), that seems somewhat cumbersome to do. Basically instead of handling the focused gained/lost events in JXLayer, I have to do it in the current UI layer and then tell its parent (i.e. the JXLayer) to swap the UI to a different one.
Seems a bit illogical for the child to tell the parent to swap it for a different child. Shouldn't this be purely the responsibility of the parent (i.e. the JXLayer)?
P.S. Yes, I know you can do the scenario mentioned above just by switching the layer effects to use let's say BlurFilter. But let's say I want to do something bigger like switch from a LockableUI to an ImageOpUI, depending on an event...I can't seem to add any event listeners at the JXLayer to let it swap/handle any LayerUIs it has at its disposal...
Message was edited by: jacek