Ejemplo n.º 1
0
 private void cmdRemoveActionPerformed(
     java.awt.event.ActionEvent evt) { // GEN-FIRST:event_cmdRemoveActionPerformed
   if (theBean.getSelectedBean() != null) {
     theBean.getBeanList().remove(theBean.getSelectedBean());
     theBean.setSelectedBean(null);
   }
 } // GEN-LAST:event_cmdRemoveActionPerformed
Ejemplo n.º 2
0
 /** This constructor must be used to initialize the bean. */
 public CadastreObjectListPanel(CadastreObjectListBean bean) {
   this.theBean = bean;
   initComponents();
   // Add a listner to the bean property of selected bean
   theBean.addPropertyChangeListener(
       new PropertyChangeListener() {
         @Override
         public void propertyChange(PropertyChangeEvent evt) {
           if (evt.getPropertyName().equals(AbstractListSpatialBean.SELECTED_BEAN_PROPERTY)) {
             customizeButtons((SpatialBean) evt.getNewValue());
           }
         }
       });
 }