/* enables or disables fields depending on whether a sub category is being added */ protected void setSubCatAddMode(boolean adding) { showSubCatAddFields(adding); disableInputFields(adding); lbxItems.setDisabled(adding); lbxSubCatItems.setDisabled(adding); // btnAddSubCat.setDisabled(adding); // btnRemoveSubCat.setDisabled(adding || subCatUnremovable()); }
/* enable or disable fields depending on whether we are in browse/edit or add mode */ public void setAddMode(boolean adding, String selectedTab) { lbxItems.setDisabled(adding); if (selectedTab.equals("tabCategories")) { lbxSubCatItems.setDisabled(adding); btnAddSubCat.setDisabled(adding); btnRemoveSubCat.setDisabled(adding); disableInputFields(!adding); disableSubCatButtons(adding); _sb.setCategoryMembers(null); } if (adding) clearTextFields(); txtName.setText(""); lblMembers.setText("Members (0)"); }