From 2cd5514923ff976c1b72e5776f8a66670e0b9f78 Mon Sep 17 00:00:00 2001 From: lemon Date: Mon, 21 Oct 2024 15:27:10 +0800 Subject: [PATCH 01/11] =?UTF-8?q?REPORT-137646=20&=20REPORT-137829=20fix?= =?UTF-8?q?=EF=BC=9A=E5=88=A0=E9=99=A4=E2=80=9C=E6=B2=A1=E6=9C=89=E8=83=8C?= =?UTF-8?q?=E6=99=AF=E2=80=9D=20&=20=E7=A7=BB=E5=8A=A8=E7=AB=AF=E5=BC=B9?= =?UTF-8?q?=E7=AA=97=E5=B8=83=E5=B1=80=E8=B0=83=E6=95=B4=EF=BC=8Csplit=20p?= =?UTF-8?q?anel=20=E8=AE=BE=E7=BD=AE=E6=8B=96=E6=8B=BD=E8=8C=83=E5=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tabledatapane/DBTableDataPane.java | 8 ++-- .../design/gui/controlpane/JControlPane.java | 39 ++++++++++++++++- .../design/gui/controlpane/UIControlPane.java | 2 +- .../popup/MobilePopupRegularPane.java | 4 +- .../hyperlink/popup/StyleSettingPane.java | 14 +++--- .../background/impl/NullBackgroundPane.java | 40 ------------------ .../light/ui/laf/FineLightLaf.properties | 2 + .../images/background/null_background.png | Bin 349 -> 0 bytes 8 files changed, 52 insertions(+), 57 deletions(-) delete mode 100644 designer-chart/src/main/resources/com/fr/design/images/background/null_background.png diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java index dbe45885cc..937e4ec62c 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java @@ -3,6 +3,7 @@ package com.fr.design.data.tabledata.tabledatapane; import com.fine.theme.icon.LazyIcon; import com.fine.theme.utils.FineUIScale; import com.fine.theme.utils.FineUIStyle; +import com.fine.theme.utils.FineUIUtils; import com.formdev.flatlaf.util.ScaledEmptyBorder; import com.fr.base.Parameter; import com.fr.base.ParameterHelper; @@ -272,11 +273,8 @@ public class DBTableDataPane extends AbstractTableDataPane implemen JPanel sqlSplitPane = new JPanel(FRGUIPaneFactory.createScaledBorderLayout(4, 4)); sqlSplitPane.add(box, BorderLayout.CENTER); - - box.setMinimumSize(FineUIScale.scale(new Dimension(300, 400))); - - this.connectionTableProcedurePane.setMinimumSize(FineUIScale.scale(new Dimension(230, 400))); - this.connectionTableProcedurePane.setMaximumSize(FineUIScale.scale(new Dimension(500, 400))); + int leftComponentMin = FineUIUtils.getAndScaleInt("SplitPane.leftComponent.minimumSize", 120); + this.connectionTableProcedurePane.setMinimumSize(FineUIScale.scale(new Dimension(leftComponentMin, 400))); JSplitPane mainSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, this.connectionTableProcedurePane, sqlSplitPane); mainSplitPane.setOneTouchExpandable(true); diff --git a/designer-base/src/main/java/com/fr/design/gui/controlpane/JControlPane.java b/designer-base/src/main/java/com/fr/design/gui/controlpane/JControlPane.java index b957a1370d..c0da6e502f 100644 --- a/designer-base/src/main/java/com/fr/design/gui/controlpane/JControlPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/controlpane/JControlPane.java @@ -1,6 +1,7 @@ package com.fr.design.gui.controlpane; import com.fine.theme.utils.FineUIScale; +import com.fine.theme.utils.FineUIUtils; import com.formdev.flatlaf.ui.FlatUIUtils; import com.formdev.flatlaf.util.ScaledEmptyBorder; import com.fr.design.border.FineBorderFactory; @@ -21,7 +22,9 @@ import javax.swing.JSplitPane; import java.awt.BorderLayout; import java.awt.CardLayout; import java.awt.Color; +import java.awt.Dimension; import java.util.Arrays; +import java.util.Objects; import java.util.stream.Stream; /** @@ -47,6 +50,11 @@ abstract class JControlPane extends BasicPane implements UnrepeatedNameHelper, S protected JPanel cardPane; protected AbstractShortCutFactory shortCutFactory; + protected JSplitPane mainSplitPane; + // split pane 左边组件最小宽度 + protected int leftComponentMin; + // split pane 左边组件最大宽度 + protected int leftComponentMax; JControlPane() { this.initShortCutFactory(); @@ -110,7 +118,10 @@ abstract class JControlPane extends BasicPane implements UnrepeatedNameHelper, S this.creators = this.createNameableCreators(); initCardPane(); // SplitPane - JSplitPane mainSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, getLeftPane(), cardPane); + JPanel leftComponentPane = getLeftPane(); + leftComponentMin = FineUIUtils.getAndScaleInt("SplitPane.leftComponent.minimumSize", 120); + leftComponentPane.setMinimumSize(FineUIScale.createScaleDimension(leftComponentMin, 0)); + mainSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, leftComponentPane, cardPane); mainSplitPane.setOneTouchExpandable(true); this.add(mainSplitPane, BorderLayout.CENTER); @@ -123,11 +134,12 @@ abstract class JControlPane extends BasicPane implements UnrepeatedNameHelper, S } protected void initCardPane() { + leftComponentMax = FineUIUtils.getAndScaleInt("SplitPane.leftComponent.maximumSize", 240); this.controlUpdatePane = createControlUpdatePane(); // p: edit card layout this.cardLayout = new CardLayout(); - cardPane = FRGUIPaneFactory.createCardLayout_S_Pane(); + initCardPaneWithMinSize(); cardPane.setLayout(this.cardLayout); // p:选择的Label UILabel selectLabel = new UILabel(); @@ -135,6 +147,29 @@ abstract class JControlPane extends BasicPane implements UnrepeatedNameHelper, S cardPane.add(controlUpdatePane, EDIT); } + /** + * 初始化一个 rightComponent,且指定 minimumSize + * + * {@link javax.swing.plaf.basic.BasicSplitPaneDivider#DragController} 拖拽的时候会调用 getMinimumSize 方法 + * split pane driver 拖拽范围取自 leftComponent 的 minimumSize 和 rightComponent 的 minimumSize + */ + private void initCardPaneWithMinSize() { + cardPane = new JPanel(new CardLayout()) { + @Override + public Dimension getMinimumSize() { + Dimension size = super.getMinimumSize(); + if (mainSplitPane == null) { + return size; + } + Dimension parentSize = mainSplitPane.getSize(); + if (parentSize.width != 0 && Objects.equals(JSplitPane.HORIZONTAL_SPLIT, mainSplitPane.getOrientation())) { + size.width = parentSize.width - FineUIScale.scale(leftComponentMax); + } + return size; + } + }; + } + public void showEditPane() { this.cardLayout.show(cardPane, EDIT); } diff --git a/designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java b/designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java index 814e52848b..551c05a0bf 100644 --- a/designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java @@ -91,7 +91,7 @@ public abstract class UIControlPane extends JControlPane { rightPaneWrapper.add(cardPane, BorderLayout.CENTER); rightPaneWrapper.setBorder(new ScaledEmptyBorder(0, 10, 0, 0)); // SplitPane - JSplitPane mainSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, leftPaneWrapper, rightPaneWrapper); + mainSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, leftPaneWrapper, rightPaneWrapper); mainSplitPane.setOneTouchExpandable(true); this.add(mainSplitPane, BorderLayout.CENTER); mainSplitPane.setDividerLocation(getLeftPreferredSize()); diff --git a/designer-base/src/main/java/com/fr/design/hyperlink/popup/MobilePopupRegularPane.java b/designer-base/src/main/java/com/fr/design/hyperlink/popup/MobilePopupRegularPane.java index 7978159c1c..293d2893e6 100644 --- a/designer-base/src/main/java/com/fr/design/hyperlink/popup/MobilePopupRegularPane.java +++ b/designer-base/src/main/java/com/fr/design/hyperlink/popup/MobilePopupRegularPane.java @@ -45,7 +45,7 @@ public class MobilePopupRegularPane extends BasicPane { spinnerGroupPane = this.createSpinnerPane(); this.add(column(LayoutConstants.VERTICAL_GAP, cell(this.createRadioButtonGroupPane()), - row(flex(1), cell(spinnerGroupPane).weight(3)) + row(flex(1.5), cell(spinnerGroupPane).weight(3)) ).getComponent()); } @@ -62,7 +62,7 @@ public class MobilePopupRegularPane extends BasicPane { radioButtons.add(autoRadio); radiosPane.add(row(30, cell(customRadio), cell(autoRadio), flex()).getComponent()); - return row(cell(new UILabel(this.label, FineUIStyle.LABEL_SECONDARY)).weight(1), cell(radiosPane).weight(3)).getComponent(); + return row(cell(new UILabel(this.label, FineUIStyle.LABEL_SECONDARY)).weight(1.5), cell(radiosPane).weight(3)).getComponent(); } private ActionListener radioActionListener = new ActionListener() { diff --git a/designer-base/src/main/java/com/fr/design/hyperlink/popup/StyleSettingPane.java b/designer-base/src/main/java/com/fr/design/hyperlink/popup/StyleSettingPane.java index 701594bf12..3cd58ca51d 100644 --- a/designer-base/src/main/java/com/fr/design/hyperlink/popup/StyleSettingPane.java +++ b/designer-base/src/main/java/com/fr/design/hyperlink/popup/StyleSettingPane.java @@ -83,9 +83,9 @@ public class StyleSettingPane extends BasicBeanPane { UILabel borderLabel = new UILabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Border")); borderPane.add(column(LayoutConstants.VERTICAL_GAP, - row(cell(borderLabel).weight(1), cell(new UILabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Line"), FineUIStyle.LABEL_SECONDARY)).weight(1), cell(borderType).weight(2), flex(3)), - row(flex(1), cell(new UILabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Colors"), FineUIStyle.LABEL_SECONDARY)).weight(1), cell(borderColor).weight(2), flex(3)), - row(flex(1), cell(new UILabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Radius"), FineUIStyle.LABEL_SECONDARY)).weight(1), cell(borderRadiusSpinner).weight(2), flex(3)) + row(cell(borderLabel).weight(1), cell(new UILabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Line"), FineUIStyle.LABEL_SECONDARY)).weight(1.5), cell(borderType).weight(2), flex(2.5)), + row(flex(1), cell(new UILabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Colors"), FineUIStyle.LABEL_SECONDARY)).weight(1.5), cell(borderColor).weight(2), flex(2.5)), + row(flex(1), cell(new UILabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Radius"), FineUIStyle.LABEL_SECONDARY)).weight(1.5), cell(borderRadiusSpinner).weight(2), flex(2.5)) ).getComponent()); return borderPane; } @@ -102,8 +102,8 @@ public class StyleSettingPane extends BasicBeanPane { JLabel bgLabel = new JLabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Background")); bgPane.add(column(LayoutConstants.VERTICAL_GAP, - row(cell(bgLabel).weight(1), cell(new UILabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Colors"), FineUIStyle.LABEL_SECONDARY)).weight(1), cell(bgColor).weight(2), flex(3)), - row(flex(1), cell(new UILabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Opacity"), FineUIStyle.LABEL_SECONDARY)).weight(1), cell(transparencyPane).weight(3), flex(2)) + row(cell(bgLabel).weight(1), cell(new UILabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Colors"), FineUIStyle.LABEL_SECONDARY)).weight(1.5), cell(bgColor).weight(2), flex(2.5)), + row(flex(1), cell(new UILabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Opacity"), FineUIStyle.LABEL_SECONDARY)).weight(1.5), cell(transparencyPane).weight(3), flex(1.5)) ).getComponent()); return bgPane; } @@ -117,9 +117,9 @@ public class StyleSettingPane extends BasicBeanPane { sizePane.add(column(LayoutConstants.VERTICAL_GAP, row( column(LayoutConstants.VERTICAL_GAP, cell(sizeLabel), flex()).weight(1), - cell(mobileRegularPane).weight(4), flex(2) + cell(mobileRegularPane).weight(4.5), flex(1.5) ), - row(flex(1), cell(padRegularPane).weight(4), flex(2)) + row(flex(1), cell(padRegularPane).weight(4.5), flex(1.5)) ).getComponent()); return sizePane; } diff --git a/designer-base/src/main/java/com/fr/design/style/background/impl/NullBackgroundPane.java b/designer-base/src/main/java/com/fr/design/style/background/impl/NullBackgroundPane.java index 976744e3b3..9f7ef617e3 100644 --- a/designer-base/src/main/java/com/fr/design/style/background/impl/NullBackgroundPane.java +++ b/designer-base/src/main/java/com/fr/design/style/background/impl/NullBackgroundPane.java @@ -1,20 +1,15 @@ package com.fr.design.style.background.impl; -import com.fine.theme.utils.FineUIScale; import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.style.background.BackgroundDetailPane; import com.fr.general.Background; -import com.fr.general.locale.image.I18nImage; import javax.swing.*; import javax.swing.event.ChangeListener; import java.awt.BorderLayout; -import java.awt.Dimension; -import java.awt.Graphics; -import java.awt.Image; import static com.fine.swing.ui.layout.Layouts.cell; import static com.fine.swing.ui.layout.Layouts.column; @@ -25,23 +20,14 @@ import static com.fine.swing.ui.layout.Layouts.flex; */ public class NullBackgroundPane extends BackgroundDetailPane { - private static final String NULL_BACKGROUND = "/com/fr/design/images/background/null_background.png"; - private static final Image DEFAULT_NULL_BACKGROUND_IMAGE; - - static { - DEFAULT_NULL_BACKGROUND_IMAGE = I18nImage.getImage(NULL_BACKGROUND); - } - public NullBackgroundPane() { this.setLayout(FRGUIPaneFactory.createBorderLayout()); UILabel centerLabel = new UILabel( com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Background_Background_Is_Null")); - ImagePanel imagePane = new ImagePanel(); JPanel pane = column( 10, flex(), - cell(imagePane), cell(centerLabel), flex() ).getComponent(); @@ -60,30 +46,4 @@ public class NullBackgroundPane extends BackgroundDetailPane { public void addChangeListener(ChangeListener changeListener) { // do nothing. } - - /** - * 水平居中绘制 Image - */ - public class ImagePanel extends JPanel { - - public ImagePanel() { - } - - @Override - public void paintComponent(Graphics g) { - super.paintComponent(g); - if (DEFAULT_NULL_BACKGROUND_IMAGE != null) { - int x = (this.getWidth() - DEFAULT_NULL_BACKGROUND_IMAGE.getWidth(null)) / 2; - g.drawImage(DEFAULT_NULL_BACKGROUND_IMAGE, x, 0, this); - } - } - - @Override - public Dimension getPreferredSize() { - if (DEFAULT_NULL_BACKGROUND_IMAGE == null) { - return super.getPreferredSize(); - } - return FineUIScale.scale(new Dimension(DEFAULT_NULL_BACKGROUND_IMAGE.getWidth(null), DEFAULT_NULL_BACKGROUND_IMAGE.getHeight(null))); - } - } } diff --git a/designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties b/designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties index 0adc8cf686..aab414e72f 100644 --- a/designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties +++ b/designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties @@ -794,6 +794,8 @@ FormulaPane.buttonHeight=$Component.defaultHeight SplitPane.dividerSize = 5 SplitPane.continuousLayout = true SplitPane.border = null +SplitPane.leftComponent.minimumSize = 120 +SplitPane.leftComponent.maximumSize = 240 # \u5F71\u54CD\u89C6\u89C9\u6548\u679C\uFF0C\u4E34\u65F6\u5148\u5173\u6389 SplitPane.supportsOneTouchButtons = false SplitPane.centerOneTouchButtons = true diff --git a/designer-chart/src/main/resources/com/fr/design/images/background/null_background.png b/designer-chart/src/main/resources/com/fr/design/images/background/null_background.png deleted file mode 100644 index 617860181278c14cbd9bd9d114956b1a715a5733..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 349 zcmeAS@N?(olHy`uVBq!ia0vp^DIm``W z$lZxy-8q?;Kn_c~qpu?a!^VE@KZ&eB{wGft$B+ufw-*f=859H<7GAIO`*wbjX`#w BVQ&Bc From 2906309b90f43dde42c7395d6ff0e1ef0d1dab6b Mon Sep 17 00:00:00 2001 From: Anner Date: Mon, 21 Oct 2024 12:01:15 +0800 Subject: [PATCH 02/11] =?UTF-8?q?REPORT-130954=20fix:=20=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E5=90=AF=E5=8A=A8=E5=B1=8F=E8=94=BD=E4=B8=8D=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E7=9A=84=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../adaptation/DesignServerSupportModule.java | 62 +++++++++++++++++++ .../adaptation/ReportAdaptationComponent.java | 5 +- 2 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 designer-realize/src/main/java/com/fanruan/boot/adaptation/DesignServerSupportModule.java diff --git a/designer-realize/src/main/java/com/fanruan/boot/adaptation/DesignServerSupportModule.java b/designer-realize/src/main/java/com/fanruan/boot/adaptation/DesignServerSupportModule.java new file mode 100644 index 0000000000..df486b1d72 --- /dev/null +++ b/designer-realize/src/main/java/com/fanruan/boot/adaptation/DesignServerSupportModule.java @@ -0,0 +1,62 @@ +package com.fanruan.boot.adaptation; + +import com.fanruan.portal.module.PortalModuleManager; +import com.fr.third.guava.collect.Sets; + +import java.util.Optional; +import java.util.Set; + +import static com.fanruan.portal.authority.PortalAuthorityItems.ENTERPRISE_GENERAL_ID; +import static com.fanruan.portal.authority.PortalAuthorityItems.ENTERPRISE_ID; +import static com.fanruan.portal.authority.PortalAuthorityItems.MAP_ID; +import static com.fanruan.portal.authority.PortalAuthorityItems.PORTAL_MANAGEMENT_ID; +import static com.fanruan.portal.authority.PortalAuthorityItems.SECURITY_ID; + +/** + * 内置服务器支持展示的模块,预期调用顺序在业务模块之后 + * + * @author Anner + * @since 11.0 + * Created on 2024/10/15 + */ +public class DesignServerSupportModule { + private final static Set SUPPORT_MODULE = Sets.newHashSet( + // 系统管理 + PORTAL_MANAGEMENT_ID, + // 企业设置 + ENTERPRISE_ID, + // 企业设置 - 通用设置 + ENTERPRISE_GENERAL_ID, + // 安全管理 + SECURITY_ID, + // 地图管理 + MAP_ID + ); + + /** + * 注册一下支持展示的模块 + * + * @param moduleName name + */ + public static void register(String moduleName) { + Optional.of(moduleName).ifPresent(SUPPORT_MODULE::add); + } + + /** + * 取消注册展示的模块 + * + * @param moduleName name + */ + public static void unregister(String moduleName) { + Optional.of(moduleName).ifPresent(SUPPORT_MODULE::remove); + } + + /** + * 启动入口,重建一下展示的module + */ + public static void rebuild() { + PortalModuleManager.allModules().keySet().stream() + .filter(m -> !SUPPORT_MODULE.contains(m)) + .forEach(PortalModuleManager::unregister); + } +} diff --git a/designer-realize/src/main/java/com/fanruan/boot/adaptation/ReportAdaptationComponent.java b/designer-realize/src/main/java/com/fanruan/boot/adaptation/ReportAdaptationComponent.java index d09e3db108..7a1a90af3d 100644 --- a/designer-realize/src/main/java/com/fanruan/boot/adaptation/ReportAdaptationComponent.java +++ b/designer-realize/src/main/java/com/fanruan/boot/adaptation/ReportAdaptationComponent.java @@ -1,6 +1,7 @@ package com.fanruan.boot.adaptation; import com.fanruan.carina.Carina; +import com.fanruan.carina.annotions.DependsOn; import com.fanruan.carina.annotions.FineComponent; import com.fanruan.carina.annotions.Start; import com.fanruan.plugins.resource.PluginResourceHelper; @@ -57,8 +58,8 @@ import java.util.TreeSet; * Created on 2024/6/24 */ @FineComponent(name = "fine_report_adaptation") +@DependsOn(dependencies = {"fine_report"}) public class ReportAdaptationComponent { - /** * 启动 */ @@ -74,6 +75,8 @@ public class ReportAdaptationComponent { // 插件controller注册 PluginControllerManager.getInstance().init(); + // 过滤掉内置服务器不支持的模块 + DesignServerSupportModule.rebuild(); } private void listenEmbedServletFilter(ServletContext servletContext) { From b6f380c068fde84d97961c7bdfa98cd54de1004f Mon Sep 17 00:00:00 2001 From: Anner Date: Mon, 21 Oct 2024 19:04:53 +0800 Subject: [PATCH 03/11] =?UTF-8?q?REPORT-138114=20fix:=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E8=AE=BE=E7=BD=AE=E6=98=BE=E7=A4=BA=E9=97=AE?= =?UTF-8?q?=E9=A2=98=20&=20=E8=A7=84=E9=81=BF=E6=9C=8D=E5=8A=A1=E6=B3=A8?= =?UTF-8?q?=E5=86=8C=E7=9A=84=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../adaptation/DesignServerSupportModule.java | 45 +++++++++++++++++-- 1 file changed, 42 insertions(+), 3 deletions(-) diff --git a/designer-realize/src/main/java/com/fanruan/boot/adaptation/DesignServerSupportModule.java b/designer-realize/src/main/java/com/fanruan/boot/adaptation/DesignServerSupportModule.java index df486b1d72..e1bffecddd 100644 --- a/designer-realize/src/main/java/com/fanruan/boot/adaptation/DesignServerSupportModule.java +++ b/designer-realize/src/main/java/com/fanruan/boot/adaptation/DesignServerSupportModule.java @@ -1,16 +1,32 @@ package com.fanruan.boot.adaptation; +import com.fanruan.carina.Carina; +import com.fanruan.carina.context.ContextListener; import com.fanruan.portal.module.PortalModuleManager; import com.fr.third.guava.collect.Sets; import java.util.Optional; import java.util.Set; +import static com.fanruan.auth.authority.AuthAuthorityItems.USER_ADD_DEPARTMENT_ID; +import static com.fanruan.auth.authority.AuthAuthorityItems.USER_ADD_ID; +import static com.fanruan.auth.authority.AuthAuthorityItems.USER_ADD_ROLE_ID; +import static com.fanruan.auth.authority.AuthAuthorityItems.USER_DELETE_ID; +import static com.fanruan.auth.authority.AuthAuthorityItems.USER_DELETE_ROLE_ID; +import static com.fanruan.auth.authority.AuthAuthorityItems.USER_EDIT_DEP_ROLE_ID; +import static com.fanruan.auth.authority.AuthAuthorityItems.USER_EDIT_EDIT_INFO_ID; +import static com.fanruan.auth.authority.AuthAuthorityItems.USER_EDIT_ID; +import static com.fanruan.auth.authority.AuthAuthorityItems.USER_EDIT_RESET_PASSWORD_ID; +import static com.fanruan.auth.authority.AuthAuthorityItems.USER_FORBIDDEN_ID; +import static com.fanruan.auth.authority.AuthAuthorityItems.USER_ID; +import static com.fanruan.messenger.ums.authority.UMSAuthorityItems.PORTAL_MANAGEMENT_ENTERPRISE_UMS_ID; import static com.fanruan.portal.authority.PortalAuthorityItems.ENTERPRISE_GENERAL_ID; import static com.fanruan.portal.authority.PortalAuthorityItems.ENTERPRISE_ID; import static com.fanruan.portal.authority.PortalAuthorityItems.MAP_ID; import static com.fanruan.portal.authority.PortalAuthorityItems.PORTAL_MANAGEMENT_ID; import static com.fanruan.portal.authority.PortalAuthorityItems.SECURITY_ID; +import static com.fr.decision.authority.base.constant.ReportAuthorityItems.ENTERPRISE_REPORT_BASE_SETTINGS_ID; +import static com.fr.decision.authority.base.constant.ReportAuthorityItems.ENTERPRISE_REPORT_ID; /** * 内置服务器支持展示的模块,预期调用顺序在业务模块之后 @@ -23,10 +39,28 @@ public class DesignServerSupportModule { private final static Set SUPPORT_MODULE = Sets.newHashSet( // 系统管理 PORTAL_MANAGEMENT_ID, + // 用户管理 + USER_ID, + USER_ADD_ROLE_ID, + USER_ADD_DEPARTMENT_ID, + USER_ADD_ID, + USER_EDIT_ID, + USER_EDIT_RESET_PASSWORD_ID, + USER_EDIT_EDIT_INFO_ID, + USER_EDIT_DEP_ROLE_ID, + USER_DELETE_ID, + USER_DELETE_ROLE_ID, + USER_FORBIDDEN_ID, // 企业设置 ENTERPRISE_ID, + // 企业设置 - 通知中心 + PORTAL_MANAGEMENT_ENTERPRISE_UMS_ID, // 企业设置 - 通用设置 ENTERPRISE_GENERAL_ID, + // 报表设置 + ENTERPRISE_REPORT_ID, + // 报表设置 - 基础设置 + ENTERPRISE_REPORT_BASE_SETTINGS_ID, // 安全管理 SECURITY_ID, // 地图管理 @@ -55,8 +89,13 @@ public class DesignServerSupportModule { * 启动入口,重建一下展示的module */ public static void rebuild() { - PortalModuleManager.allModules().keySet().stream() - .filter(m -> !SUPPORT_MODULE.contains(m)) - .forEach(PortalModuleManager::unregister); + Carina.getApplicationContext().addListener(new ContextListener() { + @Override + public void onStart() { + PortalModuleManager.allModules().keySet().stream() + .filter(m -> !SUPPORT_MODULE.contains(m)) + .forEach(PortalModuleManager::unregister); + } + }); } } From 80d07c44c8262b27cbb7200c49a6ddcbef25e204 Mon Sep 17 00:00:00 2001 From: Anner Date: Mon, 21 Oct 2024 19:18:59 +0800 Subject: [PATCH 04/11] =?UTF-8?q?REPORT-138114=20fix:=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E4=B8=80=E4=B8=AA=E6=A8=A1=E5=9D=97=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/build.gradle b/build.gradle index 5e9743fd1f..d2d0d1506a 100644 --- a/build.gradle +++ b/build.gradle @@ -110,6 +110,7 @@ allprojects { implementation 'com.fr.datasource:fine-datasource-core:' + fdlVersion implementation 'com.fr.datasource:fine-datasource-web:' + fdlVersion implementation 'com.fr.decision:decision-i18n:' + frVersion + implementation 'com.fr.decision:decision-report:' + frVersion implementation 'com.fr.report:engine-report:' + frDevVersion implementation 'com.fr.report:engine-x:' + frDevVersion implementation 'com.fr.report:engine-chart:' + frDevVersion From 680cc44b1d505c03c710e492fe4c76ca8c3c8483 Mon Sep 17 00:00:00 2001 From: Anner Date: Mon, 21 Oct 2024 20:09:48 +0800 Subject: [PATCH 05/11] =?UTF-8?q?REPORT-138114=20fix:=20=E7=89=B9=E6=AE=8A?= =?UTF-8?q?=E5=A4=84=E7=90=86=E4=B8=80=E4=B8=8B=E8=99=9A=E6=8B=9F=E6=A0=B9?= =?UTF-8?q?=E8=8A=82=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fanruan/boot/adaptation/DesignServerSupportModule.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/designer-realize/src/main/java/com/fanruan/boot/adaptation/DesignServerSupportModule.java b/designer-realize/src/main/java/com/fanruan/boot/adaptation/DesignServerSupportModule.java index e1bffecddd..91f3fc6eb5 100644 --- a/designer-realize/src/main/java/com/fanruan/boot/adaptation/DesignServerSupportModule.java +++ b/designer-realize/src/main/java/com/fanruan/boot/adaptation/DesignServerSupportModule.java @@ -2,7 +2,10 @@ package com.fanruan.boot.adaptation; import com.fanruan.carina.Carina; import com.fanruan.carina.context.ContextListener; +import com.fanruan.portal.authority.PortalAuthorityItems; +import com.fanruan.portal.module.PortalModule; import com.fanruan.portal.module.PortalModuleManager; +import com.fr.stable.StringUtils; import com.fr.third.guava.collect.Sets; import java.util.Optional; @@ -92,7 +95,8 @@ public class DesignServerSupportModule { Carina.getApplicationContext().addListener(new ContextListener() { @Override public void onStart() { - PortalModuleManager.allModules().keySet().stream() + PortalModuleManager.allModules().values().stream() + .filter(m -> !StringUtils.equals(m.getParentID(), PortalAuthorityItems.PORTAL_ROOT_ID)).map(PortalModule::getId) .filter(m -> !SUPPORT_MODULE.contains(m)) .forEach(PortalModuleManager::unregister); } From 406b9f89b34f9b1395512a45069c49a30cef7769 Mon Sep 17 00:00:00 2001 From: lemon Date: Tue, 22 Oct 2024 10:09:31 +0800 Subject: [PATCH 06/11] =?UTF-8?q?fix=EF=BC=9A=E5=9B=9E=E9=80=80=20?= =?UTF-8?q?=E6=8B=96=E6=8B=BD=E8=8C=83=E5=9B=B4=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tabledatapane/DBTableDataPane.java | 8 ++-- .../design/gui/controlpane/JControlPane.java | 47 +++---------------- .../design/gui/controlpane/UIControlPane.java | 6 +-- .../light/ui/laf/FineLightLaf.properties | 2 - 4 files changed, 14 insertions(+), 49 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java index 937e4ec62c..dbe45885cc 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java @@ -3,7 +3,6 @@ package com.fr.design.data.tabledata.tabledatapane; import com.fine.theme.icon.LazyIcon; import com.fine.theme.utils.FineUIScale; import com.fine.theme.utils.FineUIStyle; -import com.fine.theme.utils.FineUIUtils; import com.formdev.flatlaf.util.ScaledEmptyBorder; import com.fr.base.Parameter; import com.fr.base.ParameterHelper; @@ -273,8 +272,11 @@ public class DBTableDataPane extends AbstractTableDataPane implemen JPanel sqlSplitPane = new JPanel(FRGUIPaneFactory.createScaledBorderLayout(4, 4)); sqlSplitPane.add(box, BorderLayout.CENTER); - int leftComponentMin = FineUIUtils.getAndScaleInt("SplitPane.leftComponent.minimumSize", 120); - this.connectionTableProcedurePane.setMinimumSize(FineUIScale.scale(new Dimension(leftComponentMin, 400))); + + box.setMinimumSize(FineUIScale.scale(new Dimension(300, 400))); + + this.connectionTableProcedurePane.setMinimumSize(FineUIScale.scale(new Dimension(230, 400))); + this.connectionTableProcedurePane.setMaximumSize(FineUIScale.scale(new Dimension(500, 400))); JSplitPane mainSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, this.connectionTableProcedurePane, sqlSplitPane); mainSplitPane.setOneTouchExpandable(true); diff --git a/designer-base/src/main/java/com/fr/design/gui/controlpane/JControlPane.java b/designer-base/src/main/java/com/fr/design/gui/controlpane/JControlPane.java index c0da6e502f..15f0af15b3 100644 --- a/designer-base/src/main/java/com/fr/design/gui/controlpane/JControlPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/controlpane/JControlPane.java @@ -1,7 +1,6 @@ package com.fr.design.gui.controlpane; import com.fine.theme.utils.FineUIScale; -import com.fine.theme.utils.FineUIUtils; import com.formdev.flatlaf.ui.FlatUIUtils; import com.formdev.flatlaf.util.ScaledEmptyBorder; import com.fr.design.border.FineBorderFactory; @@ -22,9 +21,7 @@ import javax.swing.JSplitPane; import java.awt.BorderLayout; import java.awt.CardLayout; import java.awt.Color; -import java.awt.Dimension; import java.util.Arrays; -import java.util.Objects; import java.util.stream.Stream; /** @@ -50,11 +47,6 @@ abstract class JControlPane extends BasicPane implements UnrepeatedNameHelper, S protected JPanel cardPane; protected AbstractShortCutFactory shortCutFactory; - protected JSplitPane mainSplitPane; - // split pane 左边组件最小宽度 - protected int leftComponentMin; - // split pane 左边组件最大宽度 - protected int leftComponentMax; JControlPane() { this.initShortCutFactory(); @@ -118,10 +110,7 @@ abstract class JControlPane extends BasicPane implements UnrepeatedNameHelper, S this.creators = this.createNameableCreators(); initCardPane(); // SplitPane - JPanel leftComponentPane = getLeftPane(); - leftComponentMin = FineUIUtils.getAndScaleInt("SplitPane.leftComponent.minimumSize", 120); - leftComponentPane.setMinimumSize(FineUIScale.createScaleDimension(leftComponentMin, 0)); - mainSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, leftComponentPane, cardPane); + JSplitPane mainSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, getLeftPane(), cardPane); mainSplitPane.setOneTouchExpandable(true); this.add(mainSplitPane, BorderLayout.CENTER); @@ -134,12 +123,11 @@ abstract class JControlPane extends BasicPane implements UnrepeatedNameHelper, S } protected void initCardPane() { - leftComponentMax = FineUIUtils.getAndScaleInt("SplitPane.leftComponent.maximumSize", 240); this.controlUpdatePane = createControlUpdatePane(); // p: edit card layout this.cardLayout = new CardLayout(); - initCardPaneWithMinSize(); + cardPane = FRGUIPaneFactory.createCardLayout_S_Pane(); cardPane.setLayout(this.cardLayout); // p:选择的Label UILabel selectLabel = new UILabel(); @@ -147,29 +135,6 @@ abstract class JControlPane extends BasicPane implements UnrepeatedNameHelper, S cardPane.add(controlUpdatePane, EDIT); } - /** - * 初始化一个 rightComponent,且指定 minimumSize - * - * {@link javax.swing.plaf.basic.BasicSplitPaneDivider#DragController} 拖拽的时候会调用 getMinimumSize 方法 - * split pane driver 拖拽范围取自 leftComponent 的 minimumSize 和 rightComponent 的 minimumSize - */ - private void initCardPaneWithMinSize() { - cardPane = new JPanel(new CardLayout()) { - @Override - public Dimension getMinimumSize() { - Dimension size = super.getMinimumSize(); - if (mainSplitPane == null) { - return size; - } - Dimension parentSize = mainSplitPane.getSize(); - if (parentSize.width != 0 && Objects.equals(JSplitPane.HORIZONTAL_SPLIT, mainSplitPane.getOrientation())) { - size.width = parentSize.width - FineUIScale.scale(leftComponentMax); - } - return size; - } - }; - } - public void showEditPane() { this.cardLayout.show(cardPane, EDIT); } @@ -247,10 +212,10 @@ abstract class JControlPane extends BasicPane implements UnrepeatedNameHelper, S } /** - * 刷新 NameableCreator - * - * @param creators 生成器 - */ + * 刷新 NameableCreator + * + * @param creators 生成器 + */ public void refreshNameableCreator(NameableCreator[] creators) { this.creators = creators; shorts = this.createShortcuts(); diff --git a/designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java b/designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java index 551c05a0bf..7d1519f2ce 100644 --- a/designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java @@ -91,7 +91,7 @@ public abstract class UIControlPane extends JControlPane { rightPaneWrapper.add(cardPane, BorderLayout.CENTER); rightPaneWrapper.setBorder(new ScaledEmptyBorder(0, 10, 0, 0)); // SplitPane - mainSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, leftPaneWrapper, rightPaneWrapper); + JSplitPane mainSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, leftPaneWrapper, rightPaneWrapper); mainSplitPane.setOneTouchExpandable(true); this.add(mainSplitPane, BorderLayout.CENTER); mainSplitPane.setDividerLocation(getLeftPreferredSize()); @@ -243,8 +243,8 @@ public abstract class UIControlPane extends JControlPane { } /** - * 是否需要隐藏popupEditDialog - */ + * 是否需要隐藏popupEditDialog + */ protected boolean needToHidePopupEditDialog() { // 检查是否有子弹窗,如果有,则不隐藏 for (Window window : popupEditDialog.getOwnedWindows()) { diff --git a/designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties b/designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties index aab414e72f..0adc8cf686 100644 --- a/designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties +++ b/designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties @@ -794,8 +794,6 @@ FormulaPane.buttonHeight=$Component.defaultHeight SplitPane.dividerSize = 5 SplitPane.continuousLayout = true SplitPane.border = null -SplitPane.leftComponent.minimumSize = 120 -SplitPane.leftComponent.maximumSize = 240 # \u5F71\u54CD\u89C6\u89C9\u6548\u679C\uFF0C\u4E34\u65F6\u5148\u5173\u6389 SplitPane.supportsOneTouchButtons = false SplitPane.centerOneTouchButtons = true From 8cb29f5d5ec1bafac5f0bc6d4cfee87ca07cec66 Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Tue, 22 Oct 2024 11:05:33 +0800 Subject: [PATCH 07/11] =?UTF-8?q?REPORT-138201=20=E3=80=90fr-fbp=E5=9B=9E?= =?UTF-8?q?=E5=BD=92=E3=80=91=E6=9C=80=E6=96=B0master=E7=9A=84fbp=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E5=99=A8=E6=9B=B4=E6=96=B0jar=E5=90=8E=EF=BC=8C?= =?UTF-8?q?=E6=89=93=E5=BC=80=E6=A8=A1=E6=9D=BF=E4=B8=8D=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../function/DesignReportBaseComponent.java | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/designer-realize/src/main/java/com/fanruan/boot/env/function/DesignReportBaseComponent.java b/designer-realize/src/main/java/com/fanruan/boot/env/function/DesignReportBaseComponent.java index 50bce512aa..c2ff0f85b2 100644 --- a/designer-realize/src/main/java/com/fanruan/boot/env/function/DesignReportBaseComponent.java +++ b/designer-realize/src/main/java/com/fanruan/boot/env/function/DesignReportBaseComponent.java @@ -5,7 +5,10 @@ import com.fanruan.carina.annotions.DependsOn; import com.fanruan.carina.annotions.FineComponent; import com.fanruan.carina.annotions.Start; import com.fanruan.carina.annotions.Stop; -import com.fr.report.VcsContext; +import com.fanruan.carina.annotions.Supplemental; +import com.fr.nx.app.web.StreamAndTemplateReportletCreator; +import com.fr.nx.app.web.StreamReportletCreator; +import com.fr.web.factory.WebletFactory; /** * DesignReportBaseComponent @@ -18,12 +21,21 @@ import com.fr.report.VcsContext; @DependsOn(dependencies = "design_function_chart_base") public class DesignReportBaseComponent extends ReportBaseComponent { + /** + * prepare + */ + @Supplemental + public void supplemental() { + WebletFactory.registerWebletCreator(StreamReportletCreator.KEY); + WebletFactory.registerWebletCreator(StreamAndTemplateReportletCreator.KEY); + } + /** * start */ @Start public void start() { - VcsContext.init(); + super.start(); } /** @@ -31,6 +43,6 @@ public class DesignReportBaseComponent extends ReportBaseComponent { */ @Stop public void stop() { - VcsContext.reset(); + super.stop(); } } From ffbd2d110f3d6cb349351f43361aa5c8308a6a9b Mon Sep 17 00:00:00 2001 From: Anner Date: Tue, 22 Oct 2024 11:31:46 +0800 Subject: [PATCH 08/11] =?UTF-8?q?REPORT-138179=20fix:=20=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E6=95=B0=E6=8D=AE=E9=9B=86=E9=A2=84=E8=A7=88=E5=85=A5?= =?UTF-8?q?=E5=8F=A3=E7=9A=84=E8=84=B1=E6=95=8F=E5=9C=BA=E6=99=AF=E8=A1=A5?= =?UTF-8?q?=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../setting/TableDataDesensitizationTablePane.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/setting/TableDataDesensitizationTablePane.java b/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/setting/TableDataDesensitizationTablePane.java index 870dc7ff5b..197341caeb 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/setting/TableDataDesensitizationTablePane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/setting/TableDataDesensitizationTablePane.java @@ -2,7 +2,6 @@ package com.fr.design.data.datapane.preview.desensitization.view.setting; import com.fr.data.desensitize.base.DesensitizationTableData; import com.fr.data.desensitize.base.TableDataDesensitizationItem; -import com.fr.data.desensitize.rule.DesensitizationRuleManager; import com.fr.data.desensitize.rule.base.DesensitizationRule; import com.fr.data.desensitize.rule.base.DesensitizationRuleSource; import com.fr.design.data.datapane.preview.desensitization.TableDataPreviewDesensitizeManager; @@ -12,8 +11,11 @@ import com.fr.design.layout.FRGUIPaneFactory; import com.fr.log.FineLoggerFactory; import com.fr.workspace.server.repository.authority.RemoteAuthorityRepository; -import javax.swing.*; -import java.awt.*; +import javax.swing.JPanel; +import javax.swing.SwingWorker; +import java.awt.BorderLayout; +import java.awt.CardLayout; +import java.awt.Component; import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; @@ -89,7 +91,7 @@ public class TableDataDesensitizationTablePane extends JPanel { // 获取当前所有用户组 roleMap.putAll(RemoteAuthorityRepository.getInstance().getAllRoles4Desensitization()); // 获取当前最新的所有规则 - latestRules.putAll(DesensitizationRuleManager.getInstance().getAllRules()); + latestRules.putAll(RemoteAuthorityRepository.getInstance().getAllRoles().getSourceRuleMap()); return null; } From d8a94fce011d1212fb3fceacade9dcb840aebf91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Levy=2EXie-=E8=A7=A3=E5=AE=89=E6=A3=AE?= Date: Tue, 22 Oct 2024 13:53:00 +0800 Subject: [PATCH 09/11] =?UTF-8?q?REPORT-137786=20fix:=20=E8=A1=A5=E5=85=85?= =?UTF-8?q?=E7=BC=A9=E6=94=BE=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fine/theme/light/ui/FineComboBoxUI.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fine/theme/light/ui/FineComboBoxUI.java b/designer-base/src/main/java/com/fine/theme/light/ui/FineComboBoxUI.java index b410afc207..90bec71856 100644 --- a/designer-base/src/main/java/com/fine/theme/light/ui/FineComboBoxUI.java +++ b/designer-base/src/main/java/com/fine/theme/light/ui/FineComboBoxUI.java @@ -88,7 +88,7 @@ public class FineComboBoxUI extends FlatComboBoxUI { // 限制最大宽度,如超出则高度预留展示横向滚动条所需宽度 int comboWidth = comboBox.getWidth(); if (fitRectangle.width > comboWidth) { - return new Rectangle(px, py, comboWidth, fitRectangle.height + FlatUIUtils.getUIInt("ScrollBar.width", 10)); + return new Rectangle(px, py, comboWidth, fitRectangle.height + FineUIUtils.getAndScaleInt("ScrollBar.width", 10)); } return fitRectangle; } From 3f24fd91cec405f75ca9f5f8befaea6e4a914cb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Levy=2EXie-=E8=A7=A3=E5=AE=89=E6=A3=AE?= Date: Tue, 22 Oct 2024 13:53:30 +0800 Subject: [PATCH 10/11] =?UTF-8?q?=E6=97=A0jira=20toolbar=E5=B8=83=E5=B1=80?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/DesignerFrameFileDealerPane.java | 1 + 1 file changed, 1 insertion(+) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java index d0ad936913..ce282861e4 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java @@ -342,6 +342,7 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt renameAction.setEnabled(false); delFileAction.setEnabled(false); vcsAction.setEnabled(false); + this.revalidate(); this.repaint(); } From 1de9cea90f92412e22aba63d16c35243312d53bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Levy=2EXie-=E8=A7=A3=E5=AE=89=E6=A3=AE?= Date: Tue, 22 Oct 2024 13:54:14 +0800 Subject: [PATCH 11/11] =?UTF-8?q?REPORT-138174=20fix:=20=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=9B=86/=E5=85=AC=E5=BC=8F=E9=9D=A2=E6=9D=BF=E8=A1=A5?= =?UTF-8?q?=E5=85=85=E4=B8=8A=E8=BE=B9=E8=B7=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/data/datapane/sqlpane/SQLEditPane.java | 5 ++--- .../src/main/java/com/fr/design/formula/FormulaPane.java | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/sqlpane/SQLEditPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/sqlpane/SQLEditPane.java index c0849032d3..c188b363eb 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/sqlpane/SQLEditPane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/sqlpane/SQLEditPane.java @@ -1,5 +1,6 @@ package com.fr.design.data.datapane.sqlpane; +import com.formdev.flatlaf.util.ScaledEmptyBorder; import com.fr.data.core.DataCoreUtils; import com.fr.data.core.db.TableProcedure; import com.fr.design.actions.UpdateAction; @@ -10,7 +11,6 @@ import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.ComparatorUtils; import com.fr.log.FineLoggerFactory; -import javax.swing.Icon; import javax.swing.JPopupMenu; import javax.swing.text.BadLocationException; import javax.swing.text.Document; @@ -57,8 +57,7 @@ public class SQLEditPane extends RSyntaxTextArea { if (requestDroptarget) { new SQLPaneDropTarget(this); } - setBorder(null); - + setBorder(new ScaledEmptyBorder(2, 2, 2, 2)); } diff --git a/designer-base/src/main/java/com/fr/design/formula/FormulaPane.java b/designer-base/src/main/java/com/fr/design/formula/FormulaPane.java index af825fb4a6..aaf95bd765 100644 --- a/designer-base/src/main/java/com/fr/design/formula/FormulaPane.java +++ b/designer-base/src/main/java/com/fr/design/formula/FormulaPane.java @@ -315,7 +315,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula { // text initFormulaTextArea(); UIScrollPane formulaTextAreaScrollPane = new UIScrollPane(formulaTextArea); - formulaTextArea.setBorder(null); + formulaTextArea.setBorder(new ScaledEmptyBorder(2, 2, 2, 2)); formulaTextAreaScrollPane.setBorder(FineBorderFactory.createWrappedRoundBorder()); // buttonPane