Ignore:
Timestamp:
2013-04-04T18:44:54+02:00 (11 years ago)
Author:
akks
Message:

fix #8574: relation list dialog side buttons din not work
Сontext menu unification (see #7846): relation list and membership table of properties dialog

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java

    r5821 r5825  
    8181public class SelectionListDialog extends ToggleDialog  {
    8282    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();
    9293
    9394    /** the popup menu and its handler */
     
    99100     */
    100101    protected void buildContentPanel() {
    101         DefaultListSelectionModel selectionModel  = new DefaultListSelectionModel();
    102         model = new SelectionListModel(selectionModel);
    103102        lstPrimitives = new JList(model);
    104103        lstPrimitives.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
     
    108107
    109108        // the select action
    110         final SideButton selectButton = new SideButton(actSelect = new SelectAction());
     109        final SideButton selectButton = new SideButton(actSelect);
    111110        lstPrimitives.getSelectionModel().addListSelectionListener(actSelect);
    112111        selectButton.createArrow(new ActionListener() {
     
    118117
    119118        // the search button
    120         final SideButton searchButton = new SideButton(actSearch = new SearchAction());
     119        final SideButton searchButton = new SideButton(actSearch);
    121120        searchButton.createArrow(new ActionListener() {
    122121            @Override
     
    141140        buildContentPanel();
    142141        model.addListDataListener(new TitleUpdater());
    143         actZoomToJOSMSelection = new ZoomToJOSMSelectionAction();
    144142        model.addListDataListener(actZoomToJOSMSelection);
    145 
    146         actZoomToListSelection = new ZoomToListSelection();
    147         actSetRelationSelection = new SelectInRelationListAction();
    148         actEditRelationSelection = new EditRelationAction();
    149         actDownloadSelectedIncompleteMembers = new DownloadSelectedIncompleteMembersAction();
    150143
    151144        popupMenu = new ListPopupMenu(lstPrimitives);
     
    219212    }
    220213
    221     private final PopupMenuHandler setupPopupMenuHandler() {
     214    private PopupMenuHandler setupPopupMenuHandler() {
    222215        PopupMenuHandler handler = new PopupMenuHandler(popupMenu);
    223216        handler.addAction(actZoomToJOSMSelection);
Note: See TracChangeset for help on using the changeset viewer.