LWUIT Container capture event

86 views Asked by At

I have a Containerwith so many Labels added inside it. When I try to capture the pointerReleased event in this Container, I have found some problems. The event only is captured when I released in the free area of the Container, no when I made the release over the Labels. Is there any way to encapsulate this event? I mean when I will do the realase over the main Container(instead I'm on a Label), the event must be launched.

Here you can take a look at my Container

Container Image

2

There are 2 answers

1
Shai Almog On

You should look at the lead component feature added in LWUIT 1.5, it allows you to define a component that manages the entire hierarchy of container/component and all events for every component in the hierarchy are sent to it.

This adds another benefit of handling the style synchronization between all the different elements (e.g. if you use a button all components will become pressed together).

0
Mun0n On

I dont' find any cool solution, so finally I propagate the pointerReleased from the Labelsto the Container.