use of com.extjs.gxt.ui.client.widget.menu.MenuItem in project activityinfo by bedatadriven.
the class ExportMenuButton method setFormats.
public void setFormats(List<RenderElement.Format> formats) {
this.formats = formats;
setIcon(formatIcon(formats.get(0)));
menu.removeAll();
for (RenderElement.Format format : formats) {
MenuItem word = new MenuItem(formatLabel(format), formatIcon(format), menuListener);
word.setData("format", format);
menu.add(word);
}
}
use of com.extjs.gxt.ui.client.widget.menu.MenuItem in project activityinfo by bedatadriven.
the class DbEditorMenu method newMenuItem.
private MenuItem newMenuItem(String itemId, String label, AbstractImagePrototype icon, SelectionListener<MenuEvent> listener) {
final MenuItem newMenuItem = new MenuItem(label, icon, listener);
newMenuItem.setItemId(itemId);
return newMenuItem;
}
use of com.extjs.gxt.ui.client.widget.menu.MenuItem in project activityinfo by bedatadriven.
the class SaveMenuButton method setMethods.
public void setMethods(List<SaveMethod> methods) {
this.methods = methods;
setIcon(IconImageBundle.ICONS.save());
menu.removeAll();
for (SaveMethod method : methods) {
MenuItem word = new MenuItem(formatLabel(method), IconImageBundle.ICONS.save(), menuListener);
word.setData("method", method);
menu.add(word);
}
}
use of com.extjs.gxt.ui.client.widget.menu.MenuItem in project activityinfo by bedatadriven.
the class ReportPortlet method addOptionsMenu.
private void addOptionsMenu() {
final Menu optionsMenu = new Menu();
optionsMenu.add(new MenuItem(I18N.CONSTANTS.edit(), IconImageBundle.ICONS.edit(), new SelectionListener<MenuEvent>() {
@Override
public void componentSelected(MenuEvent ce) {
edit();
}
}));
optionsMenu.add(new MenuItem(I18N.CONSTANTS.removeFromDashboard(), IconImageBundle.ICONS.remove(), new SelectionListener<MenuEvent>() {
@Override
public void componentSelected(MenuEvent ce) {
removeFromDashboard();
}
}));
final ToolButton gear = new ToolButton("x-tool-gear", new SelectionListener<IconButtonEvent>() {
@Override
public void componentSelected(IconButtonEvent ce) {
optionsMenu.show(ce.getComponent());
}
});
getHeader().addTool(gear);
}
Aggregations