PluginHelper.addListener(buttonSave, "SaveAll", view.getModule().getIndex());
PluginHelper.addListener(buttonRemove, "RemoveRow", view.getModule().getIndex());
// Build the panel
SecuredUser user = SecurityCentre.getInstance().getUser();
if (user == null || user.isEditingAllowed(view.getModule()))
panelActionsRight.add(buttonSave);
buttonSave.setEnabled(user == null || user.isEditingAllowed(view.getModule()));
if ( view.getType() == View._TYPE_INSERT &&
(user == null || user.isEditingAllowed(view.getModule()))) {
panelActionsLeft.add(buttonRemove);
panelActionsLeft.add(buttonAdd);
}
for (Component c: view.getAdditionalActions())
panelActionsLeft.add(c);
if (view.getType() == View._TYPE_INSERT)
panelActionsRight.add(buttonClear);
if (user == null || user.isEditingAllowed(view.getModule()))
panelActionsRight.add(buttonCancel);
setLayout(Layout.getGBL());
add(panelActionsLeft, Layout.getGBC(0, 0, 1, 1, 1.0, 1.0, GridBagConstraints.WEST,
GridBagConstraints.NONE, new Insets(0, 5, 0, 5), 0, 0));