private synchronized Settings getSettings() { User credentials = new User( window.getFdUsername().getText(), new String(window.getFdPassword().getPassword())); return new Settings( credentials, (SendMode) window.getCbMode().getSelectedItem(), window.getFdHomepage().getText(), window.getFdMessage().getText(), Integer.parseInt(window.getFdInterval().getText())); }
private boolean hasAllSettings() { return !Utils.isNullOrEmpty(window.getFdUsername()) && !Utils.isNullOrEmpty(window.getFdPassword()) && !Utils.isNullOrEmpty(window.getFdHomepage()) && !Utils.isNullOrEmpty(window.getFdMessage()); }