MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / saveWindowLocations

Method saveWindowLocations

ij/src/main/java/ij/ImageJ.java:1008–1032  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1006 }
1007
1008 void saveWindowLocations() {
1009 Window win = WindowManager.getWindow("B&C");
1010 if (win!=null)
1011 Prefs.saveLocation(ContrastAdjuster.LOC_KEY, win.getLocation());
1012 win = WindowManager.getWindow("Threshold");
1013 if (win!=null)
1014 Prefs.saveLocation(ThresholdAdjuster.LOC_KEY, win.getLocation());
1015 win = WindowManager.getWindow("Results");
1016 if (win!=null) {
1017 Prefs.saveLocation(TextWindow.LOC_KEY, win.getLocation());
1018 Dimension d = win.getSize();
1019 Prefs.set(TextWindow.WIDTH_KEY, d.width);
1020 Prefs.set(TextWindow.HEIGHT_KEY, d.height);
1021 }
1022 win = WindowManager.getWindow("Log");
1023 if (win!=null) {
1024 Prefs.saveLocation(TextWindow.LOG_LOC_KEY, win.getLocation());
1025 Dimension d = win.getSize();
1026 Prefs.set(TextWindow.LOG_WIDTH_KEY, d.width);
1027 Prefs.set(TextWindow.LOG_HEIGHT_KEY, d.height);
1028 }
1029 win = WindowManager.getWindow("ROI Manager");
1030 if (win!=null)
1031 Prefs.saveLocation(RoiManager.LOC_KEY, win.getLocation());
1032 }
1033
1034 public static String getCommandName() {
1035 return commandName!=null?commandName:"null";

Callers 1

runMethod · 0.95

Calls 5

getWindowMethod · 0.95
saveLocationMethod · 0.95
setMethod · 0.95
getLocationMethod · 0.80
getSizeMethod · 0.65

Tested by

no test coverage detected