Browse Source

REPORT-3956 设计器单元格元素数据列高级设置结果及筛选下拉框第一次选择对应配置项不显示;部分国际化修改

master
yaoh.wu 7 years ago
parent
commit
45b256f58b
  1. 4
      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. 3
      designer_base/src/com/fr/design/locale/designer.properties
  6. 3
      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. 3
      designer_base/src/com/fr/design/locale/designer_ko_KR.properties
  9. 3
      designer_base/src/com/fr/design/locale/designer_zh_CN.properties
  10. 1
      designer_base/src/com/fr/design/locale/designer_zh_TW.properties

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

@ -41,7 +41,7 @@ import java.util.regex.Pattern;
*
* @author yaoh.wu
* @version 2017年8月3日
* 复用对话框代码保留对话框原始布局
* 复用对话框代码保留对话框原始布局
* @since 8.0
*/
public class SelectedDataColumnPane extends BasicPane {
@ -282,7 +282,7 @@ public class SelectedDataColumnPane extends BasicPane {
private void initWithParameterButton(final ElementCasePane casePane, final TemplateCellElement cellElement) {
final SelectedDataColumnPane that = this;
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() {
public void actionPerformed(ActionEvent e) {
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;
import com.fr.base.Formula;
import com.fr.design.actions.UpdateAction;
import com.fr.design.actions.columnrow.DSColumnConditionAction;
import com.fr.design.actions.core.ActionFactory;
import com.fr.design.actions.insert.cell.DSColumnCellAction;
@ -219,8 +220,12 @@ public class CellDSColumnEditor extends CellQuickEditor {
uiLabel.setPreferredSize(new Dimension(60, 20));
UIButton uiButton = new UIButton();
if (tc != null) {
//第一次初始化时tc为空,引发NullPointerException
uiButton = new UIButton(new DSColumnConditionAction(tc));
//第一次初始化时tc为空,会引发NullPointerException
UpdateAction condition = new DSColumnConditionAction(tc);
//丢掉icon,修改按钮名称为编辑
condition.setSmallIcon(null);
condition.setName(Inter.getLocText("FR-Designer_Edit"));
uiButton = new UIButton(condition);
}
Component[][] components = new Component[][]{
new Component[]{uiLabel, uiButton}
@ -531,6 +536,7 @@ public class CellDSColumnEditor extends CellQuickEditor {
* @see DSColumnAdvancedPane.SortPane
*/
public class ResultSetSortConfigPane extends JPanel {
private static final String DEFAULT_VALUE = "=";
private JPanel contentPane;
//面板
private UIButtonGroup sortTypePane;
@ -553,7 +559,7 @@ public class CellDSColumnEditor extends CellQuickEditor {
cardLayout = new CardLayout();
centerPane = new JPanel(cardLayout);
formulaField = new JFormulaField("");
formulaField = new JFormulaField(DEFAULT_VALUE);
centerPane.add(new JPanel(), "none");
centerPane.add(formulaField, "content");
UILabel sortLabel = new UILabel(Inter.getLocText("Sort-Sort_Order"));
@ -648,6 +654,8 @@ public class CellDSColumnEditor extends CellQuickEditor {
* @see DSColumnAdvancedPane.SelectCountPane
*/
public class ResultSetFilterConfigPane extends JPanel {
private static final String DEFAULT_VALUE = "=";
private JPanel contentPane;
private UIComboBox rsComboBox;
private JPanel setCardPane;
@ -733,12 +741,12 @@ public class CellDSColumnEditor extends CellQuickEditor {
tipCardPane = FRGUIPaneFactory.createCardLayout_S_Pane();
//前N个
topFormulaPane = new JFormulaField("=");
topFormulaPane = new JFormulaField(DEFAULT_VALUE);
setCardPane.add(topFormulaPane, FilterType.TOP.name());
tipCardPane.add(new JPanel(), FilterType.TOP.name());
//后N个
bottomFormulaPane = new JFormulaField("=");
bottomFormulaPane = new JFormulaField(DEFAULT_VALUE);
setCardPane.add(bottomFormulaPane, FilterType.BOTTOM.name());
tipCardPane.add(new JPanel(), FilterType.BOTTOM.name());
@ -967,13 +975,15 @@ public class CellDSColumnEditor extends CellQuickEditor {
* @see DSColumnAdvancedPane.ValuePane
*/
public class CustomValuePane extends JPanel {
private static final String DEFAULT_VALUE = "=$$$";
private JFormulaField formulaField;
public CustomValuePane() {
this.setLayout(new BorderLayout());
UILabel customValueLabel = new UILabel(Inter.getLocText("FR-Designer_Display_Value"));
customValueLabel.setPreferredSize(new Dimension(60, 20));
formulaField = new JFormulaField("$$$");
formulaField = new JFormulaField(DEFAULT_VALUE);
this.add(TableLayoutHelper.createGapTableLayoutPane(new Component[][]{
new Component[]{customValueLabel, formulaField},
}, new double[]{P}, new double[]{P, F}, HGAP, VGAP), BorderLayout.CENTER);
@ -988,7 +998,7 @@ public class CellDSColumnEditor extends CellQuickEditor {
//formula
String valueFormula = dSColumn.getResult();
if (valueFormula == null) {
valueFormula = "$$$";
valueFormula = DEFAULT_VALUE;
}
formulaField.populateElement(cellElement);
formulaField.populate(valueFormula);

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

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

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

@ -203,7 +203,7 @@ public class TableLayoutHelper {
* 修改TableLayout布局的容器指定位置垂直间距的大小
*
* @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)}
* @param vgap vgap的新值
*/
@ -211,6 +211,7 @@ public class TableLayoutHelper {
TableLayout layout = (TableLayout) container.getLayout();
layout.setRow(index, vgap);
layout.layoutContainer(container);
container.revalidate();
container.repaint();
}
@ -218,7 +219,7 @@ public class TableLayoutHelper {
* 修改TableLayout布局的容器指定位置水平间距的大小
*
* @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)}
* @param hgap hgap的新值
*/
@ -226,6 +227,7 @@ public class TableLayoutHelper {
TableLayout layout = (TableLayout) container.getLayout();
layout.setColumn(index, hgap);
layout.layoutContainer(container);
container.revalidate();
container.repaint();
}

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

@ -2127,4 +2127,5 @@ FS-Designer_DS_Filter_Specify_Tip=Specify_Tip
FR-Designer_Mobile-Height-Percent=Max Percent
FR-Designer_Mobile-Height-Limit=Height Limit
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

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

@ -2123,4 +2123,5 @@ FS-Designer_DS_Filter_Odd_Tip=Odd_Tip
FS-Designer_DS_Filter_Even_Tip=Even_Tip
FS-Designer_DS_Filter_Specify_Tip=Specify_Tip
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-Limit=
FR-Designer_Select_Color=
FR-Designer-Basic_Dynamic_Parameter_Injection=\

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

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

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

@ -2134,4 +2134,5 @@ FS-Designer_DS_Filter_Odd_Tip=\u63D0\u793A\uFF1A\u5E8F\u53F7\u4ECE1\u5F00\u59CB\
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
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
FR-Designer-AlphaFine_NO_Result=\u7121\u641C\u7D22\u7D50\u679C
FR-Designer_Select_Color=
FR-Designer-Basic_Dynamic_Parameter_Injection=\u6CE8\u5165

Loading…
Cancel
Save