@ApplicationScoped public class MenuItemFactory extends Object
MenuCustom
and associated MenuItemView
.Modifier and Type | Class and Description |
---|---|
static class |
MenuItemFactory.MenuItemViewHolder<T extends MenuItemView>
Container for @{link MenuCustom} and
MenuItemView |
Constructor and Description |
---|
MenuItemFactory(org.jboss.errai.ioc.client.api.ManagedInstance<MenuItemView> menuItemViewProducer) |
Modifier and Type | Method and Description |
---|---|
<T extends MenuItemDividerView> |
makeMenuItemDivider()
Makes a
MenuCustom and associated MenuItemDividerView that can be used as
a "divider" in a menu. |
<T extends MenuItemHeaderView> |
makeMenuItemHeader(String caption)
Makes a
MenuCustom and associated MenuItemHeaderView that can be used
as a "header" in a menu. |
<T extends MenuItemWithIconView> |
makeMenuItemWithIcon(String caption,
Command cmd)
Makes a
MenuCustom and associated MenuItemWithIconView that can be used
to replace the default Views created by ListBarWidgetImpl if an icon is also required. |
@Inject public MenuItemFactory(@Any org.jboss.errai.ioc.client.api.ManagedInstance<MenuItemView> menuItemViewProducer)
public <T extends MenuItemWithIconView> MenuItemFactory.MenuItemViewHolder<T> makeMenuItemWithIcon(String caption, Command cmd)
MenuCustom
and associated MenuItemWithIconView
that can be used
to replace the default Views created by ListBarWidgetImpl
if an icon is also required.
If an icon is not required the caption is indented to the position that it would adopt if an
icon had been specified. It is not possible to use BS3's AnchorListItem
as this only
indents the caption IF an icon is specified.T
- MenuItemWithIconView
caption
- Caption to be shown for the menu item.cmd
- Command to execute when the menu item is clicked.MenuItemFactory.MenuItemViewHolder
with both a MenuItem
and MenuItemView
public <T extends MenuItemHeaderView> MenuItemFactory.MenuItemViewHolder<T> makeMenuItemHeader(String caption)
MenuCustom
and associated MenuItemHeaderView
that can be used
as a "header" in a menu. See http://getbootstrap.com/components/#dropdowns-headersT
- MenuItemHeaderView
caption
- Caption to be shown for the menu header.MenuItemFactory.MenuItemViewHolder
with both a MenuItem
and MenuItemView
public <T extends MenuItemDividerView> MenuItemFactory.MenuItemViewHolder<T> makeMenuItemDivider()
MenuCustom
and associated MenuItemDividerView
that can be used as
a "divider" in a menu. See http://getbootstrap.com/components/#dropdowns-dividerT
- MenuItemDividerView}MenuItemFactory.MenuItemViewHolder
with both a MenuItem
and MenuItemView
Copyright © 2012–2018 JBoss by Red Hat. All rights reserved.