Changeset 12127 in josm for trunk/src/org/openstreetmap/josm/gui/MainApplication.java
- Timestamp:
- 2017-05-12T19:53:09+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/MainApplication.java
r12125 r12127 88 88 private static final List<String> COMMAND_LINE_ARGS = new ArrayList<>(); 89 89 90 private static ProgramArguments args; 91 private static boolean skipLoadingPlugins; 92 90 93 private final MainFrame mainFrame; 91 94 … … 110 113 protected void initializeMainWindow() { 111 114 if (mainFrame != null) { 112 mainFrame.preInitialize();113 115 panel = mainFrame.getPanel(); 114 116 mainFrame.initialize(); … … 208 210 */ 209 211 public static void main(final String[] argArray) { 212 // First initializes all stuff that do not require AWT/Swing 213 mainNoGui(argArray); 214 // Then initializes all AWT/Swing stuff 215 mainGui(); 216 } 217 218 /** 219 * Initializes all stuff that do not require AWT/Swing. 220 * @param argArray Command-line arguments 221 */ 222 private static void mainNoGui(final String[] argArray) { 210 223 I18n.init(); 211 224 212 225 // construct argument table 213 ProgramArguments args = null;214 226 try { 215 227 args = new ProgramArguments(argArray); … … 261 273 COMMAND_LINE_ARGS.addAll(Arrays.asList(argArray)); 262 274 263 booleanskipLoadingPlugins = args.hasOption(Option.SKIP_PLUGINS);275 skipLoadingPlugins = args.hasOption(Option.SKIP_PLUGINS); 264 276 if (skipLoadingPlugins) { 265 277 Main.info(tr("Plugin loading skipped")); … … 286 298 287 299 Main.platform.afterPrefStartupHook(); 288 300 } 301 302 /** 303 * Initializes all AWT/Swing stuff. 304 */ 305 private static void mainGui() { 289 306 FontsManager.initialize(); 290 307 … … 297 314 !args.hasOption(Option.NO_MAXIMIZE) && Main.pref.getBoolean("gui.maximized", false)); 298 315 final MainFrame mainFrame = new MainFrame(contentPanePrivate, geometry); 316 Main.mainPanel = mainFrame.getPanel(); 299 317 Main.parent = mainFrame; 300 318
Note:
See TracChangeset
for help on using the changeset viewer.