Browse Source

Merge pull request #1099 in BA/design from ~YAOH.WU/a_design_0811:release/9.0 to release/9.0

* commit '45b256f58b4dae734c653e5b5cc617106c7d67aa':
  REPORT-3956 设计器单元格元素数据列高级设置结果及筛选下拉框第一次选择对应配置项不显示;部分国际化修改
master
superman 7 years ago
parent
commit
2c18c2f71f
  1. 2
      designer/src/com/fr/design/dscolumn/SelectedDataColumnPane.java
  2. 24
      designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java
  3. 2
      designer/src/com/fr/quickeditor/cellquick/CellStringQuickEditor.java
  4. 6
      designer_base/src/com/fr/design/layout/TableLayoutHelper.java
  5. 1
      designer_base/src/com/fr/design/locale/designer.properties
  6. 1
      designer_base/src/com/fr/design/locale/designer_en_US.properties
  7. 1
      designer_base/src/com/fr/design/locale/designer_ja_JP.properties
  8. 1
      designer_base/src/com/fr/design/locale/designer_ko_KR.properties
  9. 1
      designer_base/src/com/fr/design/locale/designer_zh_CN.properties
  10. 1
      designer_base/src/com/fr/design/locale/designer_zh_TW.properties

2
designer/src/com/fr/design/dscolumn/SelectedDataColumnPane.java

@ -282,7 +282,7 @@ public class SelectedDataColumnPane extends BasicPane {
private void initWithParameterButton(final ElementCasePane casePane, final TemplateCellElement cellElement) { private void initWithParameterButton(final ElementCasePane casePane, final TemplateCellElement cellElement) {
final SelectedDataColumnPane that = this; final SelectedDataColumnPane that = this;
editorPane = new UITableEditorPane<ParameterProvider>(new ParameterTableModel()); editorPane = new UITableEditorPane<ParameterProvider>(new ParameterTableModel());
paramButton = new UIButton(Inter.getLocText("TableData_Dynamic_Parameter_Setting")); paramButton = new UIButton(Inter.getLocText("FR-Designer-Basic_Dynamic_Parameter_Injection"));
paramButton.addActionListener(new ActionListener() { paramButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
BasicDialog paramDialog = editorPane.showSmallWindow(DesignerContext.getDesignerFrame(), new DialogActionAdapter() { BasicDialog paramDialog = editorPane.showSmallWindow(DesignerContext.getDesignerFrame(), new DialogActionAdapter() {

24
designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java

@ -1,6 +1,7 @@
package com.fr.quickeditor.cellquick; package com.fr.quickeditor.cellquick;
import com.fr.base.Formula; import com.fr.base.Formula;
import com.fr.design.actions.UpdateAction;
import com.fr.design.actions.columnrow.DSColumnConditionAction; import com.fr.design.actions.columnrow.DSColumnConditionAction;
import com.fr.design.actions.core.ActionFactory; import com.fr.design.actions.core.ActionFactory;
import com.fr.design.actions.insert.cell.DSColumnCellAction; import com.fr.design.actions.insert.cell.DSColumnCellAction;
@ -219,8 +220,12 @@ public class CellDSColumnEditor extends CellQuickEditor {
uiLabel.setPreferredSize(new Dimension(60, 20)); uiLabel.setPreferredSize(new Dimension(60, 20));
UIButton uiButton = new UIButton(); UIButton uiButton = new UIButton();
if (tc != null) { if (tc != null) {
//第一次初始化时tc为空,引发NullPointerException //第一次初始化时tc为空,会引发NullPointerException
uiButton = new UIButton(new DSColumnConditionAction(tc)); UpdateAction condition = new DSColumnConditionAction(tc);
//丢掉icon,修改按钮名称为编辑
condition.setSmallIcon(null);
condition.setName(Inter.getLocText("FR-Designer_Edit"));
uiButton = new UIButton(condition);
} }
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{uiLabel, uiButton} new Component[]{uiLabel, uiButton}
@ -531,6 +536,7 @@ public class CellDSColumnEditor extends CellQuickEditor {
* @see DSColumnAdvancedPane.SortPane * @see DSColumnAdvancedPane.SortPane
*/ */
public class ResultSetSortConfigPane extends JPanel { public class ResultSetSortConfigPane extends JPanel {
private static final String DEFAULT_VALUE = "=";
private JPanel contentPane; private JPanel contentPane;
//面板 //面板
private UIButtonGroup sortTypePane; private UIButtonGroup sortTypePane;
@ -553,7 +559,7 @@ public class CellDSColumnEditor extends CellQuickEditor {
cardLayout = new CardLayout(); cardLayout = new CardLayout();
centerPane = new JPanel(cardLayout); centerPane = new JPanel(cardLayout);
formulaField = new JFormulaField(""); formulaField = new JFormulaField(DEFAULT_VALUE);
centerPane.add(new JPanel(), "none"); centerPane.add(new JPanel(), "none");
centerPane.add(formulaField, "content"); centerPane.add(formulaField, "content");
UILabel sortLabel = new UILabel(Inter.getLocText("Sort-Sort_Order")); UILabel sortLabel = new UILabel(Inter.getLocText("Sort-Sort_Order"));
@ -648,6 +654,8 @@ public class CellDSColumnEditor extends CellQuickEditor {
* @see DSColumnAdvancedPane.SelectCountPane * @see DSColumnAdvancedPane.SelectCountPane
*/ */
public class ResultSetFilterConfigPane extends JPanel { public class ResultSetFilterConfigPane extends JPanel {
private static final String DEFAULT_VALUE = "=";
private JPanel contentPane; private JPanel contentPane;
private UIComboBox rsComboBox; private UIComboBox rsComboBox;
private JPanel setCardPane; private JPanel setCardPane;
@ -733,12 +741,12 @@ public class CellDSColumnEditor extends CellQuickEditor {
tipCardPane = FRGUIPaneFactory.createCardLayout_S_Pane(); tipCardPane = FRGUIPaneFactory.createCardLayout_S_Pane();
//前N个 //前N个
topFormulaPane = new JFormulaField("="); topFormulaPane = new JFormulaField(DEFAULT_VALUE);
setCardPane.add(topFormulaPane, FilterType.TOP.name()); setCardPane.add(topFormulaPane, FilterType.TOP.name());
tipCardPane.add(new JPanel(), FilterType.TOP.name()); tipCardPane.add(new JPanel(), FilterType.TOP.name());
//后N个 //后N个
bottomFormulaPane = new JFormulaField("="); bottomFormulaPane = new JFormulaField(DEFAULT_VALUE);
setCardPane.add(bottomFormulaPane, FilterType.BOTTOM.name()); setCardPane.add(bottomFormulaPane, FilterType.BOTTOM.name());
tipCardPane.add(new JPanel(), FilterType.BOTTOM.name()); tipCardPane.add(new JPanel(), FilterType.BOTTOM.name());
@ -967,13 +975,15 @@ public class CellDSColumnEditor extends CellQuickEditor {
* @see DSColumnAdvancedPane.ValuePane * @see DSColumnAdvancedPane.ValuePane
*/ */
public class CustomValuePane extends JPanel { public class CustomValuePane extends JPanel {
private static final String DEFAULT_VALUE = "=$$$";
private JFormulaField formulaField; private JFormulaField formulaField;
public CustomValuePane() { public CustomValuePane() {
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
UILabel customValueLabel = new UILabel(Inter.getLocText("FR-Designer_Display_Value")); UILabel customValueLabel = new UILabel(Inter.getLocText("FR-Designer_Display_Value"));
customValueLabel.setPreferredSize(new Dimension(60, 20)); customValueLabel.setPreferredSize(new Dimension(60, 20));
formulaField = new JFormulaField("$$$"); formulaField = new JFormulaField(DEFAULT_VALUE);
this.add(TableLayoutHelper.createGapTableLayoutPane(new Component[][]{ this.add(TableLayoutHelper.createGapTableLayoutPane(new Component[][]{
new Component[]{customValueLabel, formulaField}, new Component[]{customValueLabel, formulaField},
}, new double[]{P}, new double[]{P, F}, HGAP, VGAP), BorderLayout.CENTER); }, new double[]{P}, new double[]{P, F}, HGAP, VGAP), BorderLayout.CENTER);
@ -988,7 +998,7 @@ public class CellDSColumnEditor extends CellQuickEditor {
//formula //formula
String valueFormula = dSColumn.getResult(); String valueFormula = dSColumn.getResult();
if (valueFormula == null) { if (valueFormula == null) {
valueFormula = "$$$"; valueFormula = DEFAULT_VALUE;
} }
formulaField.populateElement(cellElement); formulaField.populateElement(cellElement);
formulaField.populate(valueFormula); formulaField.populate(valueFormula);

2
designer/src/com/fr/quickeditor/cellquick/CellStringQuickEditor.java

@ -69,7 +69,7 @@ public class CellStringQuickEditor extends CellQuickEditor {
return; return;
} }
if (e.getKeyCode() == KeyEvent.VK_ENTER) { if (e.getKeyCode() == KeyEvent.VK_ENTER) {
//todo 按enter键换至下一个单元格 yaoh.wu虽然模仿选中单元格按enter这种场景可以做到,但是原理没有弄清楚。 //todo yaoh.wu:按enter键换至下一个单元格 虽然模仿选中单元格按enter这种场景可以做到,但是原理没有弄清楚。
GridKeyListener dispatchListener = new GridKeyListener(tc.getGrid()); GridKeyListener dispatchListener = new GridKeyListener(tc.getGrid());
dispatchListener.keyPressed(e); dispatchListener.keyPressed(e);
dispatchListener.keyTyped(e); dispatchListener.keyTyped(e);

6
designer_base/src/com/fr/design/layout/TableLayoutHelper.java

@ -203,7 +203,7 @@ public class TableLayoutHelper {
* 修改TableLayout布局的容器指定位置垂直间距的大小 * 修改TableLayout布局的容器指定位置垂直间距的大小
* *
* @param container 容器 * @param container 容器
* @param index vgap的索引ContainervGapA[ComponentA]vGapB[ComponentB]vGapC,vGapB index=2, * @param index vgap的索引Container{vGapA[ComponentA]vGapB[ComponentB]vGapC},vGapB index=2,
* 详情见{@link TableLayout#setRow(int, double)} * 详情见{@link TableLayout#setRow(int, double)}
* @param vgap vgap的新值 * @param vgap vgap的新值
*/ */
@ -211,6 +211,7 @@ public class TableLayoutHelper {
TableLayout layout = (TableLayout) container.getLayout(); TableLayout layout = (TableLayout) container.getLayout();
layout.setRow(index, vgap); layout.setRow(index, vgap);
layout.layoutContainer(container); layout.layoutContainer(container);
container.revalidate();
container.repaint(); container.repaint();
} }
@ -218,7 +219,7 @@ public class TableLayoutHelper {
* 修改TableLayout布局的容器指定位置水平间距的大小 * 修改TableLayout布局的容器指定位置水平间距的大小
* *
* @param container 容器 * @param container 容器
* @param index hgap的索引ContainerhGapA[ComponentA]hGapB[ComponentB],hGapB index=2, * @param index hgap的索引Container{hGapA[ComponentA]hGapB[ComponentB]},hGapB index=2,
* 详情见{@link TableLayout#setColumn(int, double)} * 详情见{@link TableLayout#setColumn(int, double)}
* @param hgap hgap的新值 * @param hgap hgap的新值
*/ */
@ -226,6 +227,7 @@ public class TableLayoutHelper {
TableLayout layout = (TableLayout) container.getLayout(); TableLayout layout = (TableLayout) container.getLayout();
layout.setColumn(index, hgap); layout.setColumn(index, hgap);
layout.layoutContainer(container); layout.layoutContainer(container);
container.revalidate();
container.repaint(); container.repaint();
} }

1
designer_base/src/com/fr/design/locale/designer.properties

@ -2128,3 +2128,4 @@ FR-Designer_Mobile-Height-Percent=Max Percent
FR-Designer_Mobile-Height-Limit=Height Limit FR-Designer_Mobile-Height-Limit=Height Limit
FR-Designer-AlphaFine_NO_Result=no search result FR-Designer-AlphaFine_NO_Result=no search result
FR-Designer_Select_Color=Select Color FR-Designer_Select_Color=Select Color
FR-Designer-Basic_Dynamic_Parameter_Injection=Injection

1
designer_base/src/com/fr/design/locale/designer_en_US.properties

@ -2124,3 +2124,4 @@ FS-Designer_DS_Filter_Even_Tip=Even_Tip
FS-Designer_DS_Filter_Specify_Tip=Specify_Tip FS-Designer_DS_Filter_Specify_Tip=Specify_Tip
FR-Designer-AlphaFine_NO_Result=no search result FR-Designer-AlphaFine_NO_Result=no search result
FR-Designer_Select_Color=Select Color FR-Designer_Select_Color=Select Color
FR-Designer-Basic_Dynamic_Parameter_Injection=Injection

1
designer_base/src/com/fr/design/locale/designer_ja_JP.properties

@ -2122,3 +2122,4 @@ FS-Designer_DS_Filter_Specify_Tip=
FR-Designer_Mobile-Height-Percent= FR-Designer_Mobile-Height-Percent=
FR-Designer_Mobile-Height-Limit= FR-Designer_Mobile-Height-Limit=
FR-Designer_Select_Color= FR-Designer_Select_Color=
FR-Designer-Basic_Dynamic_Parameter_Injection=\

1
designer_base/src/com/fr/design/locale/designer_ko_KR.properties

@ -2123,3 +2123,4 @@ FS-Designer_DS_Filter_Specify_Tip=
FR-Designer_Mobile-Height-Percent= FR-Designer_Mobile-Height-Percent=
FR-Designer_Mobile-Height-Limit= FR-Designer_Mobile-Height-Limit=
FR-Designer_Select_Color= FR-Designer_Select_Color=
FR-Designer-Basic_Dynamic_Parameter_Injection=\

1
designer_base/src/com/fr/design/locale/designer_zh_CN.properties

@ -2135,3 +2135,4 @@ FS-Designer_DS_Filter_Even_Tip=\u63D0\u793A\uFF1A\u5E8F\u53F7\u4ECE1\u5F00\u59CB
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 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
FR-Designer-AlphaFine_NO_Result=\u65E0\u641C\u7D22\u7ED3\u679C FR-Designer-AlphaFine_NO_Result=\u65E0\u641C\u7D22\u7ED3\u679C
FR-Designer_Select_Color=\u9009\u62E9\u989C\u8272 FR-Designer_Select_Color=\u9009\u62E9\u989C\u8272
FR-Designer-Basic_Dynamic_Parameter_Injection=\u6CE8\u5165

1
designer_base/src/com/fr/design/locale/designer_zh_TW.properties

@ -2127,3 +2127,4 @@ FS-Designer_DS_Filter_Specify_Tip=\u63D0\u793A\uFF1A\u683C\u5F0F\u70BA1,2-3,5,8\
M-New_FormBook=\u65B0\u589E\u6C7A\u7B56\u5831\u8868 M-New_FormBook=\u65B0\u589E\u6C7A\u7B56\u5831\u8868
FR-Designer-AlphaFine_NO_Result=\u7121\u641C\u7D22\u7D50\u679C FR-Designer-AlphaFine_NO_Result=\u7121\u641C\u7D22\u7D50\u679C
FR-Designer_Select_Color= FR-Designer_Select_Color=
FR-Designer-Basic_Dynamic_Parameter_Injection=\u6CE8\u5165

Loading…
Cancel
Save