Browse Source

Pull request #2432: REPORT-40259【回归】Tomcat 下通过 IP 直接访问数据决策系统,切换远程之后配置页面url变了 && REPORT-38557 修复【JDK11】添加控件图标的面板里输入框显示不全

Merge in DESIGN/design from ~HADES/design:release/10.0 to release/10.0

* commit 'b6085f1a3e24e28e4c11bb759c04abdab8f16c89':
  REPORT-38557 修复【JDK11】添加控件图标的面板里输入框显示不全
  REPORT-40259【回归】Tomcat 下通过 IP 直接访问数据决策系统,切换远程之后配置页面url变了
feature/big-screen
Hades 4 years ago
parent
commit
fb0636c1bb
  1. 9
      designer-base/src/main/java/com/fr/design/web/CustomIconPane.java
  2. 34
      designer-base/src/main/java/com/fr/env/RemoteEnvPane.java

9
designer-base/src/main/java/com/fr/design/web/CustomIconPane.java

@ -4,6 +4,7 @@ import com.fr.base.BaseUtils;
import com.fr.base.GraphHelper;
import com.fr.base.Icon;
import com.fr.base.IconManager;
import com.fr.design.designer.IntervalConstants;
import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.dialog.FineJOptionPane;
@ -401,9 +402,9 @@ public class CustomIconPane extends BasicPane {
private void init() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
double p = TableLayout.PREFERRED;
double rowSize[] = {p, p};
double columnSize[] = {p, p, p};
double[] rowSize = {p, p};
double[] columnSize = {p, p};
int[][] rowCount = {{1, 1}, {1, 1}};
UIButton browseButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Custom_Icon_SelectIcon"));
browseButton.setPreferredSize(new Dimension(80, 25));
browseButton.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Click_this_button"));
@ -442,7 +443,7 @@ public class CustomIconPane extends BasicPane {
imagePane.add(browseButton);
Component[][] components = {{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Name") + ":"), nameTextField}, {new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Icon") + ":"), imagePane}};
JPanel centerPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
JPanel centerPane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W0, IntervalConstants.INTERVAL_L1);
this.add(centerPane, BorderLayout.CENTER);
}

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

@ -1,7 +1,5 @@
package com.fr.env;
import com.fr.base.FRContext;
import com.fr.base.ServerConfig;
import com.fr.design.DesignerEnvManager;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.beans.BasicBeanPane;
@ -444,38 +442,6 @@ public class RemoteEnvPane extends BasicBeanPane<RemoteDesignerWorkspaceInfo> {
new double[]{FILL}
));
setDefaultAppAndServlet();
}
/**
* 设置 app servlet 默认值
*/
private void setDefaultAppAndServlet() {
setWrap(webAppNameInput, () -> FRContext.getCommonOperator().getAppName(), RemoteWorkspaceURL.DEFAULT_WEB_APP_NAME);
setWrap(servletNameInput, () -> ServerConfig.getInstance().getServletName(), RemoteWorkspaceURL.DEFAULT_SERVLET_NAME);
}
private void setWrap(final UITextField textField, final Supplier<String> supplier, final String defaultName) {
new SwingWorker<String, Void>() {
@Override
protected String doInBackground() throws Exception {
return supplier.get();
}
@Override
protected void done() {
String name = defaultName;
try {
name = get();
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage() , e);
}
if (StringUtils.isEmpty(textField.getText())) {
textField.setText(name);
}
}
}.execute();
}

Loading…
Cancel
Save