예제 #1
0
 /* 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());
 }
예제 #2
0
 /* 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)");
 }