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