private String getSshProxyPassword() { String proxyUser = String.valueOf(sshProxyPasswordField.getPassword()); if (StringUtils.isNotBlank(proxyUser)) { return proxyUser; } return null; }
public JTextField createComponent() { Setting.ConfigType configType = setting.getConfigType(); String value = setting.getValueAsString(); JTextField jTextField; if (configType == Setting.ConfigType.PASSWORD) { JBPasswordField jbPasswordField = new JBPasswordField(); jbPasswordField.setText(value); jTextField = jbPasswordField; } else { JBTextField jbTextField = new JBTextField(value); jTextField = jbTextField; } applyGenericProperties(jTextField); return jTextField; }
privateKeyPathField.setText(sshTunnelingConfiguration.getPrivateKeyPath()); sshProxyPasswordField.setText(sshTunnelingConfiguration.getProxyPassword()); sshProxyUserField.setText(sshTunnelingConfiguration.getProxyUser());
sshProxyPasswordField.setName("sshProxyPasswordField");
@Nullable @Override protected JComponent createCenterPanel() { if (dataSourceToEdit != null) { Map<String, String> conf = dataSourceToEdit.getConfiguration(); String host = conf.get(Neo4jBoltConfiguration.HOST); String port = conf.get(Neo4jBoltConfiguration.PORT); String user = conf.get(Neo4jBoltConfiguration.USER); String password = conf.get(Neo4jBoltConfiguration.PASSWORD); dataSourceNameField.setText(dataSourceToEdit.getName()); hostField.setText(host); portField.setText(port); userField.setText(user); passwordField.setText(password); } return content; }
private void extractData() { data = new Data(); data.dataSourceName = dataSourceNameField.getText(); data.host = hostField.getText(); data.port = portField.getText(); data.user = userField.getText(); data.password = String.valueOf(passwordField.getPassword()); // TODO: use password API }