Revision 45670 trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.geodb.app/org.gvsig.geodb.app.mainplugin/src/main/java/org/gvsig/geodb/TableInfoController.java

View differences:

TableInfoController.java
40 40
import org.gvsig.tools.ToolsLocator;
41 41
import org.gvsig.tools.i18n.I18nManager;
42 42
import org.gvsig.tools.locator.LocatorException;
43
import org.gvsig.tools.swing.api.ChangeListenerHelper;
44
import org.gvsig.tools.swing.api.ChangeListenerSupport;
43 45
import org.gvsig.tools.swing.api.JListWithCheckbox;
44 46
import org.gvsig.tools.swing.api.SupportIsEnable;
45 47
import org.gvsig.tools.swing.api.ToolsSwingLocator;
......
53 55
 *
54 56
 * @author fdiaz
55 57
 */
56
public class TableInfoController implements SupportIsEnable {
58
public class TableInfoController implements SupportIsEnable, ChangeListenerSupport {
57 59

  
58 60
    public static final String CONFIGURABLE_PANEL_ID = "TableInfoController";
61
    private final ChangeListenerHelper changeListener;
59 62

  
60 63
    public static class RemoveDALInformationAction extends AbstractAction {
61 64

  
......
144 147
        this.btnAdvancedProperties = btnAdvancedProperties;
145 148
        this.lblReadOnlyNotification = lblReadOnlyNotification;
146 149
        this.pnlCfgActions = pnlCfgActions;
150
        
151
        this.changeListener = ToolsSwingLocator.getToolsSwingManager().createChangeListenerHelper();
147 152

  
148 153
        initComponents();
149 154
    }
......
194 199
            if (e.getStateChange() == ItemEvent.SELECTED) {
195 200
                doChangeGeometryField();
196 201
                updateLabel();
202
                changeListener.fireEvent();
197 203
            }
198 204
        });
199 205
        this.btnDeselectAllColumns.addActionListener((ActionEvent e) -> {
......
223 229
        }
224 230
        info.setIdFieldSelected(this.cboIdField.getSelectedIndex());
225 231
        updateLabel();
232
        changeListener.fireEvent();
226 233
    }
227 234

  
228 235
    private void doChangeProjection() {
......
232 239
        }
233 240
        info.setProjection(this.pickerProjection.get());
234 241
        updateLabel();
242
        changeListener.fireEvent();
235 243
    }
236 244

  
237 245
    private void doChangeGeometryField() {
......
339 347
        this.pickerFilter.set(tableInfo.getFilter());
340 348

  
341 349
        updateLabel();
350
        changeListener.fireEvent();        
342 351
    }
343 352

  
344 353
    private void updateLabel() throws LocatorException {
......
475 484
        cfgActionsManager.addConfigurableAction(CONFIGURABLE_PANEL_ID, new RemoveDALInformationAction());
476 485
    }
477 486

  
487
        @Override
488
    public void addChangeListener(ChangeListener listener) {
489
        this.changeListener.addChangeListener(listener);
490
    }
491

  
492
    @Override
493
    public ChangeListener[] getChangeListeners() {
494
        return this.changeListener.getChangeListeners();
495
    }
496

  
497
    @Override
498
    public void removeChangeListener(ChangeListener listener) {
499
        this.changeListener.removeChangeListener(listener);
500
    }
501

  
502
    @Override
503
    public void removeAllChangeListener() {
504
        this.changeListener.removeAllChangeListener();
505
    }
506

  
507
    @Override
508
    public boolean hasChangeListeners() {
509
        return this.changeListener.hasChangeListeners();
510
    }
511

  
512

  
478 513
}

Also available in: Unified diff