vaadin/vaadin — pull request #3 by dnebinger (2013-04-22 03:14:20+00:00)
Title: Minor MenuBar and TabSheet enhancement...

I have been working on i18n support in Vaadin widgets by extending the Vaadin classes and using the incoming captions as resource bundle keys.

In most respects this works like a charm.

The exception is the MenuBar and TabSheet classes. In their addXxx() methods, they internally instantiate instances of internal classes. In order to subclass these objects, I must replace the body of the addXxx() methods completely, thus risking compatibility with future Vaadin releases.

By moving the instantiation to separate createMenuItem() and createTab() methods, I could easily subclass MenuBar and TabSheet without having to replicate a large chunk of Vaadin code.