Changeset 2581 in josm for trunk/src/org
- Timestamp:
- 2009-12-06T12:57:06+01:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java
r2578 r2581 450 450 // -- sort action 451 451 SortAction sortAction = new SortAction(); 452 memberTableModel.addTableModelListener(sortAction); 452 453 tb.add(sortAction); 453 454 … … 866 867 } 867 868 868 class SortAction extends AbstractAction implements ListSelectionListener {869 class SortAction extends AbstractAction implements TableModelListener { 869 870 public SortAction() { 870 871 putValue(SHORT_DESCRIPTION, tr("Sort the relation members")); … … 881 882 882 883 protected void updateEnabledState() { 883 setEnabled(memberTable .getSelectedRowCount() > 0);884 } 885 886 public void valueChanged(ListSelectionEvent e) {884 setEnabled(memberTableModel.getRowCount() > 0); 885 } 886 887 public void tableChanged(TableModelEvent e) { 887 888 updateEnabledState(); 888 889 }
Note:
See TracChangeset
for help on using the changeset viewer.