diff --git a/designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java b/designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java index dcde4716b0..9c932f0370 100644 --- a/designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java +++ b/designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java @@ -1,7 +1,6 @@ package com.fr.design.data; import com.fanruan.ComponentUtils; -import com.fanruan.config.impl.data.TableDataConfigProviderFactory; import com.fr.base.StoreProcedureParameter; import com.fr.base.TableData; import com.fr.concurrent.NamedThreadFactory; @@ -20,6 +19,7 @@ import com.fr.data.impl.storeproc.StoreProcedureHelper; import com.fr.data.operator.DataOperator; import com.fr.design.DesignModelAdapter; import com.fr.design.data.datapane.preview.PreviewTablePane; +import com.fr.design.data.datapane.preview.TableDataBeanHelper; import com.fr.design.data.tabledata.wrapper.MultiResultTableDataNameWrapper; import com.fr.design.data.tabledata.wrapper.MultiResultTableDataWrapper; import com.fr.design.data.tabledata.wrapper.ServerTableDataWrapper; @@ -316,7 +316,7 @@ public abstract class DesignTableDataManager { names.add(entry.getKey()); } //服务器数据集 - Map tableDatas = TableDataConfigProviderFactory.getInstance().getTableDatas(); + Map tableDatas = TableDataBeanHelper.getServerTableDatas(); for (Map.Entry entry : tableDatas.entrySet()) { names.add(entry.getKey()); } diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/preview/TableDataBeanHelper.java b/designer-base/src/main/java/com/fr/design/data/datapane/preview/TableDataBeanHelper.java index 5efe1c8908..29750d1294 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/preview/TableDataBeanHelper.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/preview/TableDataBeanHelper.java @@ -198,9 +198,8 @@ public class TableDataBeanHelper { tableData.setPageQuerySql(DataEncryptionHelper.decrypt(bean.getPageQuery())); } Connection connection = connectionMap.get(bean.getDatabase()); - if (connection != null) { - tableData.setDatabase(new NameDatabaseConnection(bean.getDatabase())); - } else { + tableData.setDatabase(new NameDatabaseConnection(bean.getDatabase())); + if (connection == null) { FineLoggerFactory.getLogger().info("not find conn by {}", bean.getDatabase()); } String sql = SqlUtils.clearSqlComments(DataEncryptionHelper.decrypt(bean.getQuery())); diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MaxMemRowCountPanel.java b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MaxMemRowCountPanel.java index d3e43724a9..3d2ee413e4 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MaxMemRowCountPanel.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MaxMemRowCountPanel.java @@ -17,6 +17,7 @@ import com.fr.stable.StringUtils; import static com.fine.theme.utils.FineClientProperties.ADAPTIVE_COMBO_BOX; import static com.fine.theme.utils.FineClientProperties.COMBO_BOX_TYPE; +import static com.fine.theme.utils.FineUIScale.scale; public class MaxMemRowCountPanel extends UIToolbar { @@ -24,9 +25,9 @@ public class MaxMemRowCountPanel extends UIToolbar { private static final int MAX_IN_MEMORY = 1; private static final String[] CACHE_LIST = {com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Save_All_Records_In_Memory"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Max_Mem_Row_Count") }; - private static final int MAX_WIDTH = getMaxComBoBoxWidth() > 200 ? 350 : 280; + private static final int MAX_WIDTH = getMaxWidth(); private static final int MAX_COMPONENT_COUNT_OF_MAX_MEMORY = 4; - private static int getMaxComBoBoxWidth() { + private static int getMaxWidth() { int maxWidth = GraphHelper.getWidth(CACHE_LIST[0]); for (int i = 1; i < CACHE_LIST.length; i++) { int width = GraphHelper.getWidth(CACHE_LIST[i]); @@ -34,6 +35,7 @@ public class MaxMemRowCountPanel extends UIToolbar { maxWidth = width; } } + maxWidth = maxWidth > scale(200) ? scale(350) : scale(280); return maxWidth; } diff --git a/designer-base/src/main/java/com/fr/design/gui/icombobox/UIComboBox.java b/designer-base/src/main/java/com/fr/design/gui/icombobox/UIComboBox.java index 27dea24e21..6b3903ee5a 100644 --- a/designer-base/src/main/java/com/fr/design/gui/icombobox/UIComboBox.java +++ b/designer-base/src/main/java/com/fr/design/gui/icombobox/UIComboBox.java @@ -162,7 +162,7 @@ public class UIComboBox extends JComboBox implements UIObserver, GlobalNameObser int renderFix = FineUIScale.scale(5); int comboHeight = FineUIUtils.getAndScaleInt("ComboBox.comboHeight", 24); //renderFix的原因在于:render里,每一个项前面了空了一格,要多几像素 - return new Dimension(FineUIScale.scale(super.getPreferredSize().width) + renderFix, comboHeight); + return new Dimension(super.getPreferredSize().width + renderFix, comboHeight); } public void refreshBoxItems(List list) { diff --git a/designer-realize/src/main/java/com/fr/nx/app/designer/menu/CalculateAttrPane.java b/designer-realize/src/main/java/com/fr/nx/app/designer/menu/CalculateAttrPane.java index cf720b37b0..280ec9d06b 100644 --- a/designer-realize/src/main/java/com/fr/nx/app/designer/menu/CalculateAttrPane.java +++ b/designer-realize/src/main/java/com/fr/nx/app/designer/menu/CalculateAttrPane.java @@ -64,7 +64,7 @@ public class CalculateAttrPane extends BasicBeanPane { JPanel featureFlagPanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); ActionLabel featureLabel = new ActionLabel(InterProviderFactory.getProvider().getLocText("Fine-Plugin_Engine_Experimental_Feature")); - featureLabel.setFont(new Font(null, Font.PLAIN, 10)); + FineUIStyle.setStyle(featureLabel, FineUIStyle.HYPER_LINK_LABEL); featureLabel.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) {