@Override public void updateContents() { GeneralSettings st = JsonConfig.create(GeneralSettings.class); downloadFolder.setText(org.appwork.storage.config.JsonConfig.create(GeneralSettings.class).getDefaultDownloadFolder()); autoCRC.setSelected(st.isHashCheckEnabled()); simpleContainer.setSelected(st.isAutoOpenContainerAfterDownload()); this.remove.setValue(config.getCleanupAfterDownloadAction()); this.ifFileExists.setValue(config.getIfFileExistsAction()); }
@Override public void save() { GeneralSettings st = JsonConfig.create(GeneralSettings.class); st.setDefaultDownloadFolder(downloadFolder.getText()); st.setHashCheckEnabled(autoCRC.isSelected()); st.setAutoOpenContainerAfterDownload(simpleContainer.isSelected()); config.setCleanupAfterDownloadAction(remove.getValue()); config.setIfFileExistsAction(this.ifFileExists.getValue()); }