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);
}
}
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);
}
}
Aggregations