use of org.gwtbootstrap3.client.ui.DropDownMenu in project kie-wb-common by kiegroup.
the class ExplorerMenuViewImpl method asMenu.
@Override
public Menus asMenu() {
return MenuFactory.newTopLevelCustomMenu(new MenuFactory.CustomMenuBuilder() {
@Override
public void push(MenuFactory.CustomMenuBuilder element) {
}
@Override
public MenuItem build() {
return new BaseMenuCustom() {
@Override
public Widget build() {
return new ButtonGroup() {
{
add(new Button() {
{
setToggleCaret(false);
setDataToggle(Toggle.DROPDOWN);
setIcon(IconType.COG);
setSize(ButtonSize.SMALL);
setTitle(ProjectExplorerConstants.INSTANCE.customizeView());
}
});
add(new DropDownMenu() {
{
addStyleName("pull-right");
add(businessView);
add(techView);
add(new Divider());
add(breadcrumbExplorer);
add(treeExplorer);
add(new Divider());
add(showTagFilter);
add(new Divider());
add(archiveProject);
}
});
}
};
}
};
}
}).endMenu().newTopLevelCustomMenu(new MenuFactory.CustomMenuBuilder() {
@Override
public void push(MenuFactory.CustomMenuBuilder element) {
}
@Override
public MenuItem build() {
return new BaseMenuCustom() {
@Override
public Widget build() {
return new Button() {
{
setIcon(IconType.REFRESH);
setSize(ButtonSize.SMALL);
setTitle(ProjectExplorerConstants.INSTANCE.refresh());
addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
presenter.onRefresh();
}
});
}
};
}
};
}
}).endMenu().build();
}
use of org.gwtbootstrap3.client.ui.DropDownMenu in project kie-wb-common by kiegroup.
the class ProjectDiagramEditorMenuItemsBuilder method newExportsItem.
public MenuItem newExportsItem(final Command exportPNGCommand, final Command exportJPGCommand, final Command exportPDFCommand, final Command exportBPMNCommand) {
final DropDownMenu menu = new DropDownMenu() {
{
setPull(Pull.RIGHT);
}
};
menu.add(new AnchorListItem(translationService.getValue(CoreTranslationMessages.EXPORT_PNG)) {
{
setIcon(IconType.FILE_IMAGE_O);
setIconPosition(IconPosition.LEFT);
setTitle(translationService.getValue(CoreTranslationMessages.EXPORT_PNG));
addClickHandler(event -> exportPNGCommand.execute());
}
});
menu.add(new AnchorListItem(translationService.getValue(CoreTranslationMessages.EXPORT_JPG)) {
{
setIcon(IconType.FILE_IMAGE_O);
setIconPosition(IconPosition.LEFT);
setTitle(translationService.getValue(CoreTranslationMessages.EXPORT_JPG));
addClickHandler(event -> exportJPGCommand.execute());
}
});
menu.add(new AnchorListItem(translationService.getValue(CoreTranslationMessages.EXPORT_PDF)) {
{
setIcon(IconType.FILE_PDF_O);
setIconPosition(IconPosition.LEFT);
setTitle(translationService.getValue(CoreTranslationMessages.EXPORT_PDF));
addClickHandler(event -> exportPDFCommand.execute());
}
});
menu.add(new AnchorListItem(translationService.getValue(CoreTranslationMessages.EXPORT_BPMN)) {
{
setIcon(IconType.FILE_TEXT_O);
setIconPosition(IconPosition.LEFT);
setTitle(translationService.getValue(CoreTranslationMessages.EXPORT_BPMN));
addClickHandler(event -> exportBPMNCommand.execute());
}
});
final IsWidget group = new ButtonGroup() {
{
add(new Button() {
{
setToggleCaret(true);
setDataToggle(Toggle.DROPDOWN);
setIcon(IconType.DOWNLOAD);
setSize(ButtonSize.SMALL);
setTitle(translationService.getValue(StunnerProjectClientConstants.DOWNLOAD_DIAGRAM));
}
});
add(menu);
}
};
return buildItem(group);
}
use of org.gwtbootstrap3.client.ui.DropDownMenu in project kie-wb-common by kiegroup.
the class ShapeSetsMenuItemsBuilder method build.
public MenuItem build(final String title, final String prefix, final Callback callback) {
final DropDownMenu menu = new DropDownMenu() {
{
addStyleName("pull-right");
}
};
final Collection<ShapeSet<?>> shapeSets = shapeManager.getShapeSets();
if (null != shapeSets) {
shapeSets.stream().forEach(shapeSet -> {
menu.add(new AnchorListItem(prefix + " " + shapeSet.getDescription()) {
{
setTitle(prefix + " " + shapeSet.getDescription());
setIcon(IconType.PLUS);
addClickHandler(event -> callback.onClick(shapeSet));
}
});
});
}
final IsWidget group = new ButtonGroup() {
{
add(new Button() {
{
setToggleCaret(false);
setDataToggle(Toggle.DROPDOWN);
setSize(ButtonSize.SMALL);
setText(title);
setTitle(title);
}
});
add(menu);
}
};
return MenuUtils.buildItem(group);
}
use of org.gwtbootstrap3.client.ui.DropDownMenu in project ovirt-engine by oVirt.
the class Kebab method createDropDownMenu.
private DropDownMenu createDropDownMenu() {
DropDownMenu dropDownMenu = new DropDownMenu();
dropDownMenu.addStyleName(DROPDOWN_MENU_RIGHT);
return dropDownMenu;
}
Aggregations