Exemplo n.º 1
0
  public void loadStudents(List<Enrollment> enrs) {
    lstStudents.removeAllItems();

    for (Enrollment enr : enrs) {
      lstStudents.addItem(enr);
      StringBuffer caption = new StringBuffer();

      PhysicalPerson person = enr.getAdmissionAct().getStudent().getPhysicalPerson();

      if (person.getIdentificationNumber() != null) {
        caption.append(person.getIdentificationNumber() + "-");
      } else {
        caption.append("-- ");
      }

      if (person.getLastName() != null) {
        caption.append(person.getLastName() + ", ");
      } else {
        caption.append("--");
      }

      if (person.getName() != null) {
        caption.append(person.getName());
      } else {
        caption.append("--");
      }

      lstStudents.setItemCaption(enr, caption.toString());
    }
  }
Exemplo n.º 2
0
  private void populatePaymentCategories() {
    try {
      List<CategoryType> svcCategories = accSvc.getCategoriesForSheet(balSheet);

      categories = new LinkedHashMap<>(svcCategories.size());

      paymentCategories.removeAllItems();
      if (typeFrm != null) ((Select) typeFrm.getField(ADD_TYPE_FLD_CAT)).removeAllItems();

      for (CategoryType cat : svcCategories) {
        categories.put(cat.getName(), cat);
        paymentCategories.addItem(cat.getName());
        if (typeFrm != null) ((Select) typeFrm.getField(ADD_TYPE_FLD_CAT)).addItem(cat.getName());
      }

      Set<String> keys = categories.keySet();
      if (keys.size() > 0) paymentCategories.select(keys.iterator().next());

    } catch (AccountsSheetException e) {
      close();
      Messenger.genericMessage(
          MessageSeverity.ERROR,
          STRINGS.getString(AccountsMessages.MSGR_UNRECOVERABLE_ERROR),
          "Failed trying to query Payment Categories for Balance Sheet",
          e);
    }
  }
Exemplo n.º 3
0
  public void loadStudentsSelecteds(List<Enrollment> enrsSel) {
    lstStudentSelecteds.removeAllItems();

    for (Enrollment enr : enrsSel) {
      lstStudentSelecteds.addItem(enr);
    }

    removeItemLeftIfExistRight();
  }
Exemplo n.º 4
0
  private void populatePaymentTypes(CategoryType selectedCategory) {
    try {
      List<PaymentType> svcTypes = accSvc.getTypesForCategory(selectedCategory);

      types = new LinkedHashMap<>();

      paymentTypes.removeAllItems();
      for (PaymentType type : svcTypes) {
        types.put(type.getName(), type);
        paymentTypes.addItem(type.getName());
      }
    } catch (AccountsSheetException e) {
      close();
      Messenger.genericMessage(
          MessageSeverity.ERROR,
          STRINGS.getString(AccountsMessages.MSGR_UNRECOVERABLE_ERROR),
          "Failed trying to query Payment Types for Balance Sheet",
          e);
    }
  }
Exemplo n.º 5
0
 /** Set all components to default status. */
 public void resetComponents() {
   textAreaSentence.setValue("");
   textAreaSentence.setInputPrompt("Please insert a sentence here.");
   // buttonAnnotate.setEnabled(false);
   listSelectAnnotation.removeAllItems();
 }