示例#1
0
 private void llenarCombo() throws Exception {
   bindingGroup = new org.jdesktop.beansbinding.BindingGroup();
   produccionBBSector1 = new shrimp.produccion.beanbinding.ProduccionBBSector();
   eLProperty = org.jdesktop.beansbinding.ELProperty.create("${listaPrdListaSectorTO}");
   org.jdesktop.swingbinding.JComboBoxBinding jComboBoxBinding =
       org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(
           org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
           produccionBBSector1,
           eLProperty,
           jcboCP);
   bindingGroup.addBinding(jComboBoxBinding);
   this.bindingGroup.bind();
   this.produccionBBSector1.setPrdListaSectorTO(
       shrimp.produccion.delegate.ProduccionDelegate.getInstance()
           .getListaSectorTO(sisUsuarioEmpresaTO.getEmpCodigo(), false));
   this.bindingGroup.bind();
   this.jcboCP.updateUI();
   this.jcboCP.setSelectedIndex(0);
   codigoSector =
       "'"
           + produccionBBSector1
               .getListaPrdListaSectorTO()
               .get(jcboCP.getSelectedIndex())
               .getSecCodigo()
           + "'";
   jcboCP.requestFocus();
 }
示例#2
0
 private void llenarBindingGroup() {
   bindingGroup = new org.jdesktop.beansbinding.BindingGroup();
   org.jdesktop.beansbinding.ELProperty eLProperty =
       org.jdesktop.beansbinding.ELProperty.create(
           "${listaPrdListaResumenCorridaTO}"); // listaPrdListaResumenCorridaTO
   bindingGroup.bind();
 }
示例#3
0
  public void refresh() throws IOException {

    blookupService.setServiceName("/getByLookupId");
    bLookups =
        new ObjectMapper()
            .readValue(
                new RESTfulClientUtil()
                    .restFullService(
                        blookupService.getServerUrl(),
                        blookupService.getServiceName(),
                        new ObjectMapper().writeValueAsString(lookup.getId())),
                new TypeReference<List<BLookup>>() {});

    JTableBinding jTableBinding =
        org.jdesktop.swingbinding.SwingBindings.createJTableBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
            bLookups,
            mainTable,
            "");
    JTableBinding.ColumnBinding columnBinding =
        jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${code}"));
    columnBinding.setColumnName("CODE");
    columnBinding.setColumnClass(String.class);
    columnBinding =
        jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${name}"));
    columnBinding.setColumnName("NAME");
    columnBinding.setColumnClass(String.class);
    columnBinding =
        jTableBinding.addColumnBinding(
            org.jdesktop.beansbinding.ELProperty.create("${persianName}"));
    columnBinding.setColumnName("PERSIANNAME");
    columnBinding.setColumnClass(String.class);
    columnBinding =
        jTableBinding.addColumnBinding(
            org.jdesktop.beansbinding.ELProperty.create("${description}"));
    columnBinding.setColumnName("DESC");
    columnBinding.setColumnClass(String.class);
    BindingGroup bindingGroup = new BindingGroup();
    bindingGroup.addBinding(jTableBinding);
    jTableBinding.bind();
  }