Changeset 5825 in josm for trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java
- Timestamp:
- 2013-04-04T18:44:54+02:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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);
Note:
See TracChangeset
for help on using the changeset viewer.