From e15f63daf5e5ad1862ff949a55be81663e07b1f2 Mon Sep 17 00:00:00 2001 From: lemon Date: Fri, 25 Oct 2024 17:53:46 +0800 Subject: [PATCH 1/5] =?UTF-8?q?REPORT-138763=20fix:=20=E6=8E=A7=E4=BB=B6?= =?UTF-8?q?=E9=A1=BA=E5=BA=8F=E5=B1=95=E7=A4=BA=E6=A1=86=20=E9=AB=98?= =?UTF-8?q?=E5=BA=A6=E8=B0=83=E6=95=B4=E3=80=82=E6=BC=8F=E7=BF=BB=E9=9D=A2?= =?UTF-8?q?=E6=9D=BF=EF=BC=8C=E4=BC=98=E5=8C=96=E4=BA=86=E4=B8=80=E4=B8=8B?= =?UTF-8?q?=20render?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/foldablepane/UIExpandablePane.java | 5 ++--- .../controlpane/UISimpleListControlPane.java | 20 +++++++++++-------- .../designer/mobile/ParaMobileDefinePane.java | 3 ++- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/foldablepane/UIExpandablePane.java b/designer-base/src/main/java/com/fr/design/foldablepane/UIExpandablePane.java index 140aa74c83..faae8d9f84 100644 --- a/designer-base/src/main/java/com/fr/design/foldablepane/UIExpandablePane.java +++ b/designer-base/src/main/java/com/fr/design/foldablepane/UIExpandablePane.java @@ -59,15 +59,14 @@ public class UIExpandablePane extends JPanel { headerPanel = new HeaderPane(title); headerPanel.addMouseListener(new PanelAction()); setcontentPanelontentPanelBorder(); - this.add(headerPanel, BorderLayout.NORTH); - this.add(contentPanel, BorderLayout.CENTER); if (withUnderline) { this.add(column( cell(headerPanel), cell(contentPanel).with(it -> it.setBorder(new ScaledEmptyBorder(0, 0, 10, 0))), fix(1).with(it -> it.setBorder(FineBorderFactory.createDefaultUnderlineBorder()))) .getComponent()); } else { - this.add(column(cell(headerPanel), cell(contentPanel)).getComponent()); + this.add(headerPanel, BorderLayout.NORTH); + this.add(contentPanel, BorderLayout.CENTER); } setOpaque(false); diff --git a/designer-base/src/main/java/com/fr/design/gui/controlpane/UISimpleListControlPane.java b/designer-base/src/main/java/com/fr/design/gui/controlpane/UISimpleListControlPane.java index c6536e138b..a7934c928a 100644 --- a/designer-base/src/main/java/com/fr/design/gui/controlpane/UISimpleListControlPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/controlpane/UISimpleListControlPane.java @@ -1,6 +1,9 @@ package com.fr.design.gui.controlpane; import com.fine.theme.icon.LazyIcon; +import com.fine.theme.utils.FineUIScale; +import com.formdev.flatlaf.ui.FlatUIUtils; +import com.formdev.flatlaf.util.ScaledEmptyBorder; import com.fr.design.actions.UpdateAction; import com.fr.design.border.FineBorderFactory; import com.fr.design.constants.UIConstants; @@ -9,6 +12,7 @@ import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilist.ListModelElement; import com.fr.design.gui.ilist.UIList; +import com.fr.design.gui.ilist.UINameEdList; import com.fr.design.gui.itoolbar.UIToolbar; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.menu.ShortCut; @@ -26,12 +30,14 @@ import javax.swing.JList; import javax.swing.JPanel; import javax.swing.ListCellRenderer; import javax.swing.ListSelectionModel; +import javax.swing.UIManager; import javax.swing.border.Border; import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionListener; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Component; +import java.awt.Dimension; import java.awt.Point; import java.awt.Toolkit; import java.awt.event.ActionEvent; @@ -49,7 +55,7 @@ import java.util.Comparator; public class UISimpleListControlPane extends BasicPane { public static final String LIST_NAME = "UISimpleControl_List"; - protected UIList nameList; + protected UINameEdList nameList; protected String selectedName; private ShortCut4JControlPane[] shorts; private ToolBarDef toolbarDef; @@ -108,10 +114,8 @@ public class UISimpleListControlPane extends BasicPane { protected void initListPane(JPanel listPane) { nameList = createJNameList(); nameList.setName(LIST_NAME); - nameList.setSelectionBackground(UIConstants.ATTRIBUTE_PRESS); listPane.add(new UIScrollPane(nameList), BorderLayout.CENTER); - nameList.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); nameList.addMouseListener(listMouseListener); nameList.addListSelectionListener(new ListSelectionListener() { @@ -124,8 +128,8 @@ public class UISimpleListControlPane extends BasicPane { }); } - public UIList createJNameList() { - UIList nameList = new UIList(new DefaultListModel()) { + public UINameEdList createJNameList() { + UINameEdList nameList = new UINameEdList(new DefaultListModel()) { @Override public int locationToIndex(Point location) { int index = super.locationToIndex(location); @@ -411,6 +415,7 @@ public class UISimpleListControlPane extends BasicPane { label = new UILabel(); initialLabelForeground = label.getForeground(); this.setLayout(new BorderLayout()); + label.setBorder(new ScaledEmptyBorder(0, 6, 0, 0)); this.add(label, BorderLayout.CENTER); } @@ -425,6 +430,7 @@ public class UISimpleListControlPane extends BasicPane { @Override public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { + setPreferredSize(new Dimension(list.getWidth(), FineUIScale.scale(UIManager.getInt("List.cellRender.height")))); setComponentOrientation(list.getComponentOrientation()); Color bg = null; @@ -442,9 +448,7 @@ public class UISimpleListControlPane extends BasicPane { } if (isSelected) { - setBackground(bg == null ? list.getSelectionBackground() : bg); - setForeground(fg == null ? list.getSelectionForeground() : fg); - label.setForeground(Color.WHITE); + setBackground(FlatUIUtils.getUIColor("List.selectionInactiveBackground", Color.GRAY)); } else { setBackground(list.getBackground()); diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ParaMobileDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ParaMobileDefinePane.java index d2a9bb4f73..66eeab2186 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ParaMobileDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ParaMobileDefinePane.java @@ -1,6 +1,7 @@ package com.fr.design.widget.ui.designer.mobile; import com.fine.theme.utils.FineLayoutBuilder; +import com.formdev.flatlaf.util.ScaledEmptyBorder; import com.fr.design.ExtraDesignClassManager; import com.fr.design.designer.beans.events.DesignerEvent; import com.fr.design.designer.creator.XCreator; @@ -77,7 +78,7 @@ public class ParaMobileDefinePane extends MobileWidgetDefinePane { mobileWidgetListPane = new MobileWidgetListPane(designer, (WSortLayout) paraCreator.toData()); JPanel panelWrapper = FRGUIPaneFactory.createBorderLayout_S_Pane(); panelWrapper.add(mobileWidgetListPane, BorderLayout.CENTER); - + panelWrapper.setBorder(new ScaledEmptyBorder(0, 0, 10, 0)); return new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Widget_Order"), 280, 20, panelWrapper); } From 4c06c013e3073267b4732942c09d328755a79027 Mon Sep 17 00:00:00 2001 From: lemon Date: Fri, 25 Oct 2024 17:59:25 +0800 Subject: [PATCH 2/5] =?UTF-8?q?REPORT-138763=20fix:=20=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E8=B4=A8=E9=87=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/gui/controlpane/UISimpleListControlPane.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/designer-base/src/main/java/com/fr/design/gui/controlpane/UISimpleListControlPane.java b/designer-base/src/main/java/com/fr/design/gui/controlpane/UISimpleListControlPane.java index a7934c928a..e04ec6c82f 100644 --- a/designer-base/src/main/java/com/fr/design/gui/controlpane/UISimpleListControlPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/controlpane/UISimpleListControlPane.java @@ -128,6 +128,10 @@ public class UISimpleListControlPane extends BasicPane { }); } + /** + * 构造 list,设置 render + * @return UINameEdList + */ public UINameEdList createJNameList() { UINameEdList nameList = new UINameEdList(new DefaultListModel()) { @Override From f56fd271d9ba90326d10b6a474cff4cc3b5994d7 Mon Sep 17 00:00:00 2001 From: "Richard.Fang" Date: Mon, 28 Oct 2024 13:50:59 +0800 Subject: [PATCH 3/5] =?UTF-8?q?REPORT-138740=20fix:=E5=AD=98=E5=82=A8?= =?UTF-8?q?=E8=BF=87=E7=A8=8B=E9=BC=A0=E6=A0=87=E6=82=AC=E6=B5=AE=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E9=80=89=E4=B8=AD=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/gui/ilist/TableViewList.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/ilist/TableViewList.java b/designer-base/src/main/java/com/fr/design/gui/ilist/TableViewList.java index 50c050b013..25ac17ec03 100644 --- a/designer-base/src/main/java/com/fr/design/gui/ilist/TableViewList.java +++ b/designer-base/src/main/java/com/fr/design/gui/ilist/TableViewList.java @@ -3,8 +3,6 @@ package com.fr.design.gui.ilist; import com.fine.theme.icon.LazyIcon; import com.fine.theme.utils.FineUIScale; import com.formdev.flatlaf.ui.FlatUIUtils; -import com.fanruan.config.impl.data.ConnectionConfigProviderFactory; -import com.fr.base.BaseUtils; import com.fr.data.core.DataCoreUtils; import com.fr.data.core.db.TableProcedure; import com.fr.data.core.db.dialect.base.key.check.DataBaseDetail; @@ -19,7 +17,6 @@ import com.fr.general.ComparatorUtils; import com.fr.log.FineLoggerFactory; import com.fr.stable.ArrayUtils; import com.fr.stable.StringUtils; -import com.fr.workspace.server.entity.connection.ConnectionBean; import com.fr.workspace.server.repository.connection.ConnectionRepository; import javax.swing.DefaultListCellRenderer; @@ -47,9 +44,10 @@ import java.util.concurrent.CancellationException; * 表或者视图或者存储过程组成的一个下拉列表 * * @author zhou - * @since 2012-3-28下午10:07:34 + * @Created on 2012-3-28下午10:07:34 + * @since 11.0 */ -public class TableViewList extends UIList { +public class TableViewList extends JList { /** * @@ -162,7 +160,7 @@ public class TableViewList extends UIList { * august:databaseName是数据库名字,searchFilter是输入的过滤条件,typesFilter是视图、表、 * 存储过程中的一者或者几者 * - * @param databaseName + * @param datasource * @param searchFilter * @param typesFilter */ @@ -267,7 +265,7 @@ public class TableViewList extends UIList { icon = new LazyIcon("store_procedure"); } this.setIcon(icon); - + this.setToolTipText(getPreferredSize().width > list.getVisibleRect().width ? this.getText() : null); return this; } From eba7b2517861a2ce1a294ae2803dd20cf09a3fa9 Mon Sep 17 00:00:00 2001 From: lemon Date: Mon, 28 Oct 2024 17:14:30 +0800 Subject: [PATCH 4/5] =?UTF-8?q?REPORT-138856=20fix:=20=E5=BA=8F=E5=8F=B7?= =?UTF-8?q?=E5=88=97=E4=B8=BA=E5=B1=85=E4=B8=AD=E5=B1=95=E7=A4=BA=EF=BC=8C?= =?UTF-8?q?=E4=B8=8D=E9=9C=80=E8=A6=81=E6=96=87=E5=AD=97=E5=B7=A6=E9=97=B4?= =?UTF-8?q?=E8=B7=9D=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tabledata/tabledatapane/EmbeddedTableDataPane.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/EmbeddedTableDataPane.java b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/EmbeddedTableDataPane.java index 8d2798ae62..d926141cbd 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/EmbeddedTableDataPane.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/EmbeddedTableDataPane.java @@ -16,9 +16,11 @@ import com.fr.general.DateUtils; import com.fr.log.FineLoggerFactory; import com.fr.stable.StringUtils; +import javax.swing.BorderFactory; import javax.swing.DefaultCellEditor; import javax.swing.JPanel; import javax.swing.JTable; +import javax.swing.UIManager; import javax.swing.event.TableModelEvent; import javax.swing.event.TableModelListener; import javax.swing.table.AbstractTableModel; @@ -350,10 +352,12 @@ public class EmbeddedTableDataPane extends AbstractTableDataPane Date: Mon, 28 Oct 2024 18:02:45 +0800 Subject: [PATCH 5/5] =?UTF-8?q?REPORT-137540=20=E8=BF=9C=E7=A8=8B=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E4=B8=8B=E5=9C=B0=E5=9B=BE=E5=8A=A0=E8=BD=BD=E5=8D=A1?= =?UTF-8?q?=E6=85=A2=20=E5=9B=9E=E9=80=80=E6=94=B9=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fanruan/boot/env/function/DesignChartBaseComponent.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/designer-realize/src/main/java/com/fanruan/boot/env/function/DesignChartBaseComponent.java b/designer-realize/src/main/java/com/fanruan/boot/env/function/DesignChartBaseComponent.java index daf742e338..3a41a04c13 100644 --- a/designer-realize/src/main/java/com/fanruan/boot/env/function/DesignChartBaseComponent.java +++ b/designer-realize/src/main/java/com/fanruan/boot/env/function/DesignChartBaseComponent.java @@ -1,14 +1,11 @@ package com.fanruan.boot.env.function; import com.fanruan.boot.ChartBaseComponent; -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.carina.annotions.Stop; import com.fanruan.carina.annotions.Supplemental; -import com.fanruan.map.DesignGEOJSONHelper; -import com.fr.decision.webservice.v10.map.geojson.helper.GEOJSONHelperShell; /** @@ -45,7 +42,6 @@ public class DesignChartBaseComponent extends ChartBaseComponent { @Supplemental public void prepare() { super.prepare(); - Carina.getApplicationContext().singleton(GEOJSONHelperShell.class).set(DesignGEOJSONHelper.class); } }