Changeset 17704 in josm for trunk/src/org
- Timestamp:
- 2021-04-07T20:43:26+02:00 (4 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/MainApplication.java
r17681 r17704 845 845 Handler.install(); 846 846 847 WindowGeometry geometry = WindowGeometry.mainWindow( "gui.geometry",847 WindowGeometry geometry = WindowGeometry.mainWindow(WindowGeometry.PREF_KEY_GUI_GEOMETRY, 848 848 args.getSingle(Option.GEOMETRY).orElse(null), 849 849 !args.hasOption(Option.NO_MAXIMIZE) && Config.getPref().getBoolean("gui.maximized", false)); -
trunk/src/org/openstreetmap/josm/gui/MainFrame.java
r17626 r17704 117 117 public void storeState() { 118 118 if (geometry != null) { 119 geometry.remember("gui.geometry");119 geometry.remember(WindowGeometry.PREF_KEY_GUI_GEOMETRY); 120 120 } 121 121 Config.getPref().putBoolean("gui.maximized", (windowState & JFrame.MAXIMIZED_BOTH) != 0); -
trunk/src/org/openstreetmap/josm/gui/SplashScreen.java
r17449 r17704 111 111 pack(); 112 112 113 WindowGeometry.centerOnScreen(this.getSize(), "gui.geometry").applySafe(this);113 WindowGeometry.centerOnScreen(this.getSize(), WindowGeometry.PREF_KEY_GUI_GEOMETRY).applySafe(this); 114 114 115 115 // Add ability to hide splash screen by clicking it -
trunk/src/org/openstreetmap/josm/gui/util/WindowGeometry.java
r16488 r17704 34 34 public class WindowGeometry { 35 35 36 /** 37 * Preference key for the {@code MainFrame} geometry 38 */ 39 public static final String PREF_KEY_GUI_GEOMETRY = "gui.geometry"; 40 36 41 /** the top left point */ 37 42 private Point topLeft; … … 107 112 */ 108 113 public static WindowGeometry centerOnScreen(Dimension extent) { 109 return centerOnScreen(extent, "gui.geometry");114 return centerOnScreen(extent, PREF_KEY_GUI_GEOMETRY); 110 115 } 111 116 … … 233 238 */ 234 239 public static WindowGeometry mainWindow(String preferenceKey, String arg, boolean maximize) { 235 Rectangle screenDimension = getScreenInfo( "gui.geometry");240 Rectangle screenDimension = getScreenInfo(PREF_KEY_GUI_GEOMETRY); 236 241 if (arg != null) { 237 242 final Matcher m = Pattern.compile("(\\d+)x(\\d+)(([+-])(\\d+)([+-])(\\d+))?").matcher(arg);
Note:
See TracChangeset
for help on using the changeset viewer.