82 | | * Replies true if JOSM currently displays a map view. False, if it doesn't, i.e. if |
83 | | * it only shows the MOTD panel. |
84 | | * <p> |
85 | | * You do not need this when accessing the layer manager. The layer manager will be empty if no map view is shown. |
86 | | * |
87 | | * @return <code>true</code> if JOSM currently displays a map view |
88 | | * @deprecated use {@link org.openstreetmap.josm.gui.MainApplication#isDisplayingMapView()} |
89 | | */ |
90 | | @Deprecated |
91 | | public static boolean isDisplayingMapView() { |
92 | | return MainApplication.isDisplayingMapView(); |
93 | | } |
94 | | |
95 | | /** |
119 | | * The MapFrame. |
120 | | * <p> |
121 | | * There should be no need to access this to access any map data. Use {@link MainApplication#getLayerManager} instead. |
122 | | * |
123 | | * @deprecated Use {@link MainApplication#getMap()} instead |
124 | | * @see MainPanel |
125 | | */ |
126 | | @Deprecated |
127 | | public static MapFrame map; |
128 | | |
129 | | /** |
130 | | * The toolbar preference control to register new actions. |
131 | | * @deprecated Use {@link MainApplication#getToolbar} instead |
132 | | */ |
133 | | @Deprecated |
134 | | public static volatile ToolbarPreferences toolbar; |
135 | | |
136 | | /** |
137 | | * The commands undo/redo handler. |
138 | | * @deprecated Use {@link MainApplication#undoRedo} instead |
139 | | */ |
140 | | @Deprecated |
141 | | public final UndoRedoHandler undoRedo = MainApplication.undoRedo; |
142 | | |
143 | | /** |
144 | | * The main menu bar at top of screen. |
145 | | * @deprecated Use {@link MainApplication#getMenu} instead |
146 | | */ |
147 | | @Deprecated |
148 | | public MainMenu menu; |
149 | | |
150 | | /** |
151 | | * The main panel. |
152 | | * @deprecated Use {@link MainApplication#getMainPanel} instead |
153 | | * @since 12125 |
154 | | */ |
155 | | @Deprecated |
156 | | public MainPanel panel; |
157 | | |
158 | | /** |
633 | | /** |
634 | | * Registers a {@code JosmAction} and its shortcut. |
635 | | * @param action action defining its own shortcut |
636 | | * @deprecated use {@link MainApplication#registerActionShortcut(JosmAction)} instead |
637 | | */ |
638 | | @Deprecated |
639 | | public static void registerActionShortcut(JosmAction action) { |
640 | | MainApplication.registerActionShortcut(action); |
641 | | } |
642 | | |
643 | | /** |
644 | | * Registers an action and its shortcut. |
645 | | * @param action action to register |
646 | | * @param shortcut shortcut to associate to {@code action} |
647 | | * @deprecated use {@link MainApplication#registerActionShortcut(Action, Shortcut)} instead |
648 | | */ |
649 | | @Deprecated |
650 | | public static void registerActionShortcut(Action action, Shortcut shortcut) { |
651 | | MainApplication.registerActionShortcut(action, shortcut); |
652 | | } |
653 | | |
654 | | /** |
655 | | * Unregisters a shortcut. |
656 | | * @param shortcut shortcut to unregister |
657 | | * @deprecated use {@link MainApplication#unregisterShortcut(Shortcut)} instead |
658 | | */ |
659 | | @Deprecated |
660 | | public static void unregisterShortcut(Shortcut shortcut) { |
661 | | MainApplication.unregisterShortcut(shortcut); |
662 | | } |
663 | | |
664 | | /** |
665 | | * Unregisters a {@code JosmAction} and its shortcut. |
666 | | * @param action action to unregister |
667 | | * @deprecated use {@link MainApplication#unregisterActionShortcut(JosmAction)} instead |
668 | | */ |
669 | | @Deprecated |
670 | | public static void unregisterActionShortcut(JosmAction action) { |
671 | | MainApplication.unregisterActionShortcut(action); |
672 | | } |
673 | | |
674 | | /** |
675 | | * Unregisters an action and its shortcut. |
676 | | * @param action action to unregister |
677 | | * @param shortcut shortcut to unregister |
678 | | * @deprecated use {@link MainApplication#unregisterActionShortcut(Action, Shortcut)} instead |
679 | | */ |
680 | | @Deprecated |
681 | | public static void unregisterActionShortcut(Action action, Shortcut shortcut) { |
682 | | MainApplication.unregisterActionShortcut(action, shortcut); |
683 | | } |
684 | | |
685 | | /** |
686 | | * Replies the registered action for the given shortcut |
687 | | * @param shortcut The shortcut to look for |
688 | | * @return the registered action for the given shortcut |
689 | | * @deprecated use {@link MainApplication#getRegisteredActionShortcut(Shortcut)} instead |
690 | | * @since 5696 |
691 | | */ |
692 | | @Deprecated |
693 | | public static Action getRegisteredActionShortcut(Shortcut shortcut) { |
694 | | return MainApplication.getRegisteredActionShortcut(shortcut); |
695 | | } |
696 | | |
907 | | * Registers a new {@code MapFrameListener} that will be notified of MapFrame changes. |
908 | | * <p> |
909 | | * It will fire an initial mapFrameInitialized event when the MapFrame is present. |
910 | | * Otherwise will only fire when the MapFrame is created or destroyed. |
911 | | * @param listener The MapFrameListener |
912 | | * @return {@code true} if the listeners collection changed as a result of the call |
913 | | * @see #addMapFrameListener |
914 | | * @deprecated use {@link MainApplication#addAndFireMapFrameListener} instead |
915 | | * @since 11904 |
916 | | */ |
917 | | @Deprecated |
918 | | public static boolean addAndFireMapFrameListener(MapFrameListener listener) { |
919 | | return MainApplication.addAndFireMapFrameListener(listener); |
920 | | } |
921 | | |
922 | | /** |
923 | | * Registers a new {@code MapFrameListener} that will be notified of MapFrame changes |
924 | | * @param listener The MapFrameListener |
925 | | * @return {@code true} if the listeners collection changed as a result of the call |
926 | | * @see #addAndFireMapFrameListener |
927 | | * @deprecated use {@link MainApplication#addMapFrameListener} instead |
928 | | * @since 5957 |
929 | | */ |
930 | | @Deprecated |
931 | | public static boolean addMapFrameListener(MapFrameListener listener) { |
932 | | return MainApplication.addMapFrameListener(listener); |
933 | | } |
934 | | |
935 | | /** |
936 | | * Unregisters the given {@code MapFrameListener} from MapFrame changes |
937 | | * @param listener The MapFrameListener |
938 | | * @return {@code true} if the listeners collection changed as a result of the call |
939 | | * @deprecated use {@link MainApplication#removeMapFrameListener} instead |
940 | | * @since 5957 |
941 | | */ |
942 | | @Deprecated |
943 | | public static boolean removeMapFrameListener(MapFrameListener listener) { |
944 | | return MainApplication.removeMapFrameListener(listener); |
945 | | } |
946 | | |
947 | | /** |