use of com.qcadoo.view.internal.ribbon.model.RibbonGroupImpl in project qcadoo by qcadoo.
the class RibbonTemplates method createFormSaveAndCancelActionsTemplate.
private InternalRibbonGroup createFormSaveAndCancelActionsTemplate(final ViewDefinition viewDefinition, final SecurityRole role) {
InternalRibbonGroup ribbonGroup = new RibbonGroupImpl(ACTIONS, role);
ribbonGroup.addItem(createFormSaveAction(viewDefinition));
ribbonGroup.addItem(createFormSaveAndBackAction(viewDefinition));
ribbonGroup.addItem(createFormCancelAction(viewDefinition));
return ribbonGroup;
}
use of com.qcadoo.view.internal.ribbon.model.RibbonGroupImpl in project qcadoo by qcadoo.
the class RibbonTemplates method createGridActivateAndDeactivateActionsTemplate.
private InternalRibbonGroup createGridActivateAndDeactivateActionsTemplate(final ViewDefinition viewDefinition, final SecurityRole role) {
InternalRibbonGroup ribbonGroup = new RibbonGroupImpl(STATES, role);
ribbonGroup.addItem(createGridActivateAction(viewDefinition));
ribbonGroup.addItem(createGridDeactivateAction(viewDefinition));
return ribbonGroup;
}
use of com.qcadoo.view.internal.ribbon.model.RibbonGroupImpl in project qcadoo by qcadoo.
the class RibbonTemplates method createGridGenericExportActionsTemplate.
private InternalRibbonGroup createGridGenericExportActionsTemplate(final ViewDefinition viewDefinition, final SecurityRole role) {
InternalRibbonGroup ribbonGroup = new RibbonGroupImpl(GENERIC_EXPORT, role);
ribbonGroup.addItem(createGridExportCsvAction(viewDefinition));
ribbonGroup.addItem(createGridExportPdfAction(viewDefinition));
return ribbonGroup;
}
use of com.qcadoo.view.internal.ribbon.model.RibbonGroupImpl in project qcadoo by qcadoo.
the class TemplateRibbonGroup method getRibbonGroup.
public InternalRibbonGroup getRibbonGroup(final RibbonTemplateParameters parameters, final ViewDefinition viewDefinition) {
if (!PluginUtils.isEnabled(pluginIdentifier)) {
return null;
}
List<InternalRibbonActionItem> itemsToApply = getFilteredList(parameters);
if (itemsToApply.isEmpty()) {
return null;
}
if (!checkCondition(condition, viewDefinition)) {
return null;
}
InternalRibbonGroup group = new RibbonGroupImpl(name);
for (InternalRibbonActionItem item : itemsToApply) {
InternalRibbonActionItem itemCopy = item.getCopy();
translateRibbonAction(itemCopy, viewDefinition);
group.addItem(itemCopy);
}
return group;
}
use of com.qcadoo.view.internal.ribbon.model.RibbonGroupImpl in project qcadoo by qcadoo.
the class RibbonTemplates method createGridRemoveActionTemplate.
private InternalRibbonGroup createGridRemoveActionTemplate(final ViewDefinition viewDefinition, final SecurityRole role) {
InternalRibbonGroup ribbonGroup = new RibbonGroupImpl(ACTIONS, role);
ribbonGroup.addItem(createGridDeleteAction(viewDefinition));
return ribbonGroup;
}
Aggregations