public void clearAllFieldsAndLists() { clearTextFields(); clearCombos(); _sb.setNhResourcesCategoryItems(null); _sb.setNhResourcesSubcategoryItems(null); // resource tab combo box _sb.setNhResourcesSubcategoryList(null); // category tab list box lblMembers.setText("Members (0)"); }
/* fills ui with the selected category's values */ private void populateGUI(NonHumanCategory category) { if (category != null) { populateSimpleFields(category); _sb.setNhResourcesSubcategoryList(getSubCategoryList(category)); int membership = _sb.setCategoryMembers(category); lblMembers.setText("Members (" + membership + ")"); } _sb.setNhResourcesSubcategoryItems(null); // empty the resource tab combo box }
/* fills ui with the selected resource's values */ private void populateGUI(NonHumanResource resource, String id) { // selected resource is null after a selection change if (resource == null) { resource = _orgDataSet.getNonHumanResource(id); updateSelectedResource(resource); } if (resource != null) { populateSimpleFields(resource); NonHumanCategory category = resource.getCategory(); String subCatName = resource.getSubCategoryName(); if (category == null) { category = getFirstListedCategory(); // default } if (subCatName == null) subCatName = "None"; if (category != null) { cbbCategory.setSelected(category.getID()); _sb.setNhResourcesSubcategoryItems(getSubCategoryList(category)); cbbSubCategory.setSelected(subCatName); } else _sb.setNhResourcesSubcategoryItems(null); // no categories defined } _sb.setNhResourcesSubcategoryList(null); // empty the category tab list box }