Пример #1
0
 @SuppressWarnings("unused")
 private boolean isLegal() {
   try {
     int row = Integer.parseInt(rowField.getText());
     if (row <= 0) {
       HintFrame hint =
           new HintFrame(
               "排数必须为正!", frame.getX(), frame.getY(), frame.getWidth(), frame.getHeight());
       return false;
     }
   } catch (NumberFormatException e) {
     HintFrame hint =
         new HintFrame("排数格式错误!", frame.getX(), frame.getY(), frame.getWidth(), frame.getHeight());
     return false;
   }
   try {
     int place = Integer.parseInt(placeField.getText());
     if (place <= 0) {
       HintFrame hint =
           new HintFrame(
               "每排位数必须为正!", frame.getX(), frame.getY(), frame.getWidth(), frame.getHeight());
       return false;
     }
   } catch (NumberFormatException e) {
     HintFrame hint =
         new HintFrame(
             "每排位数格式错误!", frame.getX(), frame.getY(), frame.getWidth(), frame.getHeight());
     return false;
   }
   return true;
 }
Пример #2
0
 @SuppressWarnings("unchecked")
 private void search() {
   ResultMessage message = logicSer.searchShelf(orgId, searchField.getText());
   if (message.getReInfo().equals(Result.SUCCESS)) {
     shelfList = (ArrayList<ShelfVO>) message.getMessage();
     tableDisplay();
   } else {
     @SuppressWarnings("unused")
     HintFrame hint =
         new HintFrame(
             message.getReInfo(), frame.getX(), frame.getY(), frame.getWidth(), frame.getHeight());
   }
 }
Пример #3
0
 private void fresh(Result result) {
   if (result.equals(Result.SUCCESS)) {
     if (searchField.getText().equals("")) {
       getAll();
     } else {
       search();
     }
     DoHint.hint(result, frame);
   } else {
     @SuppressWarnings("unused")
     HintFrame hint =
         new HintFrame(result, frame.getX(), frame.getY(), frame.getWidth(), frame.getHeight());
   }
 }