|
|
|
@ -96,6 +96,10 @@ public class RemoteEnvPane extends BasicBeanPane<RemoteDesignerWorkspaceInfo> {
|
|
|
|
|
* 密码 |
|
|
|
|
*/ |
|
|
|
|
private UIPassWordField passwordInput = new UIPassWordField(); |
|
|
|
|
/** |
|
|
|
|
* 是否记住密码 |
|
|
|
|
*/ |
|
|
|
|
private UICheckBox rememberPwdCheckbox = new UICheckBox(Toolkit.i18nText("Fine-Design_Basic_Remote_Env_Remember_Password")); |
|
|
|
|
/** |
|
|
|
|
* https证书路径 |
|
|
|
|
*/ |
|
|
|
@ -212,7 +216,7 @@ public class RemoteEnvPane extends BasicBeanPane<RemoteDesignerWorkspaceInfo> {
|
|
|
|
|
updateHttpsConfigPanel(); |
|
|
|
|
|
|
|
|
|
remoteWorkspaceURL.setHttps(isHttps); |
|
|
|
|
// reset下url,将勾选状态是否htpps加到url里
|
|
|
|
|
// reset下url,将勾选状态是否https加到url里
|
|
|
|
|
remoteWorkspaceURL.resetUrl(); |
|
|
|
|
|
|
|
|
|
fillRemoteEnvURLField(); |
|
|
|
@ -286,6 +290,7 @@ public class RemoteEnvPane extends BasicBeanPane<RemoteDesignerWorkspaceInfo> {
|
|
|
|
|
|
|
|
|
|
contentPanel.add(configPanel, BorderLayout.NORTH); |
|
|
|
|
contentPanel.add(accountPanel, BorderLayout.CENTER); |
|
|
|
|
contentPanel.add(packRememberPwdConfigPanel(), BorderLayout.SOUTH); |
|
|
|
|
JPanel panel = FRGUIPaneFactory.createBorderLayout_S_Pane(); |
|
|
|
|
panel.add(contentPanel, BorderLayout.NORTH); |
|
|
|
|
panel.add(testPanel, BorderLayout.CENTER); |
|
|
|
@ -306,15 +311,18 @@ public class RemoteEnvPane extends BasicBeanPane<RemoteDesignerWorkspaceInfo> {
|
|
|
|
|
String pwd = fromNullable(connection.getPassword()).or(StringUtils.EMPTY); |
|
|
|
|
String certPath = fromNullable(connection.getCertPath()).or(StringUtils.EMPTY); |
|
|
|
|
String certSecretKey = fromNullable(connection.getCertSecretKey()).or(StringUtils.EMPTY); |
|
|
|
|
boolean rememberPwd = fromNullable(connection.isRememberPwd()).or(true); |
|
|
|
|
this.usernameInput.setText(username); |
|
|
|
|
this.passwordInput.setText(pwd); |
|
|
|
|
this.certPathInput.setText(certPath); |
|
|
|
|
this.certSecretKeyInput.setText(certSecretKey); |
|
|
|
|
this.rememberPwdCheckbox.setSelected(rememberPwd); |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
this.remoteWorkspaceURL = RemoteWorkspaceURL.createDefaultURL(); |
|
|
|
|
this.usernameInput.setText(StringUtils.EMPTY); |
|
|
|
|
this.passwordInput.setText(StringUtils.EMPTY); |
|
|
|
|
this.rememberPwdCheckbox.setSelected(true); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
fillRemoteEnvURLField(); |
|
|
|
@ -333,6 +341,7 @@ public class RemoteEnvPane extends BasicBeanPane<RemoteDesignerWorkspaceInfo> {
|
|
|
|
|
String url = this.remoteWorkspaceURL.getURL(); |
|
|
|
|
String username = this.usernameInput.getText(); |
|
|
|
|
String password = new String(this.passwordInput.getPassword()); |
|
|
|
|
boolean rememberPwd = this.rememberPwdCheckbox.isSelected(); |
|
|
|
|
DesignerEnvProcessor envProcessor = ExtraDesignClassManager.getInstance().getSingle(DesignerEnvProcessor.XML_TAG); |
|
|
|
|
if (envProcessor != null) { |
|
|
|
|
url = envProcessor.changeEnvPathBeforeConnect(username, password, url); |
|
|
|
@ -342,7 +351,8 @@ public class RemoteEnvPane extends BasicBeanPane<RemoteDesignerWorkspaceInfo> {
|
|
|
|
|
username, |
|
|
|
|
password, |
|
|
|
|
this.certPathInput.getText(), |
|
|
|
|
new String(this.certSecretKeyInput.getPassword())); |
|
|
|
|
new String(this.certSecretKeyInput.getPassword()), |
|
|
|
|
rememberPwd); |
|
|
|
|
|
|
|
|
|
return RemoteDesignerWorkspaceInfo.create(connection); |
|
|
|
|
} |
|
|
|
@ -522,6 +532,20 @@ public class RemoteEnvPane extends BasicBeanPane<RemoteDesignerWorkspaceInfo> {
|
|
|
|
|
accountPanel.add(content, BorderLayout.CENTER); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private JPanel packRememberPwdConfigPanel() { |
|
|
|
|
|
|
|
|
|
JPanel panel = TableLayoutHelper.createGapTableLayoutPane( |
|
|
|
|
new Component[][]{ |
|
|
|
|
new Component[]{rememberPwdCheckbox} |
|
|
|
|
}, |
|
|
|
|
new double[]{PREFERRED}, |
|
|
|
|
new double[]{PREFERRED}, |
|
|
|
|
5, |
|
|
|
|
10 |
|
|
|
|
); |
|
|
|
|
TableLayoutHelper.modifyTableLayoutIndexHGap(panel, 0, 50); |
|
|
|
|
return panel; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private JPanel createHttpsCertFileInputPanel() { |
|
|
|
|
JPanel inputPanel = FRGUIPaneFactory.createRightFlowInnerContainer_S_Pane(); |
|
|
|
|