use of net.sourceforge.processdash.tool.perm.Role in project processdash by dtuma.
the class RolesEditor method savePermissionChanges.
private void savePermissionChanges() {
if (currentlyEditing != null && permissionList.isDirty()) {
Role updated = new Role(currentlyEditing.getId(), //
currentlyEditing.getName(), currentlyEditing.isInactive(), permissionList.getContents());
rolesToSave.remove(currentlyEditing);
rolesToSave.add(updated);
permissionList.clearDirty();
int pos = roles.indexOf(currentlyEditing);
currentlyEditing = updated;
roles.set(pos, updated);
}
}
use of net.sourceforge.processdash.tool.perm.Role in project processdash by dtuma.
the class RolesEditor method addRoleToListAndSelect.
private void addRoleToListAndSelect(Role add) {
for (int i = 0; i < roles.size(); i++) {
Role r = roles.get(i);
if (add.compareTo(r) < 0) {
roles.add(i, add);
rolesList.setSelectedValue(add, true);
return;
}
}
roles.addElement(add);
rolesList.setSelectedValue(add, true);
}
Aggregations