MessageBox by Dieter Steinwedel

*** Please vote and propose it for Vaadin core. Version 1.1.x: Vaadin 6.7+ Version 2.x.x: Vaadin 7+ DESCRIPTION AND FEATURES MessageBox is a flexible utility class for generating different styles of messageboxes. The messagebox is typically a modal dialog, with an icon on the left side, a message on the right of the icon and some buttons on the bottom of the dialog. E.g. you can define/customize * the window caption * different types of icons (see Icon) * a message as plain string or HTML or with a custom component * which and how many buttons are placed on the dialog * the icon and appearance of the buttons * the buttons alignment (left, centered, right) * one simple event listener (see MessageBoxListener) for all buttons Now, real I18n is supported via java.util.ResourceBundle. Even a new feature is, that the dialog size is determined automatically from the message itself - but it can be overridden explicitly, if required. You need less code to show a messagebox in compare to version 1.x of this add-on. Even the naming, packaging and javadoc has been improved. USAGE MessageBox.showPlain(Icon.INFO, "Example 1", "Hello World!", ButtonId.OK); This example shows a simple message dialog, with "Example 1" as dialog caption, an info icon, "Hello World!" as message and an "Ok" labeled button. The dialog is displayed modally. To receive an event of the pressed button, add an event listener (see MessageBoxListener). You can find the complete demo at sourceforge. The demo contains many examples, to show most of the possible use cases. But there are many more ways to display and customize a messagebox. LICENSE The licenses are suitable for commercial usage. Code license: Apache License 2.0 Dialog icons: * Author: Dieter Steinwedel * License: Creative Commons Attribution 2.5 License Button icons: * Author: Mark James * URL: http://www.famfamfam.com/lab/icons/silk/ * License: Creative Commons Attribution 2.5 License

Please enable JavaScript for the full featured version of this page.