@Override public void reset() { if (settingsPanel != null) { settingsPanel.serverUrlTextField.setText(globalSettings.getUrl()); settingsPanel.userIdTextField.setText(globalSettings.getUserId()); } }
@Override public void apply() { if (settingsPanel != null) { globalSettings.setUrl(settingsPanel.serverUrlTextField.getText()); globalSettings.setUserId(settingsPanel.userIdTextField.getText()); } }
@Override public boolean isModified() { return settingsPanel == null || !Objects.equals(globalSettings.getUrl(), settingsPanel.serverUrlTextField.getText()) || !Objects.equals(globalSettings.getUserId(), settingsPanel.userIdTextField.getText()); }
public CopeGlobalSettingsConfigurable() { globalSettings = CopeGlobalSettings.getInstance(); }