Browse Source

Pull request #8511: REPORT-68212 表头排序功能-国际化-交互问题 && REPORT-68931 表头排序图标配置颜色后大小发生变化

Merge in DESIGN/design from ~HENRY.WANG/design:release/11.0 to release/11.0

* commit '3b50585aeff3eea9a066a9f333b792bdba8b8969':
  REPORT-68212 表头排序功能-国际化-交互问题 && REPORT-68931 表头排序图标配置颜色后大小发生变化
bugfix/11.0
Henry.Wang 3 years ago
parent
commit
fe32a0799a
  1. 6
      designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties
  2. 6
      designer-base/src/main/resources/com/fr/design/i18n/dimension_ja_JP.properties
  3. 6
      designer-base/src/main/resources/com/fr/design/i18n/dimension_ko_KR.properties
  4. 6
      designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties
  5. 6
      designer-base/src/main/resources/com/fr/design/i18n/dimension_zh_TW.properties
  6. 7
      designer-realize/src/main/java/com/fr/design/sort/celldscolumn/CellDSColumnSortPane.java
  7. 3
      designer-realize/src/main/java/com/fr/design/sort/cellexpand/CellExpandSortPane.java
  8. 10
      designer-realize/src/main/java/com/fr/design/sort/common/AbstractSortPane.java
  9. 3
      designer-realize/src/main/java/com/fr/design/sort/common/SortUIExpandablePane.java
  10. 9
      designer-realize/src/main/java/com/fr/design/sort/header/HeaderSettingPane.java
  11. 15
      designer-realize/src/main/java/com/fr/design/sort/header/HeaderSortRulePane.java

6
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
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

6
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
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

6
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
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

6
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
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

6
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
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

7
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

3
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));
}

10
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;
}
}

3
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));

9
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);

15
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;
}

Loading…
Cancel
Save