if (ruler != null && ruler.getSize().width != 0 && ruler.getSize().height != 0) { Settings.rulerPosX = ruler.getLocation().x; Settings.rulerPosY = ruler.getLocation().y; Settings.rulerSizeWidth = ruler.getSize().width; Settings.rulerSizeHeight = ruler.getSize().height; }
    public void saveSettings() {    	// save frame location        Settings.windowPosX = frame.getLocation().x;        Settings.windowPosY = frame.getLocation().y;        Settings.windowSizeWidth = frame.getSize().width;        Settings.windowSizeHeight = frame.getSize().height;        // also minimap        if (minimapW != null            && (minimapW.getSize().width * minimapW.getSize().height) > 0) {            Settings.minimapPosX = minimapW.getLocation().x;            Settings.minimapPosY = minimapW.getLocation().y;            Settings.minimapSizeWidth = minimapW.getSize().width;            Settings.minimapSizeHeight = minimapW.getSize().height;        }        // also mech display        if (mechW != null            && (mechW.getSize().width * mechW.getSize().height) > 0) {            Settings.displayPosX = mechW.getLocation().x;            Settings.displayPosY = mechW.getLocation().y;            Settings.displaySizeWidth = mechW.getSize().width;            Settings.displaySizeHeight = mechW.getSize().height;        }        // save settings to disk        Settings.save();    }