Only the top-most component in a StackPane will receive mouse events. However, every container has a built-in z-order that dictates the order in which components are painted as well as which will receive mouse events. The z-order is defined by the order of the components within the container itself (since Container implements Sequence<Component>).
Sounds like you probably may to write your own layout container (or possibly use the Panel container, which supports absolute layout; i.e. no layout management). G On Sep 27, 2010, at 4:18 AM, Superstring Media wrote: > The Pivot API says the OverlayDecorator can not process events because it is > strictly visual. This is okay in some use cases but what I'm looking for is a > way to create a layered stack of components (panels, image-views, etc) that > can also use contextual editors which are over laid on top of all nested > layers. > > For my editing scenario a foreground glasspane layer for interaction (event > processing) and intermediate rendering, a middle layer used only for > rendering of accepted content (musical notation notes and symbols) and a > background layer used only for displaying rendered music staff lines and an > optional color or image are needed. Any of the layers should have the option > to render their specific graphics but have transparent backgrounds so that > they contain what has been rendered on them but allow the layers below them > to be seen. These Photoshop type layers nicely separate the concerns of music > Z order layout and also reduce the amount of painting required when editing. > > On the foreground layer it should also be possible to render temporary > contextual icons and other small editors over top of all layers (they > automatically appear as a result of hit detection when hovering over the > interact-layer and are erased as the cursor moves away from a qualifying hit > location). These icons and editors need to be able to process events so > decorators do not look like they are suited. Maybe it would be best if the > editors could be separate Pivot drawings floating over top with the ability > to process events? If this is not possible then maybe I'd have to do my own > hit tracking using only a decorator? > > Can Pivot support a stack of layers and the over laying editors that follow > the cursor around as qualifying hit locations are found? What would be the > best way to achieve the nested layer surface that can also utilize the > contextual editors? Where is the transparency amount set on the different > components? Are components in a StackPane just automatically transparent? > > Superstring
