public CursValutarView(final Shell parent, final CursValuta cursValutar, final int mode) {
    super(parent, SWT.MIN | SWT.CLOSE, mode);

    this.mapValute.addAll(BorgCache.getValute().values());
    this.mapBanci.addAll(BorgCache.getBanci().values());

    Collections.sort(
        this.mapValute,
        AbstractDB.getComparator(Valuta.class, Valuta.EXTERNAL_REFLECT_GET_ACRONIM));
    Collections.sort(
        this.mapBanci, AbstractDB.getComparator(Banca.class, Banca.EXTERNAL_REFLECT_GET_COD));

    if (cursValutar != null) {
      this.cursValutar = cursValutar.cloneObject();
      setModifiedObject(this.cursValutar);
    } else {
      this.cursValutar = new CursValuta();
    }

    addComponents();
    populateFields();

    if (!isViewEnabled()) {
      WidgetCompositeUtil.enableGUI(getContainer(), false);
    }
  }
 private void addBanca() {
   try {
     BancaView view;
     view = new BancaView(getShell(), null, AbstractView.MODE_ADD, null, false);
     view.open();
     if (view.getUserAction() == SWT.CANCEL) {
       return;
     }
     Banca result = view.getResult();
     CursValutarView.this.mapBanci.clear();
     CursValutarView.this.mapBanci.addAll(BorgCache.getBanci().values());
     CursValutarView.this.comboBanca.getViewer().setInput(CursValutarView.this.mapBanci);
     CursValutarView.this.comboBanca.select(result.getId());
   } catch (Exception exc) {
     SQLLibrary.processErr(exc);
   }
 }