Browse Source

Pull request #14886: REPORT-133133 & REPORT-134138 & REPORT-135142 fix:数据连接异常报错场景弹窗处理

Merge in DESIGN/design from ~LEVY.XIE/design:fbp/release to fbp/release

* commit 'c71d151e5e01c5baac823d7eadce29f859cd9d72':
  Revert "REPORT-133133 fix:数据连接异常报错场景弹窗处理"
  无jira 代码质量
  无jira 代码质量
  REPORT-135142 fix:NewUI 图表显示比例调优
  REPORT-133133 & REPORT-134138 fix:数据连接异常报错场景弹窗处理
fbp/release
Levy.Xie-解安森 2 months ago
parent
commit
30c8e64e2d
  1. 12
      designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java
  2. 2
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartHtmlLabelPane.java

12
designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java

@ -13,6 +13,8 @@ import com.fr.design.ExtraDesignClassManager;
import com.fr.design.data.MapCompareUtils; import com.fr.design.data.MapCompareUtils;
import com.fr.design.data.datapane.preview.ConnectionInfoBeanHelper; import com.fr.design.data.datapane.preview.ConnectionInfoBeanHelper;
import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.editlock.EditLockUtils;
import com.fr.design.fun.ConnectionProvider; import com.fr.design.fun.ConnectionProvider;
import com.fr.design.gui.controlpane.JListControlPane; import com.fr.design.gui.controlpane.JListControlPane;
import com.fr.design.gui.controlpane.NameObjectCreator; import com.fr.design.gui.controlpane.NameObjectCreator;
@ -26,6 +28,7 @@ import com.fr.license.database.DBTypes;
import com.fr.license.database.DataBaseTypePointManager; import com.fr.license.database.DataBaseTypePointManager;
import com.fr.license.exception.DataBaseNotSupportedException; import com.fr.license.exception.DataBaseNotSupportedException;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.report.LockItem;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import com.fr.stable.Nameable; import com.fr.stable.Nameable;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
@ -36,6 +39,7 @@ import com.fr.workspace.server.entity.connection.ConnectionBean;
import com.fr.workspace.server.repository.connection.ConnectionRepository; import com.fr.workspace.server.repository.connection.ConnectionRepository;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import javax.swing.JOptionPane;
import javax.swing.SwingWorker; import javax.swing.SwingWorker;
import java.awt.Window; import java.awt.Window;
import java.util.ArrayList; import java.util.ArrayList;
@ -366,8 +370,8 @@ public class ConnectionListPane extends JListControlPane implements ConnectionSh
} }
} }
public static void showDialog(Window parent) { public static void showDialog(Window parent) {
try {
final Map<String, Connection> connectionMap = ConnectionInfoBeanHelper.createConnectionMap(ConnectionRepository.getInstance().getAll()); final Map<String, Connection> connectionMap = ConnectionInfoBeanHelper.createConnectionMap(ConnectionRepository.getInstance().getAll());
final ConnectionManagerPane connectionManagerPane = new ConnectionManagerPane() { final ConnectionManagerPane connectionManagerPane = new ConnectionManagerPane() {
@Override @Override
@ -378,6 +382,12 @@ public class ConnectionListPane extends JListControlPane implements ConnectionSh
final BasicDialog connectionListDialog = connectionManagerPane.showLargeWindow(parent, null); final BasicDialog connectionListDialog = connectionManagerPane.showLargeWindow(parent, null);
connectionListDialog.addDialogActionListener(new ConnectionListDialogActionAdapter(connectionManagerPane, connectionListDialog, connectionMap)); connectionListDialog.addDialogActionListener(new ConnectionListDialogActionAdapter(connectionManagerPane, connectionListDialog, connectionMap));
connectionListDialog.setVisible(true); connectionListDialog.setVisible(true);
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
FineJOptionPane.showMessageDialog(null, Toolkit.i18nText("Fine-Design_Remote_Data_Error"),
Toolkit.i18nText("Fine-Design_Basic_Error"), JOptionPane.ERROR_MESSAGE);
EditLockUtils.unlock(LockItem.CONNECTION);
}
} }
@Override @Override

2
designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartHtmlLabelPane.java

@ -151,7 +151,7 @@ public class VanChartHtmlLabelPane extends JPanel {
new Component[]{isCustomWidth, customWidth}, new Component[]{isCustomWidth, customWidth},
new Component[]{isCustomHeight, customHeight}, new Component[]{isCustomHeight, customHeight},
}; };
return FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1, 1}); return FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.4, 0.6});
} }
private void checkWidth() { private void checkWidth() {

Loading…
Cancel
Save