示例#1
0
 /**
  * Decide whether admin menu items should be shown.
  *
  * @param isAdmin
  */
 private void setAdminMenusVisible(boolean isAdmin) {
   if (isAdmin) {
     newUserMenuItem.setVisible(true);
     manageAllUsersMenuItem.setVisible(true);
     userMenuSeperator.setVisible(true);
     preferencesMenu.setVisible(true);
     // preferencesMenuItem.setVisible(true);
     preferencesMenuSeperator.setVisible(true);
   } else {
     newUserMenuItem.setVisible(false);
     manageAllUsersMenuItem.setVisible(false);
     userMenuSeperator.setVisible(false);
     preferencesMenu.setVisible(false);
     // preferencesMenuItem.setVisible(false);
     preferencesMenuSeperator.setVisible(false);
   }
 }