Search in sources :

Example 16 with IMenuModel

use of org.jowidgets.api.model.item.IMenuModel in project jo-client-platform by jo-source.

the class EntityComponentMasterTableToolBarPlugin method onInitialize.

@Override
public void onInitialize(final IPluginProperties properties, final IViewContext context, final IBeanTable<?> table, final Collection<IAction> linkCreatorActions) {
    final IToolBarModel toolBar = context.getToolBar();
    if (table.getDefaultCreatorAction() != null) {
        toolBar.addAction(table.getDefaultCreatorAction());
    }
    final IMenuModel toolBarMenu = context.getToolBarMenu();
    for (final IAction action : linkCreatorActions) {
        toolBarMenu.addAction(action);
    }
}
Also used : IMenuModel(org.jowidgets.api.model.item.IMenuModel) IAction(org.jowidgets.api.command.IAction) IToolBarModel(org.jowidgets.api.model.item.IToolBarModel)

Example 17 with IMenuModel

use of org.jowidgets.api.model.item.IMenuModel in project jo-client-platform by jo-source.

the class EntityComponentRelationTreeToolBarPlugin method onInitialize.

@Override
public void onInitialize(final IPluginProperties properties, final IViewContext context, final IBeanTable<?> rootTable, final IBeanRelationTree<?> relationTree, final Collection<IAction> linkCreatorActions) {
    final IToolBarModel toolBar = context.getToolBar();
    if (relationTree.getAddAction() != null) {
        toolBar.addAction(relationTree.getAddAction());
    }
    final IMenuModel toolBarMenu = context.getToolBarMenu();
    for (final IAction action : linkCreatorActions) {
        toolBarMenu.addAction(action);
    }
}
Also used : IMenuModel(org.jowidgets.api.model.item.IMenuModel) IAction(org.jowidgets.api.command.IAction) IToolBarModel(org.jowidgets.api.model.item.IToolBarModel)

Aggregations

IMenuModel (org.jowidgets.api.model.item.IMenuModel)17 IAction (org.jowidgets.api.command.IAction)4 MenuModel (org.jowidgets.tools.model.item.MenuModel)4 IMenuItemModel (org.jowidgets.api.model.item.IMenuItemModel)2 IToolBarModel (org.jowidgets.api.model.item.IToolBarModel)2 IActionItemModel (org.jowidgets.api.model.item.IActionItemModel)1 IMenuBarModel (org.jowidgets.api.model.item.IMenuBarModel)1 ISeparatorItemModel (org.jowidgets.api.model.item.ISeparatorItemModel)1 IEntityLinkDescriptor (org.jowidgets.cap.common.api.entity.IEntityLinkDescriptor)1 IEntityService (org.jowidgets.cap.common.api.service.IEntityService)1 IDataModelAction (org.jowidgets.cap.ui.api.command.IDataModelAction)1 IBeanTableMenuContributionPlugin (org.jowidgets.cap.ui.api.plugin.IBeanTableMenuContributionPlugin)1 IWorkbenchMenuInterceptorPlugin (org.jowidgets.cap.ui.api.plugin.IWorkbenchMenuInterceptorPlugin)1 IPluginProperties (org.jowidgets.plugin.api.IPluginProperties)1 IPluginPropertiesBuilder (org.jowidgets.plugin.api.IPluginPropertiesBuilder)1 MenuBarModel (org.jowidgets.tools.model.item.MenuBarModel)1