- Timestamp:
- 2018-07-15T12:16:21+02:00 (6 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/dialogs/relation
- Files:
-
- 35 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java
r14027 r14029 251 251 } 252 252 }); 253 253 254 254 IRelationEditorActionAccess actionAccess = new RelationEditorActionAccess(); 255 255 … … 294 294 // handle uncommon situation, that user has no keystroke assigned to paste 295 295 registerCopyPasteAction(new PasteMembersAction(actionAccess) { 296 297 298 296 private static final long serialVersionUID = 1L; 297 298 @Override 299 299 public void actionPerformed(ActionEvent e) { 300 300 super.actionPerformed(e); … … 609 609 */ 610 610 static class LeftButtonToolbar extends JToolBar { 611 612 613 611 private static final long serialVersionUID = 1L; 612 613 /** 614 614 * Constructs a new {@code LeftButtonToolbar}. 615 615 * @param re relation editor … … 622 622 // Move 623 623 groups.add(buildNativeGroup(10, 624 625 626 624 new MoveUpAction(editorAccess, "moveUp"), 625 new MoveDownAction(editorAccess, "moveDown") 626 )); 627 627 // Edit 628 628 groups.add(buildNativeGroup(20, 629 630 631 629 new EditAction(editorAccess), 630 new RemoveAction(editorAccess, "removeSelected") 631 )); 632 632 // Sort 633 633 groups.add(buildNativeGroup(30, 634 635 636 634 new SortAction(editorAccess), 635 new SortBelowAction(editorAccess) 636 )); 637 637 // Reverse 638 638 groups.add(buildNativeGroup(40, 639 640 639 new ReverseAction(editorAccess) 640 )); 641 641 // Download 642 642 groups.add(buildNativeGroup(50, 643 644 645 643 new DownloadIncompleteMembersAction(editorAccess, "downloadIncomplete"), 644 new DownloadSelectedIncompleteMembersAction(editorAccess) 645 )); 646 646 groups.addAll(RelationEditorHooks.getMemberActions()); 647 647 648 648 IRelationEditorActionGroup.fillToolbar(this, groups, editorAccess); 649 649 650 650 651 651 InputMap inputMap = editorAccess.getMemberTable().getInputMap(MemberTable.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT); … … 654 654 inputMap.put((KeyStroke) new MoveDownAction(editorAccess, "moveDown").getValue(AbstractAction.ACCELERATOR_KEY), "moveDown"); 655 655 inputMap.put((KeyStroke) new DownloadIncompleteMembersAction( 656 656 editorAccess, "downloadIncomplete").getValue(AbstractAction.ACCELERATOR_KEY), "downloadIncomplete"); 657 657 } 658 658 } … … 671 671 tb.setFloatable(false); 672 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 673 List<IRelationEditorActionGroup> groups = new ArrayList<>(); 674 groups.add(buildNativeGroup(10, 675 new AddSelectedAtStartAction(editorAccess), 676 new AddSelectedBeforeSelection(editorAccess), 677 new AddSelectedAfterSelection(editorAccess), 678 new AddSelectedAtEndAction(editorAccess) 679 )); 680 groups.add(buildNativeGroup(20, 681 new SelectedMembersForSelectionAction(editorAccess), 682 new SelectPrimitivesForSelectedMembersAction(editorAccess) 683 )); 684 groups.add(buildNativeGroup(30, 685 new RemoveSelectedAction(editorAccess) 686 )); 687 groups.addAll(RelationEditorHooks.getSelectActions()); 688 689 689 IRelationEditorActionGroup.fillToolbar(tb, groups, editorAccess); 690 690 return tb; 691 691 } 692 692 693 693 private static IRelationEditorActionGroup buildNativeGroup(int order, AbstractRelationEditorAction... actions) { 694 695 696 697 698 699 700 701 702 703 704 694 return new IRelationEditorActionGroup() { 695 @Override 696 public int order() { 697 return order; 698 } 699 700 @Override 701 public List<AbstractRelationEditorAction> getActions(IRelationEditorActionAccess editorAccess) { 702 return Arrays.asList(actions); 703 } 704 }; 705 705 } 706 706 … … 761 761 tr("Focus Relation Editor with relation ''{0}'' in layer ''{1}''", name, layerName), 762 762 null, false, false) { 763 764 765 763 private static final long serialVersionUID = 1L; 764 765 @Override 766 766 public void actionPerformed(ActionEvent e) { 767 767 ((RelationEditor) getValue("relationEditor")).setVisible(true); … … 949 949 } 950 950 } 951 951 952 952 private class RelationEditorActionAccess implements IRelationEditorActionAccess { 953 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 954 @Override 955 public MemberTable getMemberTable() { 956 return memberTable; 957 } 958 959 @Override 960 public MemberTableModel getMemberTableModel() { 961 return memberTableModel; 962 } 963 964 @Override 965 public SelectionTable getSelectionTable() { 966 return selectionTable; 967 } 968 969 @Override 970 public SelectionTableModel getSelectionTableModel() { 971 return selectionTableModel; 972 } 973 974 @Override 975 public IRelationEditor getEditor() { 976 return GenericRelationEditor.this; 977 } 978 979 @Override 980 public TagEditorModel getTagModel() { 981 return tagEditorPanel.getModel(); 982 } 983 984 @Override 985 public AutoCompletingTextField getTextFieldRole() { 986 return tfRole; 987 } 988 989 989 } 990 990 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationEditor.java
r14027 r14029 20 20 */ 21 21 public abstract class RelationEditor extends ExtendedDialog implements IRelationEditor { 22 22 private static final long serialVersionUID = 1L; 23 23 24 24 /** the property name for the current relation. 25 25 * @see #setRelation(Relation) 26 26 * @see #getRelation() -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationEditorHooks.java
r14027 r14029 14 14 */ 15 15 public class RelationEditorHooks { 16 17 18 16 17 private static final CopyOnWriteArrayList<IRelationEditorActionGroup> memberActions = new CopyOnWriteArrayList<>(); 18 private static final CopyOnWriteArrayList<IRelationEditorActionGroup> selectionActions = new CopyOnWriteArrayList<>(); 19 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 20 private RelationEditorHooks() { 21 // only static methods. 22 } 23 24 /** 25 * Adds actions to the members action toolbar 26 * @param group The group to add 27 */ 28 public static void addActionsToMembers(IRelationEditorActionGroup group) { 29 memberActions.add(group); 30 } 31 32 /** 33 * Adds actions to the selection action toolbar 34 * @param group The group to add 35 */ 36 public static void addActionsToSelectio(IRelationEditorActionGroup group) { 37 selectionActions.add(group); 38 } 39 40 /* package */ static List<IRelationEditorActionGroup> getMemberActions() { 41 return Collections.unmodifiableList(memberActions); 42 } 43 44 /* package */ static List<IRelationEditorActionGroup> getSelectActions() { 45 return Collections.unmodifiableList(selectionActions); 46 } 47 48 48 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/AbstractRelationEditorAction.java
r14027 r14029 30 30 */ 31 31 public abstract class AbstractRelationEditorAction extends AbstractAction 32 33 34 32 implements TableModelListener, ListSelectionListener, PropertyChangeListener { 33 private static final long serialVersionUID = 1L; 34 protected final transient IRelationEditorActionAccess editorAccess; 35 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 36 /** 37 * Create a new relation editor action 38 * 39 * @param editorAccess 40 * The editor this action is for 41 * @param actionMapKey 42 * The key for the member table action map. 43 * @param updateOn 44 * The events that may cause the enabled state of this button to 45 * change. 46 */ 47 protected AbstractRelationEditorAction(IRelationEditorActionAccess editorAccess, 48 IRelationEditorUpdateOn... updateOn) { 49 Objects.requireNonNull(editorAccess, "editorAccess"); 50 Objects.requireNonNull(updateOn, "updateOn"); 51 this.editorAccess = editorAccess; 52 for (IRelationEditorUpdateOn u : updateOn) { 53 u.register(editorAccess, this); 54 } 55 } 56 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 57 /** 58 * Create a new relation editor action 59 * 60 * @param editorAccess 61 * The editor this action is for 62 * @param actionMapKey 63 * The key for the member table action map. 64 * @param updateOn 65 * The events that may cause the enabled state of this button to 66 * change. 67 */ 68 protected AbstractRelationEditorAction(IRelationEditorActionAccess editorAccess, String actionMapKey, 69 IRelationEditorUpdateOn... updateOn) { 70 this(editorAccess, updateOn); 71 Objects.requireNonNull(actionMapKey, "actionMapKey"); 72 72 73 74 73 this.editorAccess.addMemberTableAction(actionMapKey, this); 74 } 75 75 76 77 78 79 76 @Override 77 public void tableChanged(TableModelEvent e) { 78 updateEnabledState(); 79 } 80 80 81 82 83 84 81 @Override 82 public void valueChanged(ListSelectionEvent e) { 83 updateEnabledState(); 84 } 85 85 86 86 @Override … … 89 89 } 90 90 91 91 protected abstract void updateEnabledState(); 92 92 93 94 95 96 97 98 99 93 protected final boolean canDownload() { 94 if (editorAccess.getEditor().getRelation() == null) 95 return false; 96 DataSet ds = editorAccess.getEditor().getRelation().getDataSet(); 97 return !Main.isOffline(OnlineResource.OSM_API) && ds != null && !ds.isLocked() 98 && !DownloadPolicy.BLOCKED.equals(ds.getDownloadPolicy()); 99 } 100 100 101 102 103 101 protected MemberTable getMemberTable() { 102 return editorAccess.getMemberTable(); 103 } 104 104 105 106 107 105 protected MemberTableModel getMemberTableModel() { 106 return editorAccess.getMemberTableModel(); 107 } 108 108 109 110 111 109 protected SelectionTable getSelectionTable() { 110 return editorAccess.getSelectionTable(); 111 } 112 112 113 114 115 113 protected SelectionTableModel getSelectionTableModel() { 114 return editorAccess.getSelectionTableModel(); 115 } 116 116 117 118 119 117 protected IRelationEditor getEditor() { 118 return editorAccess.getEditor(); 119 } 120 120 121 122 123 121 protected TagEditorModel getTagModel() { 122 return editorAccess.getTagModel(); 123 } 124 124 125 126 127 125 protected OsmDataLayer getLayer() { 126 return editorAccess.getEditor().getLayer(); 127 } 128 128 129 130 131 129 public boolean isExpertOnly() { 130 return false; 131 } 132 132 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/AddFromSelectionAction.java
r14027 r14029 17 17 */ 18 18 abstract class AddFromSelectionAction extends AbstractRelationEditorAction { 19 19 private static final long serialVersionUID = 1L; 20 20 21 21 protected AddFromSelectionAction(IRelationEditorActionAccess editorAccess, 22 22 IRelationEditorUpdateOn... updateOn) { 23 23 super(editorAccess, updateOn); 24 24 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/AddSelectedAfterSelection.java
r14027 r14029 15 15 */ 16 16 public class AddSelectedAfterSelection extends AddFromSelectionAction { 17 17 private static final long serialVersionUID = 1L; 18 18 19 19 /** … … 32 32 @Override 33 33 protected void updateEnabledState() { 34 35 34 setEnabled(getSelectionTableModel().getRowCount() > 0 35 && getMemberTableModel().getSelectionModel().getMinSelectionIndex() >= 0); 36 36 } 37 37 … … 39 39 public void actionPerformed(ActionEvent e) { 40 40 try { 41 42 41 getMemberTableModel().addMembersAfterIdx(filterConfirmedPrimitives(getSelectionTableModel().getSelection()), 42 getMemberTableModel().getSelectionModel().getMaxSelectionIndex()); 43 43 } catch (AddAbortException ex) { 44 44 Logging.trace(ex); -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/AddSelectedAtEndAction.java
r14027 r14029 15 15 */ 16 16 public class AddSelectedAtEndAction extends AddFromSelectionAction { 17 17 private static final long serialVersionUID = 1L; 18 18 19 19 /** … … 38 38 public void actionPerformed(ActionEvent e) { 39 39 try { 40 40 getMemberTableModel().addMembersAtEnd(filterConfirmedPrimitives(getSelectionTableModel().getSelection())); 41 41 } catch (AddAbortException ex) { 42 42 Logging.trace(ex); -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/AddSelectedAtStartAction.java
r14027 r14029 15 15 */ 16 16 public class AddSelectedAtStartAction extends AddFromSelectionAction { 17 17 private static final long serialVersionUID = 1L; 18 18 19 19 /** … … 38 38 public void actionPerformed(ActionEvent e) { 39 39 try { 40 40 getMemberTableModel().addMembersAtBeginning(filterConfirmedPrimitives(getSelectionTableModel().getSelection())); 41 41 } catch (AddAbortException ex) { 42 42 Logging.trace(ex); -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/AddSelectedBeforeSelection.java
r14027 r14029 15 15 */ 16 16 public class AddSelectedBeforeSelection extends AddFromSelectionAction { 17 17 private static final long serialVersionUID = 1L; 18 18 19 19 /** … … 32 32 @Override 33 33 protected void updateEnabledState() { 34 35 34 setEnabled(getSelectionTableModel().getRowCount() > 0 35 && editorAccess.getMemberTableModel().getSelectionModel().getMinSelectionIndex() >= 0); 36 36 } 37 37 … … 39 39 public void actionPerformed(ActionEvent e) { 40 40 try { 41 42 41 editorAccess.getMemberTableModel().addMembersBeforeIdx(filterConfirmedPrimitives(getSelectionTableModel().getSelection()), 42 editorAccess.getMemberTableModel().getSelectionModel().getMinSelectionIndex()); 43 43 } catch (AddAbortException ex) { 44 44 Logging.trace(ex); -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/ApplyAction.java
r14027 r14029 13 13 */ 14 14 public class ApplyAction extends SavingAction { 15 15 private static final long serialVersionUID = 1L; 16 16 17 17 /** … … 34 34 public void actionPerformed(ActionEvent e) { 35 35 if (applyChanges()) { 36 36 editorAccess.getEditor().reloadDataFromRelation(); 37 37 } 38 38 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/CancelAction.java
r14027 r14029 22 22 */ 23 23 public class CancelAction extends SavingAction { 24 24 private static final long serialVersionUID = 1L; 25 25 26 26 /** -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/CopyMembersAction.java
r14027 r14029 14 14 */ 15 15 public class CopyMembersAction extends AddFromSelectionAction { 16 16 private static final long serialVersionUID = 1L; 17 17 18 18 /** -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/DeleteCurrentRelationAction.java
r14027 r14029 18 18 */ 19 19 public class DeleteCurrentRelationAction extends AbstractRelationEditorAction implements PropertyChangeListener { 20 20 private static final long serialVersionUID = 1L; 21 21 22 22 /** -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/DownloadIncompleteMembersAction.java
r14027 r14029 19 19 */ 20 20 public class DownloadIncompleteMembersAction extends AbstractRelationEditorAction { 21 21 private static final long serialVersionUID = 1L; 22 22 23 23 /** … … 45 45 return; 46 46 MainApplication.worker.submit(new DownloadRelationMemberTask( 47 47 getEditor().getRelation(), 48 48 getMemberTableModel().getIncompleteMemberPrimitives(), 49 49 getLayer(), -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/DownloadSelectedIncompleteMembersAction.java
r14027 r14029 16 16 */ 17 17 public class DownloadSelectedIncompleteMembersAction extends AbstractRelationEditorAction { 18 18 private static final long serialVersionUID = 1L; 19 19 20 20 /** … … 39 39 return; 40 40 MainApplication.worker.submit(new DownloadRelationMemberTask( 41 41 getEditor().getRelation(), 42 42 getMemberTableModel().getSelectedIncompleteMemberPrimitives(), 43 43 getLayer(), -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/DuplicateRelationAction.java
r14027 r14029 16 16 */ 17 17 public class DuplicateRelationAction extends AbstractRelationEditorAction { 18 18 private static final long serialVersionUID = 1L; 19 19 20 20 /** -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/EditAction.java
r14027 r14029 19 19 */ 20 20 public class EditAction extends AbstractRelationEditorAction { 21 21 private static final long serialVersionUID = 1L; 22 22 23 23 /** … … 37 37 protected void updateEnabledState() { 38 38 setEnabled(editorAccess.getMemberTable().getSelectedRowCount() == 1 39 40 39 && editorAccess.getMemberTableModel() 40 .isEditableRelation(editorAccess.getMemberTable().getSelectedRow())); 41 41 } 42 42 -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/IRelationEditorActionAccess.java
r14027 r14029 20 20 public interface IRelationEditorActionAccess { 21 21 22 23 24 25 26 27 28 29 22 /** 23 * Adds a keyboard action to the member table. 24 * @param actionMapKey The key to use 25 * @param action The action to map for that key. 26 */ 27 default void addMemberTableAction(String actionMapKey, Action action) { 28 getMemberTable().getActionMap().put(actionMapKey, action); 29 } 30 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 31 /** 32 * Get the member table that is used by the dialog. 33 * @return The member table 34 */ 35 MemberTable getMemberTable(); 36 37 /** 38 * Get the model the member table is using. 39 * @return That model 40 */ 41 MemberTableModel getMemberTableModel(); 42 43 /** 44 * Get the table that displays the current user selection 45 * @return That table 46 */ 47 SelectionTable getSelectionTable(); 48 49 /** 50 * Get the model that the selection table is based on. 51 * @return The model 52 */ 53 53 SelectionTableModel getSelectionTableModel(); 54 54 -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/IRelationEditorActionGroup.java
r14027 r14029 17 17 public interface IRelationEditorActionGroup { 18 18 19 20 21 22 23 24 25 26 19 /** 20 * Get the position at which the action group should be added. 21 * 22 * @return The order index, default is to add at the end. 23 */ 24 default int order() { 25 return 100; 26 } 27 27 28 29 30 31 32 33 34 35 28 /** 29 * Get the actions in this action group. 30 * 31 * @param editorAccess 32 * Methods to access the relation editor. 33 * @return The actions 34 */ 35 List<AbstractRelationEditorAction> getActions(IRelationEditorActionAccess editorAccess); 36 36 37 38 39 40 41 42 37 static void fillToolbar(JToolBar toolbar, List<IRelationEditorActionGroup> groups, 38 IRelationEditorActionAccess editorAccess) { 39 groups.stream().sorted(Comparator.comparingInt(IRelationEditorActionGroup::order)).forEach(group -> { 40 if (toolbar.getComponentCount() > 0) { 41 toolbar.addSeparator(); 42 } 43 43 44 45 46 47 48 49 50 51 44 for (AbstractRelationEditorAction action : group.getActions(editorAccess)) { 45 JButton button = toolbar.add(action); 46 if (action.isExpertOnly()) { 47 ExpertToggleAction.addVisibilitySwitcher(button); 48 } 49 } 50 }); 51 } 52 52 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/IRelationEditorUpdateOn.java
r14027 r14029 12 12 @FunctionalInterface 13 13 public interface IRelationEditorUpdateOn { 14 15 16 17 18 19 20 21 22 23 14 /** 15 * Update when the member table contents change 16 */ 17 IRelationEditorUpdateOn MEMBER_TABLE_CHANGE = (editor, action) -> editor.getMemberTableModel() 18 .addTableModelListener(action); 19 /** 20 * Update upon a member table selection change 21 */ 22 IRelationEditorUpdateOn MEMBER_TABLE_SELECTION = (editor, action) -> editor.getMemberTable().getSelectionModel() 23 .addListSelectionListener(action); 24 24 25 26 27 25 IRelationEditorUpdateOn TAG_CHANGE = (editor, action) -> editor.getTagModel().addPropertyChangeListener(action); 26 IRelationEditorUpdateOn SELECTION_TABLE_CHANGE = (editor, action) -> editor.getSelectionTableModel() 27 .addTableModelListener(action); 28 28 29 29 void register(IRelationEditorActionAccess editor, AbstractRelationEditorAction action); 30 30 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/MoveDownAction.java
r14027 r14029 16 16 */ 17 17 public class MoveDownAction extends AbstractRelationEditorAction { 18 18 private static final long serialVersionUID = 1L; 19 19 20 20 /** … … 35 35 @Override 36 36 public void actionPerformed(ActionEvent e) { 37 37 editorAccess.getMemberTableModel().moveDown(editorAccess.getMemberTable().getSelectedRows()); 38 38 } 39 39 -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/MoveUpAction.java
r14027 r14029 16 16 */ 17 17 public class MoveUpAction extends AbstractRelationEditorAction { 18 18 private static final long serialVersionUID = 1L; 19 19 20 20 /** … … 35 35 @Override 36 36 public void actionPerformed(ActionEvent e) { 37 37 editorAccess.getMemberTableModel().moveUp(editorAccess.getMemberTable().getSelectedRows()); 38 38 } 39 39 -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/OKAction.java
r14027 r14029 13 13 */ 14 14 public class OKAction extends SavingAction { 15 15 private static final long serialVersionUID = 1L; 16 16 17 17 /** -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/PasteMembersAction.java
r14027 r14029 18 18 */ 19 19 public class PasteMembersAction extends AddFromSelectionAction implements FlavorListener { 20 20 private static final long serialVersionUID = 1L; 21 21 22 22 /** -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/RefreshAction.java
r14027 r14029 24 24 */ 25 25 public class RefreshAction extends SavingAction implements CommandQueueListener { 26 26 private static final long serialVersionUID = 1L; 27 27 28 28 /** -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/RemoveAction.java
r14027 r14029 16 16 */ 17 17 public class RemoveAction extends AbstractRelationEditorAction { 18 18 private static final long serialVersionUID = 1L; 19 19 20 20 /** -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/RemoveSelectedAction.java
r14027 r14029 14 14 */ 15 15 public class RemoveSelectedAction extends AddFromSelectionAction { 16 16 private static final long serialVersionUID = 1L; 17 17 18 18 /** … … 42 42 @Override 43 43 public void actionPerformed(ActionEvent e) { 44 44 editorAccess.getMemberTableModel().removeMembersReferringTo(getSelectionTableModel().getSelection()); 45 45 } 46 46 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/ReverseAction.java
r14027 r14029 13 13 */ 14 14 public class ReverseAction extends AbstractRelationEditorAction { 15 15 private static final long serialVersionUID = 1L; 16 16 17 17 /** -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/SavingAction.java
r14027 r14029 34 34 */ 35 35 abstract class SavingAction extends AbstractRelationEditorAction { 36 36 private static final long serialVersionUID = 1L; 37 37 38 38 protected final AutoCompletingTextField tfRole; -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/SelectAction.java
r14027 r14029 14 14 */ 15 15 public class SelectAction extends AbstractRelationEditorAction { 16 16 private static final long serialVersionUID = 1L; 17 17 18 18 /** -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/SelectPrimitivesForSelectedMembersAction.java
r14027 r14029 14 14 */ 15 15 public class SelectPrimitivesForSelectedMembersAction extends AbstractRelationEditorAction { 16 16 private static final long serialVersionUID = 1L; 17 17 18 18 /** -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/SelectedMembersForSelectionAction.java
r14027 r14029 13 13 */ 14 14 public class SelectedMembersForSelectionAction extends AddFromSelectionAction { 15 15 private static final long serialVersionUID = 1L; 16 16 17 17 /** … … 35 35 if (enabled) { 36 36 putValue(SHORT_DESCRIPTION, tr("Select relation members which refer to {0} objects in the current selection", 37 37 editorAccess.getMemberTableModel().getChildPrimitives(getLayer().data.getSelected()).size())); 38 38 } else { 39 39 putValue(SHORT_DESCRIPTION, tr("Select relation members which refer to objects in the current selection")); … … 44 44 @Override 45 45 public void actionPerformed(ActionEvent e) { 46 46 editorAccess.getMemberTableModel().selectMembersReferringTo(getLayer().data.getSelected()); 47 47 } 48 48 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/SetRoleAction.java
r14027 r14029 21 21 */ 22 22 public class SetRoleAction extends AbstractRelationEditorAction implements DocumentListener { 23 23 private static final long serialVersionUID = 1L; 24 24 25 25 private final transient AutoCompletingTextField tfRole; -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/SortAction.java
r14027 r14029 16 16 */ 17 17 public class SortAction extends AbstractRelationEditorAction { 18 18 private static final long serialVersionUID = 1L; 19 19 20 20 /** … … 35 35 @Override 36 36 public void actionPerformed(ActionEvent e) { 37 37 editorAccess.getMemberTableModel().sort(); 38 38 } 39 39 -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/SortBelowAction.java
r14027 r14029 13 13 */ 14 14 public class SortBelowAction extends AbstractRelationEditorAction { 15 15 private static final long serialVersionUID = 1L; 16 16 17 17 /** … … 30 30 @Override 31 31 public void actionPerformed(ActionEvent e) { 32 32 editorAccess.getMemberTableModel().sortBelow(); 33 33 } 34 34 … … 40 40 @Override 41 41 public boolean isExpertOnly() { 42 42 return true; 43 43 } 44 44 }
Note:
See TracChangeset
for help on using the changeset viewer.