示例#1
0
 void saveWindowLocations() {
   Frame frame = WindowManager.getFrame("B&C");
   if (frame != null) Prefs.saveLocation(ContrastAdjuster.LOC_KEY, frame.getLocation());
   frame = WindowManager.getFrame("Threshold");
   if (frame != null) Prefs.saveLocation(ThresholdAdjuster.LOC_KEY, frame.getLocation());
   frame = WindowManager.getFrame("Results");
   if (frame != null) {
     Prefs.saveLocation(TextWindow.LOC_KEY, frame.getLocation());
     Dimension d = frame.getSize();
     Prefs.set(TextWindow.WIDTH_KEY, d.width);
     Prefs.set(TextWindow.HEIGHT_KEY, d.height);
   }
   frame = WindowManager.getFrame("Log");
   if (frame != null) {
     Prefs.saveLocation(TextWindow.LOG_LOC_KEY, frame.getLocation());
     Dimension d = frame.getSize();
     Prefs.set(TextWindow.LOG_WIDTH_KEY, d.width);
     Prefs.set(TextWindow.LOG_HEIGHT_KEY, d.height);
   }
 }