/* removes a subcategory - triggered by categories tab only */ public String btnRemoveSubCat_action() { NonHumanCategory category = getCurrentlySelectedCategory(); if (category != null) { if (category.removeSubCategory(_sb.getNhResourcesSubcategoryChoice())) { _orgDataSet.updateNonHumanCategory(category); _sb.setNhResourcesSubcategoryChoice("None"); } else _msgPanel.error("Failed to remove subcategory."); } return null; }
/* checks if currently selected subcat may be removed. pre: in 'edit' mode */ private boolean subCatUnremovable() { String subCatStr = _sb.getNhResourcesSubcategoryChoice(); return (subCatStr == null) || subCatStr.equals("None"); }