private void disableMenuItems(final Menus menus) { for (MenuItem mi : menus.getItemsMap().values()) { mi.setEnabled(false); } }
private void onEditorLockInfo(@Observes UpdatedLockStatusEvent lockInfo) { boolean enabled = (!lockInfo.isLocked() || lockInfo.isLockedByCurrentUser()); for (MenuItem menuItem : menuItemsSyncedWithLockState) { menuItem.setEnabled(enabled); } }