Ignore:
Timestamp:
2017-08-25T10:18:53+02:00 (7 years ago)
Author:
Don-vip
Message:

see #15182 - deprecate Main.main.menu. Replacement: gui.MainApplication.getMenu()

File:
1 edited

Legend:

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

    r12642 r12643  
    136136
    137137    /**
     138     * The main menu bar at top of screen.
     139     */
     140    static MainMenu menu;
     141
     142    /**
    138143     * The main panel, required to be static for {@link MapFrameListener} handling.
    139144     */
     
    278283            mainFrame.initialize();
    279284            menu = mainFrame.getMenu();
     285            super.menu = menu;
    280286        } else {
    281287            // required for running some tests.
     
    283289            panel = mainPanel;
    284290            menu = new MainMenu();
     291            super.menu = menu;
    285292        }
    286293        mainPanel.addMapFrameListener((o, n) -> redoUndoListener.commandChanged(0, 0));
     
    377384    public static MainPanel getMainPanel() {
    378385        return mainPanel;
     386    }
     387
     388    /**
     389     * Returns the main menu, at top of screen.
     390     * @return the main menu
     391     * @since 12643 (as a replacement to {@code MainApplication.getMenu()})
     392     */
     393    public static MainMenu getMenu() {
     394        return menu;
    379395    }
    380396
Note: See TracChangeset for help on using the changeset viewer.