From bb4e3ce6de97ec25987c428f7bf637d03811131a Mon Sep 17 00:00:00 2001 From: "yaoh.wu" Date: Wed, 9 Aug 2017 14:24:29 +0800 Subject: [PATCH 1/3] =?UTF-8?q?REPORT-3348=20=E6=8F=90=E7=A4=BA=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E5=8F=8A=E5=85=B6=E5=9B=BD=E9=99=85=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cellquick/CellDSColumnEditor.java | 50 +++++++++++-------- .../com/fr/design/locale/designer.properties | 5 +- .../design/locale/designer_en_US.properties | 3 ++ .../design/locale/designer_ja_JP.properties | 5 +- .../design/locale/designer_ko_KR.properties | 5 +- .../design/locale/designer_zh_CN.properties | 5 +- .../design/locale/designer_zh_TW.properties | 3 ++ 7 files changed, 50 insertions(+), 26 deletions(-) diff --git a/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java b/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java index 254b9102da..0cb1919bcc 100644 --- a/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java +++ b/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java @@ -18,6 +18,7 @@ import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.ibutton.UIHeadGroup; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.icombobox.UIComboBox; +import com.fr.design.gui.ilable.MultilineLabel; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ispinner.UISpinner; import com.fr.design.gui.itextfield.UITextField; @@ -54,6 +55,7 @@ import java.util.ArrayList; public class CellDSColumnEditor extends CellQuickEditor { private static final double P = TableLayout.PREFERRED, F = TableLayout.FILL; + private static final Color TIP_FONT_COLOR = new Color(51f, 51f, 52f, 1.0f); private enum FilterType { //前N个 后N个 奇数 偶数 自定义 未定义 @@ -604,7 +606,7 @@ public class CellDSColumnEditor extends CellQuickEditor { if (noContent) { centerPane.setPreferredSize(new Dimension(0, 0)); } else { - centerPane.setPreferredSize(new Dimension(155, 20)); + centerPane.setPreferredSize(new Dimension(158, 20)); } String sortFormula = dSColumn.getSortFormula(); if (sortFormula != null && sortFormula.length() >= 1) { @@ -678,14 +680,14 @@ public class CellDSColumnEditor extends CellQuickEditor { setCardPaneLayout.show(setCardPane, FilterType.TOP.name()); tipCardPaneLayout.show(tipCardPane, FilterType.TOP.name()); //隐藏tip 显示set - setCardPane.setPreferredSize(new Dimension(155, 20)); + setCardPane.setPreferredSize(new Dimension(158, 20)); tipCardPane.setPreferredSize(new Dimension(0, 0)); } else if (selectIndex == 2) { //后N个 setCardPaneLayout.show(setCardPane, FilterType.BOTTOM.name()); tipCardPaneLayout.show(tipCardPane, FilterType.BOTTOM.name()); //隐藏tip 显示set - setCardPane.setPreferredSize(new Dimension(155, 20)); + setCardPane.setPreferredSize(new Dimension(158, 20)); tipCardPane.setPreferredSize(new Dimension(0, 0)); } else if (selectIndex == 3) { //奇数 @@ -693,19 +695,19 @@ public class CellDSColumnEditor extends CellQuickEditor { tipCardPaneLayout.show(tipCardPane, FilterType.ODD.name()); //隐藏set 显示tip setCardPane.setPreferredSize(new Dimension(0, 0)); - tipCardPane.setPreferredSize(new Dimension(221, 15)); + tipCardPane.setPreferredSize(new Dimension(224, 40)); } else if (selectIndex == 4) { setCardPaneLayout.show(setCardPane, FilterType.EVEN.name()); tipCardPaneLayout.show(tipCardPane, FilterType.EVEN.name()); //隐藏set 显示tip setCardPane.setPreferredSize(new Dimension(0, 0)); - tipCardPane.setPreferredSize(new Dimension(221, 15)); + tipCardPane.setPreferredSize(new Dimension(224, 40)); } else if (selectIndex == 5) { setCardPaneLayout.show(setCardPane, FilterType.SPECIFY.name()); tipCardPaneLayout.show(tipCardPane, FilterType.SPECIFY.name()); //显示set和tip - setCardPane.setPreferredSize(new Dimension(155, 20)); - tipCardPane.setPreferredSize(new Dimension(221, 15)); + setCardPane.setPreferredSize(new Dimension(158, 20)); + tipCardPane.setPreferredSize(new Dimension(224, 40)); } else { setCardPaneLayout.show(setCardPane, FilterType.UNDEFINE.name()); tipCardPaneLayout.show(tipCardPane, FilterType.UNDEFINE.name()); @@ -713,7 +715,10 @@ public class CellDSColumnEditor extends CellQuickEditor { setCardPane.setPreferredSize(new Dimension(0, 0)); tipCardPane.setPreferredSize(new Dimension(0, 0)); } - + setCardPane.revalidate(); + tipCardPane.revalidate(); + setCardPane.repaint(); + tipCardPane.repaint(); } }); //配置展示CardLayout @@ -737,22 +742,23 @@ public class CellDSColumnEditor extends CellQuickEditor { //奇数 UILabel 占一行作为提示信息 setCardPane.add(new JPanel(), FilterType.ODD.name()); - tipCardPane.add(new UILabel(Inter.getLocText("BindColumn-Result_Serial_Number_Start_From_1") - + "," + Inter.getLocText("BindColumn-Odd_Selected_(1,3,5...)")), FilterType.ODD.name()); + MultilineLabel oddTip = new MultilineLabel(Inter.getLocText("FS-Designer_DS_Filter_Odd_Tip")); + oddTip.setForeground(TIP_FONT_COLOR); + tipCardPane.add(oddTip, FilterType.ODD.name()); //偶数 UILabel 占一行作为提示信息 setCardPane.add(new JPanel(), FilterType.EVEN.name()); - tipCardPane.add(new UILabel(Inter.getLocText("BindColumn-Result_Serial_Number_Start_From_1") - + "," + Inter.getLocText("BindColumn-Even_Selected_(2,4,6...)")), FilterType.EVEN.name()); + MultilineLabel evenTip = new MultilineLabel(Inter.getLocText("FS-Designer_DS_Filter_Even_Tip")); + evenTip.setForeground(TIP_FONT_COLOR); + tipCardPane.add(evenTip, FilterType.EVEN.name()); //输入框占用右半边,提示信息占一行 serialTextField = new UITextField(16); setCardPane.add(serialTextField, FilterType.SPECIFY.name()); - tipCardPane.add(new UILabel( - Inter.getLocText(new String[]{ - "Format", "BindColumn-Result_Serial_Number_Start_From_1", "Inner_Parameter", "Group_Count"}, - new String[]{": 1,2-3,5,8 ", ",", "$__count__"})), FilterType.SPECIFY.name()); + MultilineLabel specifyTip = new MultilineLabel(Inter.getLocText("FS-Designer_DS_Filter_Specify_Tip")); + specifyTip.setForeground(TIP_FONT_COLOR); + tipCardPane.add(specifyTip, FilterType.SPECIFY.name()); this.add(TableLayoutHelper.createTableLayoutPane(new Component[][]{ {filterLabel, rsComboBox}, @@ -776,30 +782,30 @@ public class CellDSColumnEditor extends CellQuickEditor { case SelectCount.TOP: this.topFormulaPane.populate(selectCount.getFormulaCount()); //隐藏tip 显示set - setCardPane.setPreferredSize(new Dimension(155, 20)); + setCardPane.setPreferredSize(new Dimension(158, 20)); tipCardPane.setPreferredSize(new Dimension(0, 0)); break; case SelectCount.BOTTOM: this.bottomFormulaPane.populate(selectCount.getFormulaCount()); //隐藏tip 显示set - setCardPane.setPreferredSize(new Dimension(155, 20)); + setCardPane.setPreferredSize(new Dimension(158, 20)); tipCardPane.setPreferredSize(new Dimension(0, 0)); break; case SelectCount.SPECIFY: this.serialTextField.setText(selectCount.getSerial()); //显示set和tip - setCardPane.setPreferredSize(new Dimension(155, 20)); - tipCardPane.setPreferredSize(new Dimension(221, 15)); + setCardPane.setPreferredSize(new Dimension(158, 20)); + tipCardPane.setPreferredSize(new Dimension(224, 40)); break; case SelectCount.EVEN: //隐藏set 显示tip setCardPane.setPreferredSize(new Dimension(0, 0)); - tipCardPane.setPreferredSize(new Dimension(221, 15)); + tipCardPane.setPreferredSize(new Dimension(224, 40)); break; case SelectCount.ODD: //隐藏set 显示tip setCardPane.setPreferredSize(new Dimension(0, 0)); - tipCardPane.setPreferredSize(new Dimension(221, 15)); + tipCardPane.setPreferredSize(new Dimension(224, 40)); break; default: //隐藏set和tip diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index ac0e0171ec..4a787cb966 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -2119,4 +2119,7 @@ FR-Designer_Widget_Return_Path=return path FR-Designer_Widget_Display_Position=Display Position FR-Designer_Size_Limit=Size_Limit FR-Designer_Widget_Name=Widget Name -FR-Designer_Coords_And_Size=Coords & Size \ No newline at end of file +FR-Designer_Coords_And_Size=Coords & Size +FS-Designer_DS_Filter_Odd_Tip=\ +FS-Designer_DS_Filter_Even_Tip=\ +FS-Designer_DS_Filter_Specify_Tip=\ \ No newline at end of file diff --git a/designer_base/src/com/fr/design/locale/designer_en_US.properties b/designer_base/src/com/fr/design/locale/designer_en_US.properties index b020b124d9..effd1232cc 100644 --- a/designer_base/src/com/fr/design/locale/designer_en_US.properties +++ b/designer_base/src/com/fr/design/locale/designer_en_US.properties @@ -2116,3 +2116,6 @@ FR-Designer_Widget_Display_Position=Display Position FR-Designer_Size_Limit=Size_Limit FR-Designer_Widget_Name=Widget Name FR-Designer_Coords_And_Size=Coords & Size +FS-Designer_DS_Filter_Odd_Tip=\ +FS-Designer_DS_Filter_Even_Tip=\ +FS-Designer_DS_Filter_Specify_Tip=\ diff --git a/designer_base/src/com/fr/design/locale/designer_ja_JP.properties b/designer_base/src/com/fr/design/locale/designer_ja_JP.properties index 5c87c63519..3dda74e68b 100644 --- a/designer_base/src/com/fr/design/locale/designer_ja_JP.properties +++ b/designer_base/src/com/fr/design/locale/designer_ja_JP.properties @@ -2118,4 +2118,7 @@ FR-Designer_Widget_Return_Path= FR-Designer_Widget_Display_Position= FR-Designer_Size_Limit= FR-Designer_Widget_Name= -FR-Designer_Coords_And_Size= \ No newline at end of file +FR-Designer_Coords_And_Size= +FS-Designer_DS_Filter_Odd_Tip=\ +FS-Designer_DS_Filter_Even_Tip=\ +FS-Designer_DS_Filter_Specify_Tip=\ \ No newline at end of file diff --git a/designer_base/src/com/fr/design/locale/designer_ko_KR.properties b/designer_base/src/com/fr/design/locale/designer_ko_KR.properties index 0af04893e8..a177eaa7b9 100644 --- a/designer_base/src/com/fr/design/locale/designer_ko_KR.properties +++ b/designer_base/src/com/fr/design/locale/designer_ko_KR.properties @@ -2118,4 +2118,7 @@ FR-Designer_Widget_Return_Path= FR-Designer_Widget_Display_Position= FR-Designer_Size_Limit= FR-Designer_Widget_Name= -FR-Designer_Coords_And_Size= \ No newline at end of file +FR-Designer_Coords_And_Size= +FS-Designer_DS_Filter_Odd_Tip=\ +FS-Designer_DS_Filter_Even_Tip=\ +FS-Designer_DS_Filter_Specify_Tip=\ \ No newline at end of file diff --git a/designer_base/src/com/fr/design/locale/designer_zh_CN.properties b/designer_base/src/com/fr/design/locale/designer_zh_CN.properties index e822817437..54ffaaf30f 100644 --- a/designer_base/src/com/fr/design/locale/designer_zh_CN.properties +++ b/designer_base/src/com/fr/design/locale/designer_zh_CN.properties @@ -2126,4 +2126,7 @@ FR-Designer_Widget_Return_Path=\u7ED3\u679C\u8FD4\u56DE\u5B8C\u6574\u5C42\u6B21\ FR-Designer_Widget_Display_Position=\u663E\u793A\u4F4D\u7F6E FR-Designer_Size_Limit=\u5927\u5C0F\u9650\u5236 FR-Designer_Widget_Name=\u63A7\u4EF6\u540D\u79F0 -FR-Designer_Coords_And_Size=\u5750\u6807\u00B7\u5C3A\u5BF8 \ No newline at end of file +FR-Designer_Coords_And_Size=\u5750\u6807\u00B7\u5C3A\u5BF8 +FS-Designer_DS_Filter_Odd_Tip=\u63D0\u793A\uFF1A\u5E8F\u53F7\u4ECE1\u5F00\u59CB\uFF0C\u9009\u62E9\u4E86\u5947\u6570\u96C6(1,3,5...) +FS-Designer_DS_Filter_Even_Tip=\u63D0\u793A\uFF1A\u5E8F\u53F7\u4ECE1\u5F00\u59CB\uFF0C\u9009\u62E9\u4E86\u5076\u6570\u96C6(2,4,6...) +FS-Designer_DS_Filter_Specify_Tip=\u63D0\u793A\uFF1A\u683C\u5F0F\u4E3A1,2-3,5,8\uFF0C\u5E8F\u53F7\u4ECE1\u5F00\u59CB\uFF0C\u5185\u503C\u53C2\u6570$_count_\u8868\u793A\u603B\u4E2A\u6570 \ No newline at end of file diff --git a/designer_base/src/com/fr/design/locale/designer_zh_TW.properties b/designer_base/src/com/fr/design/locale/designer_zh_TW.properties index dda5dae78d..9c682333a5 100644 --- a/designer_base/src/com/fr/design/locale/designer_zh_TW.properties +++ b/designer_base/src/com/fr/design/locale/designer_zh_TW.properties @@ -2119,3 +2119,6 @@ FR-Designer_Widget_Display_Position= FR-Designer_Size_Limit= FR-Designer_Widget_Name= FR-Designer_Coords_And_Size= +FS-Designer_DS_Filter_Odd_Tip=\u63D0\u793A\uFF1A\u5E8F\u865F\u5F9E1\u958B\u59CB\uFF0C\u9078\u64C7\u4E86\u5947\u6578\u96C6(1,3,5...) +FS-Designer_DS_Filter_Even_Tip=\u63D0\u793A\uFF1A\u5E8F\u865F\u5F9E1\u958B\u59CB\uFF0C\u9078\u64C7\u4E86\u5076\u6578\u96C6(2,4,6...) +FS-Designer_DS_Filter_Specify_Tip=\u63D0\u793A\uFF1A\u683C\u5F0F\u70BA1,2-3,5,8\uFF0C\u5E8F\u865F\u5F9E1\u958B\u59CB\uFF0C\u5185\u7F6E\u53C3\u6578$_count_\u8868\u793A\u7E02\u500B\u6578 From 0f92b58f7a701b0e31f4d6b79d0541e147691e82 Mon Sep 17 00:00:00 2001 From: "yaoh.wu" Date: Wed, 9 Aug 2017 16:14:15 +0800 Subject: [PATCH 2/3] =?UTF-8?q?REPORT-3348=20=E9=97=B4=E8=B7=9D=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dscolumn/ResultSetGroupDockingPane.java | 4 +- .../com/fr/quickeditor/CellQuickEditor.java | 8 ++-- .../cellquick/CellBiasTextPainterEditor.java | 4 +- .../cellquick/CellDSColumnEditor.java | 42 +++++++++---------- .../cellquick/CellFormulaQuickEditor.java | 4 +- .../cellquick/CellImageQuickEditor.java | 4 +- .../cellquick/CellRichTextEditor.java | 4 +- .../cellquick/CellSubReportEditor.java | 4 +- 8 files changed, 38 insertions(+), 36 deletions(-) diff --git a/designer/src/com/fr/design/dscolumn/ResultSetGroupDockingPane.java b/designer/src/com/fr/design/dscolumn/ResultSetGroupDockingPane.java index ed4c24cba1..3c36414681 100644 --- a/designer/src/com/fr/design/dscolumn/ResultSetGroupDockingPane.java +++ b/designer/src/com/fr/design/dscolumn/ResultSetGroupDockingPane.java @@ -69,13 +69,13 @@ public class ResultSetGroupDockingPane extends ResultSetGroupPane { int i = goBox.getSelectedIndex(); if (i == BIND_GROUP) { cardLayout.show(cardPane, "groupPane"); - cardPane.setPreferredSize(new Dimension(155, 20)); + cardPane.setPreferredSize(new Dimension(156, 20)); } else if (i == BIND_SELECTED) { cardLayout.show(cardPane, "listPane"); cardPane.setPreferredSize(new Dimension(0, 0)); } else if (i == BIND_SUMMARY) { cardLayout.show(cardPane, "summaryPane"); - cardPane.setPreferredSize(new Dimension(155, 20)); + cardPane.setPreferredSize(new Dimension(156, 20)); CellExpandAttr cellExpandAttr = cellElement.getCellExpandAttr(); cellExpandAttr.setDirection(Constants.NONE); } diff --git a/designer/src/com/fr/quickeditor/CellQuickEditor.java b/designer/src/com/fr/quickeditor/CellQuickEditor.java index 2e1f4531d2..ae4e4b73f9 100644 --- a/designer/src/com/fr/quickeditor/CellQuickEditor.java +++ b/designer/src/com/fr/quickeditor/CellQuickEditor.java @@ -55,6 +55,8 @@ public abstract class CellQuickEditor extends QuickEditor { emptyLabel.setPreferredSize(new Dimension(60, 20)); } + protected static final int VGAP = 10, HGAP = 8, VGAP_INNER = 5; + public CellQuickEditor() { scrollBar = new UIScrollBar(UIScrollBar.VERTICAL) { @@ -101,7 +103,7 @@ public abstract class CellQuickEditor extends QuickEditor { new Component[]{initTopContent(), null}, new Component[]{centerBody, null} }; - leftContentPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); + leftContentPane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, HGAP, VGAP); this.setLayout(new BarLayout()); this.add(scrollBar); this.add(leftContentPane); @@ -122,8 +124,8 @@ public abstract class CellQuickEditor extends QuickEditor { new Component[]{cellLabel, columnRowTextField = initColumnRowTextField()}, new Component[]{insertContentLabel, cellElementEditButton}, }; - JPanel topContent = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); - topContent.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 0)); + JPanel topContent = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, HGAP, VGAP); + topContent.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 0)); return topContent; } diff --git a/designer/src/com/fr/quickeditor/cellquick/CellBiasTextPainterEditor.java b/designer/src/com/fr/quickeditor/cellquick/CellBiasTextPainterEditor.java index c9a1ad1e17..c17ac86784 100644 --- a/designer/src/com/fr/quickeditor/cellquick/CellBiasTextPainterEditor.java +++ b/designer/src/com/fr/quickeditor/cellquick/CellBiasTextPainterEditor.java @@ -34,10 +34,10 @@ public class CellBiasTextPainterEditor extends CellQuickEditor { } }); editButton.setOpaque(false); - content.add(TableLayoutHelper.createTableLayoutPane(new Component[][]{ + content.add(TableLayoutHelper.createGapTableLayoutPane(new Component[][]{ new Component[]{emptyLabel, editButton}}, new double[]{TableLayout.PREFERRED}, - new double[]{TableLayout.PREFERRED, TableLayout.FILL}), BorderLayout.CENTER); + new double[]{TableLayout.PREFERRED, TableLayout.FILL}, HGAP, VGAP), BorderLayout.CENTER); return content; } diff --git a/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java b/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java index 0cb1919bcc..5a2822afb6 100644 --- a/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java +++ b/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java @@ -55,7 +55,7 @@ import java.util.ArrayList; public class CellDSColumnEditor extends CellQuickEditor { private static final double P = TableLayout.PREFERRED, F = TableLayout.FILL; - private static final Color TIP_FONT_COLOR = new Color(51f, 51f, 52f, 1.0f); + private static final Color TIP_FONT_COLOR = new Color(0x7F333334, true); private enum FilterType { //前N个 后N个 奇数 偶数 自定义 未定义 @@ -73,8 +73,6 @@ public class CellDSColumnEditor extends CellQuickEditor { private JPanel cardContainer; // 卡片布局TAB切换按钮 private UIHeadGroup tabsHeaderIconPane; - // 数据列基本设置 - private DSColumnBasicEditorPane cellDSColumnBasicPane; // 数据列高级设置 private DSColumnAdvancedEditorPane cellDSColumnAdvancedPane; @@ -158,7 +156,7 @@ public class CellDSColumnEditor extends CellQuickEditor { private void createPanes() { paneList = new ArrayList<>(); /*基本设置面板*/ - cellDSColumnBasicPane = new DSColumnBasicEditorPane(); + DSColumnBasicEditorPane cellDSColumnBasicPane = new DSColumnBasicEditorPane(); paneList.add(cellDSColumnBasicPane); /*高级设置面板*/ cellDSColumnAdvancedPane = new DSColumnAdvancedEditorPane(); @@ -227,7 +225,7 @@ public class CellDSColumnEditor extends CellQuickEditor { Component[][] components = new Component[][]{ new Component[]{uiLabel, uiButton} }; - conditionPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); + conditionPane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, HGAP, VGAP); this.add(this.createContentPane(), BorderLayout.CENTER); this.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); } @@ -274,7 +272,7 @@ public class CellDSColumnEditor extends CellQuickEditor { //条件过滤 new Component[]{this.conditionPane} }; - return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); + return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, HGAP, VGAP); } } @@ -485,11 +483,11 @@ public class CellDSColumnEditor extends CellQuickEditor { //数据倍数 UILabel multipleLabel = new UILabel(Inter.getLocText("Column_Multiple")); multipleLabel.setPreferredSize(new Dimension(60, 20)); - multiPane = TableLayoutHelper.createTableLayoutPane(new Component[][]{ + multiPane = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{ new Component[]{ multipleLabel, multiNumSpinner } - }, new double[]{P}, new double[]{P, F} + }, new double[]{P}, new double[]{P, F}, HGAP, VGAP ); multiNumPane.add(multiPane); useMultiplyNumCheckBox.addActionListener(new ActionListener() { @@ -518,7 +516,7 @@ public class CellDSColumnEditor extends CellQuickEditor { {extendableDirectionPane}, {multiNumPane} }; - return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); + return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, HGAP, VGAP); } @@ -584,7 +582,9 @@ public class CellDSColumnEditor extends CellQuickEditor { }; double[] rowSize = {P, P}, columnSize = {P, F}; - this.add(TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize), BorderLayout.CENTER); + this.add(TableLayoutHelper.createGapTableLayoutPane( + components, rowSize, columnSize, HGAP, VGAP + ), BorderLayout.CENTER); } @@ -606,7 +606,7 @@ public class CellDSColumnEditor extends CellQuickEditor { if (noContent) { centerPane.setPreferredSize(new Dimension(0, 0)); } else { - centerPane.setPreferredSize(new Dimension(158, 20)); + centerPane.setPreferredSize(new Dimension(156, 20)); } String sortFormula = dSColumn.getSortFormula(); if (sortFormula != null && sortFormula.length() >= 1) { @@ -680,14 +680,14 @@ public class CellDSColumnEditor extends CellQuickEditor { setCardPaneLayout.show(setCardPane, FilterType.TOP.name()); tipCardPaneLayout.show(tipCardPane, FilterType.TOP.name()); //隐藏tip 显示set - setCardPane.setPreferredSize(new Dimension(158, 20)); + setCardPane.setPreferredSize(new Dimension(156, 20)); tipCardPane.setPreferredSize(new Dimension(0, 0)); } else if (selectIndex == 2) { //后N个 setCardPaneLayout.show(setCardPane, FilterType.BOTTOM.name()); tipCardPaneLayout.show(tipCardPane, FilterType.BOTTOM.name()); //隐藏tip 显示set - setCardPane.setPreferredSize(new Dimension(158, 20)); + setCardPane.setPreferredSize(new Dimension(156, 20)); tipCardPane.setPreferredSize(new Dimension(0, 0)); } else if (selectIndex == 3) { //奇数 @@ -706,7 +706,7 @@ public class CellDSColumnEditor extends CellQuickEditor { setCardPaneLayout.show(setCardPane, FilterType.SPECIFY.name()); tipCardPaneLayout.show(tipCardPane, FilterType.SPECIFY.name()); //显示set和tip - setCardPane.setPreferredSize(new Dimension(158, 20)); + setCardPane.setPreferredSize(new Dimension(156, 20)); tipCardPane.setPreferredSize(new Dimension(224, 40)); } else { setCardPaneLayout.show(setCardPane, FilterType.UNDEFINE.name()); @@ -760,11 +760,11 @@ public class CellDSColumnEditor extends CellQuickEditor { specifyTip.setForeground(TIP_FONT_COLOR); tipCardPane.add(specifyTip, FilterType.SPECIFY.name()); - this.add(TableLayoutHelper.createTableLayoutPane(new Component[][]{ + this.add(TableLayoutHelper.createGapTableLayoutPane(new Component[][]{ {filterLabel, rsComboBox}, {null, setCardPane}, {tipCardPane, null} - }, new double[]{P, P, P}, new double[]{P, F}), BorderLayout.CENTER); + }, new double[]{P, P, P}, new double[]{P, F}, HGAP, VGAP), BorderLayout.CENTER); } public void populate(CellElement cellElement) { @@ -782,19 +782,19 @@ public class CellDSColumnEditor extends CellQuickEditor { case SelectCount.TOP: this.topFormulaPane.populate(selectCount.getFormulaCount()); //隐藏tip 显示set - setCardPane.setPreferredSize(new Dimension(158, 20)); + setCardPane.setPreferredSize(new Dimension(156, 20)); tipCardPane.setPreferredSize(new Dimension(0, 0)); break; case SelectCount.BOTTOM: this.bottomFormulaPane.populate(selectCount.getFormulaCount()); //隐藏tip 显示set - setCardPane.setPreferredSize(new Dimension(158, 20)); + setCardPane.setPreferredSize(new Dimension(156, 20)); tipCardPane.setPreferredSize(new Dimension(0, 0)); break; case SelectCount.SPECIFY: this.serialTextField.setText(selectCount.getSerial()); //显示set和tip - setCardPane.setPreferredSize(new Dimension(158, 20)); + setCardPane.setPreferredSize(new Dimension(156, 20)); tipCardPane.setPreferredSize(new Dimension(224, 40)); break; case SelectCount.EVEN: @@ -955,9 +955,9 @@ public class CellDSColumnEditor extends CellQuickEditor { UILabel customValueLabel = new UILabel(Inter.getLocText("FR-Designer_Display_Value")); customValueLabel.setPreferredSize(new Dimension(60, 20)); formulaField = new JFormulaField("$$$"); - this.add(TableLayoutHelper.createTableLayoutPane(new Component[][]{ + this.add(TableLayoutHelper.createGapTableLayoutPane(new Component[][]{ new Component[]{customValueLabel, formulaField}, - }, new double[]{P}, new double[]{P, F}), BorderLayout.CENTER); + }, new double[]{P}, new double[]{P, F}, HGAP, VGAP), BorderLayout.CENTER); } public void populate(CellElement cellElement) { diff --git a/designer/src/com/fr/quickeditor/cellquick/CellFormulaQuickEditor.java b/designer/src/com/fr/quickeditor/cellquick/CellFormulaQuickEditor.java index faebf9b816..fcd16a6765 100644 --- a/designer/src/com/fr/quickeditor/cellquick/CellFormulaQuickEditor.java +++ b/designer/src/com/fr/quickeditor/cellquick/CellFormulaQuickEditor.java @@ -120,10 +120,10 @@ public class CellFormulaQuickEditor extends CellQuickEditor { pane.add(formulaButton, BorderLayout.EAST); content.add(pane, BorderLayout.NORTH); - return TableLayoutHelper.createTableLayoutPane(new Component[][]{ + return TableLayoutHelper.createGapTableLayoutPane(new Component[][]{ new Component[]{emptyLabel, content}}, new double[]{TableLayout.PREFERRED}, - new double[]{TableLayout.PREFERRED, TableLayout.FILL}); + new double[]{TableLayout.PREFERRED, TableLayout.FILL}, HGAP, VGAP); } @Override diff --git a/designer/src/com/fr/quickeditor/cellquick/CellImageQuickEditor.java b/designer/src/com/fr/quickeditor/cellquick/CellImageQuickEditor.java index 6bbbf5fcf5..51b7417ac5 100644 --- a/designer/src/com/fr/quickeditor/cellquick/CellImageQuickEditor.java +++ b/designer/src/com/fr/quickeditor/cellquick/CellImageQuickEditor.java @@ -42,10 +42,10 @@ public class CellImageQuickEditor extends CellQuickEditor { } }); editButton.setOpaque(false); - content.add(TableLayoutHelper.createTableLayoutPane(new Component[][]{ + content.add(TableLayoutHelper.createGapTableLayoutPane(new Component[][]{ new Component[]{emptyLabel, editButton}}, new double[]{TableLayout.PREFERRED}, - new double[]{TableLayout.PREFERRED, TableLayout.FILL}), BorderLayout.CENTER); + new double[]{TableLayout.PREFERRED, TableLayout.FILL}, HGAP, VGAP), BorderLayout.CENTER); return content; } diff --git a/designer/src/com/fr/quickeditor/cellquick/CellRichTextEditor.java b/designer/src/com/fr/quickeditor/cellquick/CellRichTextEditor.java index 9e9bf3bc9d..8f8afbeed2 100644 --- a/designer/src/com/fr/quickeditor/cellquick/CellRichTextEditor.java +++ b/designer/src/com/fr/quickeditor/cellquick/CellRichTextEditor.java @@ -29,10 +29,10 @@ public class CellRichTextEditor extends CellQuickEditor { JPanel content = new JPanel(new BorderLayout()); richTextButton = new UIButton(); richTextButton.setOpaque(false); - content.add(TableLayoutHelper.createTableLayoutPane(new Component[][]{ + content.add(TableLayoutHelper.createGapTableLayoutPane(new Component[][]{ new Component[]{emptyLabel, richTextButton}}, new double[]{TableLayout.PREFERRED}, - new double[]{TableLayout.PREFERRED, TableLayout.FILL}), BorderLayout.CENTER); + new double[]{TableLayout.PREFERRED, TableLayout.FILL}, HGAP, VGAP), BorderLayout.CENTER); return content; } diff --git a/designer/src/com/fr/quickeditor/cellquick/CellSubReportEditor.java b/designer/src/com/fr/quickeditor/cellquick/CellSubReportEditor.java index c2d5e52df6..e28bdbf395 100644 --- a/designer/src/com/fr/quickeditor/cellquick/CellSubReportEditor.java +++ b/designer/src/com/fr/quickeditor/cellquick/CellSubReportEditor.java @@ -30,10 +30,10 @@ public class CellSubReportEditor extends CellQuickEditor { JPanel content = new JPanel(new BorderLayout()); subReportButton = new UIButton(); subReportButton.setOpaque(false); - content.add(TableLayoutHelper.createTableLayoutPane(new Component[][]{ + content.add(TableLayoutHelper.createGapTableLayoutPane(new Component[][]{ new Component[]{emptyLabel, subReportButton}}, new double[]{TableLayout.PREFERRED}, - new double[]{TableLayout.PREFERRED, TableLayout.FILL}), BorderLayout.CENTER); + new double[]{TableLayout.PREFERRED, TableLayout.FILL}, HGAP, VGAP), BorderLayout.CENTER); return content; } From 3d42e46a453143812de09b6236b3d8acfa880b53 Mon Sep 17 00:00:00 2001 From: "yaoh.wu" Date: Wed, 9 Aug 2017 17:05:04 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E9=97=B4=E8=B7=9D=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/dscolumn/ResultSetGroupDockingPane.java | 2 +- designer/src/com/fr/design/dscolumn/SelectedDataColumnPane.java | 2 +- designer/src/com/fr/quickeditor/CellQuickEditor.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/designer/src/com/fr/design/dscolumn/ResultSetGroupDockingPane.java b/designer/src/com/fr/design/dscolumn/ResultSetGroupDockingPane.java index 3c36414681..b89eec7e7b 100644 --- a/designer/src/com/fr/design/dscolumn/ResultSetGroupDockingPane.java +++ b/designer/src/com/fr/design/dscolumn/ResultSetGroupDockingPane.java @@ -84,7 +84,7 @@ public class ResultSetGroupDockingPane extends ResultSetGroupPane { double[] columnSize = {p, f}; double[] rowSize = {p, p}; - return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); + return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, 8, 10); } private void initCardPane() { diff --git a/designer/src/com/fr/design/dscolumn/SelectedDataColumnPane.java b/designer/src/com/fr/design/dscolumn/SelectedDataColumnPane.java index f76d5fa85a..d672810286 100644 --- a/designer/src/com/fr/design/dscolumn/SelectedDataColumnPane.java +++ b/designer/src/com/fr/design/dscolumn/SelectedDataColumnPane.java @@ -144,7 +144,7 @@ public class SelectedDataColumnPane extends BasicPane { {dcLabel, columnNameComboBox} }; this.setLayout(new BorderLayout()); - this.add(TableLayoutHelper.createTableLayoutPane(components, new double[]{p, p, p}, new double[]{p, f})); + this.add(TableLayoutHelper.createGapTableLayoutPane(components, new double[]{p, p, p}, new double[]{p, f}, 8, 10)); } diff --git a/designer/src/com/fr/quickeditor/CellQuickEditor.java b/designer/src/com/fr/quickeditor/CellQuickEditor.java index ae4e4b73f9..05e117ab4f 100644 --- a/designer/src/com/fr/quickeditor/CellQuickEditor.java +++ b/designer/src/com/fr/quickeditor/CellQuickEditor.java @@ -55,7 +55,7 @@ public abstract class CellQuickEditor extends QuickEditor { emptyLabel.setPreferredSize(new Dimension(60, 20)); } - protected static final int VGAP = 10, HGAP = 8, VGAP_INNER = 5; + protected static final int VGAP = 10, HGAP = 8; public CellQuickEditor() {