mgwt

How to create an mgwt widget which extends from FlexPanel and TouchWidget


I have several escenarios where some mgwt widgets which do not extend TouchWidget need to be "touchable", for instance ScrollPanel or FlexPanel.

One scenario is a full screen widget wich reacts when user touches it and shows a popup.

Java do not let extending two classes, so I want to reuse code from both the widget and the TouchWidget (which has a final static TouchWidgetImpl in it)

Thanks


Solution

  • You don't need to make a FlexPanel into a TouchWidget. You can add a TouchWidget to a FlexPanel, and let it occupy the entire screen.