Changeset 3561 in josm
- Timestamp:
- 2010-09-24T18:48:14+02:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java
r3518 r3561 67 67 import org.openstreetmap.josm.gui.DefaultNameFormatter; 68 68 import org.openstreetmap.josm.gui.HelpAwareOptionPane; 69 import org.openstreetmap.josm.gui.HelpAwareOptionPane.ButtonSpec; 69 70 import org.openstreetmap.josm.gui.SideButton; 70 import org.openstreetmap.josm.gui.HelpAwareOptionPane.ButtonSpec;71 71 import org.openstreetmap.josm.gui.dialogs.properties.PresetListPanel.PresetHandler; 72 72 import org.openstreetmap.josm.gui.help.ContextSensitiveHelpAction; … … 537 537 tb.setFloatable(false); 538 538 539 // -- add at start action 540 AddSelectedAtStartAction addSelectionAction = new AddSelectedAtStartAction(); 541 selectionTableModel.addTableModelListener(addSelectionAction); 542 tb.add(addSelectionAction); 543 544 // -- add before selected action 545 AddSelectedBeforeSelection addSelectedBeforeSelectionAction = new AddSelectedBeforeSelection(); 546 selectionTableModel.addTableModelListener(addSelectedBeforeSelectionAction); 547 memberTableModel.getSelectionModel().addListSelectionListener(addSelectedBeforeSelectionAction); 548 tb.add(addSelectedBeforeSelectionAction); 549 550 // -- add after selected action 551 AddSelectedAfterSelection addSelectedAfterSelectionAction = new AddSelectedAfterSelection(); 552 selectionTableModel.addTableModelListener(addSelectedAfterSelectionAction); 553 memberTableModel.getSelectionModel().addListSelectionListener(addSelectedAfterSelectionAction); 554 tb.add(addSelectedAfterSelectionAction); 555 539 556 // -- add at end action 540 557 AddSelectedAtEndAction addSelectedAtEndAction = new AddSelectedAtEndAction(); 541 558 selectionTableModel.addTableModelListener(addSelectedAtEndAction); 542 559 tb.add(addSelectedAtEndAction); 560 561 tb.addSeparator(); 543 562 544 563 // -- select members action … … 548 567 tb.add(selectMembersForSelectionAction); 549 568 569 // -- select action 570 SelectPrimitivesForSelectedMembersAction selectAction = new SelectPrimitivesForSelectedMembersAction(); 571 memberTable.getSelectionModel().addListSelectionListener(selectAction); 572 tb.add(selectAction); 573 550 574 tb.addSeparator(); 551 575 … … 554 578 selectionTableModel.addTableModelListener(removeSelectedAction); 555 579 tb.add(removeSelectedAction); 556 557 // -- select action558 SelectPrimitivesForSelectedMembersAction selectAction = new SelectPrimitivesForSelectedMembersAction();559 memberTable.getSelectionModel().addListSelectionListener(selectAction);560 tb.add(selectAction);561 562 tb.addSeparator();563 564 // -- add at start action565 AddSelectedAtStartAction addSelectionAction = new AddSelectedAtStartAction();566 selectionTableModel.addTableModelListener(addSelectionAction);567 tb.add(addSelectionAction);568 569 // -- add before selected action570 AddSelectedBeforeSelection addSelectedBeforeSelectionAction = new AddSelectedBeforeSelection();571 selectionTableModel.addTableModelListener(addSelectedBeforeSelectionAction);572 memberTableModel.getSelectionModel().addListSelectionListener(addSelectedBeforeSelectionAction);573 tb.add(addSelectedBeforeSelectionAction);574 575 // -- add after selected action576 AddSelectedAfterSelection addSelectedAfterSelectionAction = new AddSelectedAfterSelection();577 selectionTableModel.addTableModelListener(addSelectedAfterSelectionAction);578 memberTableModel.getSelectionModel().addListSelectionListener(addSelectedAfterSelectionAction);579 tb.add(addSelectedAfterSelectionAction);580 580 581 581 return tb; … … 735 735 736 736 protected void refreshEnabled() { 737 setEnabled(selectionTableModel.getRowCount() > 0 && memberTableModel.getRowCount() > 0);737 setEnabled(selectionTableModel.getRowCount() > 0); 738 738 } 739 739
Note:
See TracChangeset
for help on using the changeset viewer.