use of net.parostroj.timetable.gui.ini.IniConfigSection in project grafikon by jub77.
the class FreightNetPane2 method saveToPreferences.
@Override
public IniConfigSection saveToPreferences(IniConfig prefs) {
IniConfigSection section = prefs.getSection("freigh.net");
section.put("gtv", graphicalTimetableView.getSettings().getStorageString());
return section;
}
use of net.parostroj.timetable.gui.ini.IniConfigSection in project grafikon by jub77.
the class TrainsCyclesPane method loadFromPreferences.
@Override
public IniConfigSection loadFromPreferences(IniConfig prefs) {
IniConfigSection section = prefs.getSection(getKey());
splitPane.setDividerLocation(section.get("divider", Integer.class, -1));
try {
GTViewSettings gtvs = GTViewSettings.parseStorageString(section.get("gtv"));
if (gtvs != null) {
graphicalTimetableView.setSettings(graphicalTimetableView.getSettings().merge(gtvs));
}
} catch (Exception e) {
log.warn("Wrong GTView settings - using default values.");
}
return section;
}
use of net.parostroj.timetable.gui.ini.IniConfigSection in project grafikon by jub77.
the class FloatingDialog method loadFromPreferences.
@Override
public IniConfigSection loadFromPreferences(IniConfig prefs) {
IniConfigSection section = prefs.getSection(storageKeyPrefix);
// set position
String positionStr = section.get("position");
GuiUtils.setPosition(positionStr, this);
// set visibility
if (section.get("visible", Boolean.class, false)) {
this.visibleOnInit = true;
}
return section;
}
use of net.parostroj.timetable.gui.ini.IniConfigSection in project grafikon by jub77.
the class FloatingDialog method saveToPreferences.
@Override
public IniConfigSection saveToPreferences(IniConfig prefs) {
prefs.removeSection(storageKeyPrefix);
IniConfigSection section = prefs.getSection(storageKeyPrefix);
section.put("position", GuiUtils.getPosition(this));
section.put("visible", this.isVisible());
return section;
}
Aggregations