Changeset 5825 in josm
- Timestamp:
- 2013-04-04T18:44:54+02:00 (12 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/dialogs
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java
r5821 r5825 605 605 private final void setupPopupMenuHandler() { 606 606 607 // -- download members action 608 popupMenuHandler.addAction(downloadMembersAction); 609 610 // -- download incomplete members action 611 popupMenuHandler.addAction(downloadSelectedIncompleteMembersAction); 612 613 popupMenuHandler.addSeparator(); 607 // -- select action 608 popupMenuHandler.addAction(selectRelationAction); 609 popupMenuHandler.addAction(addRelationToSelectionAction); 614 610 615 611 // -- select members action … … 617 613 popupMenuHandler.addAction(addMembersToSelectionAction); 618 614 619 // -- select action620 popupMenuHandler.addAction(selectRelationAction);621 popupMenuHandler.addAction(addRelationToSelectionAction);622 623 615 popupMenuHandler.addSeparator(); 624 616 // -- download members action 617 popupMenuHandler.addAction(downloadMembersAction); 618 619 // -- download incomplete members action 620 popupMenuHandler.addAction(downloadSelectedIncompleteMembersAction); 621 622 popupMenuHandler.addSeparator(); 623 popupMenuHandler.addAction(editAction).setVisible(false); 624 popupMenuHandler.addAction(duplicateAction).setVisible(false); 625 popupMenuHandler.addAction(deleteRelationsAction).setVisible(false); 626 625 627 popupMenuHandler.addAction(addSelectionToRelations); 626 628 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java
r5821 r5825 81 81 public class SelectionListDialog extends ToggleDialog { 82 82 private JList lstPrimitives; 83 private SelectionListModel model; 84 85 private SelectAction actSelect; 86 private SearchAction actSearch; 87 private ZoomToJOSMSelectionAction actZoomToJOSMSelection; 88 private ZoomToListSelection actZoomToListSelection; 89 private SelectInRelationListAction actSetRelationSelection; 90 private EditRelationAction actEditRelationSelection; 91 private DownloadSelectedIncompleteMembersAction actDownloadSelectedIncompleteMembers; 83 private DefaultListSelectionModel selectionModel = new DefaultListSelectionModel(); 84 private SelectionListModel model = new SelectionListModel(selectionModel); 85 86 private SelectAction actSelect = new SelectAction(); 87 private SearchAction actSearch = new SearchAction(); 88 private ZoomToJOSMSelectionAction actZoomToJOSMSelection = new ZoomToJOSMSelectionAction(); 89 private ZoomToListSelection actZoomToListSelection = new ZoomToListSelection(); 90 private SelectInRelationListAction actSetRelationSelection = new SelectInRelationListAction(); 91 private EditRelationAction actEditRelationSelection = new EditRelationAction(); 92 private DownloadSelectedIncompleteMembersAction actDownloadSelectedIncompleteMembers = new DownloadSelectedIncompleteMembersAction(); 92 93 93 94 /** the popup menu and its handler */ … … 99 100 */ 100 101 protected void buildContentPanel() { 101 DefaultListSelectionModel selectionModel = new DefaultListSelectionModel();102 model = new SelectionListModel(selectionModel);103 102 lstPrimitives = new JList(model); 104 103 lstPrimitives.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); … … 108 107 109 108 // the select action 110 final SideButton selectButton = new SideButton(actSelect = new SelectAction());109 final SideButton selectButton = new SideButton(actSelect); 111 110 lstPrimitives.getSelectionModel().addListSelectionListener(actSelect); 112 111 selectButton.createArrow(new ActionListener() { … … 118 117 119 118 // the search button 120 final SideButton searchButton = new SideButton(actSearch = new SearchAction());119 final SideButton searchButton = new SideButton(actSearch); 121 120 searchButton.createArrow(new ActionListener() { 122 121 @Override … … 141 140 buildContentPanel(); 142 141 model.addListDataListener(new TitleUpdater()); 143 actZoomToJOSMSelection = new ZoomToJOSMSelectionAction();144 142 model.addListDataListener(actZoomToJOSMSelection); 145 146 actZoomToListSelection = new ZoomToListSelection();147 actSetRelationSelection = new SelectInRelationListAction();148 actEditRelationSelection = new EditRelationAction();149 actDownloadSelectedIncompleteMembers = new DownloadSelectedIncompleteMembersAction();150 143 151 144 popupMenu = new ListPopupMenu(lstPrimitives); … … 219 212 } 220 213 221 private finalPopupMenuHandler setupPopupMenuHandler() {214 private PopupMenuHandler setupPopupMenuHandler() { 222 215 PopupMenuHandler handler = new PopupMenuHandler(popupMenu); 223 216 handler.addAction(actZoomToJOSMSelection); -
trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java
r5821 r5825 49 49 import org.openstreetmap.josm.Main; 50 50 import org.openstreetmap.josm.actions.JosmAction; 51 import org.openstreetmap.josm.actions.relation.DownloadMembersAction; 51 52 import org.openstreetmap.josm.actions.relation.DownloadSelectedIncompleteMembersAction; 53 import org.openstreetmap.josm.actions.relation.SelectInRelationListAction; 52 54 import org.openstreetmap.josm.actions.relation.SelectMembersAction; 53 55 import org.openstreetmap.josm.actions.relation.SelectRelationAction; … … 162 164 163 165 // relation actions 166 private final SelectInRelationListAction setRelationSelectionAction = new SelectInRelationListAction(); 167 private final SelectRelationAction selectRelationAction = new SelectRelationAction(false); 168 private final SelectRelationAction addRelationToSelectionAction = new SelectRelationAction(true); 169 170 private final DownloadMembersAction downloadMembersAction = new DownloadMembersAction(); 164 171 private final DownloadSelectedIncompleteMembersAction downloadSelectedIncompleteMembersAction = new DownloadSelectedIncompleteMembersAction(); 165 private final SelectRelationAction addRelationToSelectionAction = new SelectRelationAction(true); 172 173 private final SelectMembersAction selectMembersAction = new SelectMembersAction(false); 166 174 private final SelectMembersAction addMembersToSelectionAction = new SelectMembersAction(true); 167 private final SelectRelationAction selectRelationAction = new SelectRelationAction(false);168 175 169 176 /** … … 376 383 private void setupMembershipMenu() { 377 384 // setting up the membership table 385 membershipMenuHandler.addAction(setRelationSelectionAction); 386 membershipMenuHandler.addAction(selectRelationAction); 378 387 membershipMenuHandler.addAction(addRelationToSelectionAction); 379 membershipMenuHandler.addAction(select RelationAction);388 membershipMenuHandler.addAction(selectMembersAction); 380 389 membershipMenuHandler.addAction(addMembersToSelectionAction); 390 membershipMenu.addSeparator(); 391 membershipMenuHandler.addAction(downloadMembersAction); 381 392 membershipMenuHandler.addAction(downloadSelectedIncompleteMembersAction); 382 393 membershipMenu.addSeparator(); … … 695 706 // </editor-fold> 696 707 697 // <editor-fold defaultstate="collapsed" desc="Methods that are called by plugins to extend fuctional ty ">708 // <editor-fold defaultstate="collapsed" desc="Methods that are called by plugins to extend fuctionality "> 698 709 699 710 /**
Note:
See TracChangeset
for help on using the changeset viewer.