From f101fb1e8a560bd706bb9181e2fd57573598b362 Mon Sep 17 00:00:00 2001 From: lemon Date: Fri, 13 Sep 2024 14:58:14 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-134561=20&=20REPORT-134368=20&=20REPORT-?= =?UTF-8?q?134033=20&=20REPORT-132510=20&=20REPORT-133962=20&=20REPORT-133?= =?UTF-8?q?894=20&=20REPORT-132266=20fix:=20=E8=A1=A8=E6=A0=BC=E7=BB=86?= =?UTF-8?q?=E8=8A=82=E9=97=AE=E9=A2=98=EF=BC=8C=E6=BB=9A=E5=8A=A8=E6=9D=A1?= =?UTF-8?q?=20ui=20=E5=92=8C=E4=B8=80=E4=BA=9B=E7=BC=A9=E6=94=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../theme/light/ui/FineTableHeaderUI.java | 21 ++++++- .../design/actions/TableDataSourceAction.java | 4 +- .../design/actions/help/SystemInfoPane.java | 14 +++-- .../data/datapane/TableDataTreePane.java | 10 +++- .../datapane/preview/PreviewTablePane.java | 20 ++++++- .../view/common/DesensitizationOpenPane.java | 7 ++- .../rule/DesensitizationRuleChoosePane.java | 15 ++--- .../TableDataDesensitizationTableModel.java | 11 ++-- .../tabledatapane/EmbeddedTableDataPane.java | 57 ++++++++++++++++--- .../fr/design/file/SaveSomeTemplatePane.java | 14 +++-- .../config/LayerDependenceSettingPane.java | 40 ++++++------- .../gui/icombocheckbox/UIComboCheckBox.java | 1 + .../iscrollbar/UIBasicVerticalScrollBar.java | 22 +++++++ .../design/gui/iscrollbar/UIScrollBarUI.java | 6 +- .../gui/itable/FineUITableCellEditor.java | 33 +++++++++++ .../javascript/ExportJavaScriptPane.java | 10 ++-- .../design/mainframe/check/CheckButton.java | 3 +- .../write/submit/DBManipulationPane.java | 5 +- .../theme/icon/tip/jump_to_references.svg | 3 + .../fine/theme/light/ui/fine_light.icon.json | 1 + .../theme/light/ui/laf/FineLaf.properties | 1 + .../fr/design/i18n/dimension_en.properties | 1 + .../fr/design/i18n/dimension_ja_JP.properties | 1 + .../fr/design/i18n/dimension_ko_KR.properties | 1 + .../fr/design/i18n/dimension_zh.properties | 1 + .../fr/design/i18n/dimension_zh_TW.properties | 1 + .../submit/SmartInsertDBManipulationPane.java | 4 +- 27 files changed, 236 insertions(+), 71 deletions(-) create mode 100644 designer-base/src/main/java/com/fr/design/gui/iscrollbar/UIBasicVerticalScrollBar.java create mode 100644 designer-base/src/main/java/com/fr/design/gui/itable/FineUITableCellEditor.java create mode 100644 designer-base/src/main/resources/com/fine/theme/icon/tip/jump_to_references.svg diff --git a/designer-base/src/main/java/com/fine/theme/light/ui/FineTableHeaderUI.java b/designer-base/src/main/java/com/fine/theme/light/ui/FineTableHeaderUI.java index e129e77349..8be32bb5cf 100644 --- a/designer-base/src/main/java/com/fine/theme/light/ui/FineTableHeaderUI.java +++ b/designer-base/src/main/java/com/fine/theme/light/ui/FineTableHeaderUI.java @@ -17,6 +17,7 @@ import javax.swing.table.DefaultTableCellRenderer; import javax.swing.table.JTableHeader; import java.awt.Color; import java.awt.Component; +import java.awt.FontMetrics; import java.awt.Graphics; /** @@ -87,7 +88,7 @@ public class FineTableHeaderUI extends FlatTableHeaderUI { public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { Class columnClass = table.getColumnClass(0); Border border; - if (column == table.getColumnCount() - 1) { + if (column == table.getColumnCount() - 1 && table.getAutoResizeMode() != JTable.AUTO_RESIZE_OFF) { border = BorderFactory.createCompoundBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, UIManager.getColor("defaultBorderColor")), UIManager.getBorder("Table.cellNoFocusBorder")); } else { @@ -101,8 +102,26 @@ public class FineTableHeaderUI extends FlatTableHeaderUI { } setBackground(selectionBackground); setText(value == null ? StringUtils.BLANK : String.valueOf(value)); + setToolTipText(table, value, column); setBorder(border); return this; } + + /** + * 显示不全的文字,增加了 toolTip + * @param table + * @param value + * @param column + */ + private void setToolTipText(JTable table, Object value, int column) { + String tipText = value == null ? StringUtils.BLANK : String.valueOf(value); + FontMetrics fm = this.getFontMetrics(this.getFont()); + int textWidth = fm.stringWidth(String.valueOf(value)); + if (textWidth > table.getColumnModel().getColumn(column).getWidth()) { + setToolTipText(tipText); + } else { + setToolTipText(null); + } + } } } diff --git a/designer-base/src/main/java/com/fr/design/actions/TableDataSourceAction.java b/designer-base/src/main/java/com/fr/design/actions/TableDataSourceAction.java index ce5534daad..8ce229b272 100644 --- a/designer-base/src/main/java/com/fr/design/actions/TableDataSourceAction.java +++ b/designer-base/src/main/java/com/fr/design/actions/TableDataSourceAction.java @@ -9,6 +9,7 @@ import com.fr.design.data.datapane.TableDataTreePane; import com.fr.design.data.tabledata.ResponseDataSourceChange; import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.DialogActionAdapter; +import com.fr.design.i18n.DesignSizeI18nManager; import com.fr.design.mainframe.JTemplate; import com.fr.design.menu.KeySetUtils; @@ -43,7 +44,8 @@ public class TableDataSourceAction extends TemplateComponentAction 0) { + previewPane.add(tabbedPane.withHeadRatio(0.8f).withTabLayout(buildTabLayout(nameDataModels)).build(), BorderLayout.CENTER); + } previewPane.showWindow(new JFrame()).setVisible(true); } + private static int[] buildTabLayout(NameDataModel[] nameDataModels) { + int length = nameDataModels.length; + int size = (length + TAB_MAX_COUNT_WITH_LINE - 1) / TAB_MAX_COUNT_WITH_LINE; + int[] tabLayout = new int[size]; + int index = 0; + for (int i = 0; i < length; i += TAB_MAX_COUNT_WITH_LINE) { + tabLayout[index ++] = Math.min(TAB_MAX_COUNT_WITH_LINE, length - i); + } + return tabLayout; + } + /** * 直接预览存储过程的所有返回数据集,没有实际值和显示值 * diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/common/DesensitizationOpenPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/common/DesensitizationOpenPane.java index 0cf850d4dc..8abe19a405 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/common/DesensitizationOpenPane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/common/DesensitizationOpenPane.java @@ -1,5 +1,6 @@ package com.fr.design.data.datapane.preview.desensitization.view.common; +import com.fine.theme.icon.LazyIcon; import com.fine.theme.utils.FineUIUtils; import com.fr.base.svg.IconUtils; import com.fr.design.border.UITitledBorder; @@ -23,6 +24,7 @@ import java.net.URL; import static com.fine.swing.ui.layout.Layouts.cell; import static com.fine.swing.ui.layout.Layouts.column; +import static com.fine.swing.ui.layout.Layouts.row; /** * 启用数据脱敏的面板 @@ -56,7 +58,7 @@ public class DesensitizationOpenPane extends JPanel { // 启用数据脱敏的勾选框 desensitizeOpenCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Desensitization_Opened")); // 跳转帮助文档Label - hyperlinkLabel = new UILabel(IconUtils.readIcon("/com/fr/design/standard/tip/tips")); + hyperlinkLabel = new UILabel(new LazyIcon("jump_to_references")); hyperlinkLabel.setToolTipText(Toolkit.i18nText("Fine-Design_Report_Desensitization_Open_Tips")); hyperlinkLabel.addMouseListener(new MouseAdapter() { @Override @@ -70,8 +72,7 @@ public class DesensitizationOpenPane extends JPanel { } } }); - panel.add(desensitizeOpenCheckBox); - panel.add(hyperlinkLabel); + panel.add(row(4, cell(desensitizeOpenCheckBox), cell(hyperlinkLabel)).getComponent()); // 提示Label tipsLabel = new UILabel(Toolkit.i18nText("Fine-Design_Report_Desensitization_Opened_Tooltips")); diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/rule/DesensitizationRuleChoosePane.java b/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/rule/DesensitizationRuleChoosePane.java index dc0eaf2011..c5f9e06d15 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/rule/DesensitizationRuleChoosePane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/rule/DesensitizationRuleChoosePane.java @@ -2,6 +2,7 @@ package com.fr.design.data.datapane.preview.desensitization.view.rule; import com.fine.theme.icon.LazyIcon; import com.fine.theme.utils.FineUIScale; +import com.fine.theme.utils.FineUIStyle; import com.formdev.flatlaf.ui.FlatUIUtils; import com.fr.base.svg.IconUtils; import com.fr.data.desensitize.rule.DesensitizationRuleManager; @@ -12,6 +13,7 @@ import com.fr.design.data.datapane.preview.desensitization.view.common.ChooseMar import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.itable.FineUITableCellEditor; import com.fr.design.gui.itableeditorpane.UITableEditAction; import com.fr.design.gui.itableeditorpane.UITableEditorPane; import com.fr.design.gui.itableeditorpane.UITableModelAdapter; @@ -20,12 +22,10 @@ import com.fr.design.i18n.Toolkit; import com.fr.stable.StringUtils; import com.fr.stable.collections.CollectionUtils; -import javax.swing.AbstractCellEditor; -import javax.swing.BorderFactory; +import javax.swing.JComponent; import javax.swing.JPanel; import javax.swing.JTable; import javax.swing.SwingUtilities; -import javax.swing.UIManager; import javax.swing.table.TableCellEditor; import javax.swing.table.TableCellRenderer; import java.awt.CardLayout; @@ -195,17 +195,15 @@ public class DesensitizationRuleChoosePane extends JPanel { /** * 规则状态展示页面 */ - private class DesensitizationRuleStatusPane extends AbstractCellEditor implements TableCellEditor, TableCellRenderer { + private class DesensitizationRuleStatusPane extends FineUITableCellEditor { private UILabel ruleStatusLabel; DesensitizationRuleStatusPane() { // 规则状态 this.ruleStatusLabel = new UILabel(); - this.ruleStatusLabel.setForeground(Color.RED); this.ruleStatusLabel.setOpaque(true); - this.ruleStatusLabel.setBackground(FlatUIUtils.getUIColor("background.normal", Color.WHITE)); - this.ruleStatusLabel.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, UIManager.getColor("defaultBorderColor"))); + FineUIStyle.setStyle(ruleStatusLabel, FineUIStyle.LABEL_WARNING_TIP); } /** @@ -239,6 +237,9 @@ public class DesensitizationRuleChoosePane extends JPanel { @Override public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { refreshRuleStatus(getList().get(row)); + JComponent c = (JComponent) super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); + ruleStatusLabel.setBorder(c.getBorder()); + ruleStatusLabel.setBackground(c.getBackground()); return ruleStatusLabel; } } diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/setting/TableDataDesensitizationTableModel.java b/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/setting/TableDataDesensitizationTableModel.java index 8b3d9464fe..7c5aa47d43 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/setting/TableDataDesensitizationTableModel.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/setting/TableDataDesensitizationTableModel.java @@ -18,6 +18,7 @@ import com.fr.design.gui.icombobox.ComboCheckBox; import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombocheckbox.UIComboCheckBox; import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.itable.FineUITableCellEditor; import com.fr.design.gui.itableeditorpane.UITableEditAction; import com.fr.design.gui.itableeditorpane.UITableModelAdapter; import com.fr.design.gui.itextfield.UITextField; @@ -432,7 +433,6 @@ public class TableDataDesensitizationTableModel extends UITableModelAdapter 1) { - dataJTable.getTableHeader().setPreferredSize(new Dimension(super.getWidth(), FineUIScale.scale((Integer) UIManager.get("Table.rowHeight")))); + dataJTable.getTableHeader().setVisible(true); } else { - dataJTable.getTableHeader().setPreferredSize(new Dimension(super.getWidth(), FineUIScale.scale(4))); + dataJTable.getTableHeader().setVisible(false); } } diff --git a/designer-base/src/main/java/com/fr/design/file/SaveSomeTemplatePane.java b/designer-base/src/main/java/com/fr/design/file/SaveSomeTemplatePane.java index 8ee5c61fb2..18065fb37d 100644 --- a/designer-base/src/main/java/com/fr/design/file/SaveSomeTemplatePane.java +++ b/designer-base/src/main/java/com/fr/design/file/SaveSomeTemplatePane.java @@ -10,6 +10,8 @@ import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilist.UIList; +import com.fr.design.gui.iscrollbar.UIBasicVerticalScrollBar; +import com.fr.design.gui.iscrollbar.UIScrollBar; import com.fr.design.gui.iscrollbar.UIScrollBarUI; import com.fr.design.gui.itree.checkboxtree.NullTristateCheckBox; import com.fr.design.gui.itree.checkboxtree.TristateCheckBox; @@ -21,10 +23,10 @@ import com.fr.log.FineLoggerFactory; import org.jetbrains.annotations.Nullable; import javax.swing.AbstractListModel; -import javax.swing.BorderFactory; import javax.swing.DefaultListCellRenderer; import javax.swing.JList; import javax.swing.JPanel; +import javax.swing.JScrollBar; import java.awt.BorderLayout; import java.awt.Component; import java.awt.Window; @@ -83,11 +85,13 @@ public class SaveSomeTemplatePane extends BasicPane { UILabel tip = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Select_The_Source_To_Save")); this.add(tip, BorderLayout.NORTH); templatesChoosePane = FRGUIPaneFactory.createBorderLayout_S_Pane(); - UIScrollPane scrollPane = new UIScrollPane(templatesChoosePane); + UIScrollPane scrollPane = new UIScrollPane(templatesChoosePane) { + @Override + public UIScrollBar createVerticalScrollBar() { + return new UIBasicVerticalScrollBar(JScrollBar.VERTICAL); + } + }; scrollPane.setBorder(new FineRoundBorder()); - if (SystemInfo.isWindows) { - scrollPane.getVerticalScrollBar().setUI(new UIScrollBarUI()); - } this.add(scrollPane, BorderLayout.CENTER); this.isJudgeCurrentEditingTemplate = isNeedTojudgeCurrent; } diff --git a/designer-base/src/main/java/com/fr/design/gui/frpane/tree/layer/config/LayerDependenceSettingPane.java b/designer-base/src/main/java/com/fr/design/gui/frpane/tree/layer/config/LayerDependenceSettingPane.java index b3ad1e179a..c3d7ba7ef3 100644 --- a/designer-base/src/main/java/com/fr/design/gui/frpane/tree/layer/config/LayerDependenceSettingPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/frpane/tree/layer/config/LayerDependenceSettingPane.java @@ -1,9 +1,10 @@ package com.fr.design.gui.frpane.tree.layer.config; +import com.fine.theme.light.ui.FineTableHeaderUI; import com.fr.design.data.tabledata.wrapper.TableDataWrapper; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.icombobox.UIComboBox; -import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.icontainer.UITableScrollPane; import com.fr.design.present.dict.TableDataDictPane; import com.fr.form.ui.tree.LayerDependence; @@ -126,7 +127,7 @@ public class LayerDependenceSettingPane extends JPanel implements ItemListener { buttonPanel.add(delButton); this.add(buttonPanel, BorderLayout.NORTH); //添加Table的panel - JScrollPane tablePanel = new JScrollPane(dependenceTable); + UITableScrollPane tablePanel = new UITableScrollPane(dependenceTable); this.add(tablePanel, BorderLayout.CENTER); @@ -177,23 +178,21 @@ public class LayerDependenceSettingPane extends JPanel implements ItemListener { /** * 第一列renderer */ - private static final class FirstRenderer extends UILabel implements TableCellRenderer { + private static final class FirstRenderer extends FineTableHeaderUI.TableRenderer { + public FirstRenderer() { + this.setOpaque(true); + } @Override public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { - + JLabel label = (JLabel) super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); if (value != null) { //value是用户选择的字段索引值,从1开始的 - this.setText(String.valueOf(value)); - } else { - this.setText(""); - } - if (hasFocus) { - this.setBorder(UIManager.getBorder("Table.focusCelHighlightBorder")); + label.setText(String.valueOf(value)); } else { - this.setBorder(null); + label.setText(""); } - return this; + return label; } } @@ -201,14 +200,14 @@ public class LayerDependenceSettingPane extends JPanel implements ItemListener { * 第二列renderer * 由于从model中获取的数据是数据集列的索引值,这里要转换为列的名称 */ - private static final class FieldRenderer extends UILabel implements TableCellRenderer { + private static final class FieldRenderer extends FineTableHeaderUI.TableRenderer { //用于将字段索引转换为字段名;保存改pane,是为了当用户选择其他数据集时,renderer可同步更新 private TableDataDictPane tableDataDictPane; public FieldRenderer(TableDataDictPane tableDataDictPane) { - this.tableDataDictPane = tableDataDictPane; + this.setOpaque(true); } /** @@ -217,20 +216,15 @@ public class LayerDependenceSettingPane extends JPanel implements ItemListener { */ @Override public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { - + JLabel label = (JLabel) super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); if (value != null) { List columnNames = getColumnNameList(this.tableDataDictPane); //value是用户选择的字段索引值,从1开始的 - this.setText(columnNames.get(Integer.valueOf(String.valueOf(value)))); - } else { - this.setText(""); - } - if (hasFocus) { - this.setBorder(UIManager.getBorder("Table.focusCelHighlightBorder")); + label.setText(columnNames.get(Integer.valueOf(String.valueOf(value)))); } else { - this.setBorder(null); + label.setText(""); } - return this; + return label; } } diff --git a/designer-base/src/main/java/com/fr/design/gui/icombocheckbox/UIComboCheckBox.java b/designer-base/src/main/java/com/fr/design/gui/icombocheckbox/UIComboCheckBox.java index d5f573f773..977c02e134 100644 --- a/designer-base/src/main/java/com/fr/design/gui/icombocheckbox/UIComboCheckBox.java +++ b/designer-base/src/main/java/com/fr/design/gui/icombocheckbox/UIComboCheckBox.java @@ -259,6 +259,7 @@ public class UIComboCheckBox extends JComponent implements UIObserver, GlobalNam private void togglePopup() { if (this.arrowButton.isEnabled()) { popup.setBorder(new FineRoundBorder()); + popup.setPreferredSize(new Dimension(getWidth(), this.popup.getPreferredSize().height)); popup.show(this, 0, getHeight()); } } diff --git a/designer-base/src/main/java/com/fr/design/gui/iscrollbar/UIBasicVerticalScrollBar.java b/designer-base/src/main/java/com/fr/design/gui/iscrollbar/UIBasicVerticalScrollBar.java new file mode 100644 index 0000000000..336ed71ef8 --- /dev/null +++ b/designer-base/src/main/java/com/fr/design/gui/iscrollbar/UIBasicVerticalScrollBar.java @@ -0,0 +1,22 @@ +package com.fr.design.gui.iscrollbar; + +/** + * 解决 Windows 下垂直滚动条不显示的临时方案:替换 UI + * + * @author lemon + * @since + * Created on + */ +public class UIBasicVerticalScrollBar extends UIScrollBar { + private static final String UI_CLASS_ID = "BasicVerticalScrollBarUI"; + private static final long serialVersionUID = 1L; + + public UIBasicVerticalScrollBar(int orientation) { + super(orientation); + } + + public String getUIClassID() { + return UI_CLASS_ID; + } + +} diff --git a/designer-base/src/main/java/com/fr/design/gui/iscrollbar/UIScrollBarUI.java b/designer-base/src/main/java/com/fr/design/gui/iscrollbar/UIScrollBarUI.java index 949b3958ae..487eafb31e 100644 --- a/designer-base/src/main/java/com/fr/design/gui/iscrollbar/UIScrollBarUI.java +++ b/designer-base/src/main/java/com/fr/design/gui/iscrollbar/UIScrollBarUI.java @@ -56,6 +56,7 @@ public class UIScrollBarUI extends ScrollBarUI implements LayoutManager, SwingCo protected Color thumbLightShadowColor; protected Color thumbDarkShadowColor; protected Color thumbColor; + protected Color pressedThumbColor; protected Color trackColor; protected Color trackHighlightColor; @@ -139,6 +140,7 @@ public class UIScrollBarUI extends ScrollBarUI implements LayoutManager, SwingCo thumbLightShadowColor = UIManager.getColor("ScrollBar.thumbShadow"); thumbDarkShadowColor = UIManager.getColor("ScrollBar.thumbDarkShadow"); thumbColor = UIManager.getColor("ScrollBar.thumb"); + pressedThumbColor = UIManager.getColor( "ScrollBar.pressedThumbColor" ); trackColor = UIManager.getColor("ScrollBar.track"); trackHighlightColor = UIManager.getColor("ScrollBar.trackHighlight"); } @@ -472,9 +474,9 @@ public class UIScrollBarUI extends ScrollBarUI implements LayoutManager, SwingCo g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g2.translate(thumbBounds.x, thumbBounds.y); - Color color = isPressing ? UIConstants.LINE_COLOR : UIConstants.BARNOMAL; + Color color = isPressing ? pressedThumbColor : thumbColor; g2.setColor(color); - g2.fillRoundRect(1, 1, width - 2, height - 2, UIConstants.LARGEARC, UIConstants.LARGEARC); + g2.fillRoundRect(1, 1, width - 4, height - 4, UIConstants.LARGEARC, UIConstants.LARGEARC); } diff --git a/designer-base/src/main/java/com/fr/design/gui/itable/FineUITableCellEditor.java b/designer-base/src/main/java/com/fr/design/gui/itable/FineUITableCellEditor.java new file mode 100644 index 0000000000..cba3c07bba --- /dev/null +++ b/designer-base/src/main/java/com/fr/design/gui/itable/FineUITableCellEditor.java @@ -0,0 +1,33 @@ +package com.fr.design.gui.itable; + +import com.fine.theme.light.ui.FineTableHeaderUI; + +import javax.swing.AbstractCellEditor; +import javax.swing.JTable; +import javax.swing.table.TableCellEditor; +import javax.swing.table.TableCellRenderer; +import java.awt.Component; + +/** + * TableCellEditor 应用 {@link FineTableHeaderUI.TableRenderer} + * + * @author lemon + * @since + * Created on 2024/09/10 + */ +public class FineUITableCellEditor extends AbstractCellEditor implements TableCellEditor, TableCellRenderer { + @Override + public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) { + return null; + } + + @Override + public Object getCellEditorValue() { + return null; + } + + @Override + public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { + return new FineTableHeaderUI.TableRenderer().getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); + } +} diff --git a/designer-base/src/main/java/com/fr/design/javascript/ExportJavaScriptPane.java b/designer-base/src/main/java/com/fr/design/javascript/ExportJavaScriptPane.java index 37339c2297..ab62b8e668 100644 --- a/designer-base/src/main/java/com/fr/design/javascript/ExportJavaScriptPane.java +++ b/designer-base/src/main/java/com/fr/design/javascript/ExportJavaScriptPane.java @@ -16,6 +16,7 @@ import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBoxRenderer; import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.itable.FineUITableCellEditor; import com.fr.design.gui.itableeditorpane.ParameterTableModel; import com.fr.design.gui.itableeditorpane.UITableEditAction; import com.fr.design.gui.itableeditorpane.UITableEditorPane; @@ -301,9 +302,6 @@ public class ExportJavaScriptPane extends AbstractHyperLinkPane { return super.value2Text(value); } }; - bPane.add(new JScrollPane(list), BorderLayout.CENTER); + JScrollPane scrollPane = new JScrollPane(list); + scrollPane.setBorder(new FineRoundBorder()); + bPane.add(scrollPane, BorderLayout.CENTER); BasicDialog dlg = bPane.showSmallWindow(SwingUtilities.getWindowAncestor(DBManipulationPane.this), new DialogActionAdapter() { @Override diff --git a/designer-base/src/main/resources/com/fine/theme/icon/tip/jump_to_references.svg b/designer-base/src/main/resources/com/fine/theme/icon/tip/jump_to_references.svg new file mode 100644 index 0000000000..192bdfff9a --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/tip/jump_to_references.svg @@ -0,0 +1,3 @@ + + + diff --git a/designer-base/src/main/resources/com/fine/theme/light/ui/fine_light.icon.json b/designer-base/src/main/resources/com/fine/theme/light/ui/fine_light.icon.json index 45971eca90..d8d0d1b65e 100644 --- a/designer-base/src/main/resources/com/fine/theme/light/ui/fine_light.icon.json +++ b/designer-base/src/main/resources/com/fine/theme/light/ui/fine_light.icon.json @@ -445,6 +445,7 @@ "waiting":"tip/waiting.svg", "information":"tip/information.svg", "new_information":"tip/new_information.svg", + "jump_to_references":"tip/jump_to_references.svg", "success":"tip/success.svg", "warning":"tip/warning.svg", "layout_top": "layout/layout_top.svg", diff --git a/designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLaf.properties b/designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLaf.properties index 9ac0952b65..165701c244 100644 --- a/designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLaf.properties +++ b/designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLaf.properties @@ -27,6 +27,7 @@ RadioButtonUI=com.formdev.flatlaf.ui.FlatRadioButtonUI RadioButtonMenuItemUI=com.formdev.flatlaf.ui.FlatRadioButtonMenuItemUI RootPaneUI=com.formdev.flatlaf.ui.FlatRootPaneUI ScrollBarUI=com.formdev.flatlaf.ui.FlatScrollBarUI +BasicVerticalScrollBarUI=com.fr.design.gui.iscrollbar.UIScrollBarUI ScrollPaneUI=com.formdev.flatlaf.ui.FlatScrollPaneUI SeparatorUI=com.formdev.flatlaf.ui.FlatSeparatorUI SliderUI=com.fine.theme.light.ui.FineSliderUI diff --git a/designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties b/designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties index f8f5b7f878..190da5ff4b 100644 --- a/designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties +++ b/designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties @@ -37,6 +37,7 @@ com.fr.design.ds.column.cellEditor.pane=900*600 com.fr.design.actions.reportWebAttr.dialog=800*630 com.fr.design.actions.printingSetting.dialog=700*600 com.fr.design.data.datapane.preview.dialog=700*600 +com.fr.design.data.tabledata.dialog=1200*600 diff --git a/designer-base/src/main/resources/com/fr/design/i18n/dimension_ja_JP.properties b/designer-base/src/main/resources/com/fr/design/i18n/dimension_ja_JP.properties index 2ffcb1aa42..32408cc796 100644 --- a/designer-base/src/main/resources/com/fr/design/i18n/dimension_ja_JP.properties +++ b/designer-base/src/main/resources/com/fr/design/i18n/dimension_ja_JP.properties @@ -36,6 +36,7 @@ com.fr.design.ds.column.cellEditor.pane=900*600 com.fr.design.actions.reportWebAttr.dialog=700*630 com.fr.design.actions.printingSetting.dialog=700*600 com.fr.design.data.datapane.preview.dialog=700*600 +com.fr.design.data.tabledata.dialog=900*600 diff --git a/designer-base/src/main/resources/com/fr/design/i18n/dimension_ko_KR.properties b/designer-base/src/main/resources/com/fr/design/i18n/dimension_ko_KR.properties index 598b8f68d1..86c6e11cb2 100644 --- a/designer-base/src/main/resources/com/fr/design/i18n/dimension_ko_KR.properties +++ b/designer-base/src/main/resources/com/fr/design/i18n/dimension_ko_KR.properties @@ -36,6 +36,7 @@ com.fr.design.ds.column.cellEditor.pane=900*600 com.fr.design.actions.reportWebAttr.dialog=700*630 com.fr.design.actions.printingSetting.dialog=700*600 com.fr.design.data.datapane.preview.dialog=700*600 +com.fr.design.data.tabledata.dialog=900*600 diff --git a/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties b/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties index 0663409e6d..44d8e4180e 100644 --- a/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties +++ b/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties @@ -36,6 +36,7 @@ com.fr.design.ds.column.cellEditor.pane=700*600 com.fr.design.actions.reportWebAttr.dialog=660*600 com.fr.design.actions.printingSetting.dialog=660*600 com.fr.design.data.datapane.preview.dialog=660*600 +com.fr.design.data.tabledata.dialog=900*600 diff --git a/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh_TW.properties b/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh_TW.properties index e79bb892d1..ef212e9c63 100644 --- a/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh_TW.properties +++ b/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh_TW.properties @@ -35,6 +35,7 @@ com.fr.design.ds.column.cellEditor.pane=700*600 com.fr.design.actions.reportWebAttr.dialog=700*630 com.fr.design.actions.printingSetting.dialog=700*600 com.fr.design.data.datapane.preview.dialog=700*600 +com.fr.design.data.tabledata.dialog=900*600 diff --git a/designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationPane.java b/designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationPane.java index 7ced9bf8e9..fffdbbbb59 100644 --- a/designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationPane.java +++ b/designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationPane.java @@ -50,6 +50,8 @@ import java.awt.event.ActionEvent; import java.util.ArrayList; import java.util.List; +import static com.fine.theme.utils.FineUIScale.scale; + public class SmartInsertDBManipulationPane extends DBManipulationPane { private static final Selection NO_SELECTION = new CellSelection(-1, -1, -1, -1); private ElementCasePane ePane; @@ -352,7 +354,7 @@ public class SmartInsertDBManipulationPane extends DBManipulationPane { * set Width */ TableColumn column0 = table.getColumnModel().getColumn(0); - column0.setMaxWidth(LEFT_COLUMN_MAX_WIDTH); + column0.setMaxWidth(scale(LEFT_COLUMN_MAX_WIDTH)); ColumnNameTableCellRenderer cellRenderer = new ColumnNameTableCellRenderer(); cellRenderer.setHorizontalAlignment(SwingConstants.LEFT); column0.setCellRenderer(new BooleanRenderer());