use of com.cburch.logisim.gui.generic.ZoomModel in project logisim-evolution by reds-heig.
the class Frame method savePreferences.
public void savePreferences() {
AppPreferences.TICK_FREQUENCY.set(Double.valueOf(proj.getSimulator().getTickFrequency()));
AppPreferences.LAYOUT_SHOW_GRID.setBoolean(layoutZoomModel.getShowGrid());
AppPreferences.LAYOUT_ZOOM.set(Double.valueOf(layoutZoomModel.getZoomFactor()));
if (appearance != null) {
ZoomModel aZoom = appearance.getZoomModel();
AppPreferences.APPEARANCE_SHOW_GRID.setBoolean(aZoom.getShowGrid());
AppPreferences.APPEARANCE_ZOOM.set(Double.valueOf(aZoom.getZoomFactor()));
}
int state = getExtendedState() & ~JFrame.ICONIFIED;
AppPreferences.WINDOW_STATE.set(Integer.valueOf(state));
Dimension dim = getSize();
AppPreferences.WINDOW_WIDTH.set(Integer.valueOf(dim.width));
AppPreferences.WINDOW_HEIGHT.set(Integer.valueOf(dim.height));
Point loc;
try {
loc = getLocationOnScreen();
} catch (IllegalComponentStateException e) {
loc = Projects.getLocation(this);
}
if (loc != null) {
AppPreferences.WINDOW_LOCATION.set(loc.x + "," + loc.y);
}
AppPreferences.WINDOW_LEFT_SPLIT.set(Double.valueOf(leftRegion.getFraction()));
if (Double.valueOf(rightRegion.getFraction()) < 1.0)
AppPreferences.WINDOW_RIGHT_SPLIT.set(Double.valueOf(rightRegion.getFraction()));
AppPreferences.WINDOW_MAIN_SPLIT.set(Double.valueOf(mainRegion.getFraction()));
AppPreferences.DIALOG_DIRECTORY.set(JFileChoosers.getCurrentDirectory());
}
Aggregations