Exemplo n.º 1
0
  /** @return */
  private String[][] getAddressColumns(final int[] columnWidth) {

    String[][] columns;
    if (customer != null) {
      Address address;
      final String[] filter = getAddressFilter();
      final Collection<Business> list = AddressController.getAddresses(filter);
      columns = new String[list.size()][];
      final Iterator<Business> it = list.iterator();
      int i = 0;
      while (it.hasNext()) {
        address = (Address) it.next();
        columns[i] =
            new String[] {
              address.getIdAddress(),
              CodeController.getOneCodeDetail(CodeEnum.ADDRESS_TYPE.getType(), address.getAddType())
                  .getCodeDesc(),
              address.getAddStreet(),
              address.getAddNumber(),
              address.getAddBox(),
              address.getAddZip(),
              address.getAddCity(),
              CodeController.getOneCodeDetail(CodeEnum.COUNTRY.getType(), address.getAddCountry())
                  .getCodeDesc()
            };
        calculateColumnWidth(columns[i], columnWidth);

        i++;
      }
    } else {
      columns = null;
    }
    return columns;
  }
Exemplo n.º 2
0
 private JComboBox getJComboBoxCusCur() {
   if (jComboBoxCusCur == null) {
     cusCurs = CodeController.getCodeDetails(CodeEnum.CURRENCY.getType()); // CustomerCurrency
     jComboBoxCusCurModel = new DefaultComboBoxModel(cusCurs.keySet().toArray());
     jComboBoxCusCur = new JComboBox();
     jComboBoxCusCur.setModel(jComboBoxCusCurModel);
   }
   return jComboBoxCusCur;
 }
Exemplo n.º 3
0
 private JComboBox getJComboBoxCusLang() {
   if (jComboBoxCusLang == null) {
     cusLangs = CodeController.getCodeDetails(CodeEnum.LANGUAGE.getType()); // CustomerLanguage
     jComboBoxCusLangModel = new DefaultComboBoxModel(cusLangs.keySet().toArray());
     jComboBoxCusLang = new JComboBox();
     jComboBoxCusLang.setModel(jComboBoxCusLangModel);
   }
   return jComboBoxCusLang;
 }
Exemplo n.º 4
0
 private JComboBox getJComboBoxCusType() {
   if (jComboBoxCusType == null) {
     cusTypes = CodeController.getCodeDetails(CodeEnum.CUSTOMER_TYPE.getType()); // CustomerType
     jComboBoxCusTypeModel = new DefaultComboBoxModel(cusTypes.keySet().toArray());
     jComboBoxCusType = new JComboBox();
     jComboBoxCusType.setModel(jComboBoxCusTypeModel);
   }
   return jComboBoxCusType;
 }
Exemplo n.º 5
0
  private JComboBox getJComboBoxCusPay() {
    if (jComboBoxCusPay == null) {
      cusPays = CodeController.getCodeDetails(CodeEnum.PAYMENT.getType()); // PaymentConditions

      jComboBoxCusPayModel = new DefaultComboBoxModel(cusPays.keySet().toArray());
      jComboBoxCusPay = new JComboBox();
      jComboBoxCusPay.setModel(jComboBoxCusPayModel);
    }
    return jComboBoxCusPay;
  }
Exemplo n.º 6
0
 private JComboBox getJComboBoxCusCat() {
   if (jComboBoxCusCat == null) {
     cusCats =
         CodeController.getCodeDetails(CodeEnum.CUSTOMER_CATEGORY.getType()); // CustomerCategory
     jComboBoxCusCatModel = new DefaultComboBoxModel(cusCats.keySet().toArray());
     jComboBoxCusCat = new JComboBox();
     jComboBoxCusCat.setModel(jComboBoxCusCatModel);
   }
   return jComboBoxCusCat;
 }