View Full Version : Menu's needed for Icon's, especially in Header class

3 Feb 2010, 3:00 PM
A common requirement in (web) desktop applications is that a user can click on the application window icon in the upper left corner of the app view and a menu shows up to close, minimize, move, etc. the window. at least this is common in windows and linux.

unfortunately gxt doesn't provide the option to put a menu on the Icon (which is just an AbstractImagePrototype) in the Header of i.e. a Window or ContentPanel.

My quick hack attempt goes sth. like this but it's not finished and not working:

Icons icons = GWT.create(Icons.class);
Image image = new Image(icons.document());

WidgetComponent wc = new WidgetComponent(image);
wc.addListener(Events.DoubleClick, new Listener<ComponentEvent>() {

public void handleEvent(final ComponentEvent be) {
MessageBox.alert("now show a menu below the icon TODO but this msgbox is never loaded", "bla", null);
} });


Has anybody else already solved this and would be so kind to share his idea/solution/code? I also think this functionality (maybe adding a menu to any icon) belongs into the base functionality of a framework like gxt.