Пример #1
0
 /* adds a new subcategory - triggered by categories tab only */
 public String btnConfirmAddSubCat_action() {
   String name = (String) txtSubCat.getText();
   if ((name != null) && (name.length() > 0)) {
     NonHumanCategory category = getCurrentlySelectedCategory();
     if (category != null) {
       if (category.addSubCategory(name)) { // won't add if duplicate
         _orgDataSet.updateNonHumanCategory(category);
         _sb.setSubCatAddMode(false);
         txtSubCat.setText(null);
       } else _msgPanel.error("Subcategory already exists: " + name);
     }
   } else _msgPanel.error("Please enter a subcategory to add.");
   return null;
 }
Пример #2
0
 /* reset mode to browse/edit for subcategories - triggered by categories tab only */
 public String btnCancelAddSubCat_action() {
   _sb.setSubCatAddMode(false);
   return null;
 }
Пример #3
0
 /* set mode to add a new subcategory - triggered by categories tab only */
 public String btnAddSubCat_action() {
   _sb.setSubCatAddMode(true);
   setSubCatAddMode(true);
   return null;
 }