From 3b50585aeff3eea9a066a9f333b792bdba8b8969 Mon Sep 17 00:00:00 2001 From: "Henry.Wang" Date: Mon, 11 Apr 2022 10:48:08 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-68212=20=E8=A1=A8=E5=A4=B4=E6=8E=92?= =?UTF-8?q?=E5=BA=8F=E5=8A=9F=E8=83=BD-=E5=9B=BD=E9=99=85=E5=8C=96-?= =?UTF-8?q?=E4=BA=A4=E4=BA=92=E9=97=AE=E9=A2=98=20&&=20REPORT-68931=20?= =?UTF-8?q?=E8=A1=A8=E5=A4=B4=E6=8E=92=E5=BA=8F=E5=9B=BE=E6=A0=87=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E9=A2=9C=E8=89=B2=E5=90=8E=E5=A4=A7=E5=B0=8F=E5=8F=91?= =?UTF-8?q?=E7=94=9F=E5=8F=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/i18n/dimension_en.properties | 6 +++++- .../com/fr/design/i18n/dimension_ja_JP.properties | 6 +++++- .../com/fr/design/i18n/dimension_ko_KR.properties | 6 +++++- .../com/fr/design/i18n/dimension_zh.properties | 6 +++++- .../com/fr/design/i18n/dimension_zh_TW.properties | 6 +++++- .../sort/celldscolumn/CellDSColumnSortPane.java | 7 ++----- .../sort/cellexpand/CellExpandSortPane.java | 3 ++- .../fr/design/sort/common/AbstractSortPane.java | 10 +++++++--- .../design/sort/common/SortUIExpandablePane.java | 3 ++- .../fr/design/sort/header/HeaderSettingPane.java | 9 +++++++++ .../fr/design/sort/header/HeaderSortRulePane.java | 15 +++++++++------ 11 files changed, 56 insertions(+), 21 deletions(-) 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 aa4a83f3e..f4840b71a 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 @@ -14,4 +14,8 @@ com.fr.design.report.fit.templatePane.dialog=800*400 com.fr.design.report.fit.firstColumn=120*20 com.fr.design.report.fit.column=160*20 com.fr.design.lock.LockInfoDialog=500*180 -com.fr.design.mainframe.ForbiddenPane.refreshButton=75*24 \ No newline at end of file +com.fr.design.mainframe.ForbiddenPane.refreshButton=75*24 +com.fr.design.cell.expand.sort.pane=257*185 +com.fr.design.sort.rule.item=125*20 +com.fr.design.ds.column.sort.pane=250*180 +com.fr.design.sort.expand.header.pane=95*10 \ No newline at end of file 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 96558262f..fb0ecfb3d 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 @@ -13,4 +13,8 @@ com.fr.design.report.fit.templatePane.dialog=600*400 com.fr.design.report.fit.firstColumn=170*20 com.fr.design.report.fit.column=100*20 com.fr.design.lock.LockInfoDialog=500*180 -com.fr.design.mainframe.ForbiddenPane.refreshButton=68*24 \ No newline at end of file +com.fr.design.mainframe.ForbiddenPane.refreshButton=68*24 +com.fr.design.cell.expand.sort.pane=257*170 +com.fr.design.sort.rule.item=125*20 +com.fr.design.ds.column.sort.pane=250*165 +com.fr.design.sort.expand.header.pane=95*10 \ No newline at end of file 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 05e20c7aa..19bb7e97a 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 @@ -13,4 +13,8 @@ com.fr.design.report.fit.templatePane.dialog=600*400 com.fr.design.report.fit.firstColumn=130*20 com.fr.design.report.fit.column=100*20 com.fr.design.lock.LockInfoDialog=500*180 -com.fr.design.mainframe.ForbiddenPane.refreshButton=80*24 \ No newline at end of file +com.fr.design.mainframe.ForbiddenPane.refreshButton=80*24 +com.fr.design.cell.expand.sort.pane=267*165 +com.fr.design.sort.rule.item=125*20 +com.fr.design.ds.column.sort.pane=250*180 +com.fr.design.sort.expand.header.pane=95*10 \ No newline at end of file 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 a4b2993e6..3c398efc0 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 @@ -14,4 +14,8 @@ com.fr.design.report.fit.templatePane.dialog=600*400 com.fr.design.report.fit.firstColumn=80*20 com.fr.design.report.fit.column=100*20 com.fr.design.lock.LockInfoDialog=400*160 -com.fr.design.mainframe.ForbiddenPane.refreshButton=68*24 \ No newline at end of file +com.fr.design.mainframe.ForbiddenPane.refreshButton=68*24 +com.fr.design.cell.expand.sort.pane=227*155 +com.fr.design.sort.rule.item=80*20 +com.fr.design.ds.column.sort.pane=220*150 +com.fr.design.sort.expand.header.pane=108*10 \ No newline at end of file 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 5813cd96c..7130938c7 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 @@ -13,4 +13,8 @@ com.fr.design.report.fit.templatePane.dialog=600*400 com.fr.design.report.fit.firstColumn=80*20 com.fr.design.report.fit.column=100*20 com.fr.design.lock.LockInfoDialog=400*160 -com.fr.design.mainframe.ForbiddenPane.refreshButton=68*24 \ No newline at end of file +com.fr.design.mainframe.ForbiddenPane.refreshButton=68*24 +com.fr.design.cell.expand.sort.pane=227*155 +com.fr.design.sort.rule.item=80*20 +com.fr.design.ds.column.sort.pane=220*150 +com.fr.design.sort.expand.header.pane=108*10 \ No newline at end of file diff --git a/designer-realize/src/main/java/com/fr/design/sort/celldscolumn/CellDSColumnSortPane.java b/designer-realize/src/main/java/com/fr/design/sort/celldscolumn/CellDSColumnSortPane.java index b5175e7fa..584ff05b4 100644 --- a/designer-realize/src/main/java/com/fr/design/sort/celldscolumn/CellDSColumnSortPane.java +++ b/designer-realize/src/main/java/com/fr/design/sort/celldscolumn/CellDSColumnSortPane.java @@ -1,20 +1,17 @@ package com.fr.design.sort.celldscolumn; -import com.fr.design.gui.ilable.UILabel; +import com.fr.design.i18n.DesignSizeI18nManager; import com.fr.design.sort.common.AbstractSortPane; import com.fr.general.data.TableDataColumn; import com.fr.report.cell.TemplateCellElement; import com.fr.report.cell.cellattr.core.group.DSColumn; import com.fr.report.core.sort.common.CellSortAttr; -import javax.swing.*; - public class CellDSColumnSortPane extends AbstractSortPane { public CellDSColumnSortPane() { - super(220, 150); - //this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); + super(DesignSizeI18nManager.getInstance().i18nDimension("com.fr.design.ds.column.sort.pane")); } @Override diff --git a/designer-realize/src/main/java/com/fr/design/sort/cellexpand/CellExpandSortPane.java b/designer-realize/src/main/java/com/fr/design/sort/cellexpand/CellExpandSortPane.java index 5bfc20eea..e8045b283 100644 --- a/designer-realize/src/main/java/com/fr/design/sort/cellexpand/CellExpandSortPane.java +++ b/designer-realize/src/main/java/com/fr/design/sort/cellexpand/CellExpandSortPane.java @@ -1,6 +1,7 @@ package com.fr.design.sort.cellexpand; +import com.fr.design.i18n.DesignSizeI18nManager; import com.fr.design.mainframe.cell.settingpane.CellExpandAttrPane; import com.fr.design.sort.common.AbstractSortPane; import com.fr.report.cell.TemplateCellElement; @@ -14,7 +15,7 @@ public class CellExpandSortPane extends AbstractSortPane { CellExpandAttrPane cellExpandAttrPane; public CellExpandSortPane(CellExpandAttrPane cellExpandAttrPane) { - super(227, 155); + super(DesignSizeI18nManager.getInstance().i18nDimension("com.fr.design.cell.expand.sort.pane")); this.cellExpandAttrPane = cellExpandAttrPane; this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); } diff --git a/designer-realize/src/main/java/com/fr/design/sort/common/AbstractSortPane.java b/designer-realize/src/main/java/com/fr/design/sort/common/AbstractSortPane.java index 227708e7a..281b365ac 100644 --- a/designer-realize/src/main/java/com/fr/design/sort/common/AbstractSortPane.java +++ b/designer-realize/src/main/java/com/fr/design/sort/common/AbstractSortPane.java @@ -26,6 +26,10 @@ public abstract class AbstractSortPane extends JPanel { protected String selfSortArea; protected String defaultHeaderArea; + public AbstractSortPane(Dimension dimension) { + this(dimension.width, dimension.height); + } + public AbstractSortPane(int sortPaneWidth, int sortPaneRightWidth) { this.sortPaneWidth = sortPaneWidth; this.sortPaneRightWidth = sortPaneRightWidth; @@ -101,12 +105,12 @@ public abstract class AbstractSortPane extends JPanel { } public static UILabel createIntervalUILabel() { - return createIntervalUILabel(PANE_COMPONENT_H_GAP); + return createIntervalUILabel(new Dimension(PANE_COMPONENT_H_GAP, 10)); } - public static UILabel createIntervalUILabel(int vGap) { + public static UILabel createIntervalUILabel(Dimension dimension) { UILabel uiLabel = new UILabel(); - uiLabel.setPreferredSize(new Dimension(vGap, 10)); + uiLabel.setPreferredSize(dimension); return uiLabel; } } diff --git a/designer-realize/src/main/java/com/fr/design/sort/common/SortUIExpandablePane.java b/designer-realize/src/main/java/com/fr/design/sort/common/SortUIExpandablePane.java index eef21bb06..42a135298 100644 --- a/designer-realize/src/main/java/com/fr/design/sort/common/SortUIExpandablePane.java +++ b/designer-realize/src/main/java/com/fr/design/sort/common/SortUIExpandablePane.java @@ -6,6 +6,7 @@ import com.fr.design.event.UIObserver; import com.fr.design.event.UIObserverListener; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ilable.UILabel; +import com.fr.design.i18n.DesignSizeI18nManager; import com.fr.design.i18n.Toolkit; import javax.swing.*; @@ -85,7 +86,7 @@ public class SortUIExpandablePane extends JPanel { this.add(iconUiLabel); tipUILabel = new UILabel(Toolkit.i18nText("Fine-Design_Sort_Second_Sort")); this.add(tipUILabel); - this.add(AbstractSortPane.createIntervalUILabel(108)); + this.add(AbstractSortPane.createIntervalUILabel( DesignSizeI18nManager.getInstance().i18nDimension("com.fr.design.sort.expand.header.pane"))); closeButton = new UILabel(IconUtils.readIcon("/com/fr/design/images/control/close.png")); closeButton.setPreferredSize(new Dimension(16, 20)); diff --git a/designer-realize/src/main/java/com/fr/design/sort/header/HeaderSettingPane.java b/designer-realize/src/main/java/com/fr/design/sort/header/HeaderSettingPane.java index f31c40929..114300e66 100644 --- a/designer-realize/src/main/java/com/fr/design/sort/header/HeaderSettingPane.java +++ b/designer-realize/src/main/java/com/fr/design/sort/header/HeaderSettingPane.java @@ -4,12 +4,14 @@ import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.ilable.UILabel; import com.fr.design.i18n.Toolkit; import com.fr.design.sort.common.AbstractSortPane; +import com.fr.general.GeneralContext; import com.fr.report.core.sort.header.SortHeader; import javax.swing.*; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import java.awt.*; +import java.util.Locale; public class HeaderSettingPane extends JPanel { protected int headerSettingPaneWidth; @@ -36,6 +38,7 @@ public class HeaderSettingPane extends JPanel { emptyUILabel.setPreferredSize(new Dimension(10, 10)); uiCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Sort_Allow_User_Click_Sort_Order")); + addToolTipText(); uiCheckBox.setPreferredSize(new Dimension(headerSettingPaneRightWidth - 10, AbstractSortPane.PANE_COMPONENT_HEIGHT)); uiCheckBox.addChangeListener(new ChangeListener() { @Override @@ -49,6 +52,12 @@ public class HeaderSettingPane extends JPanel { this.add(jPanel); } + private void addToolTipText() { + if (!Locale.CHINA.equals(GeneralContext.getLocale())) { + uiCheckBox.setToolTipText(Toolkit.i18nText("Fine-Design_Sort_Allow_User_Click_Sort_Order")); + } + } + void initHeaderSortRulePane() { headerSortRulePane = new HeaderSortRulePane(); this.add(headerSortRulePane); diff --git a/designer-realize/src/main/java/com/fr/design/sort/header/HeaderSortRulePane.java b/designer-realize/src/main/java/com/fr/design/sort/header/HeaderSortRulePane.java index 27c03e9e0..01021ed09 100644 --- a/designer-realize/src/main/java/com/fr/design/sort/header/HeaderSortRulePane.java +++ b/designer-realize/src/main/java/com/fr/design/sort/header/HeaderSortRulePane.java @@ -7,6 +7,7 @@ import com.fr.design.event.UIObserverListener; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ipoppane.PopupHider; +import com.fr.design.i18n.DesignSizeI18nManager; import com.fr.design.i18n.Toolkit; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.style.color.ColorControlWindow; @@ -32,6 +33,7 @@ public class HeaderSortRulePane extends JPanel { UICheckBox desUICheckBox; UICheckBox nosortUICheckBox; Color defaultColor = new Color(33, 33, 34); + public static final int ICON_LENGTH = 20; HeaderSortRulePane() { initComponents(); @@ -57,8 +59,9 @@ public class HeaderSortRulePane extends JPanel { new Component[]{desUICheckBox = new UICheckBox(SortRule.DES.getDescription()), desIconButton = new IconButton(SortRule.DES)}, new Component[]{nosortUICheckBox = new UICheckBox(SortRule.NO_SORT.getDescription()), nosortIconButton = new IconButton(SortRule.NO_SORT)}, }; - double[] rowSize = {HeaderIconBuilder.ICON_LENGTH + 10, HeaderIconBuilder.ICON_LENGTH + 10, HeaderIconBuilder.ICON_LENGTH + 10}; - double[] columnSize = {80, HeaderIconBuilder.ICON_LENGTH + 10}; + double[] rowSize = {ICON_LENGTH + 10, ICON_LENGTH + 10, ICON_LENGTH + 10}; + double[] columnSize = + {DesignSizeI18nManager.getInstance().i18nDimension("com.fr.design.sort.rule.item").getWidth(), ICON_LENGTH + 10}; JPanel sortRuleItem = TableLayoutHelper.createCommonTableLayoutPane(components, rowSize, columnSize, 0); this.add(sortRuleItem, BorderLayout.CENTER); initUICheckBoxChange(ascUICheckBox, ascIconButton); @@ -116,10 +119,10 @@ public class HeaderSortRulePane extends JPanel { jLayeredPane = new JLayeredPane(); iconLabel = getIconLabel(); borderUiLabel = new UILabel(); - borderUiLabel.setSize(HeaderIconBuilder.ICON_LENGTH, HeaderIconBuilder.ICON_LENGTH); + borderUiLabel.setSize(ICON_LENGTH, ICON_LENGTH); borderUiLabel.setOpaque(true); borderUiLabel.setBackground(Color.WHITE); - iconLabel.setSize(HeaderIconBuilder.ICON_LENGTH, HeaderIconBuilder.ICON_LENGTH); + iconLabel.setSize(ICON_LENGTH, ICON_LENGTH); iconLabel.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { @@ -128,7 +131,7 @@ public class HeaderSortRulePane extends JPanel { } } }); - jLayeredPane.setPreferredSize(new Dimension(HeaderIconBuilder.ICON_LENGTH, HeaderIconBuilder.ICON_LENGTH)); + jLayeredPane.setPreferredSize(new Dimension(ICON_LENGTH, ICON_LENGTH)); jLayeredPane.add(iconLabel, JLayeredPane.POPUP_LAYER); jLayeredPane.add(borderUiLabel, JLayeredPane.MODAL_LAYER); this.add(jLayeredPane); @@ -142,7 +145,7 @@ public class HeaderSortRulePane extends JPanel { Icon getIcon(FineColor fineColor) { BufferedImage bufferedImage = HeaderIconBuilder.getIcon(sortRule, fineColor); - Icon icon = new ImageIcon(bufferedImage); + Icon icon = new SVGIcon(bufferedImage); return icon; }