Browse Source

merge

master
hzzz 7 years ago
parent
commit
cd26cd96bc
  1. 2
      designer-base/src/com/fr/design/DesignerEnvManager.java
  2. 6
      designer-base/src/com/fr/env/EnvListPane.java
  3. 1245
      designer-base/src/com/fr/env/RemoteEnv.java
  4. 17
      designer-base/src/com/fr/env/RemoteEnvPane.java

2
designer-base/src/com/fr/design/DesignerEnvManager.java

@ -1455,7 +1455,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
}
if (reader.isChildNode()) {
if (reader.getTagName().equals("Env")) { // description.
if (reader.getTagName().contains("Env")) { // description.
// marks:获取名字
String reportServerName = reader.getAttrAsString("name", null);

6
designer-base/src/com/fr/env/EnvListPane.java vendored

@ -1,6 +1,8 @@
package com.fr.env;
import com.fr.base.Env;
import com.fr.base.env.resource.LocalEnvConfig;
import com.fr.base.env.resource.RemoteEnvConfig;
import com.fr.core.env.EnvConfig;
import com.fr.dav.LocalEnv;
import com.fr.design.DesignerEnvManager;
@ -60,9 +62,9 @@ public class EnvListPane extends JListControlPane {
@Override
public NameableCreator[] createNameableCreators() {
NameableCreator local = new NameObjectCreator(Inter.getLocText("Env-Local_Directory"), "com/fr/design/images/data/bind/localconnect.png",
LocalEnv.class, LocalEnvPane.class);
LocalEnvConfig.class, LocalEnvPane.class);
NameableCreator remote = new NameObjectCreator(Inter.getLocText("Env-Remote_Server"), "com/fr/design/images/data/bind/distanceconnect.png",
RemoteEnv.class, RemoteEnvPane.class);
RemoteEnvConfig.class, RemoteEnvPane.class);
return new NameableCreator[]{local, remote};
}

1245
designer-base/src/com/fr/env/RemoteEnv.java vendored

File diff suppressed because it is too large Load Diff

17
designer-base/src/com/fr/env/RemoteEnvPane.java vendored

@ -1,6 +1,8 @@
package com.fr.env;
import com.fr.base.FRContext;
import com.fr.base.env.resource.EnvConfigUtils;
import com.fr.base.env.resource.RemoteEnvConfig;
import com.fr.design.DesignerEnvManager;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.border.UITitledBorder;
@ -49,7 +51,7 @@ import static com.fr.design.layout.TableLayout.PREFERRED;
/**
* @author yaohwu
*/
public class RemoteEnvPane extends BasicBeanPane<RemoteEnv> {
public class RemoteEnvPane extends BasicBeanPane<RemoteEnvConfig> {
private static final Color TIPS_FONT_COLOR = new Color(0x8f8f92);
@ -100,7 +102,7 @@ public class RemoteEnvPane extends BasicBeanPane<RemoteEnv> {
/**
* 主机位置
*/
private RemoteEnvURL remoteEnvURL;
private RemoteEnvURL remoteEnvURL = new RemoteEnvURL("");
/**
* https 配置面板
*/
@ -151,6 +153,7 @@ public class RemoteEnvPane extends BasicBeanPane<RemoteEnv> {
@Override
public void removeUpdate(DocumentEvent e) {
actionURLInputChange();
}
@ -250,7 +253,7 @@ public class RemoteEnvPane extends BasicBeanPane<RemoteEnv> {
}
@Override
public void populateBean(RemoteEnv ob) {
public void populateBean(RemoteEnvConfig ob) {
if (StringUtils.isEmpty(ob.getPath())) {
remoteEnvURL = RemoteEnvURL.createDefaultURL();
@ -265,18 +268,20 @@ public class RemoteEnvPane extends BasicBeanPane<RemoteEnv> {
fileChooserButton.setEnabled(remoteEnvURL.getHttps());
updateHttpsConfigPanel();
this.usernameInput.setText(ob.getUser() == null ? StringUtils.EMPTY : ob.getUser());
String username = EnvConfigUtils.getUsername(ob);
String pwd = EnvConfigUtils.getPassword(ob);
this.usernameInput.setText(username == null ? StringUtils.EMPTY : pwd);
this.passwordInput.setText(ob.getPassword() == null ? StringUtils.EMPTY : ob.getPassword());
}
@Override
public RemoteEnv updateBean() {
public RemoteEnvConfig updateBean() {
String path = remoteEnvURL.getURL();
String user = this.usernameInput.getText();
String password = new String(this.passwordInput.getPassword());
return new RemoteEnv(path, user, password);
return new RemoteEnvConfig(path, user, password);
}
@Override

Loading…
Cancel
Save