BUNDLE.getString("Duplicate"), null, new DuplicateListener());
// find the security component for both this cell and it's parent,
// if any
final Cell cell = event.getPrimaryCell();
final SecurityComponent sc = cell.getComponent(SecurityComponent.class);
final SecurityComponent psc;
if (cell.getParent() != null) {
psc = cell.getParent().getComponent(SecurityComponent.class);
} else {
psc = null;
}
// see if we can check security locally, or if we have to make a
// remote request
if ((sc == null || sc.hasPermissions()) &&
(psc == null || psc.hasPermissions())) {
duplicateItem.setEnabled(canDuplicate(psc));
deleteItem.setEnabled(canDelete(sc, psc));
} else {
Thread t = new Thread(new Runnable() {