public void adjustListMenuBar() {
    JMenuItem menuItem;
    Action act;
    String itemLabel;
    boolean enableState;
    boolean inEditState;
    boolean allowAdds;
    ICFSecuritySecGroupMemberObj selectedObj = getSwingFocusAsSecGroupMember();
    CFJPanel.PanelMode mode = getPanelMode();
    if (mode == CFJPanel.PanelMode.Edit) {
      inEditState = true;
      if (getSwingContainer() != null) {
        allowAdds = true;
      } else {
        allowAdds = false;
      }
    } else {
      inEditState = false;
      allowAdds = false;
    }
    if (selectedObj == null) {
      enableState = false;
    } else {
      enableState = true;
    }

    if (actionViewSelected != null) {
      actionViewSelected.setEnabled(enableState);
    }
    if (actionEditSelected != null) {
      actionEditSelected.setEnabled(inEditState && enableState);
    }
    if (actionDeleteSelected != null) {
      actionDeleteSelected.setEnabled(inEditState && enableState);
    }
    if (actionAddSecGroupMember != null) {
      actionAddSecGroupMember.setEnabled(allowAdds);
    }

    if (menuAdd != null) {
      menuAdd.setEnabled(allowAdds);
    }
    if (menuSelected != null) {
      menuSelected.setEnabled(enableState);
      int itemCount = menuSelected.getItemCount();
      for (int itemIdx = 0; itemIdx < itemCount; itemIdx++) {
        menuItem = menuSelected.getItem(itemIdx);
        act = menuItem.getAction();
        if (act != null) {
          if (act == actionViewSelected) {
            menuItem.setEnabled(enableState);
          } else if (act == actionEditSelected) {
            menuItem.setEnabled(inEditState && enableState);
          } else if (act == actionDeleteSelected) {
            menuItem.setEnabled(inEditState && enableState);
          }
        }
      }
    }
  }
 public JMenuBar getPanelMenuBar() {
   if (panelMenuBar == null) {
     JMenuItem menuItem;
     ICFLibAnyObj container = getSwingContainer();
     panelMenuBar = new JMenuBar();
     menuAdd = new JMenu("Add");
     actionAddSecGroupMember = new ActionAddSecGroupMember();
     if (container instanceof ICFSecuritySecGroupObj) {
       menuItem = new JMenuItem(actionAddSecGroupMember);
       menuAdd.add(menuItem);
     }
     if (getSwingContainer() != null) {
       panelMenuBar.add(menuAdd);
     }
     menuSelected = new JMenu("Selected");
     menuSelected.setEnabled(false);
     actionViewSelected = new ViewSelectedActionSecGroupMember();
     menuItem = new JMenuItem(actionViewSelected);
     menuSelected.add(menuItem);
     actionEditSelected = new EditSelectedActionSecGroupMember();
     menuItem = new JMenuItem(actionEditSelected);
     menuSelected.add(menuItem);
     actionDeleteSelected = new DeleteSelectedActionSecGroupMember();
     menuItem = new JMenuItem(actionDeleteSelected);
     menuSelected.add(menuItem);
     panelMenuBar.add(menuSelected);
   }
   return (panelMenuBar);
 }
  public void adjustFinderMenuBar() {
    JMenuItem menuItem;
    Action act;
    String itemLabel;
    ICFSecurityServiceTypeObj selectedObj = getSwingFocusAsServiceType();
    boolean enableState;
    if (selectedObj == null) {
      enableState = false;
    } else {
      enableState = true;
    }

    if (actionViewSelected != null) {
      actionViewSelected.setEnabled(enableState);
    }
    if (actionEditSelected != null) {
      actionEditSelected.setEnabled(enableState);
    }
    if (actionDeleteSelected != null) {
      actionDeleteSelected.setEnabled(enableState);
    }
    if (actionAddServiceType != null) {
      actionAddServiceType.setEnabled(true);
    }

    if (menuFile != null) {
      int itemCount = menuFile.getItemCount();
      for (int itemIdx = 0; itemIdx < itemCount; itemIdx++) {
        menuItem = menuFile.getItem(itemIdx);
        act = menuItem.getAction();
        if (act != null) {
          if (act == actionViewSelected) {
            menuItem.setEnabled(enableState);
          } else if (act == actionEditSelected) {
            menuItem.setEnabled(enableState);
          } else if (act == actionDeleteSelected) {
            menuItem.setEnabled(enableState);
          } else if (act == actionAddServiceType) {
            menuItem.setEnabled(true);
          }
        }
      }
    }
  }
 public JMenuBar getPanelMenuBar() {
   if (panelMenuBar == null) {
     JMenuItem menuItem;
     ICFLibAnyObj container = getSwingContainer();
     panelMenuBar = new JMenuBar();
     menuAdd = new JMenu("Add");
     actionAddMajorVersion = new ActionAddMajorVersion();
     if (container instanceof ICFInternetRealProjectObj) {
       menuItem = new JMenuItem(actionAddMajorVersion);
       menuAdd.add(menuItem);
     }
     actionAddMinorVersion = new ActionAddMinorVersion();
     if (container instanceof ICFInternetMajorVersionObj) {
       menuItem = new JMenuItem(actionAddMinorVersion);
       menuAdd.add(menuItem);
     }
     if (getSwingContainer() != null) {
       panelMenuBar.add(menuAdd);
     }
     menuSelected = new JMenu("Selected");
     menuSelected.setEnabled(false);
     actionViewSelected = new ViewSelectedActionVersion();
     menuItem = new JMenuItem(actionViewSelected);
     menuSelected.add(menuItem);
     actionEditSelected = new EditSelectedActionVersion();
     menuItem = new JMenuItem(actionEditSelected);
     menuSelected.add(menuItem);
     actionDeleteSelected = new DeleteSelectedActionVersion();
     menuItem = new JMenuItem(actionDeleteSelected);
     menuSelected.add(menuItem);
     panelMenuBar.add(menuSelected);
   }
   return (panelMenuBar);
 }
 public JMenuBar getFinderMenuBar() {
   if (finderMenuBar == null) {
     JMenuItem menuItem;
     finderMenuBar = new JMenuBar();
     menuFile = new JMenu("File");
     actionAddServiceType = new ActionAddServiceType();
     menuItem = new JMenuItem(actionAddServiceType);
     menuFile.add(menuItem);
     actionViewSelected = new ActionViewSelectedServiceType();
     menuItem = new JMenuItem(actionViewSelected);
     menuFile.add(menuItem);
     actionEditSelected = new ActionEditSelectedServiceType();
     menuItem = new JMenuItem(actionEditSelected);
     menuFile.add(menuItem);
     actionDeleteSelected = new ActionDeleteSelectedServiceType();
     menuItem = new JMenuItem(actionDeleteSelected);
     menuFile.add(menuItem);
     actionClose = new ActionClose();
     menuItem = new JMenuItem(actionClose);
     menuFile.add(menuItem);
     finderMenuBar.add(menuFile);
   }
   return (finderMenuBar);
 }