From c820059d3a54131c76757e62fc1c57939963883c Mon Sep 17 00:00:00 2001 From: "yaoh.wu" Date: Mon, 31 Jul 2017 17:26:21 +0800 Subject: [PATCH 01/30] =?UTF-8?q?REPORT-3348=20=E5=8D=95=E5=85=83=E6=A0=BC?= =?UTF-8?q?=E5=85=83=E7=B4=A0=E6=95=B0=E6=8D=AE=E5=88=97=E9=AB=98=E7=BA=A7?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dscolumn/DSColumnAdvancedEditorPane.java | 464 ++++++++++++++++++ 1 file changed, 464 insertions(+) diff --git a/designer/src/com/fr/design/dscolumn/DSColumnAdvancedEditorPane.java b/designer/src/com/fr/design/dscolumn/DSColumnAdvancedEditorPane.java index 57af1a340..fb0b69496 100644 --- a/designer/src/com/fr/design/dscolumn/DSColumnAdvancedEditorPane.java +++ b/designer/src/com/fr/design/dscolumn/DSColumnAdvancedEditorPane.java @@ -1,11 +1,45 @@ package com.fr.design.dscolumn; +import com.fr.base.Formula; +import com.fr.data.TableDataSource; +import com.fr.design.data.DesignTableDataManager; +import com.fr.design.dialog.DialogActionAdapter; +import com.fr.design.formula.CustomVariableResolver; +import com.fr.design.formula.FormulaFactory; +import com.fr.design.formula.TinyFormulaPane; +import com.fr.design.formula.UIFormula; +import com.fr.design.gui.ibutton.UIButton; +import com.fr.design.gui.ibutton.UIButtonGroup; +import com.fr.design.gui.icheckbox.UICheckBox; +import com.fr.design.gui.icombobox.UIComboBox; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.ispinner.UISpinner; +import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.cell.CellEditorPane; +import com.fr.design.utils.gui.GUICoreUtils; +import com.fr.general.IOUtils; +import com.fr.general.Inter; +import com.fr.report.cell.CellElement; import com.fr.report.cell.TemplateCellElement; +import com.fr.report.cell.cellattr.core.group.DSColumn; +import com.fr.report.cell.cellattr.core.group.SelectCount; + +import javax.swing.*; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; +import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; /** * 单元格元素 数据列 基本设置内容面板 + *

+ * 复制了一些{@link DSColumnAdvancedPane}的内部类,不做复用,价值不大,进行修改后直接使用; + *

* * @author yaoh.wu * @version 2017年7月25日 @@ -13,6 +47,29 @@ import com.fr.report.cell.TemplateCellElement; */ public class DSColumnAdvancedEditorPane extends CellEditorPane { + private static final String INSET_TEXT = " "; + + //排列顺序 + private ResultSetSortConfigPane sortPane; + //结果集筛选 + private SelectCountPane selectCountPane; + //自定义值显示 + private ValuePane valuePane; + //横向可扩展性 + private UICheckBox horizontalExtendableCheckBox; + //纵向可扩展性 + private UICheckBox verticalExtendableCheckBox; + //补充空白数据 + private UICheckBox useMultiplyNumCheckBox; + //补充空白数据书目输入框 + private UISpinner multiNumSpinner; + + + public DSColumnAdvancedEditorPane() { + this.setLayout(new BorderLayout()); + this.add(this.createContentPane(), BorderLayout.CENTER); + } + @Override public String getIconPath() { @@ -35,4 +92,411 @@ public class DSColumnAdvancedEditorPane extends CellEditorPane { } + + /** + * 创建内容 + */ + private JPanel createContentPane() { + this.setBorder(BorderFactory.createEmptyBorder(3, 3, 3, 3)); + this.setLayout(FRGUIPaneFactory.createBorderLayout()); + + this.sortPane = new ResultSetSortConfigPane(); + + selectCountPane = new DSColumnAdvancedEditorPane.SelectCountPane(); + + valuePane = new DSColumnAdvancedEditorPane.ValuePane(); + + JPanel extendableDirectionPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); + extendableDirectionPane.add(horizontalExtendableCheckBox = new UICheckBox(Inter.getLocText("ExpandD-Horizontal_Extendable"))); + extendableDirectionPane.add(verticalExtendableCheckBox = new UICheckBox(Inter.getLocText("ExpandD-Vertical_Extendable"))); + + JPanel extendablePane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("ExpandD-Expandable")); + extendablePane.setLayout(new BorderLayout()); + extendablePane.add(extendableDirectionPane, BorderLayout.CENTER); + + JPanel multiNumPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("Fill_blank_Data")); + + useMultiplyNumCheckBox = new UICheckBox(Inter.getLocText("Column_Multiple")); + multiNumPane.add(useMultiplyNumCheckBox); + multiNumPane.add(new UILabel(INSET_TEXT)); + + multiNumSpinner = new UISpinner(1, 10000, 1, 1); + multiNumPane.add(multiNumSpinner); + + useMultiplyNumCheckBox.addActionListener(new ActionListener() { + + public void actionPerformed(ActionEvent e) { + checkButtonEnabled(); + } + }); + + double[] rowSize = {TableLayout.PREFERRED, TableLayout.PREFERRED, + TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED}; + double[] columnSize = {TableLayout.FILL}; + + Component[][] components = null; + components = new Component[][]{ + {sortPane}, + {selectCountPane}, + {valuePane}, + {extendablePane}, + {multiNumPane} + }; + return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); + } + + + private void checkButtonEnabled() { + if (useMultiplyNumCheckBox.isSelected()) { + multiNumSpinner.setEnabled(true); + } else { + multiNumSpinner.setEnabled(false); + } + } + + /** + * 单元格元素>数据集>高级设置>结果排序设置面板 + * + * @see com.fr.design.mainframe.cell.settingpane.CellExpandAttrPane + */ + protected static class ResultSetSortConfigPane extends JPanel { + private UIButtonGroup sort_type_pane; + private TinyFormulaPane tinyFormulaPane; + private CardLayout cardLayout; + private JPanel centerPane; + + + public ResultSetSortConfigPane() { + this.setLayout(new BorderLayout(0, 4)); + Icon[] iconArray = { + IOUtils.readIcon("/com/fr/design/images/expand/none16x16.png"), + IOUtils.readIcon("/com/fr/design/images/expand/asc.png"), + IOUtils.readIcon("/com/fr/design/images/expand/des.png") + }; + String[] nameArray = {Inter.getLocText("Sort-Original"), Inter.getLocText("Sort-Ascending"), Inter.getLocText("Sort-Descending")}; + sort_type_pane = new UIButtonGroup(iconArray); + sort_type_pane.setAllToolTips(nameArray); + sort_type_pane.setGlobalName(Inter.getLocText("ExpandD-Sort_After_Expand")); + this.add(sort_type_pane, BorderLayout.NORTH); + + cardLayout = new CardLayout(); + centerPane = new JPanel(cardLayout); + + tinyFormulaPane = new TinyFormulaPane(); + + centerPane.add(new JPanel(), "none"); + centerPane.add(tinyFormulaPane, "content"); + + this.add(centerPane, BorderLayout.CENTER); + + sort_type_pane.addChangeListener(new ChangeListener() { + @Override + public void stateChanged(ChangeEvent e) { + cardLayout.show(centerPane, sort_type_pane.getSelectedIndex() == 0 ? "none" : "content"); + } + }); + } + + + /** + * 刷新面板信息 + * + * @param dataSource 数据集对象 + * @param cellElement 单元格 + */ + public void populate(TableDataSource dataSource, TemplateCellElement cellElement) { + //todo + } + + + /** + * 保存面板配置信息 + * + * @param cellElement 单元格 + */ + public void update(CellElement cellElement) { + //todo + } + } + + /** + * 单元格元素>数据集>高级设置>结果集筛选设置面板 + * + * @see DSColumnAdvancedPane.SelectCountPane + */ + protected static class SelectCountPane extends JPanel { + + CellElement cellElement; + // private Comparator sortComparator; + private UIComboBox selectCountComboBox; + private JPanel selectCountCardPane; + private UITextField serialTextField; + + DSColumnAdvancedEditorPane.JFormulaField topFormulaPane; + DSColumnAdvancedEditorPane.JFormulaField bottomFormulaPane; + + public SelectCountPane() { + this.setLayout(FRGUIPaneFactory.createBorderLayout()); + + selectCountComboBox = new UIComboBox(new String[]{ + Inter.getLocText("Undefined"), + Inter.getLocText("BindColumn-Top_N"), + Inter.getLocText("BindColumn-Bottom_N"), + Inter.getLocText("Odd"), + Inter.getLocText("Even"), + Inter.getLocText("Specify"),}); + selectCountComboBox.addActionListener(new ActionListener() { + + public void actionPerformed(ActionEvent evt) { + int selectIndex = selectCountComboBox.getSelectedIndex(); + CardLayout c1 = (CardLayout) selectCountCardPane.getLayout(); + if (selectIndex == 1) { + c1.show(selectCountCardPane, "TOP"); + } else if (selectIndex == 2) { + c1.show(selectCountCardPane, "BOTTOM"); + } else if (selectIndex == 3) { + c1.show(selectCountCardPane, "ODD"); + } else if (selectIndex == 4) { + c1.show(selectCountCardPane, "EVEN"); + } else if (selectIndex == 5) { + c1.show(selectCountCardPane, "SPECIFY"); + } else { + c1.show(selectCountCardPane, "UNDEFINE"); + } + } + }); + + selectCountCardPane = FRGUIPaneFactory.createCardLayout_S_Pane(); + this.add(GUICoreUtils.createFlowPane(new JComponent[]{new UILabel(INSET_TEXT), selectCountComboBox, + new UILabel(INSET_TEXT), selectCountCardPane}, FlowLayout.LEFT), BorderLayout.WEST); +// selectCountCardPane.setLayout(new CardLayout()); + + //not define pane + + JPanel undefinedPane = GUICoreUtils.createFlowPane(new UILabel(Inter.getLocText("Undefined")), FlowLayout.LEFT); + topFormulaPane = new DSColumnAdvancedEditorPane.JFormulaField("-1"); + bottomFormulaPane = new DSColumnAdvancedEditorPane.JFormulaField("-1"); + serialTextField = new UITextField(18); + JPanel oddPane = GUICoreUtils.createFlowPane(new UILabel(Inter.getLocText("BindColumn-Result_Serial_Number_Start_From_1") + + " " + Inter.getLocText("BindColumn-Odd_Selected_(1,3,5...)")), FlowLayout.LEFT); + JPanel evenPane = GUICoreUtils.createFlowPane(new UILabel(Inter.getLocText("BindColumn-Result_Serial_Number_Start_From_1") + + " " + Inter.getLocText("BindColumn-Even_Selected_(2,4,6...)")), FlowLayout.LEFT); + JPanel specifyPane = GUICoreUtils.createFlowPane(new JComponent[]{ + serialTextField, 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__"}) + ) + }, FlowLayout.LEFT); + serialTextField.setToolTipText(Inter.getLocText("StyleFormat-Sample") + ":=JOINARRAY(GREPARRAY(RANGE($__count__), item!=4), \",\")"); + selectCountCardPane.add(undefinedPane, "UNDEFINE"); + selectCountCardPane.add(topFormulaPane, "TOP"); + selectCountCardPane.add(bottomFormulaPane, "BOTTOM"); + //odd + selectCountCardPane.add(oddPane, "ODD"); + //even + selectCountCardPane.add(evenPane, "EVEN"); + //specify + selectCountCardPane.add(specifyPane, "SPECIFY"); + } + + public void populate(CellElement cellElement) { + if (cellElement == null) { + return; + } + this.cellElement = cellElement; + + Object value = cellElement.getValue(); + if (value == null || !(value instanceof DSColumn)) { + return; + } + DSColumn dSColumn = (DSColumn) (cellElement.getValue()); + SelectCount selectCount = dSColumn.getSelectCount(); + this.topFormulaPane.populateElement(cellElement); + this.bottomFormulaPane.populateElement(cellElement); + if (selectCount != null) { + int selectCountType = selectCount.getType(); + this.selectCountComboBox.setSelectedIndex(selectCountType); + if (selectCountType == SelectCount.TOP) { + this.topFormulaPane.populate(selectCount.getFormulaCount()); + } else if (selectCountType == SelectCount.BOTTOM) { + this.bottomFormulaPane.populate(selectCount.getFormulaCount()); + } else if (selectCountType == SelectCount.SPECIFY) { + this.serialTextField.setText(selectCount.getSerial()); + } + } + } + + public void update(CellElement cellElement) { + if (cellElement == null) { + return; + } + Object value = cellElement.getValue(); + if (value == null || !(value instanceof DSColumn)) { + return; + } + DSColumn dSColumn = (DSColumn) (cellElement.getValue()); + + //alex:SelectCount + int selectCountSelectIndex = this.selectCountComboBox.getSelectedIndex(); + if (selectCountSelectIndex == 0) { + dSColumn.setSelectCount(null); + } else { + SelectCount selectCount = new SelectCount(); + dSColumn.setSelectCount(selectCount); + selectCount.setType(selectCountSelectIndex); + if (selectCountSelectIndex == SelectCount.TOP) { + selectCount.setFormulaCount(this.topFormulaPane.getFormulaText()); + } else if (selectCountSelectIndex == SelectCount.BOTTOM) { + selectCount.setFormulaCount(this.bottomFormulaPane.getFormulaText()); + } else if (selectCountSelectIndex == SelectCount.SPECIFY) { + selectCount.setSerial(this.serialTextField.getText()); + } + } + } + + private JFormattedTextField getTextField(JSpinner spinner) { + JComponent editor = spinner.getEditor(); + if (editor instanceof JSpinner.DefaultEditor) { + return ((JSpinner.DefaultEditor) editor).getTextField(); + } else { + System.err.println("Unexpected editor type: " + + spinner.getEditor().getClass() + + " isn't a descendant of DefaultEditor"); + return null; + } + } + } + + /** + * 单元格元素>数据集>高级设置>公式输入框 + * + * @see DSColumnAdvancedPane.JFormulaField + */ + private static class JFormulaField extends JPanel { + private CellElement cellElement; + private UITextField formulaTextField; + private String defaultValue; + + public JFormulaField(String defaultValue) { + this.defaultValue = defaultValue; + + this.setLayout(FRGUIPaneFactory.createBoxFlowLayout()); + UILabel bottomLabel = new UILabel("="); + bottomLabel.setFont(new Font("Dialog", Font.BOLD, 12)); + this.add(bottomLabel); + formulaTextField = new UITextField(24); + this.add(formulaTextField); + formulaTextField.setText(defaultValue); + + UIButton bottomFrmulaButton = new UIButton("..."); + this.add(bottomFrmulaButton); + bottomFrmulaButton.setToolTipText(Inter.getLocText("Formula") + "..."); + bottomFrmulaButton.setPreferredSize(new Dimension(25, formulaTextField.getPreferredSize().height)); + bottomFrmulaButton.addActionListener(formulaButtonActionListener); + } + + public void populate(String formulaContent) { + this.formulaTextField.setText(formulaContent); + } + + public void populateElement(CellElement cellElement) { + this.cellElement = cellElement; + } + + public String getFormulaText() { + return this.formulaTextField.getText(); + } + + private ActionListener formulaButtonActionListener = new ActionListener() { + + public void actionPerformed(ActionEvent evt) { + Formula valueFormula = new Formula(); + String text = formulaTextField.getText(); + if (text == null || text.length() <= 0) { + valueFormula.setContent(defaultValue); + } else { + valueFormula.setContent(text); + } + + final UIFormula formulaPane = FormulaFactory.createFormulaPaneWhenReserveFormula(); + + if (cellElement == null) { + return; + } + Object value = cellElement.getValue(); + if (value == null || !(value instanceof DSColumn)) { + return; + } + DSColumn dsColumn = (DSColumn) value; + + String[] displayNames = DesignTableDataManager.getSelectedColumnNames(DesignTableDataManager.getEditingTableDataSource(), dsColumn.getDSName()); + + formulaPane.populate(valueFormula, new CustomVariableResolver(displayNames, true)); + formulaPane.showLargeWindow(SwingUtilities.getWindowAncestor(DSColumnAdvancedEditorPane.JFormulaField.this), new DialogActionAdapter() { + @Override + public void doOk() { + Formula valueFormula = formulaPane.update(); + if (valueFormula.getContent().length() <= 1) { + formulaTextField.setText(defaultValue); + } else { + formulaTextField.setText(valueFormula.getContent().substring(1)); + } + } + }).setVisible(true); + } + }; + } + + /** + * 单元格元素>数据集>高级设置>自定义值显示设置面板 + * + * @see DSColumnAdvancedPane.ValuePane + */ + private static class ValuePane extends JPanel { + private DSColumnAdvancedEditorPane.JFormulaField formulaField; + + public ValuePane() { + this.setLayout(FRGUIPaneFactory.createBoxFlowLayout()); + + this.add(new UILabel(INSET_TEXT + Inter.getLocText("Value") + ":")); + this.add(Box.createHorizontalStrut(2)); + this.add((formulaField = new DSColumnAdvancedEditorPane.JFormulaField("$$$"))); + } + + public void populate(CellElement cellElement) { + if (cellElement == null) { + return; + } + + Object value = cellElement.getValue(); + if (value == null || !(value instanceof DSColumn)) { + return; + } + DSColumn dSColumn = (DSColumn) value; + + //formula + String valueFormula = dSColumn.getResult(); + if (valueFormula == null) { + valueFormula = "$$$"; + } + formulaField.populateElement(cellElement); + formulaField.populate(valueFormula); + } + + public void update(CellElement cellElement) { + if (cellElement == null) { + return; + } + Object value = cellElement.getValue(); + if (value == null || !(value instanceof DSColumn)) { + return; + } + DSColumn dSColumn = (DSColumn) (cellElement.getValue()); + + //formula + dSColumn.setResult(this.formulaField.getFormulaText()); + } + } + } From 1a3b6fca8ff0d9f249a8a17a7161bf1b44ecd3c9 Mon Sep 17 00:00:00 2001 From: "yaoh.wu" Date: Wed, 2 Aug 2017 19:01:43 +0800 Subject: [PATCH 02/30] =?UTF-8?q?REPORT-3348=20=E6=95=B0=E6=8D=AE=E5=88=97?= =?UTF-8?q?=E9=AB=98=E7=BA=A7=E8=AE=BE=E7=BD=AE=E5=86=85=E9=83=A8=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dscolumn/DSColumnAdvancedEditorPane.java | 213 +++-- .../dscolumn/DSColumnBasicEditorPane.java | 1 + .../dscolumn/ResultSetGroupDockingPane.java | 50 +- .../com/fr/quickeditor/CellQuickEditor.java | 23 +- .../cellquick/CellDSColumnEditor.java | 2 - .../fr/design/layout/FRGUIPaneFactory.java | 902 +++++++++--------- .../src/com/fr/design/utils/DesignUtils.java | 3 +- 7 files changed, 631 insertions(+), 563 deletions(-) diff --git a/designer/src/com/fr/design/dscolumn/DSColumnAdvancedEditorPane.java b/designer/src/com/fr/design/dscolumn/DSColumnAdvancedEditorPane.java index fb0b69496..46d8d0a6e 100644 --- a/designer/src/com/fr/design/dscolumn/DSColumnAdvancedEditorPane.java +++ b/designer/src/com/fr/design/dscolumn/DSColumnAdvancedEditorPane.java @@ -19,7 +19,6 @@ import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.cell.CellEditorPane; -import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.IOUtils; import com.fr.general.Inter; import com.fr.report.cell.CellElement; @@ -52,9 +51,9 @@ public class DSColumnAdvancedEditorPane extends CellEditorPane { //排列顺序 private ResultSetSortConfigPane sortPane; //结果集筛选 - private SelectCountPane selectCountPane; + private ResultSetFilterConfigPane filterPane; //自定义值显示 - private ValuePane valuePane; + private CustomValuePane valuePane; //横向可扩展性 private UICheckBox horizontalExtendableCheckBox; //纵向可扩展性 @@ -68,6 +67,7 @@ public class DSColumnAdvancedEditorPane extends CellEditorPane { public DSColumnAdvancedEditorPane() { this.setLayout(new BorderLayout()); this.add(this.createContentPane(), BorderLayout.CENTER); + this.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 15)); } @@ -99,22 +99,22 @@ public class DSColumnAdvancedEditorPane extends CellEditorPane { private JPanel createContentPane() { this.setBorder(BorderFactory.createEmptyBorder(3, 3, 3, 3)); this.setLayout(FRGUIPaneFactory.createBorderLayout()); + //结果集排序 this.sortPane = new ResultSetSortConfigPane(); + //结果筛选 - selectCountPane = new DSColumnAdvancedEditorPane.SelectCountPane(); - - valuePane = new DSColumnAdvancedEditorPane.ValuePane(); - + filterPane = new ResultSetFilterConfigPane(); + //自定义值显示 + valuePane = new CustomValuePane(); + //可扩展性 JPanel extendableDirectionPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); extendableDirectionPane.add(horizontalExtendableCheckBox = new UICheckBox(Inter.getLocText("ExpandD-Horizontal_Extendable"))); extendableDirectionPane.add(verticalExtendableCheckBox = new UICheckBox(Inter.getLocText("ExpandD-Vertical_Extendable"))); - JPanel extendablePane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("ExpandD-Expandable")); - extendablePane.setLayout(new BorderLayout()); - extendablePane.add(extendableDirectionPane, BorderLayout.CENTER); - JPanel multiNumPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("Fill_blank_Data")); + //补充空白数据 + JPanel multiNumPane = new JPanel(); useMultiplyNumCheckBox = new UICheckBox(Inter.getLocText("Column_Multiple")); multiNumPane.add(useMultiplyNumCheckBox); @@ -124,22 +124,20 @@ public class DSColumnAdvancedEditorPane extends CellEditorPane { multiNumPane.add(multiNumSpinner); useMultiplyNumCheckBox.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { checkButtonEnabled(); } }); - double[] rowSize = {TableLayout.PREFERRED, TableLayout.PREFERRED, - TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED}; - double[] columnSize = {TableLayout.FILL}; + double p = TableLayout.PREFERRED, f = TableLayout.FILL; + double[] rowSize = {p, p, p, p, p, p}; + double[] columnSize = {f}; - Component[][] components = null; - components = new Component[][]{ + Component[][] components = new Component[][]{ {sortPane}, - {selectCountPane}, + {filterPane}, {valuePane}, - {extendablePane}, + {extendableDirectionPane}, {multiNumPane} }; return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); @@ -167,7 +165,7 @@ public class DSColumnAdvancedEditorPane extends CellEditorPane { public ResultSetSortConfigPane() { - this.setLayout(new BorderLayout(0, 4)); + this.setLayout(new BorderLayout(0, 0)); Icon[] iconArray = { IOUtils.readIcon("/com/fr/design/images/expand/none16x16.png"), IOUtils.readIcon("/com/fr/design/images/expand/asc.png"), @@ -177,24 +175,34 @@ public class DSColumnAdvancedEditorPane extends CellEditorPane { sort_type_pane = new UIButtonGroup(iconArray); sort_type_pane.setAllToolTips(nameArray); sort_type_pane.setGlobalName(Inter.getLocText("ExpandD-Sort_After_Expand")); - this.add(sort_type_pane, BorderLayout.NORTH); cardLayout = new CardLayout(); centerPane = new JPanel(cardLayout); - tinyFormulaPane = new TinyFormulaPane(); - centerPane.add(new JPanel(), "none"); centerPane.add(tinyFormulaPane, "content"); - - this.add(centerPane, BorderLayout.CENTER); - + //todo 国际化 + UILabel sortLabel = new UILabel("排列顺序"); sort_type_pane.addChangeListener(new ChangeListener() { @Override public void stateChanged(ChangeEvent e) { - cardLayout.show(centerPane, sort_type_pane.getSelectedIndex() == 0 ? "none" : "content"); + boolean noContent = sort_type_pane.getSelectedIndex() == 0; + cardLayout.show(centerPane, noContent ? "none" : "content"); + if (noContent) { + centerPane.setPreferredSize(new Dimension(0, 0)); + } else { + centerPane.setPreferredSize(new Dimension(165, 20)); + } } }); + + Component[][] components = new Component[][]{ + new Component[]{sortLabel, sort_type_pane}, + new Component[]{null, centerPane} + }; + double p = TableLayout.PREFERRED, f = TableLayout.FILL; + double[] rowSize = {p, p}, columnSize = {p, f}; + this.add(TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize), BorderLayout.CENTER); } @@ -224,80 +232,106 @@ public class DSColumnAdvancedEditorPane extends CellEditorPane { * * @see DSColumnAdvancedPane.SelectCountPane */ - protected static class SelectCountPane extends JPanel { + protected static class ResultSetFilterConfigPane extends JPanel { + private enum FilterType { + //前N个 后N个 奇数 偶数 自定义 未定义 + TOP, BOTTOM, ODD, EVEN, SPECIFY, UNDEFINE; + } CellElement cellElement; - // private Comparator sortComparator; - private UIComboBox selectCountComboBox; - private JPanel selectCountCardPane; + private UIComboBox rsComboBox; + private JPanel setCardPane; + private JPanel tipCardPane; private UITextField serialTextField; DSColumnAdvancedEditorPane.JFormulaField topFormulaPane; DSColumnAdvancedEditorPane.JFormulaField bottomFormulaPane; - public SelectCountPane() { + public ResultSetFilterConfigPane() { + double p = TableLayout.PREFERRED, f = TableLayout.FILL; + this.setLayout(FRGUIPaneFactory.createBorderLayout()); + UILabel filterLabel = new UILabel("结果集筛选"); - selectCountComboBox = new UIComboBox(new String[]{ + //结果集筛选下拉框 + rsComboBox = new UIComboBox(new String[]{ Inter.getLocText("Undefined"), Inter.getLocText("BindColumn-Top_N"), Inter.getLocText("BindColumn-Bottom_N"), Inter.getLocText("Odd"), Inter.getLocText("Even"), - Inter.getLocText("Specify"),}); - selectCountComboBox.addActionListener(new ActionListener() { - + Inter.getLocText("Specify") + }); + rsComboBox.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { - int selectIndex = selectCountComboBox.getSelectedIndex(); - CardLayout c1 = (CardLayout) selectCountCardPane.getLayout(); + int selectIndex = rsComboBox.getSelectedIndex(); + CardLayout setCardPaneLayout = (CardLayout) setCardPane.getLayout(); + CardLayout tipCardPaneLayout = (CardLayout) tipCardPane.getLayout(); if (selectIndex == 1) { - c1.show(selectCountCardPane, "TOP"); + setCardPaneLayout.show(setCardPane, FilterType.TOP.name()); + tipCardPaneLayout.show(tipCardPane, FilterType.TOP.name()); } else if (selectIndex == 2) { - c1.show(selectCountCardPane, "BOTTOM"); + setCardPaneLayout.show(setCardPane, FilterType.BOTTOM.name()); + tipCardPaneLayout.show(tipCardPane, FilterType.BOTTOM.name()); } else if (selectIndex == 3) { - c1.show(selectCountCardPane, "ODD"); + setCardPaneLayout.show(setCardPane, FilterType.ODD.name()); + tipCardPaneLayout.show(tipCardPane, FilterType.ODD.name()); } else if (selectIndex == 4) { - c1.show(selectCountCardPane, "EVEN"); + setCardPaneLayout.show(setCardPane, FilterType.EVEN.name()); + tipCardPaneLayout.show(tipCardPane, FilterType.EVEN.name()); } else if (selectIndex == 5) { - c1.show(selectCountCardPane, "SPECIFY"); + setCardPaneLayout.show(setCardPane, FilterType.SPECIFY.name()); + tipCardPaneLayout.show(tipCardPane, FilterType.SPECIFY.name()); } else { - c1.show(selectCountCardPane, "UNDEFINE"); + setCardPaneLayout.show(setCardPane, FilterType.UNDEFINE.name()); + tipCardPaneLayout.show(tipCardPane, FilterType.UNDEFINE.name()); } } }); - - selectCountCardPane = FRGUIPaneFactory.createCardLayout_S_Pane(); - this.add(GUICoreUtils.createFlowPane(new JComponent[]{new UILabel(INSET_TEXT), selectCountComboBox, - new UILabel(INSET_TEXT), selectCountCardPane}, FlowLayout.LEFT), BorderLayout.WEST); -// selectCountCardPane.setLayout(new CardLayout()); - - //not define pane - - JPanel undefinedPane = GUICoreUtils.createFlowPane(new UILabel(Inter.getLocText("Undefined")), FlowLayout.LEFT); - topFormulaPane = new DSColumnAdvancedEditorPane.JFormulaField("-1"); - bottomFormulaPane = new DSColumnAdvancedEditorPane.JFormulaField("-1"); - serialTextField = new UITextField(18); - JPanel oddPane = GUICoreUtils.createFlowPane(new UILabel(Inter.getLocText("BindColumn-Result_Serial_Number_Start_From_1") - + " " + Inter.getLocText("BindColumn-Odd_Selected_(1,3,5...)")), FlowLayout.LEFT); - JPanel evenPane = GUICoreUtils.createFlowPane(new UILabel(Inter.getLocText("BindColumn-Result_Serial_Number_Start_From_1") - + " " + Inter.getLocText("BindColumn-Even_Selected_(2,4,6...)")), FlowLayout.LEFT); - JPanel specifyPane = GUICoreUtils.createFlowPane(new JComponent[]{ - serialTextField, new UILabel( + //配置展示CardLayout + setCardPane = FRGUIPaneFactory.createCardLayout_S_Pane(); + //提示信息展示CardLayout + tipCardPane = FRGUIPaneFactory.createCardLayout_S_Pane(); + + //前N个 + topFormulaPane = new DSColumnAdvancedEditorPane.JFormulaField("="); + setCardPane.add(topFormulaPane, FilterType.TOP.name()); + tipCardPane.add(new JPanel(), FilterType.TOP.name()); + + //后N个 + bottomFormulaPane = new DSColumnAdvancedEditorPane.JFormulaField("="); + setCardPane.add(bottomFormulaPane, FilterType.BOTTOM.name()); + tipCardPane.add(new JPanel(), FilterType.BOTTOM.name()); + + //自定义值下方没有提示信息,也没有输入框 + JPanel undefinedPane = new JPanel(); + setCardPane.add(new JPanel(), FilterType.UNDEFINE.name()); + tipCardPane.add(new JPanel(), FilterType.UNDEFINE.name()); + + //奇数 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()); + + + //偶数 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.ODD.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__"}) - ) - }, FlowLayout.LEFT); - serialTextField.setToolTipText(Inter.getLocText("StyleFormat-Sample") + ":=JOINARRAY(GREPARRAY(RANGE($__count__), item!=4), \",\")"); - selectCountCardPane.add(undefinedPane, "UNDEFINE"); - selectCountCardPane.add(topFormulaPane, "TOP"); - selectCountCardPane.add(bottomFormulaPane, "BOTTOM"); - //odd - selectCountCardPane.add(oddPane, "ODD"); - //even - selectCountCardPane.add(evenPane, "EVEN"); - //specify - selectCountCardPane.add(specifyPane, "SPECIFY"); + new String[]{": 1,2-3,5,8 ", ",", "$__count__"})), FilterType.SPECIFY.name()); + + this.add(TableLayoutHelper.createTableLayoutPane(new Component[][]{ + {filterLabel, rsComboBox}, + {null, setCardPane}, + {tipCardPane, null} + }, new double[]{p, p, p}, new double[]{p, f}), BorderLayout.CENTER); } public void populate(CellElement cellElement) { @@ -316,7 +350,7 @@ public class DSColumnAdvancedEditorPane extends CellEditorPane { this.bottomFormulaPane.populateElement(cellElement); if (selectCount != null) { int selectCountType = selectCount.getType(); - this.selectCountComboBox.setSelectedIndex(selectCountType); + this.rsComboBox.setSelectedIndex(selectCountType); if (selectCountType == SelectCount.TOP) { this.topFormulaPane.populate(selectCount.getFormulaCount()); } else if (selectCountType == SelectCount.BOTTOM) { @@ -338,7 +372,7 @@ public class DSColumnAdvancedEditorPane extends CellEditorPane { DSColumn dSColumn = (DSColumn) (cellElement.getValue()); //alex:SelectCount - int selectCountSelectIndex = this.selectCountComboBox.getSelectedIndex(); + int selectCountSelectIndex = this.rsComboBox.getSelectedIndex(); if (selectCountSelectIndex == 0) { dSColumn.setSelectCount(null); } else { @@ -381,19 +415,16 @@ public class DSColumnAdvancedEditorPane extends CellEditorPane { public JFormulaField(String defaultValue) { this.defaultValue = defaultValue; - this.setLayout(FRGUIPaneFactory.createBoxFlowLayout()); - UILabel bottomLabel = new UILabel("="); - bottomLabel.setFont(new Font("Dialog", Font.BOLD, 12)); - this.add(bottomLabel); - formulaTextField = new UITextField(24); + this.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0)); + formulaTextField = new UITextField(11); this.add(formulaTextField); formulaTextField.setText(defaultValue); - UIButton bottomFrmulaButton = new UIButton("..."); - this.add(bottomFrmulaButton); - bottomFrmulaButton.setToolTipText(Inter.getLocText("Formula") + "..."); - bottomFrmulaButton.setPreferredSize(new Dimension(25, formulaTextField.getPreferredSize().height)); - bottomFrmulaButton.addActionListener(formulaButtonActionListener); + UIButton formulaButton = new UIButton(IOUtils.readIcon("/com/fr/design/images/m_insert/formula.png")); + this.add(formulaButton); + formulaButton.setToolTipText(Inter.getLocText("Formula") + "..."); + formulaButton.setPreferredSize(new Dimension(20, formulaTextField.getPreferredSize().height)); + formulaButton.addActionListener(formulaButtonActionListener); } public void populate(String formulaContent) { @@ -453,13 +484,12 @@ public class DSColumnAdvancedEditorPane extends CellEditorPane { * * @see DSColumnAdvancedPane.ValuePane */ - private static class ValuePane extends JPanel { + private static class CustomValuePane extends JPanel { private DSColumnAdvancedEditorPane.JFormulaField formulaField; - public ValuePane() { + public CustomValuePane() { this.setLayout(FRGUIPaneFactory.createBoxFlowLayout()); - - this.add(new UILabel(INSET_TEXT + Inter.getLocText("Value") + ":")); + UILabel customValueLabel = new UILabel("显示值"); this.add(Box.createHorizontalStrut(2)); this.add((formulaField = new DSColumnAdvancedEditorPane.JFormulaField("$$$"))); } @@ -493,7 +523,6 @@ public class DSColumnAdvancedEditorPane extends CellEditorPane { return; } DSColumn dSColumn = (DSColumn) (cellElement.getValue()); - //formula dSColumn.setResult(this.formulaField.getFormulaText()); } diff --git a/designer/src/com/fr/design/dscolumn/DSColumnBasicEditorPane.java b/designer/src/com/fr/design/dscolumn/DSColumnBasicEditorPane.java index ef0c5e0b5..b369e66c5 100644 --- a/designer/src/com/fr/design/dscolumn/DSColumnBasicEditorPane.java +++ b/designer/src/com/fr/design/dscolumn/DSColumnBasicEditorPane.java @@ -33,6 +33,7 @@ public class DSColumnBasicEditorPane extends CellEditorPane { this.groupPane = groupPane; this.conditionPane = conditionPane; this.add(this.createContentPane(), BorderLayout.CENTER); + this.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 15)); } diff --git a/designer/src/com/fr/design/dscolumn/ResultSetGroupDockingPane.java b/designer/src/com/fr/design/dscolumn/ResultSetGroupDockingPane.java index b7cc3b5ae..c2ef1b8a9 100644 --- a/designer/src/com/fr/design/dscolumn/ResultSetGroupDockingPane.java +++ b/designer/src/com/fr/design/dscolumn/ResultSetGroupDockingPane.java @@ -1,35 +1,31 @@ package com.fr.design.dscolumn; -import java.awt.*; -import java.awt.event.ItemEvent; -import java.awt.event.ItemListener; - -import com.fr.design.gui.ilable.UILabel; -import javax.swing.JPanel; - - import com.fr.design.gui.ibutton.UIButton; -import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.FunctionComboBox; +import com.fr.design.gui.icombobox.UIComboBox; +import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; -import com.fr.general.Inter; import com.fr.design.mainframe.ElementCasePane; +import com.fr.design.utils.gui.GUICoreUtils; +import com.fr.general.Inter; import com.fr.report.cell.TemplateCellElement; import com.fr.report.cell.cellattr.CellExpandAttr; -import com.fr.report.cell.cellattr.core.group.CustomGrouper; -import com.fr.report.cell.cellattr.core.group.DSColumn; -import com.fr.report.cell.cellattr.core.group.FunctionGrouper; -import com.fr.report.cell.cellattr.core.group.RecordGrouper; -import com.fr.report.cell.cellattr.core.group.SummaryGrouper; +import com.fr.report.cell.cellattr.core.group.*; import com.fr.stable.Constants; -import com.fr.design.utils.gui.GUICoreUtils; + +import javax.swing.*; +import java.awt.*; +import java.awt.event.ItemEvent; +import java.awt.event.ItemListener; /** * 这个pane是选中数据列后,在上方QuickRegion处显示的pane * - * @author zhou + * @author zhou, yaoh.wu + * @version 2017年8月2日14点55分 + * @since 8.0 */ public class ResultSetGroupDockingPane extends ResultSetGroupPane { private static final int BIND_GROUP = 0; @@ -42,7 +38,7 @@ public class ResultSetGroupDockingPane extends ResultSetGroupPane { private CardLayout cardLayout; private UIComboBox goBox; - ItemListener l; + private ItemListener listener; public ResultSetGroupDockingPane(ElementCasePane ePane) { super(); @@ -58,15 +54,13 @@ public class ResultSetGroupDockingPane extends ResultSetGroupPane { } private JPanel layoutPane() { - double vs = 4; - double vg = 6; double p = TableLayout.PREFERRED; double f = TableLayout.FILL; Component[][] components = new Component[][] { new Component[]{new UILabel(Inter.getLocText("Data_Setting")), goBox}, - new Component[]{cardPane, null} + new Component[]{null, cardPane} }; goBox.addItemListener(new ItemListener() { public void itemStateChanged(ItemEvent ee) { @@ -86,7 +80,7 @@ public class ResultSetGroupDockingPane extends ResultSetGroupPane { double[] columnSize = {p, f}; double[] rowSize = {p, p}; - return TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); + return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); } private void initCardPane() { @@ -190,15 +184,15 @@ public class ResultSetGroupDockingPane extends ResultSetGroupPane { } } - public void addListener(ItemListener l) { - goBox.addItemListener(l); - groupComboBox.addItemListener(l); - functionComboBox.addItemListener(l); - this.l = l; + public void addListener(ItemListener listener) { + goBox.addItemListener(listener); + groupComboBox.addItemListener(listener); + functionComboBox.addItemListener(listener); + this.listener = listener; } void fireTargetChanged() { - l.itemStateChanged(null); + listener.itemStateChanged(null); } @Override diff --git a/designer/src/com/fr/quickeditor/CellQuickEditor.java b/designer/src/com/fr/quickeditor/CellQuickEditor.java index 7ae3dbba3..730a1577d 100644 --- a/designer/src/com/fr/quickeditor/CellQuickEditor.java +++ b/designer/src/com/fr/quickeditor/CellQuickEditor.java @@ -37,18 +37,33 @@ public abstract class CellQuickEditor extends QuickEditor { double p = TableLayout.PREFERRED; double f = TableLayout.FILL; double[] columnSize = {p, f}; - double[] rowSize = {p, p, p}; + double[] rowSize = {p, p}; Component[][] components = new Component[][]{ - new Component[]{new UILabel(" " + Inter.getLocText("Cell")), columnRowTextField = initColumnRowTextField()}, - new Component[]{new UILabel(Inter.getLocText("HF-Insert_Content") + " "), cellElementEditButton = initCellElementEditButton()}, + new Component[]{initTopContent(), null}, new Component[]{createCenterBody(), null} }; JPanel panel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); this.setLayout(new BorderLayout()); - this.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); + this.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0)); this.add(panel, BorderLayout.CENTER); } + + private JPanel initTopContent() { + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = {p, f}; + double[] rowSize = {p, p}; + Component[][] components = new Component[][]{ + new Component[]{new UILabel(" " + Inter.getLocText("Cell")), columnRowTextField = initColumnRowTextField()}, + new Component[]{new UILabel(Inter.getLocText("HF-Insert_Content") + " "), cellElementEditButton = initCellElementEditButton()}, + }; + JPanel topContent = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); + topContent.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 15)); + return topContent; + } + + /** * 初始化添加按钮 * TODO 9.0 换成下拉菜单后原来的快捷键不好处理,先跳过。 diff --git a/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java b/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java index 321da63fb..3493967af 100644 --- a/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java +++ b/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java @@ -175,7 +175,6 @@ public class CellDSColumnEditor extends CellQuickEditor { */ private void createPanes() { paneList = new ArrayList<>(); - /*基本设置面板*/ this.dataPane = new SelectedDataColumnPane(); this.groupPane = new ResultSetGroupDockingPane(tc); @@ -194,7 +193,6 @@ public class CellDSColumnEditor extends CellQuickEditor { dataPane.addListener(dataListener); groupPane.addListener(groupListener); paneList.add(new DSColumnBasicEditorPane(cellElement, dataPane, groupPane, conditionPane)); - /*高级设置面板*/ paneList.add(new DSColumnAdvancedEditorPane()); } diff --git a/designer_base/src/com/fr/design/layout/FRGUIPaneFactory.java b/designer_base/src/com/fr/design/layout/FRGUIPaneFactory.java index 00fde425f..ef1abd7fb 100644 --- a/designer_base/src/com/fr/design/layout/FRGUIPaneFactory.java +++ b/designer_base/src/com/fr/design/layout/FRGUIPaneFactory.java @@ -1,456 +1,486 @@ package com.fr.design.layout; -import java.awt.BorderLayout; -import java.awt.CardLayout; -import java.awt.Color; -import java.awt.FlowLayout; -import java.awt.LayoutManager; - -import javax.swing.BorderFactory; -import javax.swing.BoxLayout; -import javax.swing.Icon; +import com.fr.design.border.UITitledBorder; import com.fr.design.gui.ilable.UILabel; -import javax.swing.JPanel; -import javax.swing.JRadioButton; -import com.fr.design.border.UITitledBorder; +import javax.swing.*; +import java.awt.*; public class FRGUIPaneFactory { - private FRGUIPaneFactory() { - } + public static final float WIDTH_PARA_F = 80.0f; + public static final int WIDTH_OFFSET_N = 60; + public static final int WIDTH_OFFSET_M = 20; + public static final int WIDTH_PARA_INT = 80; + public static final float WIDTHABS_PARA_F = 2.0f; + public static final int HEIGHT_PARA = 25; + public static final int HEIGHT_OFFSET = 50; - public static final float WIDTH_PARA_F = 80.0f; - public static final int WIDTH_OFFSET_N = 60; - public static final int WIDTH_OFFSET_M = 20; - public static final int WIDTH_PARA_INT = 80; - public static final float WIDTHABS_PARA_F = 2.0f; - public static final int HEIGHT_PARA = 25; - public static final int HEIGHT_OFFSET = 50; + private FRGUIPaneFactory() { + } /** * 创建一个靠右靠左的水平间隙为2的流式布局 + * * @return FlowLayout对象 */ - public static LayoutManager createBoxFlowLayout() { // createBoxFlowLayout 图表用到的比较多 - return new FlowLayout(FlowLayout.LEFT, 2, 0); - } + public static LayoutManager createBoxFlowLayout() { // createBoxFlowLayout 图表用到的比较多 + return new FlowLayout(FlowLayout.LEFT, 2, 0); + } - /** - * 创建一个靠左的布局 - * @return FlowLayout对象 - */ - public static LayoutManager createLeftZeroLayout() { - return new FlowLayout(FlowLayout.LEFT, 0, 0); - } + /** + * 创建一个靠左的布局 + * + * @return FlowLayout对象 + */ + public static LayoutManager createLeftZeroLayout() { + return new FlowLayout(FlowLayout.LEFT, 0, 0); + } /** * 创建一个靠左的水平和垂直间隙均为5的流式布局 + * + * @return FlowLayout对象 + */ + public static LayoutManager createLabelFlowLayout() { // createLabelFlowLayout + return new FlowLayout(FlowLayout.LEFT); // 默认 5, 5 + } + + /** + * 创建一个靠左流式布局,间距10,10 + * + * @return FlowLayout对象 + */ + public static LayoutManager createL_FlowLayout() { + return new FlowLayout(FlowLayout.LEFT, 10, 10); + } + + /** + * 创建一个居中流式布局 + * * @return FlowLayout对象 */ - public static LayoutManager createLabelFlowLayout() { // createLabelFlowLayout - return new FlowLayout(FlowLayout.LEFT); // 默认 5, 5 - } - - /** - * 创建一个靠左流式布局,间距10,10 - * @return FlowLayout对象 - */ - public static LayoutManager createL_FlowLayout() { - return new FlowLayout(FlowLayout.LEFT, 10, 10); - } - - /** - * 创建一个居中流式布局 - * @return FlowLayout对象 - */ - public static LayoutManager createCenterFlowLayout() { - return new FlowLayout(FlowLayout.CENTER); - } - - /** - * 创建一个靠右流式布局 - * @return FlowLayout对象 - */ - public static LayoutManager createRightFlowLayout() { - return new FlowLayout(FlowLayout.RIGHT); - } - - /** - * 创建一个边框布局 - * @return BorderLayout对象 - */ - public static LayoutManager createBorderLayout() { - return new BorderLayout(); - } - - /** - * 创建一个边框布局,间距4,4 - * @return BorderLayout对象 - */ - public static LayoutManager createM_BorderLayout() { - return new BorderLayout(4,4); - } - - // TODO 删掉 - - /** - * 创建一个1列的网格布局 - * @return FRGridLayout对象 - */ - public static LayoutManager create1ColumnGridLayout() { - return new FRGridLayout(1); - } - - /** - * 创建一个2列的网格布局 - * @return FRGridLayout对象 - */ - public static LayoutManager create2ColumnGridLayout() { - return new FRGridLayout(2); - } - - /** - * 创建一个n列的网格布局 - * @param nColumn 列数 - * @return FRGridLayout对象 - */ - public static LayoutManager createNColumnGridLayout(int nColumn) { - return new FRGridLayout(nColumn); - } - - /** - * 创建一个带标题边框面板 - * @param string 边框标题 - * @return JPanel对象 - */ - public static JPanel createTitledBorderPane(String string) { - JPanel jp = new JPanel(); - UITitledBorder explainBorder = UITitledBorder.createBorderWithTitle(string); - jp.setBorder(explainBorder); - jp.setLayout(new FlowLayout(FlowLayout.LEFT)); - return jp; - } - - /** - * 创建一个带标题边框面板并且居中显示 - * @param borderTitle 边框标题 - * @return JPanel对象 - */ - public static JPanel createTitledBorderPaneCenter(String borderTitle) { - JPanel jp = new JPanel(); - UITitledBorder explainBorder = UITitledBorder.createBorderWithTitle(borderTitle); - jp.setBorder(explainBorder); - jp.setLayout(new FlowLayout(FlowLayout.CENTER)); - return jp; - } - - /** - * 创建一个靠左空边框布局,间隔大 - * @return JPanel对象 - */ - public static JPanel createBigHGapFlowInnerContainer_M_Pane() { - JPanel jp = new JPanel(); - jp.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0)); - jp.setLayout(new FRLeftFlowLayout(5, 60, 5)); - return jp; - } - - /** - * 创建一个靠左空边框面板,间隔中等 - * @return JPanel对象 - */ - public static JPanel createMediumHGapFlowInnerContainer_M_Pane() { - JPanel jp = new JPanel(); - jp.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0)); - jp.setLayout(new FRLeftFlowLayout(5, 20, 5)); - return jp; - } - - /** - * 创建一个靠左空边框面板,间隔中等 - * @return JPanel对象 - */ - public static JPanel createMediumHGapHighTopFlowInnerContainer_M_Pane() { - JPanel jp = new JPanel(); - jp.setBorder(BorderFactory.createEmptyBorder(50, 5, 0, 0)); - jp.setLayout(new FRLeftFlowLayout(5, 20, 5)); - return jp; - } - - /** - * 创建一个正常靠左空边框面板 - * @return JPanel对象 - */ - public static JPanel createNormalFlowInnerContainer_M_Pane() { - JPanel jp = new JPanel(); - jp.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0)); - jp.setLayout(new FlowLayout(FlowLayout.LEFT)); - return jp; - } - - /** - * 创建一个靠左0间距边框面板 - * @return JPanel对象 - */ - public static JPanel createLeftFlowZeroGapBorderPane() { - JPanel jp = new JPanel(); - jp.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); - jp.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0)); - return jp; - } - - /** - * 创建一个靠左流式布局,正常流式内嵌 - * @return JPanel对象 - */ - public static JPanel createNormalFlowInnerContainer_S_Pane() { - JPanel jp = new JPanel(); - jp.setLayout(new FlowLayout(FlowLayout.LEFT)); - return jp; - } - - /** - * 创建一个靠左流式布局,流式内嵌 - * @return JPanel对象 - */ - public static JPanel createBoxFlowInnerContainer_S_Pane() { - JPanel jp = new JPanel(); - jp.setLayout(new FlowLayout(FlowLayout.LEFT, 2, 2)); - return jp; - } - - /** - * 创建一个靠右面板 - * @return JPanel对象 - */ - public static JPanel createRightFlowInnerContainer_S_Pane() { - JPanel jp = new JPanel(); - jp.setLayout(new FlowLayout(FlowLayout.RIGHT)); - return jp; - } - - /** - * 创建一个居中面板 - * @return JPanel对象 - */ - public static JPanel createCenterFlowInnerContainer_S_Pane() { - JPanel jp = new JPanel(); - jp.setLayout(new FlowLayout(FlowLayout.CENTER)); - return jp; - } - - /** - * 创建一个居中0间距面板 - * @return JPanel对象 - */ - public static JPanel createCenterFlowZeroGapBorderPane() { - JPanel jp = new JPanel(); - jp.setLayout(new FlowLayout(FlowLayout.CENTER, 0, 0)); - jp.setBorder(BorderFactory.createEmptyBorder()); - return jp; - } - - /** - * 创建纵向排列面板 - * @return JPanel对象 - */ - public static JPanel createY_AXISBoxInnerContainer_L_Pane() { - JPanel jp = new JPanel(); - jp.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); - jp.setLayout(new BoxLayout(jp, BoxLayout.Y_AXIS)); - return jp; - } - - /** - * 创建纵向边框面板 - * @return JPanel对象 - */ - public static JPanel createYBoxEmptyBorderPane() { - JPanel jp = new JPanel(); - jp.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); - jp.setLayout(new BoxLayout(jp, BoxLayout.Y_AXIS)); - return jp; - } - - /** - * 创建横向面板 - * @return JPanel对象 - */ - public static JPanel createX_AXISBoxInnerContainer_L_Pane() { - JPanel jp = new JPanel(); - jp.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); - jp.setLayout(new BoxLayout(jp, BoxLayout.X_AXIS)); - return jp; - } - - /** - * 创建纵向面板M - * @return JPanel对象 - */ - public static JPanel createY_AXISBoxInnerContainer_M_Pane() { - JPanel jp = new JPanel(); - jp.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0)); - jp.setLayout(new BoxLayout(jp, BoxLayout.Y_AXIS)); - return jp; - } - - /** - * 创建横向内置boxlayout的面板 - * @return JPanel对象 - */ - public static JPanel createX_AXISBoxInnerContainer_M_Pane() { - JPanel jp = new JPanel(); - jp.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0)); - jp.setLayout(new BoxLayout(jp, BoxLayout.X_AXIS)); - return jp; - } - - /** - * 创建纵向内置boxlayout的面板 - * @return JPanel对象 - */ - public static JPanel createY_AXISBoxInnerContainer_S_Pane() { - JPanel jp = new JPanel(); - jp.setLayout(new BoxLayout(jp, BoxLayout.Y_AXIS)); - return jp; - } - - /** - * 创建横向内置boxlayout的面板 - * @return JPanel对象 - */ - public static JPanel createX_AXISBoxInnerContainer_S_Pane() { - JPanel jp = new JPanel(); - jp.setLayout(new BoxLayout(jp, BoxLayout.X_AXIS)); - return jp; - } - - /** - * 创建n列网格面板 - * @param nColumn 列数 - * @return JPanel对象 - */ - public static JPanel createNColumnGridInnerContainer_S_Pane(int nColumn) { - JPanel jp = new JPanel(); - jp.setLayout(new FRGridLayout(nColumn)); - return jp; - } - - /** - * 创建n列网格面板 - * @param nColumn 列数 - * @param h 水平间距 - * @param v 垂直间距 - * @return JPanel对象 - */ - public static JPanel createNColumnGridInnerContainer_Pane(int nColumn, int h, int v) { - JPanel jp = new JPanel(); - jp.setLayout(new FRGridLayout(nColumn, h, v)); - return jp; - } - - /** - * 创建顶格n列网格面板 - * @param nColumn 列数 - * @return JPanel对象 - */ - public static JPanel createFillColumnPane(int nColumn) { - JPanel jp = new JPanel(); - jp.setLayout(new FRGridLayout(nColumn, 0, 0)); - return jp; - } - - /** - * 创建边框面板L - * @return JPanel对象 - */ - public static JPanel createBorderLayout_L_Pane() { - JPanel jp = new JPanel(); - jp.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); - jp.setLayout(FRGUIPaneFactory.createBorderLayout()); - return jp; - } - - /** - * 创建边框面板M - * @return JPanel对象 - */ - public static JPanel createBorderLayout_M_Pane() { - JPanel jp = new JPanel(); - jp.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); - jp.setLayout(FRGUIPaneFactory.createM_BorderLayout()); - return jp; - } - - /** - * 创建边框面板S - * @return JPanel对象 - */ - public static JPanel createBorderLayout_S_Pane() { - JPanel jp = new JPanel(); - jp.setLayout(FRGUIPaneFactory.createBorderLayout()); - return jp; - } - - /** - * 创建卡片式布局 - * @return JPanel对象 - */ - public static JPanel createCardLayout_S_Pane() { - JPanel jp = new JPanel(); - jp.setLayout(new CardLayout()); - return jp; - } - - /** - * 创建图标IconRadio面板 - * @param icon 图标 - * @param jradiobtn 按钮 - * @return JPanel对象 - */ - public static JPanel createIconRadio_S_Pane(Icon icon, - JRadioButton jradiobtn) { - jradiobtn.setBorder(BorderFactory.createEmptyBorder(0, 4, 0, 0)); - jradiobtn.setBackground(new Color(255, 255, 255)); - JPanel iconRadioPane = new JPanel(); - iconRadioPane.setLayout(new BoxLayout(iconRadioPane, BoxLayout.X_AXIS)); - - iconRadioPane.add(new UILabel(icon)); - iconRadioPane.add(jradiobtn); - - return iconRadioPane; - } - - /** - * 计算宽度 - * @param width 宽度输入值 - * @return w 宽度输出值 - */ - public static int caculateWidth(int width) { - int w = 0; - float m = (width + WIDTH_OFFSET_M) / WIDTH_PARA_F; - float n = (width + WIDTH_OFFSET_N) / WIDTH_PARA_F; - float i = Math.abs((((int) m + (int) (m + 1)) / WIDTHABS_PARA_F) - m); - float j = Math.abs((((int) n + (int) (n + 1)) / WIDTHABS_PARA_F) - n); - float x = i > j ? i : j; - if (x == i) { - w = Math.round(m) * WIDTH_PARA_INT - WIDTH_OFFSET_M; - } else if (x == j) { - w = Math.round(n) * WIDTH_PARA_INT - WIDTH_OFFSET_N; - } - return w; - } - - /** - * 计算高度 - * @param height 高度输入值 - * @return 高度输出值 - */ - public static int caculateHeight(int height) { - int h = 0; - float x = (height + HEIGHT_OFFSET) / HEIGHT_PARA; - h = ((int) x + 1) * HEIGHT_PARA; - return h; - } + public static LayoutManager createCenterFlowLayout() { + return new FlowLayout(FlowLayout.CENTER); + } + + /** + * 创建一个靠右流式布局 + * + * @return FlowLayout对象 + */ + public static LayoutManager createRightFlowLayout() { + return new FlowLayout(FlowLayout.RIGHT); + } + + /** + * 创建一个边框布局 + * + * @return BorderLayout对象 + */ + public static LayoutManager createBorderLayout() { + return new BorderLayout(); + } + + /** + * 创建一个边框布局,间距4,4 + * + * @return BorderLayout对象 + */ + public static LayoutManager createM_BorderLayout() { + return new BorderLayout(4, 4); + } + + + /** + * 创建一个1列的网格布局 + * + * @return FRGridLayout对象 + */ + public static LayoutManager create1ColumnGridLayout() { + return new FRGridLayout(1); + } + + /** + * 创建一个2列的网格布局 + * + * @return FRGridLayout对象 + */ + public static LayoutManager create2ColumnGridLayout() { + return new FRGridLayout(2); + } + + /** + * 创建一个n列的网格布局 + * + * @param nColumn 列数 + * @return FRGridLayout对象 + */ + public static LayoutManager createNColumnGridLayout(int nColumn) { + return new FRGridLayout(nColumn); + } + + /** + * 创建一个带标题边框面板 + * + * @param string 边框标题 + * @return JPanel对象 + */ + public static JPanel createTitledBorderPane(String string) { + JPanel jp = new JPanel(); + UITitledBorder explainBorder = UITitledBorder.createBorderWithTitle(string); + jp.setBorder(explainBorder); + jp.setLayout(new FlowLayout(FlowLayout.LEFT)); + return jp; + } + + /** + * 创建一个带标题边框面板并且居中显示 + * + * @param borderTitle 边框标题 + * @return JPanel对象 + */ + public static JPanel createTitledBorderPaneCenter(String borderTitle) { + JPanel jp = new JPanel(); + UITitledBorder explainBorder = UITitledBorder.createBorderWithTitle(borderTitle); + jp.setBorder(explainBorder); + jp.setLayout(new FlowLayout(FlowLayout.CENTER)); + return jp; + } + + /** + * 创建一个靠左空边框布局,间隔大 + * + * @return JPanel对象 + */ + public static JPanel createBigHGapFlowInnerContainer_M_Pane() { + JPanel jp = new JPanel(); + jp.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0)); + jp.setLayout(new FRLeftFlowLayout(5, 60, 5)); + return jp; + } + + /** + * 创建一个靠左空边框面板,间隔中等 + * + * @return JPanel对象 + */ + public static JPanel createMediumHGapFlowInnerContainer_M_Pane() { + JPanel jp = new JPanel(); + jp.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0)); + jp.setLayout(new FRLeftFlowLayout(5, 20, 5)); + return jp; + } + + /** + * 创建一个靠左空边框面板,间隔中等 + * + * @return JPanel对象 + */ + public static JPanel createMediumHGapHighTopFlowInnerContainer_M_Pane() { + JPanel jp = new JPanel(); + jp.setBorder(BorderFactory.createEmptyBorder(50, 5, 0, 0)); + jp.setLayout(new FRLeftFlowLayout(5, 20, 5)); + return jp; + } + + /** + * 创建一个正常靠左空边框面板 + * + * @return JPanel对象 + */ + public static JPanel createNormalFlowInnerContainer_M_Pane() { + JPanel jp = new JPanel(); + jp.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0)); + jp.setLayout(new FlowLayout(FlowLayout.LEFT)); + return jp; + } + + /** + * 创建一个靠左0间距边框面板 + * + * @return JPanel对象 + */ + public static JPanel createLeftFlowZeroGapBorderPane() { + JPanel jp = new JPanel(); + jp.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); + jp.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0)); + return jp; + } + + /** + * 创建一个靠左流式布局,正常流式内嵌 + * + * @return JPanel对象 + */ + public static JPanel createNormalFlowInnerContainer_S_Pane() { + JPanel jp = new JPanel(); + jp.setLayout(new FlowLayout(FlowLayout.LEFT)); + return jp; + } + + /** + * 创建一个靠左流式布局,流式内嵌 + * + * @return JPanel对象 + */ + public static JPanel createBoxFlowInnerContainer_S_Pane() { + JPanel jp = new JPanel(); + jp.setLayout(new FlowLayout(FlowLayout.LEFT, 2, 2)); + return jp; + } + + /** + * 创建一个靠右面板 + * + * @return JPanel对象 + */ + public static JPanel createRightFlowInnerContainer_S_Pane() { + JPanel jp = new JPanel(); + jp.setLayout(new FlowLayout(FlowLayout.RIGHT)); + return jp; + } + + /** + * 创建一个居中面板 + * + * @return JPanel对象 + */ + public static JPanel createCenterFlowInnerContainer_S_Pane() { + JPanel jp = new JPanel(); + jp.setLayout(new FlowLayout(FlowLayout.CENTER)); + return jp; + } + + /** + * 创建一个居中0间距面板 + * + * @return JPanel对象 + */ + public static JPanel createCenterFlowZeroGapBorderPane() { + JPanel jp = new JPanel(); + jp.setLayout(new FlowLayout(FlowLayout.CENTER, 0, 0)); + jp.setBorder(BorderFactory.createEmptyBorder()); + return jp; + } + + /** + * 创建纵向排列面板 + * + * @return JPanel对象 + */ + public static JPanel createY_AXISBoxInnerContainer_L_Pane() { + JPanel jp = new JPanel(); + jp.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); + jp.setLayout(new BoxLayout(jp, BoxLayout.Y_AXIS)); + return jp; + } + + /** + * 创建纵向边框面板 + * + * @return JPanel对象 + */ + public static JPanel createYBoxEmptyBorderPane() { + JPanel jp = new JPanel(); + jp.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); + jp.setLayout(new BoxLayout(jp, BoxLayout.Y_AXIS)); + return jp; + } + + /** + * 创建横向面板 + * + * @return JPanel对象 + */ + public static JPanel createX_AXISBoxInnerContainer_L_Pane() { + JPanel jp = new JPanel(); + jp.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); + jp.setLayout(new BoxLayout(jp, BoxLayout.X_AXIS)); + return jp; + } + + /** + * 创建纵向面板M + * + * @return JPanel对象 + */ + public static JPanel createY_AXISBoxInnerContainer_M_Pane() { + JPanel jp = new JPanel(); + jp.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0)); + jp.setLayout(new BoxLayout(jp, BoxLayout.Y_AXIS)); + return jp; + } + + /** + * 创建横向内置boxlayout的面板 + * + * @return JPanel对象 + */ + public static JPanel createX_AXISBoxInnerContainer_M_Pane() { + JPanel jp = new JPanel(); + jp.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0)); + jp.setLayout(new BoxLayout(jp, BoxLayout.X_AXIS)); + return jp; + } + + /** + * 创建纵向内置boxlayout的面板 + * + * @return JPanel对象 + */ + public static JPanel createY_AXISBoxInnerContainer_S_Pane() { + JPanel jp = new JPanel(); + jp.setLayout(new BoxLayout(jp, BoxLayout.Y_AXIS)); + return jp; + } + + /** + * 创建横向内置boxlayout的面板 + * + * @return JPanel对象 + */ + public static JPanel createX_AXISBoxInnerContainer_S_Pane() { + JPanel jp = new JPanel(); + jp.setLayout(new BoxLayout(jp, BoxLayout.X_AXIS)); + return jp; + } + + /** + * 创建n列网格面板 + * + * @param nColumn 列数 + * @return JPanel对象 + */ + public static JPanel createNColumnGridInnerContainer_S_Pane(int nColumn) { + JPanel jp = new JPanel(); + jp.setLayout(new FRGridLayout(nColumn)); + return jp; + } + + /** + * 创建n列网格面板 + * + * @param nColumn 列数 + * @param h 水平间距 + * @param v 垂直间距 + * @return JPanel对象 + */ + public static JPanel createNColumnGridInnerContainer_Pane(int nColumn, int h, int v) { + JPanel jp = new JPanel(); + jp.setLayout(new FRGridLayout(nColumn, h, v)); + return jp; + } + + /** + * 创建顶格n列网格面板 + * + * @param nColumn 列数 + * @return JPanel对象 + */ + public static JPanel createFillColumnPane(int nColumn) { + JPanel jp = new JPanel(); + jp.setLayout(new FRGridLayout(nColumn, 0, 0)); + return jp; + } + + /** + * 创建边框面板L + * + * @return JPanel对象 + */ + public static JPanel createBorderLayout_L_Pane() { + JPanel jp = new JPanel(); + jp.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); + jp.setLayout(FRGUIPaneFactory.createBorderLayout()); + return jp; + } + + /** + * 创建边框面板M + * + * @return JPanel对象 + */ + public static JPanel createBorderLayout_M_Pane() { + JPanel jp = new JPanel(); + jp.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); + jp.setLayout(FRGUIPaneFactory.createM_BorderLayout()); + return jp; + } + + /** + * 创建边框面板S + * + * @return JPanel对象 + */ + public static JPanel createBorderLayout_S_Pane() { + JPanel jp = new JPanel(); + jp.setLayout(FRGUIPaneFactory.createBorderLayout()); + return jp; + } + + /** + * 创建卡片式布局 + * + * @return JPanel对象 + */ + public static JPanel createCardLayout_S_Pane() { + JPanel jp = new JPanel(); + jp.setLayout(new CardLayout()); + return jp; + } + + /** + * 创建图标IconRadio面板 + * + * @param icon 图标 + * @param jradiobtn 按钮 + * @return JPanel对象 + */ + public static JPanel createIconRadio_S_Pane(Icon icon, + JRadioButton jradiobtn) { + jradiobtn.setBorder(BorderFactory.createEmptyBorder(0, 4, 0, 0)); + jradiobtn.setBackground(new Color(255, 255, 255)); + JPanel iconRadioPane = new JPanel(); + iconRadioPane.setLayout(new BoxLayout(iconRadioPane, BoxLayout.X_AXIS)); + + iconRadioPane.add(new UILabel(icon)); + iconRadioPane.add(jradiobtn); + + return iconRadioPane; + } + + /** + * 计算宽度 + * + * @param width 宽度输入值 + * @return w 宽度输出值 + */ + public static int caculateWidth(int width) { + int w = 0; + float m = (width + WIDTH_OFFSET_M) / WIDTH_PARA_F; + float n = (width + WIDTH_OFFSET_N) / WIDTH_PARA_F; + float i = Math.abs((((int) m + (int) (m + 1)) / WIDTHABS_PARA_F) - m); + float j = Math.abs((((int) n + (int) (n + 1)) / WIDTHABS_PARA_F) - n); + float x = i > j ? i : j; + if (x == i) { + w = Math.round(m) * WIDTH_PARA_INT - WIDTH_OFFSET_M; + } else if (x == j) { + w = Math.round(n) * WIDTH_PARA_INT - WIDTH_OFFSET_N; + } + return w; + } + + /** + * 计算高度 + * + * @param height 高度输入值 + * @return 高度输出值 + */ + public static int caculateHeight(int height) { + int h = 0; + float x = (height + HEIGHT_OFFSET) / HEIGHT_PARA; + h = ((int) x + 1) * HEIGHT_PARA; + return h; + } } \ No newline at end of file diff --git a/designer_base/src/com/fr/design/utils/DesignUtils.java b/designer_base/src/com/fr/design/utils/DesignUtils.java index 9dc0399d5..664dd9ae0 100644 --- a/designer_base/src/com/fr/design/utils/DesignUtils.java +++ b/designer_base/src/com/fr/design/utils/DesignUtils.java @@ -52,7 +52,8 @@ public class DesignUtils { public static boolean isStarted() { try { new Socket("localhost", port); - return true; +// return true; + return false; } catch (Exception exp) { } From e8df144eaf5ff281c7d0b350b2ae037bead1b1e0 Mon Sep 17 00:00:00 2001 From: "yaoh.wu" Date: Thu, 3 Aug 2017 10:50:53 +0800 Subject: [PATCH 03/30] =?UTF-8?q?REPORT-3348=20=E5=A4=8D=E7=94=A8=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=95=B0=E6=8D=AE=E5=88=97=E5=AF=B9=E8=AF=9D=E6=A1=86?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=EF=BC=8C=E4=BF=9D=E7=95=99=E5=8E=9F=E5=A7=8B?= =?UTF-8?q?=E5=AF=B9=E8=AF=9D=E6=A1=86=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dscolumn/DSColumnAdvancedEditorPane.java | 42 +++++-- .../fr/design/dscolumn/DSColumnBasicPane.java | 117 +++++++++--------- .../SelectedConfirmedDataColumnPane.java | 68 +++++----- .../dscolumn/SelectedDataColumnPane.java | 59 ++++++++- .../cellquick/CellDSColumnEditor.java | 2 +- 5 files changed, 180 insertions(+), 108 deletions(-) diff --git a/designer/src/com/fr/design/dscolumn/DSColumnAdvancedEditorPane.java b/designer/src/com/fr/design/dscolumn/DSColumnAdvancedEditorPane.java index 46d8d0a6e..93b63a5d7 100644 --- a/designer/src/com/fr/design/dscolumn/DSColumnAdvancedEditorPane.java +++ b/designer/src/com/fr/design/dscolumn/DSColumnAdvancedEditorPane.java @@ -2,6 +2,7 @@ package com.fr.design.dscolumn; import com.fr.base.Formula; import com.fr.data.TableDataSource; +import com.fr.design.constants.LayoutConstants; import com.fr.design.data.DesignTableDataManager; import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.formula.CustomVariableResolver; @@ -19,6 +20,7 @@ import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.cell.CellEditorPane; +import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.IOUtils; import com.fr.general.Inter; import com.fr.report.cell.CellElement; @@ -270,21 +272,26 @@ public class DSColumnAdvancedEditorPane extends CellEditorPane { if (selectIndex == 1) { setCardPaneLayout.show(setCardPane, FilterType.TOP.name()); tipCardPaneLayout.show(tipCardPane, FilterType.TOP.name()); + //隐藏tip } else if (selectIndex == 2) { setCardPaneLayout.show(setCardPane, FilterType.BOTTOM.name()); tipCardPaneLayout.show(tipCardPane, FilterType.BOTTOM.name()); + //隐藏tip } else if (selectIndex == 3) { setCardPaneLayout.show(setCardPane, FilterType.ODD.name()); tipCardPaneLayout.show(tipCardPane, FilterType.ODD.name()); + //隐藏set } else if (selectIndex == 4) { setCardPaneLayout.show(setCardPane, FilterType.EVEN.name()); tipCardPaneLayout.show(tipCardPane, FilterType.EVEN.name()); + //隐藏set } else if (selectIndex == 5) { setCardPaneLayout.show(setCardPane, FilterType.SPECIFY.name()); tipCardPaneLayout.show(tipCardPane, FilterType.SPECIFY.name()); } else { setCardPaneLayout.show(setCardPane, FilterType.UNDEFINE.name()); tipCardPaneLayout.show(tipCardPane, FilterType.UNDEFINE.name()); + //隐藏set和tip } } }); @@ -413,18 +420,29 @@ public class DSColumnAdvancedEditorPane extends CellEditorPane { private String defaultValue; public JFormulaField(String defaultValue) { + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = {f}; + double[] rowSize = {p}; this.defaultValue = defaultValue; - - this.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0)); - formulaTextField = new UITextField(11); - this.add(formulaTextField); + formulaTextField = new UITextField(); formulaTextField.setText(defaultValue); - UIButton formulaButton = new UIButton(IOUtils.readIcon("/com/fr/design/images/m_insert/formula.png")); - this.add(formulaButton); formulaButton.setToolTipText(Inter.getLocText("Formula") + "..."); - formulaButton.setPreferredSize(new Dimension(20, formulaTextField.getPreferredSize().height)); + formulaButton.setPreferredSize(new Dimension(24, formulaTextField.getPreferredSize().height)); formulaButton.addActionListener(formulaButtonActionListener); + Component[] buttonComponent = new Component[]{ + formulaButton + }; + JPanel pane = new JPanel(new BorderLayout(0, 0)); + pane.add(formulaTextField, BorderLayout.CENTER); + pane.add(GUICoreUtils.createFlowPane(buttonComponent, FlowLayout.LEFT, LayoutConstants.HGAP_LARGE), BorderLayout.EAST); + Component[][] components = new Component[][]{ + new Component[]{pane} + }; + JPanel panel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); + this.setLayout(new BorderLayout()); + this.add(panel, BorderLayout.CENTER); } public void populate(String formulaContent) { @@ -485,13 +503,17 @@ public class DSColumnAdvancedEditorPane extends CellEditorPane { * @see DSColumnAdvancedPane.ValuePane */ private static class CustomValuePane extends JPanel { - private DSColumnAdvancedEditorPane.JFormulaField formulaField; + private JFormulaField formulaField; public CustomValuePane() { + double p = TableLayout.PREFERRED, f = TableLayout.FILL; this.setLayout(FRGUIPaneFactory.createBoxFlowLayout()); UILabel customValueLabel = new UILabel("显示值"); - this.add(Box.createHorizontalStrut(2)); - this.add((formulaField = new DSColumnAdvancedEditorPane.JFormulaField("$$$"))); + formulaField = new JFormulaField("$$$"); + formulaField.setPreferredSize(new Dimension(159, 20)); + this.add(TableLayoutHelper.createTableLayoutPane(new Component[][]{ + {customValueLabel, formulaField}, + }, new double[]{p}, new double[]{p, f}), BorderLayout.CENTER); } public void populate(CellElement cellElement) { diff --git a/designer/src/com/fr/design/dscolumn/DSColumnBasicPane.java b/designer/src/com/fr/design/dscolumn/DSColumnBasicPane.java index 9ba61e547..07f02a7ef 100644 --- a/designer/src/com/fr/design/dscolumn/DSColumnBasicPane.java +++ b/designer/src/com/fr/design/dscolumn/DSColumnBasicPane.java @@ -1,25 +1,23 @@ package com.fr.design.dscolumn; -import java.awt.BorderLayout; -import java.awt.Component; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; - -import javax.swing.BorderFactory; - import com.fr.data.TableDataSource; +import com.fr.design.dialog.BasicPane; import com.fr.design.expand.ConditionParentPane; import com.fr.design.expand.ExpandDirectionPane; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; -import com.fr.design.dialog.BasicPane; -import com.fr.general.Inter; import com.fr.design.mainframe.ElementCasePane; +import com.fr.design.utils.gui.GUICoreUtils; +import com.fr.general.Inter; import com.fr.report.cell.CellElement; import com.fr.report.cell.TemplateCellElement; import com.fr.report.cell.cellattr.CellExpandAttr; -import com.fr.design.utils.gui.GUICoreUtils; + +import javax.swing.*; +import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; public class DSColumnBasicPane extends BasicPane { @@ -30,54 +28,54 @@ public class DSColumnBasicPane extends BasicPane { private CellElement cellElement; public DSColumnBasicPane() { - this(DSColumnPane.SETTING_ALL); + this(DSColumnPane.SETTING_ALL); } - + public DSColumnBasicPane(int setting) { this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setBorder(BorderFactory.createEmptyBorder(3, 3, 3, 3)); if (setting > DSColumnPane.SETTING_DSRELATED) { - selectDataColumnPane = new SelectedDataColumnPane(); + selectDataColumnPane = new SelectedDataColumnPane(); } else { - selectDataColumnPane = new SelectedConfirmedDataColumnPane(); + selectDataColumnPane = new SelectedConfirmedDataColumnPane(); } - + selectDataColumnPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("Select_DataColumn"), null)); if (setting > DSColumnPane.SETTING_DSRELATED) { - conditionParentPane = new ConditionParentPane(); - conditionParentPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("ParentCell_Setting"), null)); + conditionParentPane = new ConditionParentPane(); + conditionParentPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("ParentCell_Setting"), null)); } - + resultSetGroupPane = new ResultSetGroupPopUpPane(setting > DSColumnPane.SETTING_DSRELATED); resultSetGroupPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("Data_Setting"), null)); if (setting > DSColumnPane.SETTING_DSRELATED) { - expandDirectionPane = new ExpandDirectionPane(); - expandDirectionPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("ExpandD-Expand_Direction"), null)); + expandDirectionPane = new ExpandDirectionPane(); + expandDirectionPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("ExpandD-Expand_Direction"), null)); } - + double[] rowSize = {TableLayout.PREFERRED, TableLayout.PREFERRED, - TableLayout.PREFERRED, TableLayout.PREFERRED}; + TableLayout.PREFERRED, TableLayout.PREFERRED}; double[] columnSize = {TableLayout.FILL}; - + Component[][] components = null; - + if (setting > DSColumnPane.SETTING_DSRELATED) { - components = new Component[][]{ - {selectDataColumnPane}, - {conditionParentPane}, - {resultSetGroupPane}, - {expandDirectionPane} - }; + components = new Component[][]{ + {selectDataColumnPane}, + {conditionParentPane}, + {resultSetGroupPane}, + {expandDirectionPane} + }; } else { - components = new Component[][]{ - {selectDataColumnPane}, - {resultSetGroupPane}, - }; + components = new Component[][]{ + {selectDataColumnPane}, + {resultSetGroupPane}, + }; } - + this.add(TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize), BorderLayout.CENTER); this.resultSetGroupPane.addListeners(summary_direction_ActionListener, otherGroup_direction_ActionListener, sdcUpdate_ActionListener); @@ -85,24 +83,24 @@ public class DSColumnBasicPane extends BasicPane { @Override protected String title4PopupWindow() { - return Inter.getLocText("Basic"); + return Inter.getLocText("Basic"); } - + public void populate(TableDataSource source, TemplateCellElement cellElement) { if (cellElement == null) { return; } this.cellElement = cellElement; - + selectDataColumnPane.populate(source, cellElement); CellExpandAttr cellExpandAttr = cellElement.getCellExpandAttr(); if (conditionParentPane != null) { - conditionParentPane.populate(cellExpandAttr); + conditionParentPane.populate(cellExpandAttr); } if (expandDirectionPane != null) { - expandDirectionPane.populate(cellExpandAttr); + expandDirectionPane.populate(cellExpandAttr); } resultSetGroupPane.populate(cellElement); @@ -128,27 +126,28 @@ public class DSColumnBasicPane extends BasicPane { } if (conditionParentPane != null) { - conditionParentPane.update(cellExpandAttr); + conditionParentPane.update(cellExpandAttr); } if (expandDirectionPane != null) { - expandDirectionPane.update(cellExpandAttr); + expandDirectionPane.update(cellExpandAttr); } resultSetGroupPane.update(); } + ActionListener summary_direction_ActionListener = new ActionListener() { public void actionPerformed(ActionEvent evt) { - if (expandDirectionPane != null) { - expandDirectionPane.setNoneRadioButtonSelected(true); - } + if (expandDirectionPane != null) { + expandDirectionPane.setNoneRadioButtonSelected(true); + } } }; ActionListener otherGroup_direction_ActionListener = new ActionListener() { public void actionPerformed(ActionEvent evt) { - if (expandDirectionPane != null) { - expandDirectionPane.setNoneRadioButtonSelected(false); - } + if (expandDirectionPane != null) { + expandDirectionPane.setNoneRadioButtonSelected(false); + } } }; ActionListener sdcUpdate_ActionListener = new ActionListener() { @@ -157,14 +156,16 @@ public class DSColumnBasicPane extends BasicPane { selectDataColumnPane.update(cellElement); } }; - public void putElementcase(ElementCasePane t){ - if (conditionParentPane != null) { - conditionParentPane.putElementcase(t); - } - } - public void putCellElement(TemplateCellElement tplEC2) { - if (conditionParentPane != null) { - conditionParentPane.putCellElement(tplEC2); - } - } + + public void putElementcase(ElementCasePane t) { + if (conditionParentPane != null) { + conditionParentPane.putElementcase(t); + } + } + + public void putCellElement(TemplateCellElement tplEC2) { + if (conditionParentPane != null) { + conditionParentPane.putCellElement(tplEC2); + } + } } \ No newline at end of file diff --git a/designer/src/com/fr/design/dscolumn/SelectedConfirmedDataColumnPane.java b/designer/src/com/fr/design/dscolumn/SelectedConfirmedDataColumnPane.java index 282367d27..4852aaa66 100644 --- a/designer/src/com/fr/design/dscolumn/SelectedConfirmedDataColumnPane.java +++ b/designer/src/com/fr/design/dscolumn/SelectedConfirmedDataColumnPane.java @@ -1,45 +1,45 @@ package com.fr.design.dscolumn; -import java.awt.Dimension; -import java.awt.event.ItemEvent; -import java.awt.event.ItemListener; -import java.util.Iterator; - import com.fr.data.TableDataSource; import com.fr.design.data.datapane.TableDataComboBox; import com.fr.design.data.tabledata.wrapper.TemplateTableDataWrapper; import com.fr.main.impl.WorkBook; import com.fr.report.cell.TemplateCellElement; +import java.awt.*; +import java.awt.event.ItemEvent; +import java.awt.event.ItemListener; +import java.util.Iterator; + public class SelectedConfirmedDataColumnPane extends SelectedDataColumnPane { - public SelectedConfirmedDataColumnPane () { - super(false); - } - - protected void initTableNameComboBox() { - tableNameComboBox = new TableDataComboBox(new WorkBook()); - tableNameComboBox.addItemListener(new ItemListener() { - @Override - public void itemStateChanged(ItemEvent e) { - columnNameComboBox.setLoaded(false); - } - }); - tableNameComboBox.setPreferredSize(new Dimension(100, 20)); - } - - public void populate(TableDataSource source, TemplateCellElement cell) { - tableNameComboBox.refresh(source); - tableNameComboBox.setEditable(false); - tableNameComboBox.setEnabled(false); - super.populate(source, cell); - try { - Iterator it = source.getTableDataNameIterator(); - String name = (String)it.next(); - TemplateTableDataWrapper wrapper = new TemplateTableDataWrapper(source.getTableData(name), name); - tableNameComboBox.setSelectedItem(wrapper); - tableNameComboBox.getModel().setSelectedItem(wrapper); - } catch (Exception e) { - } - } + public SelectedConfirmedDataColumnPane() { + super(false, false); + } + + protected void initTableNameComboBox() { + tableNameComboBox = new TableDataComboBox(new WorkBook()); + tableNameComboBox.addItemListener(new ItemListener() { + @Override + public void itemStateChanged(ItemEvent e) { + columnNameComboBox.setLoaded(false); + } + }); + tableNameComboBox.setPreferredSize(new Dimension(100, 20)); + } + + public void populate(TableDataSource source, TemplateCellElement cell) { + tableNameComboBox.refresh(source); + tableNameComboBox.setEditable(false); + tableNameComboBox.setEnabled(false); + super.populate(source, cell); + try { + Iterator it = source.getTableDataNameIterator(); + String name = (String) it.next(); + TemplateTableDataWrapper wrapper = new TemplateTableDataWrapper(source.getTableData(name), name); + tableNameComboBox.setSelectedItem(wrapper); + tableNameComboBox.getModel().setSelectedItem(wrapper); + } catch (Exception e) { + } + } } \ No newline at end of file diff --git a/designer/src/com/fr/design/dscolumn/SelectedDataColumnPane.java b/designer/src/com/fr/design/dscolumn/SelectedDataColumnPane.java index dd583e1ef..55f94fff7 100644 --- a/designer/src/com/fr/design/dscolumn/SelectedDataColumnPane.java +++ b/designer/src/com/fr/design/dscolumn/SelectedDataColumnPane.java @@ -39,8 +39,8 @@ import java.util.regex.Pattern; * 数据集列动态参数设置组件 * * @author yaoh.wu - * @version 2017年7月26日 - * 9.0设计器更新,修改动态参数注入按钮部分,使其显示动态参数按钮时能在右侧边栏正常显示 + * @version 2017年8月3日 + * 复用对话框代码,保留对话框原始布局 * @since 8.0 */ public class SelectedDataColumnPane extends BasicPane { @@ -54,11 +54,15 @@ public class SelectedDataColumnPane extends BasicPane { private UIButton paramButton; public SelectedDataColumnPane() { - this(true); + this(true, false); } - SelectedDataColumnPane(boolean showParameterButton) { - initComponent(showParameterButton); + public SelectedDataColumnPane(boolean showParameterButton, boolean verticalLayout) { + if (verticalLayout) { + initComponentVerticalLayout(true); + } else { + initComponent(showParameterButton); + } } /** @@ -67,6 +71,51 @@ public class SelectedDataColumnPane extends BasicPane { * @param showParameterButton 是否显示参数按钮 */ public void initComponent(boolean showParameterButton) { + initTableNameComboBox(); + if (showParameterButton) { + initWithParameterButton(); + } + columnNameComboBox = new LazyComboBox() { + + @Override + public Object[] load() { + List l = calculateColumnNameList(); + return l.toArray(new String[l.size()]); + } + + }; + columnNameComboBox.setEditable(true); + double p = TableLayout.PREFERRED; + UILabel label1 = new UILabel(Inter.getLocText("TableData") + ":"); + UILabel label2 = new UILabel(Inter.getLocText("DataColumn") + ":"); + if (showParameterButton) { + label1.setPreferredSize(new Dimension(200, 25)); + label2.setPreferredSize(new Dimension(200, 25)); + } + if (showParameterButton) { + Component[][] comps = {{label1, null, label2}, {tableNameComboBox, paramButton, columnNameComboBox}}; + this.add(TableLayoutHelper.createTableLayoutPane(comps, new double[]{p, p}, new double[]{p, p, p})); + } else { + double f = TableLayout.FILL; + double[] columnSize = {p, f}; + double[] rowSize = {p, p}; + Component[][] components = new Component[][]{ + new Component[]{label1, tableNameComboBox}, + new Component[]{label2, columnNameComboBox} + }; + JPanel jPanel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); + this.setLayout(new BorderLayout()); + this.add(jPanel, BorderLayout.CENTER); + } + } + + + /** + * 初始化组件 + * + * @param showParameterButton 是否显示参数按钮 + */ + public void initComponentVerticalLayout(boolean showParameterButton) { initTableNameComboBox(); if (showParameterButton) { initWithParameterButton(); diff --git a/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java b/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java index 3493967af..8afe3c691 100644 --- a/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java +++ b/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java @@ -176,7 +176,7 @@ public class CellDSColumnEditor extends CellQuickEditor { private void createPanes() { paneList = new ArrayList<>(); /*基本设置面板*/ - this.dataPane = new SelectedDataColumnPane(); + this.dataPane = new SelectedDataColumnPane(true, true); this.groupPane = new ResultSetGroupDockingPane(tc); double p = TableLayout.PREFERRED, f = TableLayout.FILL; double[] rowSize = {p}, columnSize = {p, f}; From 27c213d34cda587681f57ef7adb402340deba68b Mon Sep 17 00:00:00 2001 From: "yaoh.wu" Date: Thu, 3 Aug 2017 16:53:24 +0800 Subject: [PATCH 04/30] =?UTF-8?q?REPORT-3348=20=E9=87=8D=E6=9E=84=EF=BC=8C?= =?UTF-8?q?=E4=B8=8D=E7=84=B6=E4=B8=8D=E8=83=BD=E4=BF=9D=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../columnrow/DSColumnConditionAction.java | 17 +- .../dscolumn/DSColumnAdvancedEditorPane.java | 553 ------------ .../dscolumn/DSColumnBasicEditorPane.java | 85 -- .../design/mainframe/cell/CellEditorPane.java | 4 +- .../cellquick/CellDSColumnEditor.java | 806 ++++++++++++++++-- 5 files changed, 731 insertions(+), 734 deletions(-) delete mode 100644 designer/src/com/fr/design/dscolumn/DSColumnAdvancedEditorPane.java delete mode 100644 designer/src/com/fr/design/dscolumn/DSColumnBasicEditorPane.java diff --git a/designer/src/com/fr/design/actions/columnrow/DSColumnConditionAction.java b/designer/src/com/fr/design/actions/columnrow/DSColumnConditionAction.java index 0036b2806..8143409cf 100644 --- a/designer/src/com/fr/design/actions/columnrow/DSColumnConditionAction.java +++ b/designer/src/com/fr/design/actions/columnrow/DSColumnConditionAction.java @@ -1,36 +1,33 @@ package com.fr.design.actions.columnrow; import com.fr.base.BaseUtils; -import com.fr.design.data.DesignTableDataManager; import com.fr.design.actions.cell.AbstractCellElementAction; -import com.fr.design.dscolumn.DSColumnConditionsPane; +import com.fr.design.data.DesignTableDataManager; import com.fr.design.dialog.BasicPane; -import com.fr.general.Inter; +import com.fr.design.dscolumn.DSColumnConditionsPane; import com.fr.design.mainframe.ElementCasePane; +import com.fr.general.Inter; import com.fr.report.cell.TemplateCellElement; public class DSColumnConditionAction extends AbstractCellElementAction { - private boolean returnValue = false; - private TemplateCellElement editCellElement; - public DSColumnConditionAction(ElementCasePane t) { - super(t); - + super(t); + this.setName(Inter.getLocText("Filter")); this.setMnemonic('E'); this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/expand/cellAttr.gif")); } @Override - protected BasicPane populateBasicPane(TemplateCellElement cellElement) { + protected BasicPane populateBasicPane(TemplateCellElement cellElement) { DSColumnConditionsPane dSColumnConditionsPane = new DSColumnConditionsPane(); dSColumnConditionsPane.populate(DesignTableDataManager.getEditingTableDataSource(), cellElement); return dSColumnConditionsPane; } @Override - protected void updateBasicPane(BasicPane bp, TemplateCellElement cellElement) { + protected void updateBasicPane(BasicPane bp, TemplateCellElement cellElement) { ((DSColumnConditionsPane) bp).update(cellElement); } } \ No newline at end of file diff --git a/designer/src/com/fr/design/dscolumn/DSColumnAdvancedEditorPane.java b/designer/src/com/fr/design/dscolumn/DSColumnAdvancedEditorPane.java deleted file mode 100644 index 93b63a5d7..000000000 --- a/designer/src/com/fr/design/dscolumn/DSColumnAdvancedEditorPane.java +++ /dev/null @@ -1,553 +0,0 @@ -package com.fr.design.dscolumn; - -import com.fr.base.Formula; -import com.fr.data.TableDataSource; -import com.fr.design.constants.LayoutConstants; -import com.fr.design.data.DesignTableDataManager; -import com.fr.design.dialog.DialogActionAdapter; -import com.fr.design.formula.CustomVariableResolver; -import com.fr.design.formula.FormulaFactory; -import com.fr.design.formula.TinyFormulaPane; -import com.fr.design.formula.UIFormula; -import com.fr.design.gui.ibutton.UIButton; -import com.fr.design.gui.ibutton.UIButtonGroup; -import com.fr.design.gui.icheckbox.UICheckBox; -import com.fr.design.gui.icombobox.UIComboBox; -import com.fr.design.gui.ilable.UILabel; -import com.fr.design.gui.ispinner.UISpinner; -import com.fr.design.gui.itextfield.UITextField; -import com.fr.design.layout.FRGUIPaneFactory; -import com.fr.design.layout.TableLayout; -import com.fr.design.layout.TableLayoutHelper; -import com.fr.design.mainframe.cell.CellEditorPane; -import com.fr.design.utils.gui.GUICoreUtils; -import com.fr.general.IOUtils; -import com.fr.general.Inter; -import com.fr.report.cell.CellElement; -import com.fr.report.cell.TemplateCellElement; -import com.fr.report.cell.cellattr.core.group.DSColumn; -import com.fr.report.cell.cellattr.core.group.SelectCount; - -import javax.swing.*; -import javax.swing.event.ChangeEvent; -import javax.swing.event.ChangeListener; -import java.awt.*; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; - - -/** - * 单元格元素 数据列 基本设置内容面板 - *

- * 复制了一些{@link DSColumnAdvancedPane}的内部类,不做复用,价值不大,进行修改后直接使用; - *

- * - * @author yaoh.wu - * @version 2017年7月25日 - * @since 9.0 - */ -public class DSColumnAdvancedEditorPane extends CellEditorPane { - - private static final String INSET_TEXT = " "; - - //排列顺序 - private ResultSetSortConfigPane sortPane; - //结果集筛选 - private ResultSetFilterConfigPane filterPane; - //自定义值显示 - private CustomValuePane valuePane; - //横向可扩展性 - private UICheckBox horizontalExtendableCheckBox; - //纵向可扩展性 - private UICheckBox verticalExtendableCheckBox; - //补充空白数据 - private UICheckBox useMultiplyNumCheckBox; - //补充空白数据书目输入框 - private UISpinner multiNumSpinner; - - - public DSColumnAdvancedEditorPane() { - this.setLayout(new BorderLayout()); - this.add(this.createContentPane(), BorderLayout.CENTER); - this.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 15)); - } - - - @Override - public String getIconPath() { - return "Advanced"; - } - - @Override - public String title4PopupWindow() { - return "Advanced"; - } - - - @Override - public void update() { - - } - - @Override - public void populate(TemplateCellElement cellElement) { - - } - - - /** - * 创建内容 - */ - private JPanel createContentPane() { - this.setBorder(BorderFactory.createEmptyBorder(3, 3, 3, 3)); - this.setLayout(FRGUIPaneFactory.createBorderLayout()); - //结果集排序 - - this.sortPane = new ResultSetSortConfigPane(); - //结果筛选 - - filterPane = new ResultSetFilterConfigPane(); - //自定义值显示 - valuePane = new CustomValuePane(); - //可扩展性 - JPanel extendableDirectionPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); - extendableDirectionPane.add(horizontalExtendableCheckBox = new UICheckBox(Inter.getLocText("ExpandD-Horizontal_Extendable"))); - extendableDirectionPane.add(verticalExtendableCheckBox = new UICheckBox(Inter.getLocText("ExpandD-Vertical_Extendable"))); - - - //补充空白数据 - JPanel multiNumPane = new JPanel(); - - useMultiplyNumCheckBox = new UICheckBox(Inter.getLocText("Column_Multiple")); - multiNumPane.add(useMultiplyNumCheckBox); - multiNumPane.add(new UILabel(INSET_TEXT)); - - multiNumSpinner = new UISpinner(1, 10000, 1, 1); - multiNumPane.add(multiNumSpinner); - - useMultiplyNumCheckBox.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - checkButtonEnabled(); - } - }); - - double p = TableLayout.PREFERRED, f = TableLayout.FILL; - double[] rowSize = {p, p, p, p, p, p}; - double[] columnSize = {f}; - - Component[][] components = new Component[][]{ - {sortPane}, - {filterPane}, - {valuePane}, - {extendableDirectionPane}, - {multiNumPane} - }; - return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); - } - - - private void checkButtonEnabled() { - if (useMultiplyNumCheckBox.isSelected()) { - multiNumSpinner.setEnabled(true); - } else { - multiNumSpinner.setEnabled(false); - } - } - - /** - * 单元格元素>数据集>高级设置>结果排序设置面板 - * - * @see com.fr.design.mainframe.cell.settingpane.CellExpandAttrPane - */ - protected static class ResultSetSortConfigPane extends JPanel { - private UIButtonGroup sort_type_pane; - private TinyFormulaPane tinyFormulaPane; - private CardLayout cardLayout; - private JPanel centerPane; - - - public ResultSetSortConfigPane() { - this.setLayout(new BorderLayout(0, 0)); - Icon[] iconArray = { - IOUtils.readIcon("/com/fr/design/images/expand/none16x16.png"), - IOUtils.readIcon("/com/fr/design/images/expand/asc.png"), - IOUtils.readIcon("/com/fr/design/images/expand/des.png") - }; - String[] nameArray = {Inter.getLocText("Sort-Original"), Inter.getLocText("Sort-Ascending"), Inter.getLocText("Sort-Descending")}; - sort_type_pane = new UIButtonGroup(iconArray); - sort_type_pane.setAllToolTips(nameArray); - sort_type_pane.setGlobalName(Inter.getLocText("ExpandD-Sort_After_Expand")); - - cardLayout = new CardLayout(); - centerPane = new JPanel(cardLayout); - tinyFormulaPane = new TinyFormulaPane(); - centerPane.add(new JPanel(), "none"); - centerPane.add(tinyFormulaPane, "content"); - //todo 国际化 - UILabel sortLabel = new UILabel("排列顺序"); - sort_type_pane.addChangeListener(new ChangeListener() { - @Override - public void stateChanged(ChangeEvent e) { - boolean noContent = sort_type_pane.getSelectedIndex() == 0; - cardLayout.show(centerPane, noContent ? "none" : "content"); - if (noContent) { - centerPane.setPreferredSize(new Dimension(0, 0)); - } else { - centerPane.setPreferredSize(new Dimension(165, 20)); - } - } - }); - - Component[][] components = new Component[][]{ - new Component[]{sortLabel, sort_type_pane}, - new Component[]{null, centerPane} - }; - double p = TableLayout.PREFERRED, f = TableLayout.FILL; - double[] rowSize = {p, p}, columnSize = {p, f}; - this.add(TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize), BorderLayout.CENTER); - } - - - /** - * 刷新面板信息 - * - * @param dataSource 数据集对象 - * @param cellElement 单元格 - */ - public void populate(TableDataSource dataSource, TemplateCellElement cellElement) { - //todo - } - - - /** - * 保存面板配置信息 - * - * @param cellElement 单元格 - */ - public void update(CellElement cellElement) { - //todo - } - } - - /** - * 单元格元素>数据集>高级设置>结果集筛选设置面板 - * - * @see DSColumnAdvancedPane.SelectCountPane - */ - protected static class ResultSetFilterConfigPane extends JPanel { - private enum FilterType { - //前N个 后N个 奇数 偶数 自定义 未定义 - TOP, BOTTOM, ODD, EVEN, SPECIFY, UNDEFINE; - } - - CellElement cellElement; - private UIComboBox rsComboBox; - private JPanel setCardPane; - private JPanel tipCardPane; - private UITextField serialTextField; - - DSColumnAdvancedEditorPane.JFormulaField topFormulaPane; - DSColumnAdvancedEditorPane.JFormulaField bottomFormulaPane; - - public ResultSetFilterConfigPane() { - double p = TableLayout.PREFERRED, f = TableLayout.FILL; - - this.setLayout(FRGUIPaneFactory.createBorderLayout()); - UILabel filterLabel = new UILabel("结果集筛选"); - - //结果集筛选下拉框 - rsComboBox = new UIComboBox(new String[]{ - Inter.getLocText("Undefined"), - Inter.getLocText("BindColumn-Top_N"), - Inter.getLocText("BindColumn-Bottom_N"), - Inter.getLocText("Odd"), - Inter.getLocText("Even"), - Inter.getLocText("Specify") - }); - rsComboBox.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent evt) { - int selectIndex = rsComboBox.getSelectedIndex(); - CardLayout setCardPaneLayout = (CardLayout) setCardPane.getLayout(); - CardLayout tipCardPaneLayout = (CardLayout) tipCardPane.getLayout(); - if (selectIndex == 1) { - setCardPaneLayout.show(setCardPane, FilterType.TOP.name()); - tipCardPaneLayout.show(tipCardPane, FilterType.TOP.name()); - //隐藏tip - } else if (selectIndex == 2) { - setCardPaneLayout.show(setCardPane, FilterType.BOTTOM.name()); - tipCardPaneLayout.show(tipCardPane, FilterType.BOTTOM.name()); - //隐藏tip - } else if (selectIndex == 3) { - setCardPaneLayout.show(setCardPane, FilterType.ODD.name()); - tipCardPaneLayout.show(tipCardPane, FilterType.ODD.name()); - //隐藏set - } else if (selectIndex == 4) { - setCardPaneLayout.show(setCardPane, FilterType.EVEN.name()); - tipCardPaneLayout.show(tipCardPane, FilterType.EVEN.name()); - //隐藏set - } else if (selectIndex == 5) { - setCardPaneLayout.show(setCardPane, FilterType.SPECIFY.name()); - tipCardPaneLayout.show(tipCardPane, FilterType.SPECIFY.name()); - } else { - setCardPaneLayout.show(setCardPane, FilterType.UNDEFINE.name()); - tipCardPaneLayout.show(tipCardPane, FilterType.UNDEFINE.name()); - //隐藏set和tip - } - } - }); - //配置展示CardLayout - setCardPane = FRGUIPaneFactory.createCardLayout_S_Pane(); - //提示信息展示CardLayout - tipCardPane = FRGUIPaneFactory.createCardLayout_S_Pane(); - - //前N个 - topFormulaPane = new DSColumnAdvancedEditorPane.JFormulaField("="); - setCardPane.add(topFormulaPane, FilterType.TOP.name()); - tipCardPane.add(new JPanel(), FilterType.TOP.name()); - - //后N个 - bottomFormulaPane = new DSColumnAdvancedEditorPane.JFormulaField("="); - setCardPane.add(bottomFormulaPane, FilterType.BOTTOM.name()); - tipCardPane.add(new JPanel(), FilterType.BOTTOM.name()); - - //自定义值下方没有提示信息,也没有输入框 - JPanel undefinedPane = new JPanel(); - setCardPane.add(new JPanel(), FilterType.UNDEFINE.name()); - tipCardPane.add(new JPanel(), FilterType.UNDEFINE.name()); - - //奇数 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()); - - - //偶数 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.ODD.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()); - - this.add(TableLayoutHelper.createTableLayoutPane(new Component[][]{ - {filterLabel, rsComboBox}, - {null, setCardPane}, - {tipCardPane, null} - }, new double[]{p, p, p}, new double[]{p, f}), BorderLayout.CENTER); - } - - public void populate(CellElement cellElement) { - if (cellElement == null) { - return; - } - this.cellElement = cellElement; - - Object value = cellElement.getValue(); - if (value == null || !(value instanceof DSColumn)) { - return; - } - DSColumn dSColumn = (DSColumn) (cellElement.getValue()); - SelectCount selectCount = dSColumn.getSelectCount(); - this.topFormulaPane.populateElement(cellElement); - this.bottomFormulaPane.populateElement(cellElement); - if (selectCount != null) { - int selectCountType = selectCount.getType(); - this.rsComboBox.setSelectedIndex(selectCountType); - if (selectCountType == SelectCount.TOP) { - this.topFormulaPane.populate(selectCount.getFormulaCount()); - } else if (selectCountType == SelectCount.BOTTOM) { - this.bottomFormulaPane.populate(selectCount.getFormulaCount()); - } else if (selectCountType == SelectCount.SPECIFY) { - this.serialTextField.setText(selectCount.getSerial()); - } - } - } - - public void update(CellElement cellElement) { - if (cellElement == null) { - return; - } - Object value = cellElement.getValue(); - if (value == null || !(value instanceof DSColumn)) { - return; - } - DSColumn dSColumn = (DSColumn) (cellElement.getValue()); - - //alex:SelectCount - int selectCountSelectIndex = this.rsComboBox.getSelectedIndex(); - if (selectCountSelectIndex == 0) { - dSColumn.setSelectCount(null); - } else { - SelectCount selectCount = new SelectCount(); - dSColumn.setSelectCount(selectCount); - selectCount.setType(selectCountSelectIndex); - if (selectCountSelectIndex == SelectCount.TOP) { - selectCount.setFormulaCount(this.topFormulaPane.getFormulaText()); - } else if (selectCountSelectIndex == SelectCount.BOTTOM) { - selectCount.setFormulaCount(this.bottomFormulaPane.getFormulaText()); - } else if (selectCountSelectIndex == SelectCount.SPECIFY) { - selectCount.setSerial(this.serialTextField.getText()); - } - } - } - - private JFormattedTextField getTextField(JSpinner spinner) { - JComponent editor = spinner.getEditor(); - if (editor instanceof JSpinner.DefaultEditor) { - return ((JSpinner.DefaultEditor) editor).getTextField(); - } else { - System.err.println("Unexpected editor type: " - + spinner.getEditor().getClass() - + " isn't a descendant of DefaultEditor"); - return null; - } - } - } - - /** - * 单元格元素>数据集>高级设置>公式输入框 - * - * @see DSColumnAdvancedPane.JFormulaField - */ - private static class JFormulaField extends JPanel { - private CellElement cellElement; - private UITextField formulaTextField; - private String defaultValue; - - public JFormulaField(String defaultValue) { - double p = TableLayout.PREFERRED; - double f = TableLayout.FILL; - double[] columnSize = {f}; - double[] rowSize = {p}; - this.defaultValue = defaultValue; - formulaTextField = new UITextField(); - formulaTextField.setText(defaultValue); - UIButton formulaButton = new UIButton(IOUtils.readIcon("/com/fr/design/images/m_insert/formula.png")); - formulaButton.setToolTipText(Inter.getLocText("Formula") + "..."); - formulaButton.setPreferredSize(new Dimension(24, formulaTextField.getPreferredSize().height)); - formulaButton.addActionListener(formulaButtonActionListener); - Component[] buttonComponent = new Component[]{ - formulaButton - }; - JPanel pane = new JPanel(new BorderLayout(0, 0)); - pane.add(formulaTextField, BorderLayout.CENTER); - pane.add(GUICoreUtils.createFlowPane(buttonComponent, FlowLayout.LEFT, LayoutConstants.HGAP_LARGE), BorderLayout.EAST); - Component[][] components = new Component[][]{ - new Component[]{pane} - }; - JPanel panel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); - this.setLayout(new BorderLayout()); - this.add(panel, BorderLayout.CENTER); - } - - public void populate(String formulaContent) { - this.formulaTextField.setText(formulaContent); - } - - public void populateElement(CellElement cellElement) { - this.cellElement = cellElement; - } - - public String getFormulaText() { - return this.formulaTextField.getText(); - } - - private ActionListener formulaButtonActionListener = new ActionListener() { - - public void actionPerformed(ActionEvent evt) { - Formula valueFormula = new Formula(); - String text = formulaTextField.getText(); - if (text == null || text.length() <= 0) { - valueFormula.setContent(defaultValue); - } else { - valueFormula.setContent(text); - } - - final UIFormula formulaPane = FormulaFactory.createFormulaPaneWhenReserveFormula(); - - if (cellElement == null) { - return; - } - Object value = cellElement.getValue(); - if (value == null || !(value instanceof DSColumn)) { - return; - } - DSColumn dsColumn = (DSColumn) value; - - String[] displayNames = DesignTableDataManager.getSelectedColumnNames(DesignTableDataManager.getEditingTableDataSource(), dsColumn.getDSName()); - - formulaPane.populate(valueFormula, new CustomVariableResolver(displayNames, true)); - formulaPane.showLargeWindow(SwingUtilities.getWindowAncestor(DSColumnAdvancedEditorPane.JFormulaField.this), new DialogActionAdapter() { - @Override - public void doOk() { - Formula valueFormula = formulaPane.update(); - if (valueFormula.getContent().length() <= 1) { - formulaTextField.setText(defaultValue); - } else { - formulaTextField.setText(valueFormula.getContent().substring(1)); - } - } - }).setVisible(true); - } - }; - } - - /** - * 单元格元素>数据集>高级设置>自定义值显示设置面板 - * - * @see DSColumnAdvancedPane.ValuePane - */ - private static class CustomValuePane extends JPanel { - private JFormulaField formulaField; - - public CustomValuePane() { - double p = TableLayout.PREFERRED, f = TableLayout.FILL; - this.setLayout(FRGUIPaneFactory.createBoxFlowLayout()); - UILabel customValueLabel = new UILabel("显示值"); - formulaField = new JFormulaField("$$$"); - formulaField.setPreferredSize(new Dimension(159, 20)); - this.add(TableLayoutHelper.createTableLayoutPane(new Component[][]{ - {customValueLabel, formulaField}, - }, new double[]{p}, new double[]{p, f}), BorderLayout.CENTER); - } - - public void populate(CellElement cellElement) { - if (cellElement == null) { - return; - } - - Object value = cellElement.getValue(); - if (value == null || !(value instanceof DSColumn)) { - return; - } - DSColumn dSColumn = (DSColumn) value; - - //formula - String valueFormula = dSColumn.getResult(); - if (valueFormula == null) { - valueFormula = "$$$"; - } - formulaField.populateElement(cellElement); - formulaField.populate(valueFormula); - } - - public void update(CellElement cellElement) { - if (cellElement == null) { - return; - } - Object value = cellElement.getValue(); - if (value == null || !(value instanceof DSColumn)) { - return; - } - DSColumn dSColumn = (DSColumn) (cellElement.getValue()); - //formula - dSColumn.setResult(this.formulaField.getFormulaText()); - } - } - -} diff --git a/designer/src/com/fr/design/dscolumn/DSColumnBasicEditorPane.java b/designer/src/com/fr/design/dscolumn/DSColumnBasicEditorPane.java deleted file mode 100644 index b369e66c5..000000000 --- a/designer/src/com/fr/design/dscolumn/DSColumnBasicEditorPane.java +++ /dev/null @@ -1,85 +0,0 @@ -package com.fr.design.dscolumn; - -import com.fr.design.layout.TableLayout; -import com.fr.design.layout.TableLayoutHelper; -import com.fr.design.mainframe.cell.CellEditorPane; -import com.fr.report.cell.TemplateCellElement; - -import javax.swing.*; -import java.awt.*; - -/** - * 单元格元素 数据列 高级设置内容面板 - * - * @author yaoh.wu - * @version 2017年7月25日 - * @since 9.0 - */ -public class DSColumnBasicEditorPane extends CellEditorPane { - - //数据集和数据列 - private SelectedDataColumnPane dataPane; - //数据分组设置 - private ResultSetGroupDockingPane groupPane; - //当前编辑的单元格 - private TemplateCellElement cellElement; - //条件过滤按钮面板 - private JPanel conditionPane; - - public DSColumnBasicEditorPane(TemplateCellElement cellElement, SelectedDataColumnPane dataPane, ResultSetGroupDockingPane groupPane, JPanel conditionPane) { - this.setLayout(new BorderLayout()); - this.cellElement = cellElement; - this.dataPane = dataPane; - this.groupPane = groupPane; - this.conditionPane = conditionPane; - this.add(this.createContentPane(), BorderLayout.CENTER); - this.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 15)); - } - - - @Override - public String getIconPath() { - return "Basic"; - } - - @Override - public String title4PopupWindow() { - return "Basic"; - } - - - @Override - public void update() { - dataPane.update(this.cellElement); - groupPane.update(); - } - - @Override - public void populate(TemplateCellElement cellElement) { - this.cellElement = cellElement; - dataPane.populate(null, cellElement); - groupPane.populate(cellElement); - } - - - /** - * 创建有内容的面板显示信息 - * - * @return content JPanel - */ - private JPanel createContentPane() { - double p = TableLayout.PREFERRED; - double f = TableLayout.FILL; - double[] columnSize = {f}; - double[] rowSize = {p, p, p}; - Component[][] components = new Component[][]{ - //数据集列选择 - new Component[]{this.dataPane}, - //数据分组设置 - new Component[]{this.groupPane}, - //条件过滤 - new Component[]{this.conditionPane} - }; - return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); - } -} diff --git a/designer/src/com/fr/design/mainframe/cell/CellEditorPane.java b/designer/src/com/fr/design/mainframe/cell/CellEditorPane.java index b0f09af43..48b6d8a17 100644 --- a/designer/src/com/fr/design/mainframe/cell/CellEditorPane.java +++ b/designer/src/com/fr/design/mainframe/cell/CellEditorPane.java @@ -1,7 +1,6 @@ package com.fr.design.mainframe.cell; import com.fr.design.dialog.BasicPane; -import com.fr.report.cell.TemplateCellElement; /** * 右侧单元格元素面板抽象类 @@ -24,7 +23,6 @@ public abstract class CellEditorPane extends BasicPane { /** * 更新面板数据 * - * @param cellElement 单元格 */ - public abstract void populate(TemplateCellElement cellElement); + public abstract void populate(); } diff --git a/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java b/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java index 8afe3c691..1e1e9a578 100644 --- a/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java +++ b/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java @@ -1,21 +1,45 @@ package com.fr.quickeditor.cellquick; +import com.fr.base.Formula; import com.fr.design.actions.columnrow.DSColumnConditionAction; -import com.fr.design.dscolumn.DSColumnAdvancedEditorPane; -import com.fr.design.dscolumn.DSColumnBasicEditorPane; +import com.fr.design.constants.LayoutConstants; +import com.fr.design.data.DesignTableDataManager; +import com.fr.design.dialog.DialogActionAdapter; +import com.fr.design.dscolumn.DSColumnAdvancedPane; import com.fr.design.dscolumn.ResultSetGroupDockingPane; import com.fr.design.dscolumn.SelectedDataColumnPane; +import com.fr.design.formula.CustomVariableResolver; +import com.fr.design.formula.FormulaFactory; +import com.fr.design.formula.TinyFormulaPane; +import com.fr.design.formula.UIFormula; import com.fr.design.gui.ibutton.UIButton; +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.UILabel; +import com.fr.design.gui.ispinner.UISpinner; +import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.cell.CellEditorPane; import com.fr.design.utils.gui.GUICoreUtils; +import com.fr.general.IOUtils; +import com.fr.general.Inter; import com.fr.quickeditor.CellQuickEditor; +import com.fr.report.cell.CellElement; +import com.fr.report.cell.TemplateCellElement; +import com.fr.report.cell.cellattr.CellExpandAttr; +import com.fr.report.cell.cellattr.core.group.DSColumn; +import com.fr.report.cell.cellattr.core.group.SelectCount; import javax.swing.*; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; import java.util.ArrayList; @@ -29,75 +53,30 @@ import java.util.ArrayList; */ public class CellDSColumnEditor extends CellQuickEditor { + private static double P = TableLayout.PREFERRED, F = TableLayout.FILL; + + private enum FilterType { + //前N个 后N个 奇数 偶数 自定义 未定义 + TOP, BOTTOM, ODD, EVEN, SPECIFY, UNDEFINE + } + private JPanel dsColumnRegion; private JPanel centerPane; - //数据集列选择组件 - private SelectedDataColumnPane dataPane; - //数据分组设置组件 - private ResultSetGroupDockingPane groupPane; - //过滤条件面板 - private JPanel conditionPane; + // 基本和高级设置 private ArrayList paneList; // 基本和高级设置 卡片布局 private CardLayout card; // 基本和高级设置 容器面板 - private JPanel center; + private JPanel cardContainer; // 卡片布局TAB切换按钮 private UIHeadGroup tabsHeaderIconPane; - // 分组设置监听器 - private ItemListener groupListener = new ItemListener() { - @Override - public void itemStateChanged(ItemEvent e) { - if (e == null) { - //分组-高级-自定义点确定的时候传进来null的e,但是这时候应该触发保存 - groupPane.update(); - fireTargetModified(); - return; - } - if (e.getStateChange() == ItemEvent.DESELECTED) { - if (!isEditing) { - return; - } - groupPane.update(); - fireTargetModified(); - } - } - }; - //数据集列设置监听器 - private ItemListener dataListener = new ItemListener() { - @Override - public void itemStateChanged(ItemEvent e) { - if (e.getStateChange() == ItemEvent.SELECTED) { - if (!isEditing) { - return; - } - dataPane.update(cellElement); - fireTargetModified(); - } - } - }; + private CellDSColumnEditor() { super(); } - /** - * Test Main - * - * @param args 参数 - */ - public static void main(String[] args) { - JFrame jf = new JFrame("test"); - jf.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); - JPanel content = (JPanel) jf.getContentPane(); - content.setLayout(new BorderLayout()); - content.add(new CellDSColumnEditor(), BorderLayout.CENTER); - GUICoreUtils.centerWindow(jf); - jf.setSize(220, 400); - jf.setVisible(true); - } - /** * 创建面板占位 * @@ -109,7 +88,7 @@ public class CellDSColumnEditor extends CellQuickEditor { this.createSwitchTab(); dsColumnRegion = new JPanel(new BorderLayout()); dsColumnRegion.add(tabsHeaderIconPane, BorderLayout.NORTH); - dsColumnRegion.add(center, BorderLayout.CENTER); + dsColumnRegion.add(cardContainer, BorderLayout.CENTER); centerPane = new JPanel(new BorderLayout()); centerPane.add(dsColumnRegion, BorderLayout.CENTER); return centerPane; @@ -121,17 +100,16 @@ public class CellDSColumnEditor extends CellQuickEditor { */ @Override protected void refreshDetails() { - this.createPanes(); this.createSwitchTab(); dsColumnRegion = new JPanel(new BorderLayout()); dsColumnRegion.add(tabsHeaderIconPane, BorderLayout.NORTH); - dsColumnRegion.add(center, BorderLayout.CENTER); + dsColumnRegion.add(cardContainer, BorderLayout.CENTER); //必须removeAll之后再添加;重新再实例化一个centerJPanel,因为对象变了会显示不出来 centerPane.removeAll(); centerPane.add(dsColumnRegion, BorderLayout.CENTER); for (CellEditorPane cellEditorPane : paneList) { - cellEditorPane.populate(cellElement); + cellEditorPane.populate(); } this.validate(); } @@ -153,18 +131,18 @@ public class CellDSColumnEditor extends CellQuickEditor { private void createSwitchTab() { String[] iconArray = new String[paneList.size()]; card = new CardLayout(); - center = new JPanel(card); - center.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); + cardContainer = new JPanel(card); + cardContainer.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); for (int i = 0; i < paneList.size(); i++) { CellEditorPane pane = paneList.get(i); iconArray[i] = pane.getIconPath(); - center.add(pane, pane.title4PopupWindow()); + cardContainer.add(pane, pane.title4PopupWindow()); } tabsHeaderIconPane = new UIHeadGroup(iconArray) { @Override public void tabChanged(int index) { - card.show(center, paneList.get(index).title4PopupWindow()); - paneList.get(index).populate(cellElement); + card.show(cardContainer, paneList.get(index).title4PopupWindow()); + paneList.get(index).populate(); } }; tabsHeaderIconPane.setNeedLeftRightOutLine(false); @@ -176,24 +154,686 @@ public class CellDSColumnEditor extends CellQuickEditor { private void createPanes() { paneList = new ArrayList<>(); /*基本设置面板*/ - this.dataPane = new SelectedDataColumnPane(true, true); - this.groupPane = new ResultSetGroupDockingPane(tc); - double p = TableLayout.PREFERRED, f = TableLayout.FILL; - double[] rowSize = {p}, columnSize = {p, f}; - UILabel uiLabel = new UILabel("filter"); - UIButton uiButton = new UIButton(); - if (tc != null) { - //第一次初始化时tc为空,引发NullPointerException - uiButton = new UIButton(new DSColumnConditionAction(tc)); - } - Component[][] components = new Component[][]{ - new Component[]{uiLabel, uiButton} - }; - this.conditionPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); - dataPane.addListener(dataListener); - groupPane.addListener(groupListener); - paneList.add(new DSColumnBasicEditorPane(cellElement, dataPane, groupPane, conditionPane)); + paneList.add(new DSColumnBasicEditorPane()); /*高级设置面板*/ paneList.add(new DSColumnAdvancedEditorPane()); } + + /** + * 单元格元素 数据列 高级设置内容面板 + * + * @author yaoh.wu + * @version 2017年7月25日 + * @since 9.0 + */ + class DSColumnBasicEditorPane extends CellEditorPane { + + //数据集和数据列 + private SelectedDataColumnPane dataPane; + //数据分组设置 + private ResultSetGroupDockingPane groupPane; + //条件过滤按钮面板 + private JPanel conditionPane; + + // 分组设置监听器 + private ItemListener groupListener = new ItemListener() { + @Override + public void itemStateChanged(ItemEvent e) { + if (e == null) { + //分组-高级-自定义点确定的时候传进来null的e,但是这时候应该触发保存 + groupPane.update(); + fireTargetModified(); + return; + } + if (e.getStateChange() == ItemEvent.DESELECTED) { + groupPane.update(); + fireTargetModified(); + } + } + }; + //数据集列设置监听器 + private ItemListener dataListener = new ItemListener() { + @Override + public void itemStateChanged(ItemEvent e) { + if (e.getStateChange() == ItemEvent.SELECTED) { + dataPane.update(cellElement); + fireTargetModified(); + } + } + }; + + DSColumnBasicEditorPane() { + this.setLayout(new BorderLayout()); + dataPane = new SelectedDataColumnPane(true, true); + groupPane = new ResultSetGroupDockingPane(tc); + dataPane.addListener(dataListener); + groupPane.addListener(groupListener); + + double[] rowSize = {P}, columnSize = {P, F}; + UILabel uiLabel = new UILabel("filter"); + UIButton uiButton = new UIButton(); + if (tc != null) { + //第一次初始化时tc为空,引发NullPointerException + uiButton = new UIButton(new DSColumnConditionAction(tc)); + } + Component[][] components = new Component[][]{ + new Component[]{uiLabel, uiButton} + }; + conditionPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); + + this.add(this.createContentPane(), BorderLayout.CENTER); + this.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 15)); + } + + + @Override + public String getIconPath() { + return "Basic"; + } + + @Override + public String title4PopupWindow() { + return "Basic"; + } + + + @Override + public void update() { + dataPane.update(cellElement); + groupPane.update(); + } + + @Override + public void populate() { + dataPane.populate(null, cellElement); + groupPane.populate(cellElement); + } + + + /** + * 创建有内容的面板显示信息 + * + * @return content JPanel + */ + private JPanel createContentPane() { + + double[] columnSize = {F}; + double[] rowSize = {P, P, P}; + Component[][] components = new Component[][]{ + //数据集列选择 + new Component[]{this.dataPane}, + //数据分组设置 + new Component[]{this.groupPane}, + //条件过滤 + new Component[]{this.conditionPane} + }; + return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); + } + } + + + class DSColumnAdvancedEditorPane extends CellEditorPane { + + private static final String INSET_TEXT = " "; + + //排列顺序 + private ResultSetSortConfigPane sortPane; + //结果集筛选 + private ResultSetFilterConfigPane filterPane; + //自定义值显示 + private CustomValuePane valuePane; + //横向可扩展性 + private UICheckBox horizontalExtendableCheckBox; + //纵向可扩展性 + private UICheckBox verticalExtendableCheckBox; + //补充空白数据 + private UICheckBox useMultiplyNumCheckBox; + //补充空白数据书目输入框 + private UISpinner multiNumSpinner; + + + public DSColumnAdvancedEditorPane() { + this.setLayout(new BorderLayout()); + this.add(this.createContentPane(), BorderLayout.CENTER); + this.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 15)); + } + + + @Override + public String getIconPath() { + return "Advanced"; + } + + @Override + public String title4PopupWindow() { + return "Advanced"; + } + + + @Override + public void update() { + if (cellElement != null) { + sortPane.update(cellElement); + valuePane.update(cellElement); + filterPane.update(cellElement); + CellExpandAttr cellExpandAttr = cellElement.getCellExpandAttr(); + if (cellExpandAttr == null) { + cellExpandAttr = new CellExpandAttr(); + cellElement.setCellExpandAttr(cellExpandAttr); + } + if (horizontalExtendableCheckBox.isSelected()) { + if (verticalExtendableCheckBox.isSelected()) { + cellExpandAttr.setExtendable(CellExpandAttr.Both_EXTENDABLE); + } else { + cellExpandAttr.setExtendable(CellExpandAttr.Horizontal_EXTENDABLE); + } + } else { + if (verticalExtendableCheckBox.isSelected()) { + cellExpandAttr.setExtendable(CellExpandAttr.Vertical_EXTENDABLE); + } else { + cellExpandAttr.setExtendable(CellExpandAttr.None_EXTENDABLE); + } + } + if (this.useMultiplyNumCheckBox.isSelected()) { + cellExpandAttr.setMultipleNumber((int) multiNumSpinner.getValue()); + } else { + cellExpandAttr.setMultipleNumber(-1); + } + } + } + + @Override + public void populate() { + if (cellElement != null) { + sortPane.populate(cellElement); + valuePane.populate(cellElement); + filterPane.populate(cellElement); + CellExpandAttr cellExpandAttr = cellElement.getCellExpandAttr(); + if (cellExpandAttr == null) { + cellExpandAttr = new CellExpandAttr(); + cellElement.setCellExpandAttr(cellExpandAttr); + } + // extendable + switch (cellExpandAttr.getExtendable()) { + case CellExpandAttr.Both_EXTENDABLE: + horizontalExtendableCheckBox.setSelected(true); + verticalExtendableCheckBox.setSelected(true); + break; + case CellExpandAttr.Vertical_EXTENDABLE: + horizontalExtendableCheckBox.setSelected(false); + verticalExtendableCheckBox.setSelected(true); + break; + case CellExpandAttr.Horizontal_EXTENDABLE: + horizontalExtendableCheckBox.setSelected(true); + verticalExtendableCheckBox.setSelected(false); + break; + default: { + horizontalExtendableCheckBox.setSelected(false); + verticalExtendableCheckBox.setSelected(false); + } + } + if (cellExpandAttr.getMultipleNumber() == -1) { + useMultiplyNumCheckBox.setSelected(false); + } else { + useMultiplyNumCheckBox.setSelected(true); + multiNumSpinner.setValue(cellExpandAttr.getMultipleNumber()); + } + this.checkButtonEnabled(); + } + } + + /** + * 创建内容 + */ + + private JPanel createContentPane() { + this.setBorder(BorderFactory.createEmptyBorder(3, 3, 3, 3)); + this.setLayout(FRGUIPaneFactory.createBorderLayout()); + //结果集排序 + + sortPane = new ResultSetSortConfigPane(); + //结果筛选 + + filterPane = new ResultSetFilterConfigPane(); + //自定义值显示 + valuePane = new CustomValuePane(); + //可扩展性 + JPanel extendableDirectionPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); + extendableDirectionPane.add(horizontalExtendableCheckBox = new UICheckBox(Inter.getLocText("ExpandD-Horizontal_Extendable"))); + extendableDirectionPane.add(verticalExtendableCheckBox = new UICheckBox(Inter.getLocText("ExpandD-Vertical_Extendable"))); + + + //补充空白数据 + JPanel multiNumPane = new JPanel(); + + useMultiplyNumCheckBox = new UICheckBox(Inter.getLocText("Column_Multiple")); + multiNumPane.add(useMultiplyNumCheckBox); + multiNumPane.add(new UILabel(INSET_TEXT)); + + multiNumSpinner = new UISpinner(1, 10000, 1, 1); + multiNumPane.add(multiNumSpinner); + + useMultiplyNumCheckBox.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + checkButtonEnabled(); + } + }); + + + double[] rowSize = {P, P, P, P, P, P}; + double[] columnSize = {F}; + + Component[][] components = new Component[][]{ + {sortPane}, + {filterPane}, + {valuePane}, + {extendableDirectionPane}, + {multiNumPane} + }; + return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); + } + + + private void checkButtonEnabled() { + if (useMultiplyNumCheckBox.isSelected()) { + multiNumSpinner.setEnabled(true); + } else { + multiNumSpinner.setEnabled(false); + } + } + + /** + * 单元格元素>数据集>高级设置>结果排序设置面板 + * + * @see com.fr.design.expand.SortExpandAttrPane + * @see DSColumnAdvancedPane.SortPane + */ + protected class ResultSetSortConfigPane extends JPanel { + //单元格 + private CellElement cellElement; + //面板 + private UIButtonGroup sort_type_pane; + private TinyFormulaPane tinyFormulaPane; + private CardLayout cardLayout; + private JPanel centerPane; + + + public ResultSetSortConfigPane() { + this.setLayout(new BorderLayout(0, 0)); + Icon[] iconArray = { + IOUtils.readIcon("/com/fr/design/images/expand/none16x16.png"), + IOUtils.readIcon("/com/fr/design/images/expand/asc.png"), + IOUtils.readIcon("/com/fr/design/images/expand/des.png") + }; + String[] nameArray = {Inter.getLocText("Sort-Original"), Inter.getLocText("Sort-Ascending"), Inter.getLocText("Sort-Descending")}; + sort_type_pane = new UIButtonGroup(iconArray); + sort_type_pane.setAllToolTips(nameArray); + sort_type_pane.setGlobalName(Inter.getLocText("ExpandD-Sort_After_Expand")); + + cardLayout = new CardLayout(); + centerPane = new JPanel(cardLayout); + tinyFormulaPane = new TinyFormulaPane(); + centerPane.add(new JPanel(), "none"); + centerPane.add(tinyFormulaPane, "content"); + //todo 国际化 + UILabel sortLabel = new UILabel("排列顺序"); + sort_type_pane.addChangeListener(new ChangeListener() { + @Override + public void stateChanged(ChangeEvent e) { + boolean noContent = sort_type_pane.getSelectedIndex() == 0; + cardLayout.show(centerPane, noContent ? "none" : "content"); + if (noContent) { + centerPane.setPreferredSize(new Dimension(0, 0)); + } else { + centerPane.setPreferredSize(new Dimension(165, 20)); + } + } + }); + + Component[][] components = new Component[][]{ + new Component[]{sortLabel, sort_type_pane}, + new Component[]{null, centerPane} + }; + + double[] rowSize = {P, P}, columnSize = {P, F}; + this.add(TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize), BorderLayout.CENTER); + } + + + /** + * 刷新面板信息 + * + * @param cellElement 单元格 + */ + public void populate(TemplateCellElement cellElement) { + if (cellElement != null) { + this.cellElement = cellElement; + Object value = cellElement.getValue(); + if (value != null && value instanceof DSColumn) { + DSColumn dSColumn = (DSColumn) value; + int sort = dSColumn.getOrder(); + this.sort_type_pane.setSelectedIndex(sort); + boolean noContent = sort_type_pane.getSelectedIndex() == 0; + cardLayout.show(centerPane, noContent ? "none" : "content"); + if (noContent) { + centerPane.setPreferredSize(new Dimension(0, 0)); + } else { + centerPane.setPreferredSize(new Dimension(165, 20)); + } + String sortFormula = dSColumn.getSortFormula(); + if (sortFormula != null && sortFormula.length() >= 1) { + this.tinyFormulaPane.populateBean(sortFormula); + } + } + } + } + + /** + * 保存面板配置信息 + * + * @param cellElement 单元格 + */ + public void update(CellElement cellElement) { + if (cellElement != null) { + Object value = cellElement.getValue(); + if (value != null && value instanceof DSColumn) { + DSColumn dSColumn = (DSColumn) (cellElement.getValue()); + dSColumn.setOrder(this.sort_type_pane.getSelectedIndex()); + dSColumn.setSortFormula(this.tinyFormulaPane.updateBean()); + } + } + } + } + + /** + * 单元格元素>数据集>高级设置>结果集筛选设置面板 + * + * @see DSColumnAdvancedPane.SelectCountPane + */ + protected class ResultSetFilterConfigPane extends JPanel { + + private CellElement cellElement; + private UIComboBox rsComboBox; + private JPanel setCardPane; + private JPanel tipCardPane; + private UITextField serialTextField; + private JFormulaField topFormulaPane; + private JFormulaField bottomFormulaPane; + + public ResultSetFilterConfigPane() { + + + this.setLayout(FRGUIPaneFactory.createBorderLayout()); + UILabel filterLabel = new UILabel("结果集筛选"); + + //结果集筛选下拉框 + rsComboBox = new UIComboBox(new String[]{ + Inter.getLocText("Undefined"), + Inter.getLocText("BindColumn-Top_N"), + Inter.getLocText("BindColumn-Bottom_N"), + Inter.getLocText("Odd"), + Inter.getLocText("Even"), + Inter.getLocText("Specify") + }); + rsComboBox.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent evt) { + int selectIndex = rsComboBox.getSelectedIndex(); + CardLayout setCardPaneLayout = (CardLayout) setCardPane.getLayout(); + CardLayout tipCardPaneLayout = (CardLayout) tipCardPane.getLayout(); + if (selectIndex == 1) { + setCardPaneLayout.show(setCardPane, FilterType.TOP.name()); + tipCardPaneLayout.show(tipCardPane, FilterType.TOP.name()); + //隐藏tip + } else if (selectIndex == 2) { + setCardPaneLayout.show(setCardPane, FilterType.BOTTOM.name()); + tipCardPaneLayout.show(tipCardPane, FilterType.BOTTOM.name()); + //隐藏tip + } else if (selectIndex == 3) { + setCardPaneLayout.show(setCardPane, FilterType.ODD.name()); + tipCardPaneLayout.show(tipCardPane, FilterType.ODD.name()); + //隐藏set + } else if (selectIndex == 4) { + setCardPaneLayout.show(setCardPane, FilterType.EVEN.name()); + tipCardPaneLayout.show(tipCardPane, FilterType.EVEN.name()); + //隐藏set + } else if (selectIndex == 5) { + setCardPaneLayout.show(setCardPane, FilterType.SPECIFY.name()); + tipCardPaneLayout.show(tipCardPane, FilterType.SPECIFY.name()); + } else { + setCardPaneLayout.show(setCardPane, FilterType.UNDEFINE.name()); + tipCardPaneLayout.show(tipCardPane, FilterType.UNDEFINE.name()); + //隐藏set和tip + } + } + }); + //配置展示CardLayout + setCardPane = FRGUIPaneFactory.createCardLayout_S_Pane(); + //提示信息展示CardLayout + tipCardPane = FRGUIPaneFactory.createCardLayout_S_Pane(); + + //前N个 + topFormulaPane = new DSColumnAdvancedEditorPane.JFormulaField("="); + setCardPane.add(topFormulaPane, FilterType.TOP.name()); + tipCardPane.add(new JPanel(), FilterType.TOP.name()); + + //后N个 + bottomFormulaPane = new DSColumnAdvancedEditorPane.JFormulaField("="); + setCardPane.add(bottomFormulaPane, FilterType.BOTTOM.name()); + tipCardPane.add(new JPanel(), FilterType.BOTTOM.name()); + + //自定义值下方没有提示信息,也没有输入框 + setCardPane.add(new JPanel(), FilterType.UNDEFINE.name()); + tipCardPane.add(new JPanel(), FilterType.UNDEFINE.name()); + + //奇数 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...)")), "ODD"); + + + //偶数 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...)")), "ODD"); + + //输入框占用右半边,提示信息占一行 + 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__"})), "SPECIFY"); + + this.add(TableLayoutHelper.createTableLayoutPane(new Component[][]{ + {filterLabel, rsComboBox}, + {null, setCardPane}, + {tipCardPane, null} + }, new double[]{P, P, P}, new double[]{P, F}), BorderLayout.CENTER); + } + + public void populate(CellElement cellElement) { + if (cellElement != null) { + this.cellElement = cellElement; + Object value = cellElement.getValue(); + if (value != null && value instanceof DSColumn) { + DSColumn dSColumn = (DSColumn) (cellElement.getValue()); + SelectCount selectCount = dSColumn.getSelectCount(); + this.topFormulaPane.populateElement(cellElement); + this.bottomFormulaPane.populateElement(cellElement); + if (selectCount != null) { + int selectCountType = selectCount.getType(); + this.rsComboBox.setSelectedIndex(selectCountType); + switch (selectCountType) { + case SelectCount.TOP: + this.topFormulaPane.populate(selectCount.getFormulaCount()); + break; + case SelectCount.BOTTOM: + this.bottomFormulaPane.populate(selectCount.getFormulaCount()); + break; + case SelectCount.SPECIFY: + this.serialTextField.setText(selectCount.getSerial()); + break; + case SelectCount.EVEN: + break; + case SelectCount.ODD: + break; + default: + } + } + } + } + } + + public void update(CellElement cellElement) { + if (cellElement != null) { + Object value = cellElement.getValue(); + if (value != null && value instanceof DSColumn) { + DSColumn dSColumn = (DSColumn) (cellElement.getValue()); + int selectedFilterIndex = this.rsComboBox.getSelectedIndex(); + if (selectedFilterIndex == 0) { + dSColumn.setSelectCount(null); + } else { + SelectCount selectCount = new SelectCount(); + selectCount.setType(selectedFilterIndex); + dSColumn.setSelectCount(selectCount); + if (selectedFilterIndex == SelectCount.TOP) { + selectCount.setFormulaCount(this.topFormulaPane.getFormulaText()); + } else if (selectedFilterIndex == SelectCount.BOTTOM) { + selectCount.setFormulaCount(this.bottomFormulaPane.getFormulaText()); + } else if (selectedFilterIndex == SelectCount.SPECIFY) { + selectCount.setSerial(this.serialTextField.getText()); + } + } + } + } + } + } + + /** + * 单元格元素>数据集>高级设置>公式输入框 + * + * @see DSColumnAdvancedPane.JFormulaField + */ + private class JFormulaField extends JPanel { + private CellElement cellElement; + private UITextField formulaTextField; + private String defaultValue; + + public JFormulaField(String defaultValue) { + + double[] columnSize = {F}; + double[] rowSize = {P}; + this.defaultValue = defaultValue; + formulaTextField = new UITextField(); + formulaTextField.setText(defaultValue); + UIButton formulaButton = new UIButton(IOUtils.readIcon("/com/fr/design/images/m_insert/formula.png")); + formulaButton.setToolTipText(Inter.getLocText("Formula") + "..."); + formulaButton.setPreferredSize(new Dimension(24, formulaTextField.getPreferredSize().height)); + formulaButton.addActionListener(formulaButtonActionListener); + Component[] buttonComponent = new Component[]{ + formulaButton + }; + JPanel pane = new JPanel(new BorderLayout(0, 0)); + pane.add(formulaTextField, BorderLayout.CENTER); + pane.add(GUICoreUtils.createFlowPane(buttonComponent, FlowLayout.LEFT, LayoutConstants.HGAP_LARGE), BorderLayout.EAST); + Component[][] components = new Component[][]{ + new Component[]{pane} + }; + JPanel panel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); + this.setLayout(new BorderLayout()); + this.add(panel, BorderLayout.CENTER); + } + + public void populate(String formulaContent) { + this.formulaTextField.setText(formulaContent); + } + + public void populateElement(CellElement cellElement) { + this.cellElement = cellElement; + } + + public String getFormulaText() { + return this.formulaTextField.getText(); + } + + private ActionListener formulaButtonActionListener = new ActionListener() { + public void actionPerformed(ActionEvent evt) { + Formula valueFormula = new Formula(); + String text = formulaTextField.getText(); + if (text == null || text.length() <= 0) { + valueFormula.setContent(defaultValue); + } else { + valueFormula.setContent(text); + } + final UIFormula formulaPane = FormulaFactory.createFormulaPaneWhenReserveFormula(); + if (cellElement != null) { + Object value = cellElement.getValue(); + if (value != null && value instanceof DSColumn) { + DSColumn dsColumn = (DSColumn) value; + String[] displayNames = DesignTableDataManager.getSelectedColumnNames(DesignTableDataManager.getEditingTableDataSource(), dsColumn.getDSName()); + formulaPane.populate(valueFormula, new CustomVariableResolver(displayNames, true)); + formulaPane.showLargeWindow(SwingUtilities.getWindowAncestor(DSColumnAdvancedEditorPane.JFormulaField.this), new DialogActionAdapter() { + @Override + public void doOk() { + Formula valueFormula = formulaPane.update(); + if (valueFormula.getContent().length() <= 1) { + formulaTextField.setText(defaultValue); + } else { + formulaTextField.setText(valueFormula.getContent().substring(1)); + } + } + }).setVisible(true); + } + } + } + }; + } + + /** + * 单元格元素>数据集>高级设置>自定义值显示设置面板 + * + * @see DSColumnAdvancedPane.ValuePane + */ + private class CustomValuePane extends JPanel { + private JFormulaField formulaField; + + public CustomValuePane() { + + this.setLayout(FRGUIPaneFactory.createBoxFlowLayout()); + UILabel customValueLabel = new UILabel("显示值"); + formulaField = new JFormulaField("$$$"); + formulaField.setPreferredSize(new Dimension(159, 20)); + this.add(TableLayoutHelper.createTableLayoutPane(new Component[][]{ + {customValueLabel, formulaField}, + }, new double[]{P}, new double[]{P, F}), BorderLayout.CENTER); + } + + public void populate(CellElement cellElement) { + if (cellElement != null) { + Object value = cellElement.getValue(); + if (value != null && value instanceof DSColumn) { + DSColumn dSColumn = (DSColumn) value; + + //formula + String valueFormula = dSColumn.getResult(); + if (valueFormula == null) { + valueFormula = "$$$"; + } + formulaField.populateElement(cellElement); + formulaField.populate(valueFormula); + } + } + } + + public void update(CellElement cellElement) { + if (cellElement != null) { + Object value = cellElement.getValue(); + if (value != null && value instanceof DSColumn) { + DSColumn dSColumn = (DSColumn) (cellElement.getValue()); + dSColumn.setResult(this.formulaField.getFormulaText()); + } + } + } + } + } } \ No newline at end of file From 17ae107b7681415f11b24308d3f5676154adf88f Mon Sep 17 00:00:00 2001 From: "yaoh.wu" Date: Thu, 3 Aug 2017 18:55:12 +0800 Subject: [PATCH 05/30] =?UTF-8?q?REPORT-3348=20=E4=BF=AE=E6=94=B9=E5=90=8E?= =?UTF-8?q?=E8=A7=A6=E5=8F=91=E4=BF=9D=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SelectedConfirmedDataColumnPane.java | 2 +- .../dscolumn/SelectedDataColumnPane.java | 74 +++++++++++-------- .../cellquick/CellDSColumnEditor.java | 4 +- 3 files changed, 46 insertions(+), 34 deletions(-) diff --git a/designer/src/com/fr/design/dscolumn/SelectedConfirmedDataColumnPane.java b/designer/src/com/fr/design/dscolumn/SelectedConfirmedDataColumnPane.java index 4852aaa66..e71f539eb 100644 --- a/designer/src/com/fr/design/dscolumn/SelectedConfirmedDataColumnPane.java +++ b/designer/src/com/fr/design/dscolumn/SelectedConfirmedDataColumnPane.java @@ -14,7 +14,7 @@ import java.util.Iterator; public class SelectedConfirmedDataColumnPane extends SelectedDataColumnPane { public SelectedConfirmedDataColumnPane() { - super(false, false); + super(false); } protected void initTableNameComboBox() { diff --git a/designer/src/com/fr/design/dscolumn/SelectedDataColumnPane.java b/designer/src/com/fr/design/dscolumn/SelectedDataColumnPane.java index 55f94fff7..0790f87db 100644 --- a/designer/src/com/fr/design/dscolumn/SelectedDataColumnPane.java +++ b/designer/src/com/fr/design/dscolumn/SelectedDataColumnPane.java @@ -17,6 +17,7 @@ import com.fr.design.gui.itableeditorpane.UITableEditorPane; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.DesignerContext; +import com.fr.design.mainframe.ElementCasePane; import com.fr.general.Inter; import com.fr.general.data.TableDataColumn; import com.fr.report.cell.CellElement; @@ -54,12 +55,17 @@ public class SelectedDataColumnPane extends BasicPane { private UIButton paramButton; public SelectedDataColumnPane() { - this(true, false); + this(true, false, null); } - public SelectedDataColumnPane(boolean showParameterButton, boolean verticalLayout) { + + public SelectedDataColumnPane(boolean showParameterButton) { + this(showParameterButton, false, null); + } + + public SelectedDataColumnPane(boolean showParameterButton, boolean verticalLayout, ElementCasePane casePane) { if (verticalLayout) { - initComponentVerticalLayout(true); + initComponentVerticalLayout(casePane); } else { initComponent(showParameterButton); } @@ -111,15 +117,11 @@ public class SelectedDataColumnPane extends BasicPane { /** - * 初始化组件 - * - * @param showParameterButton 是否显示参数按钮 + * 初始化竖直布局的组件 */ - public void initComponentVerticalLayout(boolean showParameterButton) { + public void initComponentVerticalLayout(ElementCasePane casePane) { initTableNameComboBox(); - if (showParameterButton) { - initWithParameterButton(); - } + initWithParameterButton(casePane); columnNameComboBox = new LazyComboBox() { @Override public Object[] load() { @@ -132,27 +134,17 @@ public class SelectedDataColumnPane extends BasicPane { double p = TableLayout.PREFERRED; UILabel label1 = new UILabel(Inter.getLocText("TableData")); UILabel label3 = new UILabel(Inter.getLocText("DataColumn")); - if (showParameterButton) { - //todo 国际化 - UILabel label2 = new UILabel("param"); - Component[][] components = { - {label1, tableNameComboBox}, - {label2, paramButton}, - {label3, columnNameComboBox} - }; - this.setLayout(new BorderLayout()); - this.add(TableLayoutHelper.createTableLayoutPane(components, new double[]{p, p, p}, new double[]{p, f})); - } else { - double[] columnSize = {p, f}; - double[] rowSize = {p, p}; - Component[][] components = new Component[][]{ - new Component[]{label1, tableNameComboBox}, - new Component[]{label3, columnNameComboBox} - }; - JPanel jPanel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); - this.setLayout(new BorderLayout()); - this.add(jPanel, BorderLayout.CENTER); - } + + //todo 国际化 + UILabel label2 = new UILabel("param"); + Component[][] components = { + {label1, tableNameComboBox}, + {label2, paramButton}, + {label3, columnNameComboBox} + }; + this.setLayout(new BorderLayout()); + this.add(TableLayoutHelper.createTableLayoutPane(components, new double[]{p, p, p}, new double[]{p, f})); + } @@ -286,6 +278,26 @@ public class SelectedDataColumnPane extends BasicPane { }); } + private void initWithParameterButton(ElementCasePane casePane) { + editorPane = new UITableEditorPane(new ParameterTableModel()); + paramButton = new UIButton(Inter.getLocText("TableData_Dynamic_Parameter_Setting")); + paramButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + BasicDialog paramDialog = editorPane.showSmallWindow(DesignerContext.getDesignerFrame(), new DialogActionAdapter() { + @Override + public void doOk() { + List parameterList = editorPane.update(); + ps = parameterList.toArray(new Parameter[parameterList.size()]); + editorPane.update(); + casePane.fireTargetModified(); + } + }); + editorPane.populate(ps == null ? new Parameter[0] : ps); + paramDialog.setVisible(true); + } + }); + } + private boolean isColumnName(String columnExp) { return StringUtils.isNotBlank(columnExp) && (columnExp.length() > 0 && columnExp.charAt(0) == '#') && !columnExp.endsWith("#"); diff --git a/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java b/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java index 1e1e9a578..156f9521b 100644 --- a/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java +++ b/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java @@ -53,7 +53,7 @@ import java.util.ArrayList; */ public class CellDSColumnEditor extends CellQuickEditor { - private static double P = TableLayout.PREFERRED, F = TableLayout.FILL; + private static final double P = TableLayout.PREFERRED, F = TableLayout.FILL; private enum FilterType { //前N个 后N个 奇数 偶数 自定义 未定义 @@ -204,7 +204,7 @@ public class CellDSColumnEditor extends CellQuickEditor { DSColumnBasicEditorPane() { this.setLayout(new BorderLayout()); - dataPane = new SelectedDataColumnPane(true, true); + dataPane = new SelectedDataColumnPane(true, true, tc); groupPane = new ResultSetGroupDockingPane(tc); dataPane.addListener(dataListener); groupPane.addListener(groupListener); From cbda2836a45f32576c6c17007e3806dd28970502 Mon Sep 17 00:00:00 2001 From: "yaoh.wu" Date: Sun, 6 Aug 2017 13:39:24 +0800 Subject: [PATCH 06/30] =?UTF-8?q?=E5=9B=9E=E9=80=80=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/utils/DesignUtils.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/designer_base/src/com/fr/design/utils/DesignUtils.java b/designer_base/src/com/fr/design/utils/DesignUtils.java index 664dd9ae0..9dc0399d5 100644 --- a/designer_base/src/com/fr/design/utils/DesignUtils.java +++ b/designer_base/src/com/fr/design/utils/DesignUtils.java @@ -52,8 +52,7 @@ public class DesignUtils { public static boolean isStarted() { try { new Socket("localhost", port); -// return true; - return false; + return true; } catch (Exception exp) { } From 28a41ef8af3183cede6d4fd834fac9250d983ac2 Mon Sep 17 00:00:00 2001 From: MoMeak Date: Mon, 7 Aug 2017 11:49:02 +0800 Subject: [PATCH 07/30] =?UTF-8?q?REPORT-2897=209.0=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E4=BF=AE=E6=94=B9=20=E8=A7=86=E8=A7=89=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/widget/ui/NumberEditorDefinePane.java | 15 ++++++++++----- .../fr/design/widget/ui/WaterMarkDictPane.java | 2 +- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/designer/src/com/fr/design/widget/ui/NumberEditorDefinePane.java b/designer/src/com/fr/design/widget/ui/NumberEditorDefinePane.java index 86a8bf50f..13be4c8b5 100644 --- a/designer/src/com/fr/design/widget/ui/NumberEditorDefinePane.java +++ b/designer/src/com/fr/design/widget/ui/NumberEditorDefinePane.java @@ -8,6 +8,8 @@ import javax.swing.BorderFactory; import javax.swing.JComponent; import javax.swing.JFormattedTextField; +import com.fr.design.constants.LayoutConstants; +import com.fr.design.constants.UIConstants; import com.fr.design.gui.ilable.UILabel; import javax.swing.JPanel; @@ -166,12 +168,12 @@ public class NumberEditorDefinePane extends FieldEditorDefinePane public JPanel setValidatePane() { - this.allowDecimalsCheckBox = new UICheckBox(Inter.getLocText("Allow_Decimals")); + this.allowDecimalsCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Allow_Decimals")); this.decimalLength = new com.fr.design.editor.editor.IntegerEditor(); - this.decimalLength.setColumns(4); + this.decimalLength.setColumns(10); this.allowDecimalsCheckBox.addActionListener(actionListener1); - this.allowNegativeCheckBox = new UICheckBox(Inter.getLocText("Allow_Negative")); + this.allowNegativeCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Allow_Negative")); this.allowNegativeCheckBox.addActionListener(actionListener2); this.setMaxValueCheckBox = new UICheckBox(Inter.getLocText("Need_Max_Value"), false); @@ -191,12 +193,14 @@ public class NumberEditorDefinePane extends FieldEditorDefinePane this.setMinValueCheckBox.addActionListener(actionListener4); this.minValueSpinner.addChangeListener(changeListener2); + UILabel numberLabel = new UILabel(Inter.getLocText(new String[]{"FR-Designer_Double", "Numbers"})); + numberLabel.setBorder(BorderFactory.createEmptyBorder(0,12,0,0)); double f = TableLayout.FILL; double p = TableLayout.PREFERRED; Component[][] components = new Component[][]{ new Component[]{allowDecimalsCheckBox, null }, - new Component[]{new UILabel(Inter.getLocText(new String[]{"Double", "Numbers"})), decimalLength }, + new Component[]{numberLabel, decimalLength }, new Component[]{allowNegativeCheckBox, null}, new Component[]{setMaxValueCheckBox, maxValueSpinner}, new Component[]{setMinValueCheckBox, minValueSpinner}, @@ -204,7 +208,8 @@ public class NumberEditorDefinePane extends FieldEditorDefinePane double[] rowSize = {p, p, p, p, p}; double[] columnSize = {p,f}; int[][] rowCount = {{1, 1},{1, 1},{1, 1},{1, 1},{1, 1}}; - JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, 10, 1); + JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_MEDIUM, 1); + panel.setBorder(BorderFactory.createEmptyBorder(0,1,0,0)); return panel; } diff --git a/designer/src/com/fr/design/widget/ui/WaterMarkDictPane.java b/designer/src/com/fr/design/widget/ui/WaterMarkDictPane.java index e95d5cee1..85d088d13 100644 --- a/designer/src/com/fr/design/widget/ui/WaterMarkDictPane.java +++ b/designer/src/com/fr/design/widget/ui/WaterMarkDictPane.java @@ -39,7 +39,7 @@ public class WaterMarkDictPane extends JPanel { int[][] rowCount = {{1, 1}}; JPanel panel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); // JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_LARGE, LayoutConstants.VGAP_MEDIUM); - panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 5, 0)); + panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0)); this.add(panel, BorderLayout.CENTER); } From 7289f93467518a39ab84c7c54ca0c25e382fd7ad Mon Sep 17 00:00:00 2001 From: "yaoh.wu" Date: Sun, 6 Aug 2017 15:27:19 +0800 Subject: [PATCH 08/30] =?UTF-8?q?REPORT-3348=20=E5=8A=A8=E6=80=81=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E6=B3=A8=E5=85=A5=E8=A7=A6=E5=8F=91=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=EF=BC=8C=E9=AB=98=E7=BA=A7=E8=AE=BE=E7=BD=AE=E6=8E=92=E5=88=97?= =?UTF-8?q?=E9=A1=BA=E5=BA=8F=E8=A7=A6=E5=8F=91=E4=BF=9D=E5=AD=98,?= =?UTF-8?q?=E7=BB=93=E6=9E=9C=E9=9B=86=E7=AD=9B=E9=80=89=E8=A7=A6=E5=8F=91?= =?UTF-8?q?=E4=BF=9D=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dscolumn/SelectedDataColumnPane.java | 17 +++-- .../cellquick/CellDSColumnEditor.java | 75 ++++++++++++------- 2 files changed, 59 insertions(+), 33 deletions(-) diff --git a/designer/src/com/fr/design/dscolumn/SelectedDataColumnPane.java b/designer/src/com/fr/design/dscolumn/SelectedDataColumnPane.java index 0790f87db..bf2030fb1 100644 --- a/designer/src/com/fr/design/dscolumn/SelectedDataColumnPane.java +++ b/designer/src/com/fr/design/dscolumn/SelectedDataColumnPane.java @@ -55,17 +55,17 @@ public class SelectedDataColumnPane extends BasicPane { private UIButton paramButton; public SelectedDataColumnPane() { - this(true, false, null); + this(true, false, null, null); } public SelectedDataColumnPane(boolean showParameterButton) { - this(showParameterButton, false, null); + this(showParameterButton, false, null, null); } - public SelectedDataColumnPane(boolean showParameterButton, boolean verticalLayout, ElementCasePane casePane) { + public SelectedDataColumnPane(boolean showParameterButton, boolean verticalLayout, ElementCasePane casePane, TemplateCellElement cellElement) { if (verticalLayout) { - initComponentVerticalLayout(casePane); + initComponentVerticalLayout(casePane, cellElement); } else { initComponent(showParameterButton); } @@ -119,9 +119,9 @@ public class SelectedDataColumnPane extends BasicPane { /** * 初始化竖直布局的组件 */ - public void initComponentVerticalLayout(ElementCasePane casePane) { + public void initComponentVerticalLayout(ElementCasePane casePane, TemplateCellElement cellElement) { initTableNameComboBox(); - initWithParameterButton(casePane); + initWithParameterButton(casePane, cellElement); columnNameComboBox = new LazyComboBox() { @Override public Object[] load() { @@ -278,7 +278,8 @@ public class SelectedDataColumnPane extends BasicPane { }); } - private void initWithParameterButton(ElementCasePane casePane) { + private void initWithParameterButton(ElementCasePane casePane, TemplateCellElement cellElement) { + SelectedDataColumnPane that = this; editorPane = new UITableEditorPane(new ParameterTableModel()); paramButton = new UIButton(Inter.getLocText("TableData_Dynamic_Parameter_Setting")); paramButton.addActionListener(new ActionListener() { @@ -288,7 +289,7 @@ public class SelectedDataColumnPane extends BasicPane { public void doOk() { List parameterList = editorPane.update(); ps = parameterList.toArray(new Parameter[parameterList.size()]); - editorPane.update(); + that.update(cellElement); casePane.fireTargetModified(); } }); diff --git a/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java b/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java index 156f9521b..5387290ae 100644 --- a/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java +++ b/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java @@ -8,6 +8,7 @@ import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.dscolumn.DSColumnAdvancedPane; import com.fr.design.dscolumn.ResultSetGroupDockingPane; import com.fr.design.dscolumn.SelectedDataColumnPane; +import com.fr.design.event.UIObserverListener; import com.fr.design.formula.CustomVariableResolver; import com.fr.design.formula.FormulaFactory; import com.fr.design.formula.TinyFormulaPane; @@ -71,7 +72,10 @@ public class CellDSColumnEditor extends CellQuickEditor { private JPanel cardContainer; // 卡片布局TAB切换按钮 private UIHeadGroup tabsHeaderIconPane; - + // 数据列基本设置 + private DSColumnBasicEditorPane cellDSColumnBasicPane; + // 数据列高级设置 + private DSColumnAdvancedEditorPane cellDSColumnAdvancedPane; private CellDSColumnEditor() { super(); @@ -154,9 +158,11 @@ public class CellDSColumnEditor extends CellQuickEditor { private void createPanes() { paneList = new ArrayList<>(); /*基本设置面板*/ - paneList.add(new DSColumnBasicEditorPane()); + cellDSColumnBasicPane = new DSColumnBasicEditorPane(); + paneList.add(cellDSColumnBasicPane); /*高级设置面板*/ - paneList.add(new DSColumnAdvancedEditorPane()); + cellDSColumnAdvancedPane = new DSColumnAdvancedEditorPane(); + paneList.add(cellDSColumnAdvancedPane); } /** @@ -204,7 +210,7 @@ public class CellDSColumnEditor extends CellQuickEditor { DSColumnBasicEditorPane() { this.setLayout(new BorderLayout()); - dataPane = new SelectedDataColumnPane(true, true, tc); + dataPane = new SelectedDataColumnPane(true, true, tc, cellElement); groupPane = new ResultSetGroupDockingPane(tc); dataPane.addListener(dataListener); groupPane.addListener(groupListener); @@ -390,11 +396,29 @@ public class CellDSColumnEditor extends CellQuickEditor { this.setBorder(BorderFactory.createEmptyBorder(3, 3, 3, 3)); this.setLayout(FRGUIPaneFactory.createBorderLayout()); //结果集排序 - sortPane = new ResultSetSortConfigPane(); + sortPane.addListener(new UIObserverListener() { + @Override + public void doChange() { + sortPane.update(cellElement); + fireTargetModified(); + } + }, new ChangeListener() { + @Override + public void stateChanged(ChangeEvent e) { + sortPane.update(cellElement); + fireTargetModified(); + } + }); //结果筛选 - filterPane = new ResultSetFilterConfigPane(); + filterPane.addListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + filterPane.update(cellElement); + fireTargetModified(); + } + }); //自定义值显示 valuePane = new CustomValuePane(); //可扩展性 @@ -402,7 +426,6 @@ public class CellDSColumnEditor extends CellQuickEditor { extendableDirectionPane.add(horizontalExtendableCheckBox = new UICheckBox(Inter.getLocText("ExpandD-Horizontal_Extendable"))); extendableDirectionPane.add(verticalExtendableCheckBox = new UICheckBox(Inter.getLocText("ExpandD-Vertical_Extendable"))); - //补充空白数据 JPanel multiNumPane = new JPanel(); @@ -449,10 +472,8 @@ public class CellDSColumnEditor extends CellQuickEditor { * @see DSColumnAdvancedPane.SortPane */ protected class ResultSetSortConfigPane extends JPanel { - //单元格 - private CellElement cellElement; //面板 - private UIButtonGroup sort_type_pane; + private UIButtonGroup sortTypePane; private TinyFormulaPane tinyFormulaPane; private CardLayout cardLayout; private JPanel centerPane; @@ -466,9 +487,9 @@ public class CellDSColumnEditor extends CellQuickEditor { IOUtils.readIcon("/com/fr/design/images/expand/des.png") }; String[] nameArray = {Inter.getLocText("Sort-Original"), Inter.getLocText("Sort-Ascending"), Inter.getLocText("Sort-Descending")}; - sort_type_pane = new UIButtonGroup(iconArray); - sort_type_pane.setAllToolTips(nameArray); - sort_type_pane.setGlobalName(Inter.getLocText("ExpandD-Sort_After_Expand")); + sortTypePane = new UIButtonGroup(iconArray); + sortTypePane.setAllToolTips(nameArray); + sortTypePane.setGlobalName(Inter.getLocText("ExpandD-Sort_After_Expand")); cardLayout = new CardLayout(); centerPane = new JPanel(cardLayout); @@ -477,10 +498,10 @@ public class CellDSColumnEditor extends CellQuickEditor { centerPane.add(tinyFormulaPane, "content"); //todo 国际化 UILabel sortLabel = new UILabel("排列顺序"); - sort_type_pane.addChangeListener(new ChangeListener() { + sortTypePane.addChangeListener(new ChangeListener() { @Override public void stateChanged(ChangeEvent e) { - boolean noContent = sort_type_pane.getSelectedIndex() == 0; + boolean noContent = sortTypePane.getSelectedIndex() == 0; cardLayout.show(centerPane, noContent ? "none" : "content"); if (noContent) { centerPane.setPreferredSize(new Dimension(0, 0)); @@ -491,7 +512,7 @@ public class CellDSColumnEditor extends CellQuickEditor { }); Component[][] components = new Component[][]{ - new Component[]{sortLabel, sort_type_pane}, + new Component[]{sortLabel, sortTypePane}, new Component[]{null, centerPane} }; @@ -507,13 +528,12 @@ public class CellDSColumnEditor extends CellQuickEditor { */ public void populate(TemplateCellElement cellElement) { if (cellElement != null) { - this.cellElement = cellElement; Object value = cellElement.getValue(); if (value != null && value instanceof DSColumn) { DSColumn dSColumn = (DSColumn) value; int sort = dSColumn.getOrder(); - this.sort_type_pane.setSelectedIndex(sort); - boolean noContent = sort_type_pane.getSelectedIndex() == 0; + this.sortTypePane.setSelectedIndex(sort); + boolean noContent = sortTypePane.getSelectedIndex() == 0; cardLayout.show(centerPane, noContent ? "none" : "content"); if (noContent) { centerPane.setPreferredSize(new Dimension(0, 0)); @@ -538,11 +558,16 @@ public class CellDSColumnEditor extends CellQuickEditor { Object value = cellElement.getValue(); if (value != null && value instanceof DSColumn) { DSColumn dSColumn = (DSColumn) (cellElement.getValue()); - dSColumn.setOrder(this.sort_type_pane.getSelectedIndex()); + dSColumn.setOrder(this.sortTypePane.getSelectedIndex()); dSColumn.setSortFormula(this.tinyFormulaPane.updateBean()); } } } + + public void addListener(UIObserverListener formulaChangeListener, ChangeListener changeListener) { + tinyFormulaPane.registerChangeListener(formulaChangeListener); + sortTypePane.addChangeListener(changeListener); + } } /** @@ -552,7 +577,6 @@ public class CellDSColumnEditor extends CellQuickEditor { */ protected class ResultSetFilterConfigPane extends JPanel { - private CellElement cellElement; private UIComboBox rsComboBox; private JPanel setCardPane; private JPanel tipCardPane; @@ -561,11 +585,8 @@ public class CellDSColumnEditor extends CellQuickEditor { private JFormulaField bottomFormulaPane; public ResultSetFilterConfigPane() { - - this.setLayout(FRGUIPaneFactory.createBorderLayout()); UILabel filterLabel = new UILabel("结果集筛选"); - //结果集筛选下拉框 rsComboBox = new UIComboBox(new String[]{ Inter.getLocText("Undefined"), @@ -604,6 +625,7 @@ public class CellDSColumnEditor extends CellQuickEditor { tipCardPaneLayout.show(tipCardPane, FilterType.UNDEFINE.name()); //隐藏set和tip } + } }); //配置展示CardLayout @@ -653,7 +675,6 @@ public class CellDSColumnEditor extends CellQuickEditor { public void populate(CellElement cellElement) { if (cellElement != null) { - this.cellElement = cellElement; Object value = cellElement.getValue(); if (value != null && value instanceof DSColumn) { DSColumn dSColumn = (DSColumn) (cellElement.getValue()); @@ -707,6 +728,10 @@ public class CellDSColumnEditor extends CellQuickEditor { } } } + + public void addListener(ActionListener actionListener) { + rsComboBox.addActionListener(actionListener); + } } /** From 8ccc9e06966bf131d88b5353b91b7bdc4d6e09a8 Mon Sep 17 00:00:00 2001 From: "yaoh.wu" Date: Sun, 6 Aug 2017 16:53:35 +0800 Subject: [PATCH 09/30] =?UTF-8?q?REPORT-3348=20=E7=BB=93=E6=9E=9C=E9=9B=86?= =?UTF-8?q?=E7=AD=9B=E9=80=89=20=E5=85=AC=E5=BC=8F=E8=BE=93=E5=85=A5?= =?UTF-8?q?=E6=A1=86=E8=A7=A6=E5=8F=91=E4=BF=9D=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cellquick/CellDSColumnEditor.java | 71 +++++++++++++------ .../com/fr/design/selection/QuickEditor.java | 70 +++++++++--------- 2 files changed, 86 insertions(+), 55 deletions(-) diff --git a/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java b/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java index 5387290ae..8b4a4d60f 100644 --- a/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java +++ b/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java @@ -398,27 +398,35 @@ public class CellDSColumnEditor extends CellQuickEditor { //结果集排序 sortPane = new ResultSetSortConfigPane(); sortPane.addListener(new UIObserverListener() { - @Override - public void doChange() { - sortPane.update(cellElement); - fireTargetModified(); - } - }, new ChangeListener() { - @Override - public void stateChanged(ChangeEvent e) { - sortPane.update(cellElement); - fireTargetModified(); - } - }); + @Override + public void doChange() { + sortPane.update(cellElement); + fireTargetModified(); + } + }, new ChangeListener() { + @Override + public void stateChanged(ChangeEvent e) { + sortPane.update(cellElement); + fireTargetModified(); + } + } + ); //结果筛选 filterPane = new ResultSetFilterConfigPane(); - filterPane.addListener(new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - filterPane.update(cellElement); - fireTargetModified(); - } - }); + filterPane.addListener(new UIObserverListener() { + @Override + public void doChange() { + filterPane.update(cellElement); + fireTargetModified(); + } + }, new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + filterPane.update(cellElement); + fireTargetModified(); + } + } + ); //自定义值显示 valuePane = new CustomValuePane(); //可扩展性 @@ -564,6 +572,12 @@ public class CellDSColumnEditor extends CellQuickEditor { } } + /** + * 添加事件监听器 + * + * @param formulaChangeListener 公式输入框改动事件监听器 + * @param changeListener 排序类型下拉框改动事件监听器 + */ public void addListener(UIObserverListener formulaChangeListener, ChangeListener changeListener) { tinyFormulaPane.registerChangeListener(formulaChangeListener); sortTypePane.addChangeListener(changeListener); @@ -729,7 +743,15 @@ public class CellDSColumnEditor extends CellQuickEditor { } } - public void addListener(ActionListener actionListener) { + /** + * 添加事件监听器 + * + * @param formulaListener 公式输入框改动事件监听器 + * @param actionListener 筛选类型下拉框改动事件监听器 + */ + public void addListener(UIObserverListener formulaListener, ActionListener actionListener) { + topFormulaPane.addListener(formulaListener); + bottomFormulaPane.addListener(formulaListener); rsComboBox.addActionListener(actionListener); } } @@ -781,6 +803,15 @@ public class CellDSColumnEditor extends CellQuickEditor { return this.formulaTextField.getText(); } + /** + * 添加事件监听器 + * + * @param listener 公式文本输入框改动事件监听器 + */ + public void addListener(UIObserverListener listener) { + this.formulaTextField.registerChangeListener(listener); + } + private ActionListener formulaButtonActionListener = new ActionListener() { public void actionPerformed(ActionEvent evt) { Formula valueFormula = new Formula(); diff --git a/designer_base/src/com/fr/design/selection/QuickEditor.java b/designer_base/src/com/fr/design/selection/QuickEditor.java index 1d46af929..d2e74da5c 100644 --- a/designer_base/src/com/fr/design/selection/QuickEditor.java +++ b/designer_base/src/com/fr/design/selection/QuickEditor.java @@ -1,61 +1,61 @@ package com.fr.design.selection; -import javax.swing.JComponent; - import com.fr.design.designer.TargetComponent; +import javax.swing.*; + /** * 快速编辑区域 - * + * * @author zhou * @since 2012-7-12下午2:48:20 */ @SuppressWarnings("rawtypes") public abstract class QuickEditor extends JComponent { - private static final long serialVersionUID = 5434472104640676832L; + private static final long serialVersionUID = 5434472104640676832L; - protected T tc; + protected T tc; - protected boolean isEditing = false; + protected boolean isEditing = false; - public QuickEditor() { + public QuickEditor() { - } + } - public void populate(T tc) { - isEditing = false; - this.tc = tc; - refresh(); - isEditing = true; - } + public void populate(T tc) { + isEditing = false; + this.tc = tc; + refresh(); + isEditing = true; + } - /** - * 触发保存一定要用这个 - */ - protected void fireTargetModified() { - if(!isEditing) { - return; - } - tc.fireTargetModified(); - } + /** + * 触发保存一定要用这个 + */ + protected void fireTargetModified() { + if (!isEditing) { + return; + } + tc.fireTargetModified(); + } - protected abstract void refresh(); + protected abstract void refresh(); - /** - * for 关闭时候释放 - */ - public void release () { - tc = null; - } + /** + * for 关闭时候释放 + */ + public void release() { + tc = null; + } - public static QuickEditor DEFAULT_EDITOR = new QuickEditor() { + public static QuickEditor DEFAULT_EDITOR = new QuickEditor() { - @Override - protected void refresh() { + @Override + protected void refresh() { - } + } - }; + }; } \ No newline at end of file From fb6f0d20c472f1c094002814d821eb2fdd2ebdf3 Mon Sep 17 00:00:00 2001 From: "yaoh.wu" Date: Sun, 6 Aug 2017 17:04:22 +0800 Subject: [PATCH 10/30] =?UTF-8?q?REPORT-3348=20=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E5=80=BC=E5=85=AC=E5=BC=8F=E8=BE=93=E5=85=A5=E6=A1=86=E8=A7=A6?= =?UTF-8?q?=E5=8F=91=E4=BF=9D=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cellquick/CellDSColumnEditor.java | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java b/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java index 8b4a4d60f..af1ef68ed 100644 --- a/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java +++ b/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java @@ -429,6 +429,14 @@ public class CellDSColumnEditor extends CellQuickEditor { ); //自定义值显示 valuePane = new CustomValuePane(); + valuePane.addListener(new UIObserverListener() { + @Override + public void doChange() { + valuePane.update(cellElement); + fireTargetModified(); + } + }); + //可扩展性 JPanel extendableDirectionPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); extendableDirectionPane.add(horizontalExtendableCheckBox = new UICheckBox(Inter.getLocText("ExpandD-Horizontal_Extendable"))); @@ -854,7 +862,6 @@ public class CellDSColumnEditor extends CellQuickEditor { private JFormulaField formulaField; public CustomValuePane() { - this.setLayout(FRGUIPaneFactory.createBoxFlowLayout()); UILabel customValueLabel = new UILabel("显示值"); formulaField = new JFormulaField("$$$"); @@ -890,6 +897,15 @@ public class CellDSColumnEditor extends CellQuickEditor { } } } + + /** + * 添加事件监听器 + * + * @param formulaListener 公式输入框改动事件监听器 + */ + public void addListener(UIObserverListener formulaListener) { + this.formulaField.addListener(formulaListener); + } } } } \ No newline at end of file From 2e96d8303c3e77aaf0203c22fb09ca66ddd7b5b1 Mon Sep 17 00:00:00 2001 From: "yaoh.wu" Date: Sun, 6 Aug 2017 17:53:19 +0800 Subject: [PATCH 11/30] =?UTF-8?q?REPORT-3348=20=E5=8F=AF=E6=89=A9=E5=B1=95?= =?UTF-8?q?=E6=80=A7=E8=A7=A6=E5=8F=91=E4=BF=9D=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cellquick/CellDSColumnEditor.java | 140 ++++++++++++------ 1 file changed, 91 insertions(+), 49 deletions(-) diff --git a/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java b/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java index af1ef68ed..887f5f9e6 100644 --- a/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java +++ b/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java @@ -165,6 +165,7 @@ public class CellDSColumnEditor extends CellQuickEditor { paneList.add(cellDSColumnAdvancedPane); } + /** * 单元格元素 数据列 高级设置内容面板 * @@ -289,9 +290,9 @@ public class CellDSColumnEditor extends CellQuickEditor { //自定义值显示 private CustomValuePane valuePane; //横向可扩展性 - private UICheckBox horizontalExtendableCheckBox; + private UICheckBox heCheckBox; //纵向可扩展性 - private UICheckBox verticalExtendableCheckBox; + private UICheckBox veCheckBox; //补充空白数据 private UICheckBox useMultiplyNumCheckBox; //补充空白数据书目输入框 @@ -322,32 +323,15 @@ public class CellDSColumnEditor extends CellQuickEditor { sortPane.update(cellElement); valuePane.update(cellElement); filterPane.update(cellElement); - CellExpandAttr cellExpandAttr = cellElement.getCellExpandAttr(); - if (cellExpandAttr == null) { - cellExpandAttr = new CellExpandAttr(); - cellElement.setCellExpandAttr(cellExpandAttr); - } - if (horizontalExtendableCheckBox.isSelected()) { - if (verticalExtendableCheckBox.isSelected()) { - cellExpandAttr.setExtendable(CellExpandAttr.Both_EXTENDABLE); - } else { - cellExpandAttr.setExtendable(CellExpandAttr.Horizontal_EXTENDABLE); - } - } else { - if (verticalExtendableCheckBox.isSelected()) { - cellExpandAttr.setExtendable(CellExpandAttr.Vertical_EXTENDABLE); - } else { - cellExpandAttr.setExtendable(CellExpandAttr.None_EXTENDABLE); - } - } - if (this.useMultiplyNumCheckBox.isSelected()) { - cellExpandAttr.setMultipleNumber((int) multiNumSpinner.getValue()); - } else { - cellExpandAttr.setMultipleNumber(-1); - } + //更新单元格扩展属性 + updateExtendConfig(); + + //更新补充空白设置 + updateMultipleConfig(); } } + @SuppressWarnings("Duplicates") @Override public void populate() { if (cellElement != null) { @@ -362,20 +346,20 @@ public class CellDSColumnEditor extends CellQuickEditor { // extendable switch (cellExpandAttr.getExtendable()) { case CellExpandAttr.Both_EXTENDABLE: - horizontalExtendableCheckBox.setSelected(true); - verticalExtendableCheckBox.setSelected(true); + heCheckBox.setSelected(true); + veCheckBox.setSelected(true); break; case CellExpandAttr.Vertical_EXTENDABLE: - horizontalExtendableCheckBox.setSelected(false); - verticalExtendableCheckBox.setSelected(true); + heCheckBox.setSelected(false); + veCheckBox.setSelected(true); break; case CellExpandAttr.Horizontal_EXTENDABLE: - horizontalExtendableCheckBox.setSelected(true); - verticalExtendableCheckBox.setSelected(false); + heCheckBox.setSelected(true); + veCheckBox.setSelected(false); break; default: { - horizontalExtendableCheckBox.setSelected(false); - verticalExtendableCheckBox.setSelected(false); + heCheckBox.setSelected(false); + veCheckBox.setSelected(false); } } if (cellExpandAttr.getMultipleNumber() == -1) { @@ -388,6 +372,44 @@ public class CellDSColumnEditor extends CellQuickEditor { } } + /** + * 更新单元格扩展属性 + */ + @SuppressWarnings("Duplicates") + private void updateExtendConfig() { + CellExpandAttr cellExpandAttr = cellElement.getCellExpandAttr(); + if (cellExpandAttr == null) { + cellExpandAttr = new CellExpandAttr(); + cellElement.setCellExpandAttr(cellExpandAttr); + } + if (heCheckBox.isSelected()) { + if (veCheckBox.isSelected()) { + cellExpandAttr.setExtendable(CellExpandAttr.Both_EXTENDABLE); + } else { + cellExpandAttr.setExtendable(CellExpandAttr.Horizontal_EXTENDABLE); + } + } else { + if (veCheckBox.isSelected()) { + cellExpandAttr.setExtendable(CellExpandAttr.Vertical_EXTENDABLE); + } else { + cellExpandAttr.setExtendable(CellExpandAttr.None_EXTENDABLE); + } + } + } + + /** + * 更新补充空白处的配置 + */ + private void updateMultipleConfig() { + CellExpandAttr cellExpandAttr = cellElement.getCellExpandAttr(); + if (this.useMultiplyNumCheckBox.isSelected()) { + cellExpandAttr.setMultipleNumber((int) multiNumSpinner.getValue()); + } else { + cellExpandAttr.setMultipleNumber(-1); + } + + } + /** * 创建内容 */ @@ -438,23 +460,43 @@ public class CellDSColumnEditor extends CellQuickEditor { }); //可扩展性 - JPanel extendableDirectionPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); - extendableDirectionPane.add(horizontalExtendableCheckBox = new UICheckBox(Inter.getLocText("ExpandD-Horizontal_Extendable"))); - extendableDirectionPane.add(verticalExtendableCheckBox = new UICheckBox(Inter.getLocText("ExpandD-Vertical_Extendable"))); + JPanel extendableDirectionPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_L_Pane(); + extendableDirectionPane.add(heCheckBox = new UICheckBox(Inter.getLocText("ExpandD-Horizontal_Extendable"))); + extendableDirectionPane.add(veCheckBox = new UICheckBox(Inter.getLocText("ExpandD-Vertical_Extendable"))); + heCheckBox.addChangeListener(new ChangeListener() { + @Override + public void stateChanged(ChangeEvent e) { + cellDSColumnAdvancedPane.updateExtendConfig(); + fireTargetModified(); + } + }); + veCheckBox.addChangeListener(new ChangeListener() { + @Override + public void stateChanged(ChangeEvent e) { + cellDSColumnAdvancedPane.updateExtendConfig(); + fireTargetModified(); + } + }); //补充空白数据 - JPanel multiNumPane = new JPanel(); - + JPanel multiNumPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_L_Pane(); useMultiplyNumCheckBox = new UICheckBox(Inter.getLocText("Column_Multiple")); multiNumPane.add(useMultiplyNumCheckBox); multiNumPane.add(new UILabel(INSET_TEXT)); - multiNumSpinner = new UISpinner(1, 10000, 1, 1); multiNumPane.add(multiNumSpinner); - useMultiplyNumCheckBox.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { checkButtonEnabled(); + cellDSColumnAdvancedPane.updateMultipleConfig(); + fireTargetModified(); + } + }); + multiNumSpinner.addChangeListener(new ChangeListener() { + @Override + public void stateChanged(ChangeEvent e) { + cellDSColumnAdvancedPane.updateMultipleConfig(); + fireTargetModified(); } }); @@ -487,7 +529,7 @@ public class CellDSColumnEditor extends CellQuickEditor { * @see com.fr.design.expand.SortExpandAttrPane * @see DSColumnAdvancedPane.SortPane */ - protected class ResultSetSortConfigPane extends JPanel { + public class ResultSetSortConfigPane extends JPanel { //面板 private UIButtonGroup sortTypePane; private TinyFormulaPane tinyFormulaPane; @@ -597,7 +639,7 @@ public class CellDSColumnEditor extends CellQuickEditor { * * @see DSColumnAdvancedPane.SelectCountPane */ - protected class ResultSetFilterConfigPane extends JPanel { + public class ResultSetFilterConfigPane extends JPanel { private UIComboBox rsComboBox; private JPanel setCardPane; @@ -626,26 +668,26 @@ public class CellDSColumnEditor extends CellQuickEditor { if (selectIndex == 1) { setCardPaneLayout.show(setCardPane, FilterType.TOP.name()); tipCardPaneLayout.show(tipCardPane, FilterType.TOP.name()); - //隐藏tip + //todo 隐藏tip } else if (selectIndex == 2) { setCardPaneLayout.show(setCardPane, FilterType.BOTTOM.name()); tipCardPaneLayout.show(tipCardPane, FilterType.BOTTOM.name()); - //隐藏tip + //todo 隐藏tip } else if (selectIndex == 3) { setCardPaneLayout.show(setCardPane, FilterType.ODD.name()); tipCardPaneLayout.show(tipCardPane, FilterType.ODD.name()); - //隐藏set + //todo 隐藏set } else if (selectIndex == 4) { setCardPaneLayout.show(setCardPane, FilterType.EVEN.name()); tipCardPaneLayout.show(tipCardPane, FilterType.EVEN.name()); - //隐藏set + //todo 隐藏set } else if (selectIndex == 5) { setCardPaneLayout.show(setCardPane, FilterType.SPECIFY.name()); tipCardPaneLayout.show(tipCardPane, FilterType.SPECIFY.name()); } else { setCardPaneLayout.show(setCardPane, FilterType.UNDEFINE.name()); tipCardPaneLayout.show(tipCardPane, FilterType.UNDEFINE.name()); - //隐藏set和tip + //todo 隐藏set和tip } } @@ -769,7 +811,7 @@ public class CellDSColumnEditor extends CellQuickEditor { * * @see DSColumnAdvancedPane.JFormulaField */ - private class JFormulaField extends JPanel { + public class JFormulaField extends JPanel { private CellElement cellElement; private UITextField formulaTextField; private String defaultValue; @@ -858,7 +900,7 @@ public class CellDSColumnEditor extends CellQuickEditor { * * @see DSColumnAdvancedPane.ValuePane */ - private class CustomValuePane extends JPanel { + public class CustomValuePane extends JPanel { private JFormulaField formulaField; public CustomValuePane() { From 35ce0a2ad0b5aae0467f9d3bda369af5b3790957 Mon Sep 17 00:00:00 2001 From: "yaoh.wu" Date: Mon, 7 Aug 2017 10:51:19 +0800 Subject: [PATCH 12/30] =?UTF-8?q?REPORT-3348=20=E5=AF=8C=E6=96=87=E6=9C=AC?= =?UTF-8?q?=EF=BC=8C=E5=9B=BE=E7=89=87=EF=BC=8C=E6=96=9C=E7=BA=BF=EF=BC=8C?= =?UTF-8?q?=E5=AD=90=E6=8A=A5=E8=A1=A8=E9=9D=A2=E6=9D=BF=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=EF=BC=9B=E5=85=AC=E5=BC=8F=EF=BC=8C=E6=96=87=E6=9C=AC=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E5=99=A8=E6=8B=86=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dscolumn/SelectedDataColumnPane.java | 9 +- .../com/fr/design/module/DesignerModule.java | 10 +- .../com/fr/quickeditor/CellQuickEditor.java | 2 +- .../cellquick/CellBiasTextPainterEditor.java | 20 ++- .../cellquick/CellDSColumnEditor.java | 13 +- .../cellquick/CellFormulaQuickEditor.java | 152 ++++++++++++++++++ .../cellquick/CellImageQuickEditor.java | 32 ++-- .../cellquick/CellRichTextEditor.java | 36 ++--- .../cellquick/CellStringQuickEditor.java | 16 +- .../cellquick/CellSubReportEditor.java | 20 ++- .../com/fr/design/locale/designer.properties | 1 + .../design/locale/designer_en_US.properties | 1 + .../design/locale/designer_ja_JP.properties | 1 + .../design/locale/designer_ko_KR.properties | 1 + .../design/locale/designer_zh_CN.properties | 1 + .../design/locale/designer_zh_TW.properties | 1 + 16 files changed, 225 insertions(+), 91 deletions(-) create mode 100644 designer/src/com/fr/quickeditor/cellquick/CellFormulaQuickEditor.java diff --git a/designer/src/com/fr/design/dscolumn/SelectedDataColumnPane.java b/designer/src/com/fr/design/dscolumn/SelectedDataColumnPane.java index bf2030fb1..eb93e083a 100644 --- a/designer/src/com/fr/design/dscolumn/SelectedDataColumnPane.java +++ b/designer/src/com/fr/design/dscolumn/SelectedDataColumnPane.java @@ -132,11 +132,10 @@ public class SelectedDataColumnPane extends BasicPane { columnNameComboBox.setEditable(true); double f = TableLayout.FILL; double p = TableLayout.PREFERRED; - UILabel label1 = new UILabel(Inter.getLocText("TableData")); - UILabel label3 = new UILabel(Inter.getLocText("DataColumn")); - - //todo 国际化 - UILabel label2 = new UILabel("param"); + UILabel label1 = new UILabel(Inter.getLocText("TableData") + " "); + UILabel label2 = new UILabel(Inter.getLocText("FR-Designer_Dynamic_Parameter")); + UILabel label3 = new UILabel(Inter.getLocText("DataColumn") + " "); + tableNameComboBox.setPreferredSize(new Dimension(163, 20)); Component[][] components = { {label1, tableNameComboBox}, {label2, paramButton}, diff --git a/designer/src/com/fr/design/module/DesignerModule.java b/designer/src/com/fr/design/module/DesignerModule.java index 12ada2f02..bf96db2af 100644 --- a/designer/src/com/fr/design/module/DesignerModule.java +++ b/designer/src/com/fr/design/module/DesignerModule.java @@ -111,7 +111,7 @@ public class DesignerModule extends DesignModule { private void registerCellEditor() { ActionFactory.registerCellEditor(String.class, CellStringQuickEditor.class); ActionFactory.registerCellEditor(Number.class, CellStringQuickEditor.class); - ActionFactory.registerCellEditor(Formula.class, CellStringQuickEditor.class); + ActionFactory.registerCellEditor(Formula.class, CellFormulaQuickEditor.class); ActionFactory.registerCellEditor(SubReport.class, CellSubReportEditor.class); ActionFactory.registerCellEditor(RichText.class, CellRichTextEditor.class); ActionFactory.registerCellEditor(DSColumn.class, CellDSColumnEditor.class); @@ -212,7 +212,7 @@ public class DesignerModule extends DesignModule { } }); } - + private static abstract class AbstractWorkBookApp implements App { @Override @@ -234,10 +234,10 @@ public class DesignerModule extends DesignModule { public void process() { } - + @Override public void undo() { - + } } @@ -385,7 +385,7 @@ public class DesignerModule extends DesignModule { } public Class[] actionsForInsertCellElement() { - return (Class[])ArrayUtils.addAll(new Class[]{ + return (Class[]) ArrayUtils.addAll(new Class[]{ DSColumnCellAction.class, GeneralCellAction.class, RichTextCellAction.class, diff --git a/designer/src/com/fr/quickeditor/CellQuickEditor.java b/designer/src/com/fr/quickeditor/CellQuickEditor.java index 730a1577d..1688c1b01 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 { double[] columnSize = {p, f}; double[] rowSize = {p, p}; Component[][] components = new Component[][]{ - new Component[]{new UILabel(" " + Inter.getLocText("Cell")), columnRowTextField = initColumnRowTextField()}, + new Component[]{new UILabel(Inter.getLocText("Cell") + " "), columnRowTextField = initColumnRowTextField()}, new Component[]{new UILabel(Inter.getLocText("HF-Insert_Content") + " "), cellElementEditButton = initCellElementEditButton()}, }; JPanel topContent = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); diff --git a/designer/src/com/fr/quickeditor/cellquick/CellBiasTextPainterEditor.java b/designer/src/com/fr/quickeditor/cellquick/CellBiasTextPainterEditor.java index fcb36c8cb..ad0b3f3f2 100644 --- a/designer/src/com/fr/quickeditor/cellquick/CellBiasTextPainterEditor.java +++ b/designer/src/com/fr/quickeditor/cellquick/CellBiasTextPainterEditor.java @@ -1,39 +1,39 @@ package com.fr.quickeditor.cellquick; -import com.fr.base.BaseUtils; import com.fr.design.cell.editor.BiasTextPainterCellEditor.BiasTextPainterPane; import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.mainframe.DesignerContext; import com.fr.general.ComparatorUtils; +import com.fr.general.IOUtils; import com.fr.general.Inter; import com.fr.quickeditor.CellQuickEditor; import com.fr.report.cell.painter.BiasTextPainter; import javax.swing.*; +import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; /** * 单元格元素斜线编辑器 - * TODO 9.0 大体没有改动 */ public class CellBiasTextPainterEditor extends CellQuickEditor { @Override public JComponent createCenterBody() { - UIButton editbutton = new UIButton(Inter.getLocText("Edit"), BaseUtils.readIcon("/com/fr/design/images/m_insert/bias.png")); - editbutton.addActionListener(new ActionListener() { - + JPanel content = new JPanel(new BorderLayout()); + content.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 15)); + UIButton editButton = new UIButton(Inter.getLocText("Edit"), IOUtils.readIcon("/com/fr/design/images/m_insert/bias.png")); + editButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { showEditingDialog(); } }); - editbutton.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0)); - editbutton.setMargin(null); - editbutton.setOpaque(false); - return editbutton; + editButton.setOpaque(false); + content.add(editButton, BorderLayout.CENTER); + return content; } private void showEditingDialog() { @@ -56,8 +56,6 @@ public class CellBiasTextPainterEditor extends CellQuickEditor { @Override protected void refreshDetails() { - // TODO Auto-generated method stub - } } \ No newline at end of file diff --git a/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java b/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java index 887f5f9e6..a9fcebdfa 100644 --- a/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java +++ b/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java @@ -217,7 +217,7 @@ public class CellDSColumnEditor extends CellQuickEditor { groupPane.addListener(groupListener); double[] rowSize = {P}, columnSize = {P, F}; - UILabel uiLabel = new UILabel("filter"); + UILabel uiLabel = new UILabel(Inter.getLocText("FR-Designer_Filter_Conditions")); UIButton uiButton = new UIButton(); if (tc != null) { //第一次初始化时tc为空,引发NullPointerException @@ -235,12 +235,12 @@ public class CellDSColumnEditor extends CellQuickEditor { @Override public String getIconPath() { - return "Basic"; + return Inter.getLocText("FR-Designer_Basic"); } @Override public String title4PopupWindow() { - return "Basic"; + return Inter.getLocText("FR-Designer_Basic"); } @@ -308,12 +308,12 @@ public class CellDSColumnEditor extends CellQuickEditor { @Override public String getIconPath() { - return "Advanced"; + return Inter.getLocText("FR-Designer_Advanced"); } @Override public String title4PopupWindow() { - return "Advanced"; + return Inter.getLocText("FR-Designer_Advanced"); } @@ -554,8 +554,7 @@ public class CellDSColumnEditor extends CellQuickEditor { tinyFormulaPane = new TinyFormulaPane(); centerPane.add(new JPanel(), "none"); centerPane.add(tinyFormulaPane, "content"); - //todo 国际化 - UILabel sortLabel = new UILabel("排列顺序"); + UILabel sortLabel = new UILabel(Inter.getLocText("Sort-Sort_Order")); sortTypePane.addChangeListener(new ChangeListener() { @Override public void stateChanged(ChangeEvent e) { diff --git a/designer/src/com/fr/quickeditor/cellquick/CellFormulaQuickEditor.java b/designer/src/com/fr/quickeditor/cellquick/CellFormulaQuickEditor.java new file mode 100644 index 000000000..07e2367ea --- /dev/null +++ b/designer/src/com/fr/quickeditor/cellquick/CellFormulaQuickEditor.java @@ -0,0 +1,152 @@ +package com.fr.quickeditor.cellquick; + +import com.fr.base.Formula; +import com.fr.base.Style; +import com.fr.base.TextFormat; +import com.fr.design.gui.itextfield.UITextField; +import com.fr.grid.selection.CellSelection; +import com.fr.quickeditor.CellQuickEditor; +import com.fr.report.ReportHelper; +import com.fr.report.cell.DefaultTemplateCellElement; +import com.fr.stable.ColumnRow; +import com.fr.stable.StringUtils; + +import javax.swing.*; +import javax.swing.event.DocumentEvent; +import javax.swing.event.DocumentListener; +import java.awt.*; +import java.awt.event.KeyAdapter; +import java.awt.event.KeyEvent; + +/** + * 公式快速编辑面板,同文本数字编辑拆分 + * + * @author yaoh.wu + * @version 2017年8月7日10点44分 + * @since 9.0 + */ +public class CellFormulaQuickEditor extends CellQuickEditor { + //文本域 + private UITextField stringTextField; + //编辑状态 + private boolean isEditing = false; + + //编辑的是公式,要保留公式里的这些属性,不然在公式和字符串转化时,就会丢失这些属性设置。 + private boolean reserveInResult = false; + private boolean reserveOnWriteOrAnaly = true; + + private DocumentListener documentListener = new DocumentListener() { + @Override + public void insertUpdate(DocumentEvent e) { + changeReportPaneCell(stringTextField.getText().trim()); + } + + @Override + public void removeUpdate(DocumentEvent e) { + changeReportPaneCell(stringTextField.getText().trim()); + } + + @Override + public void changedUpdate(DocumentEvent e) { + changeReportPaneCell(stringTextField.getText().trim()); + } + + }; + + private CellFormulaQuickEditor() { + super(); + } + + /** + * 详细信息面板 + */ + @Override + public JComponent createCenterBody() { + JPanel content = new JPanel(new BorderLayout()); + content.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 15)); + stringTextField = new UITextField(); + stringTextField.addKeyListener(new KeyAdapter() { + @Override + public void keyReleased(KeyEvent e) { + if (tc != null) { + tc.getGrid().dispatchEvent(e); + } + } + }); + content.add(stringTextField, BorderLayout.CENTER); + return content; + } + + + private void changeReportPaneCell(String tmpText) { + isEditing = true; + //refresh一下,如果单元格内有新添加的控件,此时并不知道 + CellSelection cs1 = (CellSelection) tc.getSelection(); + ColumnRow columnRow = ColumnRow.valueOf(cs1.getColumn(), cs1.getRow()); + columnRowTextField.setText(columnRow.toString()); + cellElement = tc.getEditingElementCase().getTemplateCellElement(cs1.getColumn(), cs1.getRow()); + + if (cellElement == null) { + CellSelection cs = (CellSelection) tc.getSelection(); + cellElement = new DefaultTemplateCellElement(cs.getColumn(), cs.getRow()); + tc.getEditingElementCase().addCellElement(cellElement, false); + } + if (tmpText != null && (tmpText.length() > 0 && tmpText.charAt(0) == '=')) { + Formula textFormula = new Formula(tmpText); + textFormula.setReserveInResult(reserveInResult); + textFormula.setReserveOnWriteOrAnaly(reserveOnWriteOrAnaly); + cellElement.setValue(textFormula); + } else { + Style style = cellElement.getStyle(); + if (style != null && style.getFormat() != null && style.getFormat() == TextFormat.getInstance()) { + cellElement.setValue(tmpText); + } else { + cellElement.setValue(ReportHelper.convertGeneralStringAccordingToExcel(tmpText)); + } + } + fireTargetModified(); + stringTextField.requestFocus(); + isEditing = false; + } + + /** + * 刷新详细内容 + */ + @Override + protected void refreshDetails() { + String str; + if (cellElement == null) { + str = StringUtils.EMPTY; + } else { + Object value = cellElement.getValue(); + if (value == null) { + str = StringUtils.EMPTY; + } else if (value instanceof Formula) { + Formula formula = (Formula) value; + str = formula.getContent(); + reserveInResult = formula.isReserveInResult(); + reserveOnWriteOrAnaly = formula.isReserveOnWriteOrAnaly(); + } else { + str = value.toString(); + } + } + showText(str); + stringTextField.setEditable(tc.isSelectedOneCell()); + } + + /** + * 显示文本 + * + * @param str 文本 + */ + public void showText(String str) { + // 正在编辑时不处理 + if (isEditing) { + return; + } + stringTextField.getDocument().removeDocumentListener(documentListener); + stringTextField.setText(str); + stringTextField.getDocument().addDocumentListener(documentListener); + } + +} \ No newline at end of file diff --git a/designer/src/com/fr/quickeditor/cellquick/CellImageQuickEditor.java b/designer/src/com/fr/quickeditor/cellquick/CellImageQuickEditor.java index b39514ef6..40de2df79 100644 --- a/designer/src/com/fr/quickeditor/cellquick/CellImageQuickEditor.java +++ b/designer/src/com/fr/quickeditor/cellquick/CellImageQuickEditor.java @@ -1,33 +1,28 @@ package com.fr.quickeditor.cellquick; -import com.fr.base.BaseUtils; import com.fr.base.Style; import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.mainframe.DesignerContext; import com.fr.design.report.SelectImagePane; import com.fr.general.ComparatorUtils; +import com.fr.general.IOUtils; import com.fr.general.Inter; import com.fr.quickeditor.CellQuickEditor; import com.fr.report.cell.cellattr.CellImage; import javax.swing.*; +import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; /** * 单元格元素图片编辑器 - * TODO 9.0大体上没有改动 + * + * @author yaoh.wu + * @version 2017年8月7日10点53分 */ public class CellImageQuickEditor extends CellQuickEditor { - private static CellImageQuickEditor THIS; - - public static final CellImageQuickEditor getInstance() { - if (THIS == null) { - THIS = new CellImageQuickEditor(); - } - return THIS; - } private CellImageQuickEditor() { super(); @@ -35,27 +30,27 @@ public class CellImageQuickEditor extends CellQuickEditor { @Override public JComponent createCenterBody() { - UIButton editbutton = new UIButton(Inter.getLocText("Edit"), BaseUtils.readIcon("/com/fr/design/images/m_insert/image.png")); - editbutton.addActionListener(new ActionListener() { - + JPanel content = new JPanel(new BorderLayout()); + content.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 15)); + UIButton editButton = new UIButton(Inter.getLocText("Edit"), IOUtils.readIcon("/com/fr/design/images/m_insert/image.png")); + editButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { showEditingDialog(); } }); - editbutton.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0)); - editbutton.setMargin(null); - editbutton.setOpaque(false); - return editbutton; + editButton.setOpaque(false); + content.add(editButton, BorderLayout.CENTER); + return content; } + @SuppressWarnings("Duplicates") private void showEditingDialog() { final SelectImagePane imageEditorPane = new SelectImagePane(); imageEditorPane.populate(cellElement); final Object oldValue = cellElement.getValue(); final Style oldStyle = cellElement.getStyle(); imageEditorPane.showWindow(DesignerContext.getDesignerFrame(), new DialogActionAdapter() { - @Override public void doOk() { CellImage cellImage = imageEditorPane.update(); @@ -65,7 +60,6 @@ public class CellImageQuickEditor extends CellQuickEditor { fireTargetModified(); } } - }).setVisible(true); } diff --git a/designer/src/com/fr/quickeditor/cellquick/CellRichTextEditor.java b/designer/src/com/fr/quickeditor/cellquick/CellRichTextEditor.java index 41596ddba..632225107 100644 --- a/designer/src/com/fr/quickeditor/cellquick/CellRichTextEditor.java +++ b/designer/src/com/fr/quickeditor/cellquick/CellRichTextEditor.java @@ -6,45 +6,37 @@ import com.fr.general.Inter; import com.fr.quickeditor.CellQuickEditor; import javax.swing.*; +import java.awt.*; /** * 单元格元素富文本编辑器 - * TODO 9.0 大体上没有改动 + * + * @author yaoh.wu + * @version 2017年8月7日10点53分 */ public class CellRichTextEditor extends CellQuickEditor { - private UIButton subReportButton; - private static CellRichTextEditor THIS; - - public static final CellRichTextEditor getInstance() { - if (THIS == null) { - THIS = new CellRichTextEditor(); - } - return THIS; - } + private UIButton richTextButton; private CellRichTextEditor() { super(); } - /** - * 创建界面上中间的部分 - * - * @return 界面元素 - * @date 2014-12-7-下午9:41:52 - */ + @SuppressWarnings("Duplicates") + @Override public JComponent createCenterBody() { - subReportButton = new UIButton(); - subReportButton.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0)); - subReportButton.setMargin(null); - subReportButton.setOpaque(false); - return subReportButton; + JPanel content = new JPanel(new BorderLayout()); + content.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 15)); + richTextButton = new UIButton(); + richTextButton.setOpaque(false); + content.add(richTextButton, BorderLayout.CENTER); + return content; } @Override protected void refreshDetails() { RichTextCellAction subReportCellAction = new RichTextCellAction(tc); subReportCellAction.setName(Inter.getLocText("FR-Designer_RichTextEditor")); - subReportButton.setAction(subReportCellAction); + richTextButton.setAction(subReportCellAction); } } \ No newline at end of file diff --git a/designer/src/com/fr/quickeditor/cellquick/CellStringQuickEditor.java b/designer/src/com/fr/quickeditor/cellquick/CellStringQuickEditor.java index 01d3c7d6e..96dce177f 100644 --- a/designer/src/com/fr/quickeditor/cellquick/CellStringQuickEditor.java +++ b/designer/src/com/fr/quickeditor/cellquick/CellStringQuickEditor.java @@ -14,6 +14,7 @@ import com.fr.stable.StringUtils; import javax.swing.*; import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentListener; +import java.awt.*; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; @@ -21,20 +22,12 @@ import java.awt.event.KeyEvent; * */ public class CellStringQuickEditor extends CellQuickEditor { - //instance - private static CellStringQuickEditor THIS; //文本域 //TODO 9.0 文本域要根据具体文本数量自适应大小,比较难搞,先跳过。 private UITextField stringTextField; //编辑状态 private boolean isEditing = false; - public static CellStringQuickEditor getInstance() { - if (THIS == null) { - THIS = new CellStringQuickEditor(); - } - return THIS; - } //august:如果是原来编辑的是公式,要保留公式里的这些属性,不然在公式和字符串转化时,就会丢失这些属性设置。 private boolean reserveInResult = false; @@ -64,10 +57,12 @@ public class CellStringQuickEditor extends CellQuickEditor { /** * 详细信息面板 - * todo 文本框可自适应大小,公式编辑也是在这边,如果是公式那么要加一个公式编辑器的触发按钮 + * todo 文本框可自适应大小,公式编辑新写一个 */ @Override public JComponent createCenterBody() { + JPanel content = new JPanel(new BorderLayout()); + content.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 15)); stringTextField = new UITextField(); stringTextField.addKeyListener(new KeyAdapter() { @Override @@ -77,7 +72,8 @@ public class CellStringQuickEditor extends CellQuickEditor { } } }); - return stringTextField; + content.add(stringTextField, 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 de755f1df..5eb3e5586 100644 --- a/designer/src/com/fr/quickeditor/cellquick/CellSubReportEditor.java +++ b/designer/src/com/fr/quickeditor/cellquick/CellSubReportEditor.java @@ -6,33 +6,31 @@ import com.fr.general.Inter; import com.fr.quickeditor.CellQuickEditor; import javax.swing.*; +import java.awt.*; /** * 单元格元素子报表编辑器 - * TODO 9.0大体上没有改动 + * + * @author yaoh.wu + * @version 2017年8月7日10点53分 */ public class CellSubReportEditor extends CellQuickEditor { private UIButton subReportButton; - private static CellSubReportEditor THIS; - public static final CellSubReportEditor getInstance() { - if (THIS == null) { - THIS = new CellSubReportEditor(); - } - return THIS; - } private CellSubReportEditor() { super(); } + @SuppressWarnings("Duplicates") @Override public JComponent createCenterBody() { + JPanel content = new JPanel(new BorderLayout()); + content.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 15)); subReportButton = new UIButton(); - subReportButton.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0)); - subReportButton.setMargin(null); subReportButton.setOpaque(false); - return subReportButton; + content.add(subReportButton, BorderLayout.CENTER); + return content; } @Override diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index 83d7dbc8e..0a3af6483 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -2105,3 +2105,4 @@ FR-Designer_Insert_Text=Insert_Text FR-Designer_Double=Double FR-Designer_Add_Event=Add Event FR-Designer_Not_Support_Authority_Edit=this element does not support authority edit +FR-Designer_Dynamic_Parameter=Dynamic Parameter 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 915b1eac9..b361db79f 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 @@ -2106,3 +2106,4 @@ FR-Designer_Scale_Slider=Scale_Slider FR-Designer_Scale_Grade=Scale_Grade FR-Designer_Add_Event=Add Event FR-Designer_Not_Support_Authority_Edit=this element does not support authority edit +FR-Designer_Dynamic_Parameter=Dynamic Parameter 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 0e6bbf7f3..83c5a3d18 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 @@ -2109,3 +2109,4 @@ FR-Designer_Use_Params_Template= FR-Designer_Label_Name= FR-Designer_Insert_Formula= FR-Designer_Not_Support_Authority_Edit=\u3053\u306E\u8981\u7D20\u306F\u6A29\u9650\u5236\u5FA1\u3092\u30B5\u30DD\u30FC\u30C8\u3057\u3066\u3044\u307E\u305B\u3093 +FR-Designer_Dynamic_Parameter=\ 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 d27bb8fd4..31b1b21a7 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 @@ -2109,3 +2109,4 @@ FR-Designer_Use_Params_Template= FR-Designer_Label_Name= FR-Designer_Add_Event= FR-Designer_Not_Support_Authority_Edit=\uD574\uB2F9\uC694\uC18C\uB294\uAD8C\uD55C\uCEE8\uD2B8\uB864\uC744\uC9C0\uC6D0\uD558\uC9C0\uC54A\uC2B5\uB2C8\uB2E4. +FR-Designer_Dynamic_Parameter=\ 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 8f128d45a..46560c5f8 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 @@ -2112,3 +2112,4 @@ FR-Designer_Scale_Up=\u653E\u5927 FR-Designer_Scale_Slider=\u7F29\u653E\u6ED1\u5757 FR-Designer_Scale_Grade=\u7F29\u653E\u7EA7\u522B\uFF0C\u5355\u51FB\u540E\u8C03\u8282\u663E\u793A\u6BD4\u4F8B\u3002 FR-Designer_Not_Support_Authority_Edit=\u8BE5\u5143\u7D20\u4E0D\u652F\u6301\u6743\u9650\u63A7\u5236 +FR-Designer_Dynamic_Parameter=\u52A8\u6001\u53C2\u6570 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 d52583795..707a909bc 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 @@ -2109,3 +2109,4 @@ FR-Designer_Use_Params_Template= FR-Designer_Label_Name= FR-Designer_Add_Event= FR-Designer_Not_Support_Authority_Edit=\u8A72\u5143\u7D20\u4E0D\u652F\u63F4\u8A31\u53EF\u6B0A\u63A7\u5236 +FR-Designer_Dynamic_Parameter=\u52D5\u614B\u53C3\u6578 From 2150be484188bf3933b651b2c141fa825e25f56d Mon Sep 17 00:00:00 2001 From: hzzz Date: Mon, 7 Aug 2017 15:27:23 +0800 Subject: [PATCH 13/30] hzzzzzzzzzz --- .../ui/DirectWriteEditorDefinePane.java | 2 +- .../widget/ui/TreeEditorDefinePane.java | 10 +- .../design/widget/ui/WaterMarkDictPane.java | 2 +- .../widget/ui/WritableRepeatEditorPane.java | 2 +- .../fr/design/gui/frpane/TreeSettingPane.java | 1 + .../itree/refreshabletree/TreeRootPane.java | 44 +- .../fr/design/layout/FRGUIPaneFactory.java | 926 +++++++++--------- 7 files changed, 520 insertions(+), 467 deletions(-) diff --git a/designer/src/com/fr/design/widget/ui/DirectWriteEditorDefinePane.java b/designer/src/com/fr/design/widget/ui/DirectWriteEditorDefinePane.java index 18ef5d899..43405fa91 100644 --- a/designer/src/com/fr/design/widget/ui/DirectWriteEditorDefinePane.java +++ b/designer/src/com/fr/design/widget/ui/DirectWriteEditorDefinePane.java @@ -22,7 +22,7 @@ public abstract class DirectWriteEditorDefinePane e @Override protected JPanel setFirstContentPane() { JPanel contentPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_L_Pane(); - contentPane.setBorder(BorderFactory.createEmptyBorder(0, 2, 0, 0)); + contentPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); directWriteCheckBox = new UICheckBox(Inter.getLocText("Form-Allow_Edit"), false); directWriteCheckBox.setPreferredSize(new Dimension(100, 30)); diff --git a/designer/src/com/fr/design/widget/ui/TreeEditorDefinePane.java b/designer/src/com/fr/design/widget/ui/TreeEditorDefinePane.java index f68c45ccc..1c0f8967a 100644 --- a/designer/src/com/fr/design/widget/ui/TreeEditorDefinePane.java +++ b/designer/src/com/fr/design/widget/ui/TreeEditorDefinePane.java @@ -5,6 +5,9 @@ import com.fr.design.gui.frpane.TreeSettingPane; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.itree.refreshabletree.TreeRootPane; import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.design.layout.FRLeftFlowLayout; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; import com.fr.form.ui.TreeEditor; import com.fr.general.Inter; @@ -46,13 +49,14 @@ public class TreeEditorDefinePane extends FieldEditorDefinePane { @Override protected JPanel setFirstContentPane() { - return this.setSecondContentPane(); - } + return this.setSecondContentPane(); + } protected JPanel setSecondContentPane() { JPanel contentPane = FRGUIPaneFactory.createBorderLayout_L_Pane(); contentPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); - JPanel contenter = FRGUIPaneFactory.createMediumHGapFlowInnerContainer_M_Pane(); + JPanel contenter = FRGUIPaneFactory.createMediumHGapFlowInnerContainer_M_Pane_First0(); + contentPane.add(contenter,BorderLayout.NORTH); removeRepeatCheckBox = new UICheckBox(Inter.getLocText("Form-Remove_Repeat_Data"), false); contenter.add(removeRepeatCheckBox); diff --git a/designer/src/com/fr/design/widget/ui/WaterMarkDictPane.java b/designer/src/com/fr/design/widget/ui/WaterMarkDictPane.java index 85d088d13..1eef2b164 100644 --- a/designer/src/com/fr/design/widget/ui/WaterMarkDictPane.java +++ b/designer/src/com/fr/design/widget/ui/WaterMarkDictPane.java @@ -39,7 +39,7 @@ public class WaterMarkDictPane extends JPanel { int[][] rowCount = {{1, 1}}; JPanel panel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); // JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_LARGE, LayoutConstants.VGAP_MEDIUM); - panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0)); + panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); this.add(panel, BorderLayout.CENTER); } diff --git a/designer/src/com/fr/design/widget/ui/WritableRepeatEditorPane.java b/designer/src/com/fr/design/widget/ui/WritableRepeatEditorPane.java index c13577393..f27b30857 100644 --- a/designer/src/com/fr/design/widget/ui/WritableRepeatEditorPane.java +++ b/designer/src/com/fr/design/widget/ui/WritableRepeatEditorPane.java @@ -15,7 +15,7 @@ public abstract class WritableRepeatEditorPane @Override protected JPanel setSecondContentPane() { - JPanel contentPane = FRGUIPaneFactory.createBorderLayout_L_Pane(); + JPanel contentPane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane_First0(); contentPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); JPanel otherContentPane = this.setThirdContentPane(); if (otherContentPane != null) { diff --git a/designer_base/src/com/fr/design/gui/frpane/TreeSettingPane.java b/designer_base/src/com/fr/design/gui/frpane/TreeSettingPane.java index a8a72fc1e..80bbcbe0a 100644 --- a/designer_base/src/com/fr/design/gui/frpane/TreeSettingPane.java +++ b/designer_base/src/com/fr/design/gui/frpane/TreeSettingPane.java @@ -52,6 +52,7 @@ public class TreeSettingPane extends BasicPane implements DataCreatorUI { private void initComponents(boolean isEditor) { this.setLayout(FRGUIPaneFactory.createBorderLayout()); JPanel buildWayPanel= FRGUIPaneFactory.createMediumHGapFlowInnerContainer_M_Pane(); + buildWayPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); UILabel buildWayLabel = new UILabel(Inter.getLocText("FR-Designer_Build-Way") + " :"); buildWayPanel.add(buildWayLabel); buildBox = new UIComboBox(buildWay); diff --git a/designer_base/src/com/fr/design/gui/itree/refreshabletree/TreeRootPane.java b/designer_base/src/com/fr/design/gui/itree/refreshabletree/TreeRootPane.java index 1a1633c0b..4ffc762e0 100644 --- a/designer_base/src/com/fr/design/gui/itree/refreshabletree/TreeRootPane.java +++ b/designer_base/src/com/fr/design/gui/itree/refreshabletree/TreeRootPane.java @@ -9,7 +9,6 @@ import javax.swing.JPanel; import com.fr.data.impl.TreeAttr; import com.fr.design.gui.icheckbox.UICheckBox; -import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.dialog.BasicPane; import com.fr.general.Inter; @@ -18,10 +17,10 @@ public class TreeRootPane extends BasicPane { // 是否支持多选(checkBoxTree) //private JCheckBox multipleSelection; - private UIComboBox checkTypeComboBox; + private UICheckBox checkTypeCheckBox; // richer:加载的方式,支持异步加载和完全加载 - private UIComboBox loadTypeComboBox; + private UICheckBox loadTypeCheckBox; private UICheckBox layerTypeCheckBox; @@ -30,31 +29,26 @@ public class TreeRootPane extends BasicPane { public TreeRootPane() { this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); - JPanel checkTypePane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); - checkTypePane.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0)); - checkTypePane.add(new UILabel(Inter.getLocText("Tree-Mutiple_Selection_Or_Not") + ":")); - checkTypeComboBox = new UIComboBox(new String[] {Inter.getLocText("Yes"), Inter.getLocText("No")}); - checkTypePane.add(checkTypeComboBox); + JPanel checkTypePane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane_First0(); + checkTypePane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); + checkTypeCheckBox = new UICheckBox(Inter.getLocText("Tree-Mutiple_Selection_Or_Not")); + checkTypePane.add(checkTypeCheckBox); this.add(checkTypePane); - JPanel loadTypePane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); - loadTypePane.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0)); - loadTypePane.add(new UILabel(Inter.getLocText("Widget-Load_Type") + ":")); - loadTypeComboBox = new UIComboBox(new String[]{Inter.getLocText("Widget-Load_By_Async"), Inter.getLocText("Widget-Load_By_Complete")}); - loadTypePane.add(loadTypeComboBox); + JPanel loadTypePane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane_First0(); + checkTypePane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); + loadTypeCheckBox = new UICheckBox(Inter.getLocText("Widget-Load_By_Async")); + loadTypePane.add(loadTypeCheckBox); this.add(loadTypePane); - JPanel leafSelectPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); - leafSelectPane.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0)); + JPanel leafSelectPane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane_First0(); + checkTypePane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); leafSelectPane.add(layerTypeCheckBox = new UICheckBox(Inter.getLocText("Tree-Select_Leaf_Only"))); - UILabel tips = new UILabel(Inter.getLocText("Tree-Select_Leaf_Only_Tips")); - tips.setForeground(new Color(147, 178, 233)); - leafSelectPane.add(tips); this.add(leafSelectPane); - JPanel returnFullPathPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); - returnFullPathPane.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0)); - returnFullPathPane.add(returnFullPathCheckBox = new UICheckBox(Inter.getLocText("Tree-Return_Full_Path"))); + JPanel returnFullPathPane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane_First0(); + checkTypePane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); + returnFullPathPane.add(returnFullPathCheckBox = new UICheckBox(Inter.getLocText("Tree-Return_Full_Path"))); this.add(returnFullPathPane); } @@ -65,16 +59,16 @@ public class TreeRootPane extends BasicPane { } public void populate(TreeAttr treeAttr) { - checkTypeComboBox.setSelectedIndex(treeAttr.isMultipleSelection() ? 0 : 1); - loadTypeComboBox.setSelectedIndex(treeAttr.isAjax() ? 0 : 1); + checkTypeCheckBox.setSelected(treeAttr.isMultipleSelection()); + loadTypeCheckBox.setSelected(treeAttr.isAjax()); layerTypeCheckBox.setSelected(treeAttr.isSelectLeafOnly()); returnFullPathCheckBox.setSelected(treeAttr.isReturnFullPath()); } public TreeAttr update() { TreeAttr treeAttr = new TreeAttr(); - treeAttr.setMultipleSelection(checkTypeComboBox.getSelectedIndex() == 0); - treeAttr.setAjax(loadTypeComboBox.getSelectedIndex() == 0); + treeAttr.setMultipleSelection(checkTypeCheckBox.isSelected()); + treeAttr.setAjax(loadTypeCheckBox.isSelected()); treeAttr.setSelectLeafOnly(layerTypeCheckBox.isSelected()); treeAttr.setReturnFullPath(returnFullPathCheckBox.isSelected()); diff --git a/designer_base/src/com/fr/design/layout/FRGUIPaneFactory.java b/designer_base/src/com/fr/design/layout/FRGUIPaneFactory.java index 00fde425f..26768a271 100644 --- a/designer_base/src/com/fr/design/layout/FRGUIPaneFactory.java +++ b/designer_base/src/com/fr/design/layout/FRGUIPaneFactory.java @@ -1,456 +1,510 @@ package com.fr.design.layout; -import java.awt.BorderLayout; -import java.awt.CardLayout; -import java.awt.Color; -import java.awt.FlowLayout; -import java.awt.LayoutManager; - -import javax.swing.BorderFactory; -import javax.swing.BoxLayout; -import javax.swing.Icon; +import com.fr.design.border.UITitledBorder; import com.fr.design.gui.ilable.UILabel; -import javax.swing.JPanel; -import javax.swing.JRadioButton; -import com.fr.design.border.UITitledBorder; +import javax.swing.*; +import java.awt.*; public class FRGUIPaneFactory { - private FRGUIPaneFactory() { - } + private FRGUIPaneFactory() { + } - public static final float WIDTH_PARA_F = 80.0f; - public static final int WIDTH_OFFSET_N = 60; - public static final int WIDTH_OFFSET_M = 20; - public static final int WIDTH_PARA_INT = 80; - public static final float WIDTHABS_PARA_F = 2.0f; - public static final int HEIGHT_PARA = 25; - public static final int HEIGHT_OFFSET = 50; + public static final float WIDTH_PARA_F = 80.0f; + public static final int WIDTH_OFFSET_N = 60; + public static final int WIDTH_OFFSET_M = 20; + public static final int WIDTH_PARA_INT = 80; + public static final float WIDTHABS_PARA_F = 2.0f; + public static final int HEIGHT_PARA = 25; + public static final int HEIGHT_OFFSET = 50; /** * 创建一个靠右靠左的水平间隙为2的流式布局 + * * @return FlowLayout对象 */ - public static LayoutManager createBoxFlowLayout() { // createBoxFlowLayout 图表用到的比较多 - return new FlowLayout(FlowLayout.LEFT, 2, 0); - } + public static LayoutManager createBoxFlowLayout() { // createBoxFlowLayout 图表用到的比较多 + return new FlowLayout(FlowLayout.LEFT, 2, 0); + } - /** - * 创建一个靠左的布局 - * @return FlowLayout对象 - */ - public static LayoutManager createLeftZeroLayout() { - return new FlowLayout(FlowLayout.LEFT, 0, 0); - } + /** + * 创建一个靠左的布局 + * + * @return FlowLayout对象 + */ + public static LayoutManager createLeftZeroLayout() { + return new FlowLayout(FlowLayout.LEFT, 0, 0); + } /** * 创建一个靠左的水平和垂直间隙均为5的流式布局 + * + * @return FlowLayout对象 + */ + public static LayoutManager createLabelFlowLayout() { // createLabelFlowLayout + return new FlowLayout(FlowLayout.LEFT); // 默认 5, 5 + } + + /** + * 创建一个靠左流式布局,间距10,10 + * + * @return FlowLayout对象 + */ + public static LayoutManager createL_FlowLayout() { + return new FlowLayout(FlowLayout.LEFT, 10, 10); + } + + /** + * 创建一个居中流式布局 + * + * @return FlowLayout对象 + */ + public static LayoutManager createCenterFlowLayout() { + return new FlowLayout(FlowLayout.CENTER); + } + + /** + * 创建一个靠右流式布局 + * * @return FlowLayout对象 */ - public static LayoutManager createLabelFlowLayout() { // createLabelFlowLayout - return new FlowLayout(FlowLayout.LEFT); // 默认 5, 5 - } - - /** - * 创建一个靠左流式布局,间距10,10 - * @return FlowLayout对象 - */ - public static LayoutManager createL_FlowLayout() { - return new FlowLayout(FlowLayout.LEFT, 10, 10); - } - - /** - * 创建一个居中流式布局 - * @return FlowLayout对象 - */ - public static LayoutManager createCenterFlowLayout() { - return new FlowLayout(FlowLayout.CENTER); - } - - /** - * 创建一个靠右流式布局 - * @return FlowLayout对象 - */ - public static LayoutManager createRightFlowLayout() { - return new FlowLayout(FlowLayout.RIGHT); - } - - /** - * 创建一个边框布局 - * @return BorderLayout对象 - */ - public static LayoutManager createBorderLayout() { - return new BorderLayout(); - } - - /** - * 创建一个边框布局,间距4,4 - * @return BorderLayout对象 - */ - public static LayoutManager createM_BorderLayout() { - return new BorderLayout(4,4); - } - - // TODO 删掉 - - /** - * 创建一个1列的网格布局 - * @return FRGridLayout对象 - */ - public static LayoutManager create1ColumnGridLayout() { - return new FRGridLayout(1); - } - - /** - * 创建一个2列的网格布局 - * @return FRGridLayout对象 - */ - public static LayoutManager create2ColumnGridLayout() { - return new FRGridLayout(2); - } - - /** - * 创建一个n列的网格布局 - * @param nColumn 列数 - * @return FRGridLayout对象 - */ - public static LayoutManager createNColumnGridLayout(int nColumn) { - return new FRGridLayout(nColumn); - } - - /** - * 创建一个带标题边框面板 - * @param string 边框标题 - * @return JPanel对象 - */ - public static JPanel createTitledBorderPane(String string) { - JPanel jp = new JPanel(); - UITitledBorder explainBorder = UITitledBorder.createBorderWithTitle(string); - jp.setBorder(explainBorder); - jp.setLayout(new FlowLayout(FlowLayout.LEFT)); - return jp; - } - - /** - * 创建一个带标题边框面板并且居中显示 - * @param borderTitle 边框标题 - * @return JPanel对象 - */ - public static JPanel createTitledBorderPaneCenter(String borderTitle) { - JPanel jp = new JPanel(); - UITitledBorder explainBorder = UITitledBorder.createBorderWithTitle(borderTitle); - jp.setBorder(explainBorder); - jp.setLayout(new FlowLayout(FlowLayout.CENTER)); - return jp; - } - - /** - * 创建一个靠左空边框布局,间隔大 - * @return JPanel对象 - */ - public static JPanel createBigHGapFlowInnerContainer_M_Pane() { - JPanel jp = new JPanel(); - jp.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0)); - jp.setLayout(new FRLeftFlowLayout(5, 60, 5)); - return jp; - } - - /** - * 创建一个靠左空边框面板,间隔中等 - * @return JPanel对象 - */ - public static JPanel createMediumHGapFlowInnerContainer_M_Pane() { - JPanel jp = new JPanel(); - jp.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0)); - jp.setLayout(new FRLeftFlowLayout(5, 20, 5)); - return jp; - } - - /** - * 创建一个靠左空边框面板,间隔中等 - * @return JPanel对象 - */ - public static JPanel createMediumHGapHighTopFlowInnerContainer_M_Pane() { - JPanel jp = new JPanel(); - jp.setBorder(BorderFactory.createEmptyBorder(50, 5, 0, 0)); - jp.setLayout(new FRLeftFlowLayout(5, 20, 5)); - return jp; - } - - /** - * 创建一个正常靠左空边框面板 - * @return JPanel对象 - */ - public static JPanel createNormalFlowInnerContainer_M_Pane() { - JPanel jp = new JPanel(); - jp.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0)); - jp.setLayout(new FlowLayout(FlowLayout.LEFT)); - return jp; - } - - /** - * 创建一个靠左0间距边框面板 - * @return JPanel对象 - */ - public static JPanel createLeftFlowZeroGapBorderPane() { - JPanel jp = new JPanel(); - jp.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); - jp.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0)); - return jp; - } - - /** - * 创建一个靠左流式布局,正常流式内嵌 - * @return JPanel对象 - */ - public static JPanel createNormalFlowInnerContainer_S_Pane() { - JPanel jp = new JPanel(); - jp.setLayout(new FlowLayout(FlowLayout.LEFT)); - return jp; - } - - /** - * 创建一个靠左流式布局,流式内嵌 - * @return JPanel对象 - */ - public static JPanel createBoxFlowInnerContainer_S_Pane() { - JPanel jp = new JPanel(); - jp.setLayout(new FlowLayout(FlowLayout.LEFT, 2, 2)); - return jp; - } - - /** - * 创建一个靠右面板 - * @return JPanel对象 - */ - public static JPanel createRightFlowInnerContainer_S_Pane() { - JPanel jp = new JPanel(); - jp.setLayout(new FlowLayout(FlowLayout.RIGHT)); - return jp; - } - - /** - * 创建一个居中面板 - * @return JPanel对象 - */ - public static JPanel createCenterFlowInnerContainer_S_Pane() { - JPanel jp = new JPanel(); - jp.setLayout(new FlowLayout(FlowLayout.CENTER)); - return jp; - } - - /** - * 创建一个居中0间距面板 - * @return JPanel对象 - */ - public static JPanel createCenterFlowZeroGapBorderPane() { - JPanel jp = new JPanel(); - jp.setLayout(new FlowLayout(FlowLayout.CENTER, 0, 0)); - jp.setBorder(BorderFactory.createEmptyBorder()); - return jp; - } - - /** - * 创建纵向排列面板 - * @return JPanel对象 - */ - public static JPanel createY_AXISBoxInnerContainer_L_Pane() { - JPanel jp = new JPanel(); - jp.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); - jp.setLayout(new BoxLayout(jp, BoxLayout.Y_AXIS)); - return jp; - } - - /** - * 创建纵向边框面板 - * @return JPanel对象 - */ - public static JPanel createYBoxEmptyBorderPane() { - JPanel jp = new JPanel(); - jp.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); - jp.setLayout(new BoxLayout(jp, BoxLayout.Y_AXIS)); - return jp; - } - - /** - * 创建横向面板 - * @return JPanel对象 - */ - public static JPanel createX_AXISBoxInnerContainer_L_Pane() { - JPanel jp = new JPanel(); - jp.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); - jp.setLayout(new BoxLayout(jp, BoxLayout.X_AXIS)); - return jp; - } - - /** - * 创建纵向面板M - * @return JPanel对象 - */ - public static JPanel createY_AXISBoxInnerContainer_M_Pane() { - JPanel jp = new JPanel(); - jp.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0)); - jp.setLayout(new BoxLayout(jp, BoxLayout.Y_AXIS)); - return jp; - } - - /** - * 创建横向内置boxlayout的面板 - * @return JPanel对象 - */ - public static JPanel createX_AXISBoxInnerContainer_M_Pane() { - JPanel jp = new JPanel(); - jp.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0)); - jp.setLayout(new BoxLayout(jp, BoxLayout.X_AXIS)); - return jp; - } - - /** - * 创建纵向内置boxlayout的面板 - * @return JPanel对象 - */ - public static JPanel createY_AXISBoxInnerContainer_S_Pane() { - JPanel jp = new JPanel(); - jp.setLayout(new BoxLayout(jp, BoxLayout.Y_AXIS)); - return jp; - } - - /** - * 创建横向内置boxlayout的面板 - * @return JPanel对象 - */ - public static JPanel createX_AXISBoxInnerContainer_S_Pane() { - JPanel jp = new JPanel(); - jp.setLayout(new BoxLayout(jp, BoxLayout.X_AXIS)); - return jp; - } - - /** - * 创建n列网格面板 - * @param nColumn 列数 - * @return JPanel对象 - */ - public static JPanel createNColumnGridInnerContainer_S_Pane(int nColumn) { - JPanel jp = new JPanel(); - jp.setLayout(new FRGridLayout(nColumn)); - return jp; - } - - /** - * 创建n列网格面板 - * @param nColumn 列数 - * @param h 水平间距 - * @param v 垂直间距 - * @return JPanel对象 - */ - public static JPanel createNColumnGridInnerContainer_Pane(int nColumn, int h, int v) { - JPanel jp = new JPanel(); - jp.setLayout(new FRGridLayout(nColumn, h, v)); - return jp; - } - - /** - * 创建顶格n列网格面板 - * @param nColumn 列数 - * @return JPanel对象 - */ - public static JPanel createFillColumnPane(int nColumn) { - JPanel jp = new JPanel(); - jp.setLayout(new FRGridLayout(nColumn, 0, 0)); - return jp; - } - - /** - * 创建边框面板L - * @return JPanel对象 - */ - public static JPanel createBorderLayout_L_Pane() { - JPanel jp = new JPanel(); - jp.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); - jp.setLayout(FRGUIPaneFactory.createBorderLayout()); - return jp; - } - - /** - * 创建边框面板M - * @return JPanel对象 - */ - public static JPanel createBorderLayout_M_Pane() { - JPanel jp = new JPanel(); - jp.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); - jp.setLayout(FRGUIPaneFactory.createM_BorderLayout()); - return jp; - } - - /** - * 创建边框面板S - * @return JPanel对象 - */ - public static JPanel createBorderLayout_S_Pane() { - JPanel jp = new JPanel(); - jp.setLayout(FRGUIPaneFactory.createBorderLayout()); - return jp; - } - - /** - * 创建卡片式布局 - * @return JPanel对象 - */ - public static JPanel createCardLayout_S_Pane() { - JPanel jp = new JPanel(); - jp.setLayout(new CardLayout()); - return jp; - } - - /** - * 创建图标IconRadio面板 - * @param icon 图标 - * @param jradiobtn 按钮 - * @return JPanel对象 - */ - public static JPanel createIconRadio_S_Pane(Icon icon, - JRadioButton jradiobtn) { - jradiobtn.setBorder(BorderFactory.createEmptyBorder(0, 4, 0, 0)); - jradiobtn.setBackground(new Color(255, 255, 255)); - JPanel iconRadioPane = new JPanel(); - iconRadioPane.setLayout(new BoxLayout(iconRadioPane, BoxLayout.X_AXIS)); - - iconRadioPane.add(new UILabel(icon)); - iconRadioPane.add(jradiobtn); - - return iconRadioPane; - } - - /** - * 计算宽度 - * @param width 宽度输入值 - * @return w 宽度输出值 - */ - public static int caculateWidth(int width) { - int w = 0; - float m = (width + WIDTH_OFFSET_M) / WIDTH_PARA_F; - float n = (width + WIDTH_OFFSET_N) / WIDTH_PARA_F; - float i = Math.abs((((int) m + (int) (m + 1)) / WIDTHABS_PARA_F) - m); - float j = Math.abs((((int) n + (int) (n + 1)) / WIDTHABS_PARA_F) - n); - float x = i > j ? i : j; - if (x == i) { - w = Math.round(m) * WIDTH_PARA_INT - WIDTH_OFFSET_M; - } else if (x == j) { - w = Math.round(n) * WIDTH_PARA_INT - WIDTH_OFFSET_N; - } - return w; - } - - /** - * 计算高度 - * @param height 高度输入值 - * @return 高度输出值 - */ - public static int caculateHeight(int height) { - int h = 0; - float x = (height + HEIGHT_OFFSET) / HEIGHT_PARA; - h = ((int) x + 1) * HEIGHT_PARA; - return h; - } + public static LayoutManager createRightFlowLayout() { + return new FlowLayout(FlowLayout.RIGHT); + } + + /** + * 创建一个边框布局 + * + * @return BorderLayout对象 + */ + public static LayoutManager createBorderLayout() { + return new BorderLayout(); + } + + /** + * 创建一个边框布局,间距4,4 + * + * @return BorderLayout对象 + */ + public static LayoutManager createM_BorderLayout() { + return new BorderLayout(4, 4); + } + + // TODO 删掉 + + /** + * 创建一个1列的网格布局 + * + * @return FRGridLayout对象 + */ + public static LayoutManager create1ColumnGridLayout() { + return new FRGridLayout(1); + } + + /** + * 创建一个2列的网格布局 + * + * @return FRGridLayout对象 + */ + public static LayoutManager create2ColumnGridLayout() { + return new FRGridLayout(2); + } + + /** + * 创建一个n列的网格布局 + * + * @param nColumn 列数 + * @return FRGridLayout对象 + */ + public static LayoutManager createNColumnGridLayout(int nColumn) { + return new FRGridLayout(nColumn); + } + + /** + * 创建一个带标题边框面板 + * + * @param string 边框标题 + * @return JPanel对象 + */ + public static JPanel createTitledBorderPane(String string) { + JPanel jp = new JPanel(); + UITitledBorder explainBorder = UITitledBorder.createBorderWithTitle(string); + jp.setBorder(explainBorder); + jp.setLayout(new FlowLayout(FlowLayout.LEFT)); + return jp; + } + + /** + * 创建一个带标题边框面板并且居中显示 + * + * @param borderTitle 边框标题 + * @return JPanel对象 + */ + public static JPanel createTitledBorderPaneCenter(String borderTitle) { + JPanel jp = new JPanel(); + UITitledBorder explainBorder = UITitledBorder.createBorderWithTitle(borderTitle); + jp.setBorder(explainBorder); + jp.setLayout(new FlowLayout(FlowLayout.CENTER)); + return jp; + } + + /** + * 创建一个靠左空边框布局,间隔大 + * + * @return JPanel对象 + */ + public static JPanel createBigHGapFlowInnerContainer_M_Pane() { + JPanel jp = new JPanel(); + jp.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0)); + jp.setLayout(new FRLeftFlowLayout(5, 60, 5)); + return jp; + } + + /** + * 创建一个靠左空边框面板,间隔中等 + * + * @return JPanel对象 + */ + public static JPanel createMediumHGapFlowInnerContainer_M_Pane() { + JPanel jp = new JPanel(); + jp.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0)); + jp.setLayout(new FRLeftFlowLayout(5, 20, 5)); + return jp; + } + + /** + * 创建一个靠左空边框面板,间隔中等,firsthgap 为0 + * + * @return JPanel对象 + */ + public static JPanel createMediumHGapFlowInnerContainer_M_Pane_First0() { + JPanel jp = new JPanel(); + jp.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); + jp.setLayout(new FRLeftFlowLayout(0, 20, 5)); + return jp; + } + + /** + * 创建一个靠左空边框面板,间隔中等 + * + * @return JPanel对象 + */ + public static JPanel createMediumHGapHighTopFlowInnerContainer_M_Pane() { + JPanel jp = new JPanel(); + jp.setBorder(BorderFactory.createEmptyBorder(50, 5, 0, 0)); + jp.setLayout(new FRLeftFlowLayout(5, 20, 5)); + return jp; + } + + /** + * 创建一个正常靠左空边框面板 + * + * @return JPanel对象 + */ + public static JPanel createNormalFlowInnerContainer_M_Pane() { + JPanel jp = new JPanel(); + jp.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0)); + jp.setLayout(new FlowLayout(FlowLayout.LEFT)); + return jp; + } + + /** + * 创建一个靠左0间距边框面板 + * + * @return JPanel对象 + */ + public static JPanel createLeftFlowZeroGapBorderPane() { + JPanel jp = new JPanel(); + jp.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); + jp.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0)); + return jp; + } + + /** + * 创建一个靠左流式布局,正常流式内嵌 + * + * @return JPanel对象 + */ + public static JPanel createNormalFlowInnerContainer_S_Pane() { + JPanel jp = new JPanel(); + jp.setLayout(new FlowLayout(FlowLayout.LEFT)); + return jp; + } + + /** + * 创建一个靠左流式布局,流式内嵌 + * + * @return JPanel对象 + */ + public static JPanel createBoxFlowInnerContainer_S_Pane() { + JPanel jp = new JPanel(); + jp.setLayout(new FlowLayout(FlowLayout.LEFT, 2, 2)); + return jp; + } + + /** + * 创建一个靠左流式布局,流式内嵌,首元素距离左边0 + * + * @return JPanel对象 + */ + public static JPanel createBoxFlowInnerContainer_S_Pane_First0() { + JPanel jp = new JPanel(); + jp.setLayout(new FRLeftFlowLayout(0, 0, 5)); + return jp; + } + + /** + * 创建一个靠右面板 + * + * @return JPanel对象 + */ + public static JPanel createRightFlowInnerContainer_S_Pane() { + JPanel jp = new JPanel(); + jp.setLayout(new FlowLayout(FlowLayout.RIGHT)); + return jp; + } + + /** + * 创建一个居中面板 + * + * @return JPanel对象 + */ + public static JPanel createCenterFlowInnerContainer_S_Pane() { + JPanel jp = new JPanel(); + jp.setLayout(new FlowLayout(FlowLayout.CENTER)); + return jp; + } + + /** + * 创建一个居中0间距面板 + * + * @return JPanel对象 + */ + public static JPanel createCenterFlowZeroGapBorderPane() { + JPanel jp = new JPanel(); + jp.setLayout(new FlowLayout(FlowLayout.CENTER, 0, 0)); + jp.setBorder(BorderFactory.createEmptyBorder()); + return jp; + } + + /** + * 创建纵向排列面板 + * + * @return JPanel对象 + */ + public static JPanel createY_AXISBoxInnerContainer_L_Pane() { + JPanel jp = new JPanel(); + jp.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); + jp.setLayout(new BoxLayout(jp, BoxLayout.Y_AXIS)); + return jp; + } + + /** + * 创建纵向边框面板 + * + * @return JPanel对象 + */ + public static JPanel createYBoxEmptyBorderPane() { + JPanel jp = new JPanel(); + jp.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); + jp.setLayout(new BoxLayout(jp, BoxLayout.Y_AXIS)); + return jp; + } + + /** + * 创建横向面板 + * + * @return JPanel对象 + */ + public static JPanel createX_AXISBoxInnerContainer_L_Pane() { + JPanel jp = new JPanel(); + jp.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); + jp.setLayout(new BoxLayout(jp, BoxLayout.X_AXIS)); + return jp; + } + + /** + * 创建纵向面板M + * + * @return JPanel对象 + */ + public static JPanel createY_AXISBoxInnerContainer_M_Pane() { + JPanel jp = new JPanel(); + jp.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0)); + jp.setLayout(new BoxLayout(jp, BoxLayout.Y_AXIS)); + return jp; + } + + /** + * 创建横向内置boxlayout的面板 + * + * @return JPanel对象 + */ + public static JPanel createX_AXISBoxInnerContainer_M_Pane() { + JPanel jp = new JPanel(); + jp.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0)); + jp.setLayout(new BoxLayout(jp, BoxLayout.X_AXIS)); + return jp; + } + + /** + * 创建纵向内置boxlayout的面板 + * + * @return JPanel对象 + */ + public static JPanel createY_AXISBoxInnerContainer_S_Pane() { + JPanel jp = new JPanel(); + jp.setLayout(new BoxLayout(jp, BoxLayout.Y_AXIS)); + return jp; + } + + /** + * 创建横向内置boxlayout的面板 + * + * @return JPanel对象 + */ + public static JPanel createX_AXISBoxInnerContainer_S_Pane() { + JPanel jp = new JPanel(); + jp.setLayout(new BoxLayout(jp, BoxLayout.X_AXIS)); + return jp; + } + + /** + * 创建n列网格面板 + * + * @param nColumn 列数 + * @return JPanel对象 + */ + public static JPanel createNColumnGridInnerContainer_S_Pane(int nColumn) { + JPanel jp = new JPanel(); + jp.setLayout(new FRGridLayout(nColumn)); + return jp; + } + + /** + * 创建n列网格面板 + * + * @param nColumn 列数 + * @param h 水平间距 + * @param v 垂直间距 + * @return JPanel对象 + */ + public static JPanel createNColumnGridInnerContainer_Pane(int nColumn, int h, int v) { + JPanel jp = new JPanel(); + jp.setLayout(new FRGridLayout(nColumn, h, v)); + return jp; + } + + /** + * 创建顶格n列网格面板 + * + * @param nColumn 列数 + * @return JPanel对象 + */ + public static JPanel createFillColumnPane(int nColumn) { + JPanel jp = new JPanel(); + jp.setLayout(new FRGridLayout(nColumn, 0, 0)); + return jp; + } + + /** + * 创建边框面板L + * + * @return JPanel对象 + */ + public static JPanel createBorderLayout_L_Pane() { + JPanel jp = new JPanel(); + jp.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); + jp.setLayout(FRGUIPaneFactory.createBorderLayout()); + return jp; + } + + /** + * 创建边框面板M + * + * @return JPanel对象 + */ + public static JPanel createBorderLayout_M_Pane() { + JPanel jp = new JPanel(); + jp.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); + jp.setLayout(FRGUIPaneFactory.createM_BorderLayout()); + return jp; + } + + /** + * 创建边框面板S + * + * @return JPanel对象 + */ + public static JPanel createBorderLayout_S_Pane() { + JPanel jp = new JPanel(); + jp.setLayout(FRGUIPaneFactory.createBorderLayout()); + return jp; + } + + /** + * 创建卡片式布局 + * + * @return JPanel对象 + */ + public static JPanel createCardLayout_S_Pane() { + JPanel jp = new JPanel(); + jp.setLayout(new CardLayout()); + return jp; + } + + /** + * 创建图标IconRadio面板 + * + * @param icon 图标 + * @param jradiobtn 按钮 + * @return JPanel对象 + */ + public static JPanel createIconRadio_S_Pane(Icon icon, + JRadioButton jradiobtn) { + jradiobtn.setBorder(BorderFactory.createEmptyBorder(0, 4, 0, 0)); + jradiobtn.setBackground(new Color(255, 255, 255)); + JPanel iconRadioPane = new JPanel(); + iconRadioPane.setLayout(new BoxLayout(iconRadioPane, BoxLayout.X_AXIS)); + + iconRadioPane.add(new UILabel(icon)); + iconRadioPane.add(jradiobtn); + + return iconRadioPane; + } + + /** + * 计算宽度 + * + * @param width 宽度输入值 + * @return w 宽度输出值 + */ + public static int caculateWidth(int width) { + int w = 0; + float m = (width + WIDTH_OFFSET_M) / WIDTH_PARA_F; + float n = (width + WIDTH_OFFSET_N) / WIDTH_PARA_F; + float i = Math.abs((((int) m + (int) (m + 1)) / WIDTHABS_PARA_F) - m); + float j = Math.abs((((int) n + (int) (n + 1)) / WIDTHABS_PARA_F) - n); + float x = i > j ? i : j; + if (x == i) { + w = Math.round(m) * WIDTH_PARA_INT - WIDTH_OFFSET_M; + } else if (x == j) { + w = Math.round(n) * WIDTH_PARA_INT - WIDTH_OFFSET_N; + } + return w; + } + + /** + * 计算高度 + * + * @param height 高度输入值 + * @return 高度输出值 + */ + public static int caculateHeight(int height) { + int h = 0; + float x = (height + HEIGHT_OFFSET) / HEIGHT_PARA; + h = ((int) x + 1) * HEIGHT_PARA; + return h; + } } \ No newline at end of file From 161a93c244198036f3e2a1039d07226a7be664fd Mon Sep 17 00:00:00 2001 From: MoMeak Date: Mon, 7 Aug 2017 15:34:55 +0800 Subject: [PATCH 14/30] =?UTF-8?q?REPORT-2897=209.0=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E4=BF=AE=E6=94=B9=20=E8=A7=86=E8=A7=89=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/widget/ui/ButtonGroupDictPane.java | 120 +++++++++-------- .../design/widget/ui/CheckBoxDefinePane.java | 88 +++++++------ .../widget/ui/NumberEditorDefinePane.java | 44 ++++--- .../widget/ui/RadioGroupDefinePane.java | 124 +++++++++--------- .../btn/ButtonWithHotkeysDetailPane.java | 71 +++------- 5 files changed, 223 insertions(+), 224 deletions(-) diff --git a/designer/src/com/fr/design/widget/ui/ButtonGroupDictPane.java b/designer/src/com/fr/design/widget/ui/ButtonGroupDictPane.java index 3d2b53d45..b02ef38f4 100644 --- a/designer/src/com/fr/design/widget/ui/ButtonGroupDictPane.java +++ b/designer/src/com/fr/design/widget/ui/ButtonGroupDictPane.java @@ -1,59 +1,63 @@ -package com.fr.design.widget.ui; - - -import java.awt.event.ActionEvent; -import com.fr.design.gui.ispinner.UIBasicSpinner; -import java.awt.event.ActionListener; - -import com.fr.design.gui.ilable.UILabel; -import javax.swing.JPanel; -import javax.swing.SpinnerNumberModel; - -import com.fr.design.gui.icheckbox.UICheckBox; -import com.fr.design.layout.FRGUIPaneFactory; -import com.fr.form.ui.ButtonGroup; -import com.fr.general.Inter; - - -public class ButtonGroupDictPane extends JPanel { - private UIBasicSpinner columnSpinner; - private UICheckBox adaptiveCheckbox; - private UILabel columnLabel; - - public ButtonGroupDictPane() { - this.initComponents(); - } - - /** - * - */ - public void initComponents() { - this.setLayout(FRGUIPaneFactory.createLabelFlowLayout()); - adaptiveCheckbox = new UICheckBox(Inter.getLocText("Adaptive"), true); - adaptiveCheckbox.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - columnSpinner.setVisible(!adaptiveCheckbox.isSelected()); - columnLabel.setVisible(!adaptiveCheckbox.isSelected()); - } - }); - this.add(adaptiveCheckbox); - - this.columnLabel = new UILabel(Inter.getLocText("Button-Group-Display-Columns") + ":"); - this.add(columnLabel); - columnSpinner = new UIBasicSpinner(new SpinnerNumberModel(0, 0, Integer.MAX_VALUE, 1)); - this.add(columnSpinner); - } - - public void populate(ButtonGroup buttonGroup) { - adaptiveCheckbox.setSelected(buttonGroup.isAdaptive()); - columnSpinner.setVisible(!adaptiveCheckbox.isSelected()); - columnLabel.setVisible(!adaptiveCheckbox.isSelected()); - columnSpinner.setValue(buttonGroup.getColumnsInRow()); - } - - public void update(ButtonGroup buttonGroup) { - buttonGroup.setAdaptive(adaptiveCheckbox.isSelected()); - buttonGroup.setColumnsInRow((Integer)(columnSpinner.getValue())); - } - +package com.fr.design.widget.ui; + + +import java.awt.*; +import java.awt.event.ActionEvent; +import com.fr.design.gui.ispinner.UIBasicSpinner; +import java.awt.event.ActionListener; + +import com.fr.design.gui.ilable.UILabel; +import javax.swing.JPanel; +import javax.swing.SpinnerNumberModel; + +import com.fr.design.gui.icheckbox.UICheckBox; +import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.form.ui.ButtonGroup; +import com.fr.general.Inter; + + +public class ButtonGroupDictPane extends JPanel { + private UIBasicSpinner columnSpinner; + private UICheckBox adaptiveCheckbox; + private UILabel columnLabel; + + public ButtonGroupDictPane() { + this.initComponents(); + } + + /** + * + */ + public void initComponents() { + this.setLayout(new FlowLayout(0)); + JPanel pane = new JPanel(new FlowLayout()); + adaptiveCheckbox = new UICheckBox(Inter.getLocText("Adaptive"), true); + adaptiveCheckbox.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + columnSpinner.setVisible(!adaptiveCheckbox.isSelected()); + columnLabel.setVisible(!adaptiveCheckbox.isSelected()); + } + }); + + this.columnLabel = new UILabel(Inter.getLocText("Button-Group-Display-Columns")); + columnSpinner = new UIBasicSpinner(new SpinnerNumberModel(0, 0, Integer.MAX_VALUE, 1)); + pane.add(adaptiveCheckbox); + pane.add(columnLabel); + pane.add(columnSpinner); + + this.add(pane); + } + + public void populate(ButtonGroup buttonGroup) { + adaptiveCheckbox.setSelected(buttonGroup.isAdaptive()); + columnSpinner.setVisible(!adaptiveCheckbox.isSelected()); + columnLabel.setVisible(!adaptiveCheckbox.isSelected()); + columnSpinner.setValue(buttonGroup.getColumnsInRow()); + } + + public void update(ButtonGroup buttonGroup) { + buttonGroup.setAdaptive(adaptiveCheckbox.isSelected()); + buttonGroup.setColumnsInRow((Integer)(columnSpinner.getValue())); + } + } \ No newline at end of file diff --git a/designer/src/com/fr/design/widget/ui/CheckBoxDefinePane.java b/designer/src/com/fr/design/widget/ui/CheckBoxDefinePane.java index abcc5f986..98a1539ad 100644 --- a/designer/src/com/fr/design/widget/ui/CheckBoxDefinePane.java +++ b/designer/src/com/fr/design/widget/ui/CheckBoxDefinePane.java @@ -1,48 +1,62 @@ package com.fr.design.widget.ui; +import com.fr.design.constants.LayoutConstants; import com.fr.design.foldablepane.UIExpandablePane; import com.fr.design.gui.ilable.UILabel; - -import javax.swing.*; - import com.fr.design.gui.itextfield.UITextField; import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; import com.fr.form.ui.CheckBox; import com.fr.general.Inter; +import javax.swing.*; +import java.awt.*; + public class CheckBoxDefinePane extends AbstractDataModify { - private UITextField text; - - public CheckBoxDefinePane() { - this.iniComoponents(); - } - - private void iniComoponents() { - this.setLayout(FRGUIPaneFactory.createBorderLayout()); - this.setBorder(BorderFactory.createEmptyBorder(0, 8, 0, 8)); - JPanel textPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); - textPane.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0)); - UIExpandablePane uiExpandablePane = new UIExpandablePane(Inter.getLocText("FR-Designer_Advanced"), 280, 20, textPane); - textPane.add(new UILabel(Inter.getLocText("Text") + ":")); - text = new UITextField(8); - textPane.add(text); - this.add(uiExpandablePane); - } - - @Override - protected String title4PopupWindow() { - return "CheckBox"; - } - - @Override - public void populateBean(CheckBox check) { - text.setText(check.getText()); - } - - @Override - public CheckBox updateBean() { - CheckBox box = new CheckBox(); - box.setText(text.getText()); - return box; - } + private UITextField text; + + public CheckBoxDefinePane() { + this.iniComoponents(); + } + + private void iniComoponents() { + this.setLayout(FRGUIPaneFactory.createBorderLayout()); + text = new UITextField(8); + JPanel panel = new JPanel(new BorderLayout()); + panel.add(text, BorderLayout.CENTER); + panel.setBorder(BorderFactory.createEmptyBorder(0, 35, 0, 0)); + + double f = TableLayout.FILL; + double p = TableLayout.PREFERRED; + Component[][] components = new Component[][]{ + new Component[]{new UILabel(Inter.getLocText("FR-Designer_Text")), panel}, + }; + double[] rowSize = {p}; + double[] columnSize = {p, f}; + int[][] rowCount = {{1, 1}}; + JPanel pane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_LARGE, LayoutConstants.VGAP_LARGE); + + UIExpandablePane uiExpandablePane = new UIExpandablePane(Inter.getLocText("FR-Designer_Advanced"), 280, 24, pane); + pane.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 15)); + + this.add(uiExpandablePane); + } + + @Override + protected String title4PopupWindow() { + return "CheckBox"; + } + + @Override + public void populateBean(CheckBox check) { + text.setText(check.getText()); + } + + @Override + public CheckBox updateBean() { + CheckBox box = new CheckBox(); + box.setText(text.getText()); + return box; + } } \ No newline at end of file diff --git a/designer/src/com/fr/design/widget/ui/NumberEditorDefinePane.java b/designer/src/com/fr/design/widget/ui/NumberEditorDefinePane.java index 13be4c8b5..6653e723e 100644 --- a/designer/src/com/fr/design/widget/ui/NumberEditorDefinePane.java +++ b/designer/src/com/fr/design/widget/ui/NumberEditorDefinePane.java @@ -3,6 +3,8 @@ package com.fr.design.widget.ui; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; +import java.awt.event.ItemEvent; +import java.awt.event.ItemListener; import javax.swing.BorderFactory; import javax.swing.JComponent; @@ -27,7 +29,7 @@ import com.fr.form.ui.NumberEditor; import com.fr.general.Inter; public class NumberEditorDefinePane extends FieldEditorDefinePane { - /** + /**FieldEditorDefinePane * */ private static final long serialVersionUID = 8011242951911686805L; @@ -39,7 +41,7 @@ public class NumberEditorDefinePane extends FieldEditorDefinePane private SpinnerNumberModel maxValueModel; private UIBasicSpinner minValueSpinner; private SpinnerNumberModel minValueModel; - private com.fr.design.editor.editor.IntegerEditor decimalLength; + private UIBasicSpinner decimalLength; private JPanel limitNumberPane; private WaterMarkDictPane waterMarkDictPane; @@ -80,7 +82,7 @@ public class NumberEditorDefinePane extends FieldEditorDefinePane }; - private ActionListener actionListener3 = new ActionListener() { + public ActionListener actionListener3 = new ActionListener() { public void actionPerformed(ActionEvent e) { if (setMaxValueCheckBox.isSelected()) { maxValueSpinner.setVisible(true); @@ -144,7 +146,8 @@ public class NumberEditorDefinePane extends FieldEditorDefinePane }; public NumberEditorDefinePane() { - super(); +// super(); + this.initComponents(); } @@ -169,25 +172,26 @@ public class NumberEditorDefinePane extends FieldEditorDefinePane public JPanel setValidatePane() { this.allowDecimalsCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Allow_Decimals")); - this.decimalLength = new com.fr.design.editor.editor.IntegerEditor(); - this.decimalLength.setColumns(10); + this.decimalLength = new UIBasicSpinner(new SpinnerNumberModel(16, 0, Integer.MAX_VALUE, 1)); + this.decimalLength.setPreferredSize(new Dimension(155, 20)); + this.allowDecimalsCheckBox.addActionListener(actionListener1); this.allowNegativeCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Allow_Negative")); this.allowNegativeCheckBox.addActionListener(actionListener2); - this.setMaxValueCheckBox = new UICheckBox(Inter.getLocText("Need_Max_Value"), false); + this.setMaxValueCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Max_Value"), false); this.maxValueSpinner = new UIBasicSpinner(maxValueModel = new SpinnerNumberModel(0D, -Double.MAX_VALUE, Double.MAX_VALUE, 1D)); - maxValueSpinner.setPreferredSize(new Dimension(120, 20)); + maxValueSpinner.setPreferredSize(new Dimension(155, 20)); setNotAllowsInvalid(this.maxValueSpinner); this.maxValueSpinner.setVisible(false); this.setMaxValueCheckBox.addActionListener(actionListener3); this.maxValueSpinner.addChangeListener(changeListener1); - this.setMinValueCheckBox = new UICheckBox(Inter.getLocText("Need_Min_Value"), false); + this.setMinValueCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Min_Value"), false); this.minValueSpinner = new UIBasicSpinner(minValueModel = new SpinnerNumberModel(0D, -Double.MAX_VALUE, Double.MAX_VALUE, 1D)); - minValueSpinner.setPreferredSize(new Dimension(120, 20)); + minValueSpinner.setPreferredSize(new Dimension(155, 20)); setNotAllowsInvalid(this.minValueSpinner); this.minValueSpinner.setVisible(false); this.setMinValueCheckBox.addActionListener(actionListener4); @@ -196,19 +200,29 @@ public class NumberEditorDefinePane extends FieldEditorDefinePane UILabel numberLabel = new UILabel(Inter.getLocText(new String[]{"FR-Designer_Double", "Numbers"})); numberLabel.setBorder(BorderFactory.createEmptyBorder(0,12,0,0)); + JPanel pane1 = new JPanel(new BorderLayout()); + pane1.add(decimalLength, BorderLayout.CENTER); + pane1.setBorder(BorderFactory.createEmptyBorder(0,12,0,0)); + JPanel pane2 = new JPanel(new BorderLayout()); + pane2.add(maxValueSpinner, BorderLayout.CENTER); + pane2.setBorder(BorderFactory.createEmptyBorder(0,12,0,0)); + JPanel pane3 = new JPanel(new BorderLayout()); + pane3.add(minValueSpinner, BorderLayout.CENTER); + pane3.setBorder(BorderFactory.createEmptyBorder(0,12,0,0)); + double f = TableLayout.FILL; double p = TableLayout.PREFERRED; Component[][] components = new Component[][]{ new Component[]{allowDecimalsCheckBox, null }, - new Component[]{numberLabel, decimalLength }, + new Component[]{numberLabel, pane1 }, new Component[]{allowNegativeCheckBox, null}, - new Component[]{setMaxValueCheckBox, maxValueSpinner}, - new Component[]{setMinValueCheckBox, minValueSpinner}, + new Component[]{setMaxValueCheckBox, pane2}, + new Component[]{setMinValueCheckBox, pane3}, }; double[] rowSize = {p, p, p, p, p}; double[] columnSize = {p,f}; int[][] rowCount = {{1, 1},{1, 1},{1, 1},{1, 1},{1, 1}}; - JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_MEDIUM, 1); + JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_MEDIUM, LayoutConstants.VGAP_MEDIUM); panel.setBorder(BorderFactory.createEmptyBorder(0,1,0,0)); return panel; @@ -255,7 +269,7 @@ public class NumberEditorDefinePane extends FieldEditorDefinePane NumberEditor ob = new NumberEditor(); ob.setAllowDecimals(allowDecimalsCheckBox.isSelected()); if (allowDecimalsCheckBox.isSelected()) { - ob.setMaxDecimalLength(this.decimalLength.getValue()); + ob.setMaxDecimalLength((Integer) this.decimalLength.getValue()); } ob.setAllowNegative(allowNegativeCheckBox.isSelected()); diff --git a/designer/src/com/fr/design/widget/ui/RadioGroupDefinePane.java b/designer/src/com/fr/design/widget/ui/RadioGroupDefinePane.java index 460065ba6..43dc848a7 100644 --- a/designer/src/com/fr/design/widget/ui/RadioGroupDefinePane.java +++ b/designer/src/com/fr/design/widget/ui/RadioGroupDefinePane.java @@ -1,63 +1,63 @@ -package com.fr.design.widget.ui; - -import java.awt.FlowLayout; - -import javax.swing.JPanel; - -import com.fr.design.data.DataCreatorUI; -import com.fr.design.layout.FRGUIPaneFactory; -import com.fr.design.present.dict.DictionaryPane; -import com.fr.form.ui.RadioGroup; - -public class RadioGroupDefinePane extends FieldEditorDefinePane { - private DictionaryPane dictPane; - - private ButtonGroupDictPane buttonGroupDictPane; - - public RadioGroupDefinePane() { - this.initComponents(); - } - - @Override - protected void initComponents() { - super.initComponents(); - - dictPane = new DictionaryPane(); - } - - @Override - protected JPanel setFirstContentPane() { - - JPanel centerPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); - buttonGroupDictPane = new ButtonGroupDictPane(); - buttonGroupDictPane.setLayout(new FlowLayout(FlowLayout.LEFT, 5, 0)); - centerPane.add(buttonGroupDictPane); - return centerPane; - } - - @Override - protected RadioGroup updateSubFieldEditorBean() { - RadioGroup ob = new RadioGroup(); - - ob.setDictionary(this.dictPane.updateBean()); - this.buttonGroupDictPane.update(ob); - - return ob; - } - - @Override - protected String title4PopupWindow() { - return "radiogroup"; - } - - @Override - protected void populateSubFieldEditorBean(RadioGroup ob) { - this.dictPane.populateBean(ob.getDictionary()); - this.buttonGroupDictPane.populate(ob); - } - - @Override - public DataCreatorUI dataUI() { - return dictPane; - } +package com.fr.design.widget.ui; + +import java.awt.FlowLayout; + +import javax.swing.JPanel; + +import com.fr.design.data.DataCreatorUI; +import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.design.present.dict.DictionaryPane; +import com.fr.form.ui.RadioGroup; + +public class RadioGroupDefinePane extends FieldEditorDefinePane { + private DictionaryPane dictPane; + + private ButtonGroupDictPane buttonGroupDictPane; + + public RadioGroupDefinePane() { + this.initComponents(); + } + + @Override + protected void initComponents() { + super.initComponents(); + + dictPane = new DictionaryPane(); + } + + @Override + protected JPanel setFirstContentPane() { + + JPanel centerPane = FRGUIPaneFactory.createLeftFlowZeroGapBorderPane(); + buttonGroupDictPane = new ButtonGroupDictPane(); + buttonGroupDictPane.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0)); + centerPane.add(buttonGroupDictPane); + return centerPane; + } + + @Override + protected RadioGroup updateSubFieldEditorBean() { + RadioGroup ob = new RadioGroup(); + + ob.setDictionary(this.dictPane.updateBean()); + this.buttonGroupDictPane.update(ob); + + return ob; + } + + @Override + protected String title4PopupWindow() { + return "radiogroup"; + } + + @Override + protected void populateSubFieldEditorBean(RadioGroup ob) { + this.dictPane.populateBean(ob.getDictionary()); + this.buttonGroupDictPane.populate(ob); + } + + @Override + public DataCreatorUI dataUI() { + return dictPane; + } } \ No newline at end of file diff --git a/designer_base/src/com/fr/design/widget/btn/ButtonWithHotkeysDetailPane.java b/designer_base/src/com/fr/design/widget/btn/ButtonWithHotkeysDetailPane.java index 18ae3a5c4..faae19220 100644 --- a/designer_base/src/com/fr/design/widget/btn/ButtonWithHotkeysDetailPane.java +++ b/designer_base/src/com/fr/design/widget/btn/ButtonWithHotkeysDetailPane.java @@ -1,7 +1,9 @@ package com.fr.design.widget.btn; -import com.fr.design.foldablepane.UIExpandablePane; -import com.fr.design.gui.frpane.AttributeChangeListener; +import java.awt.*; + +import javax.swing.*; + import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.itextfield.UITextField; import com.fr.design.layout.FRGUIPaneFactory; @@ -12,11 +14,6 @@ import com.fr.form.ui.Button; import com.fr.general.Inter; import com.fr.stable.StableUtils; -import javax.swing.*; -import java.awt.*; -import java.awt.event.FocusEvent; -import java.awt.event.FocusListener; - /** * Created by IntelliJ IDEA. * Author : Richer @@ -28,62 +25,39 @@ public abstract class ButtonWithHotkeysDetailPane extends Butt private UITextField hotkeysTextField; private UITextField buttonNameTextField; private IconDefinePane iconPane; - private AttributeChangeListener listener; - public ButtonWithHotkeysDetailPane() { initComponents(); } private void initComponents() { -// creator. this.setLayout(FRGUIPaneFactory.createBorderLayout()); -// JPanel advancedPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("FR-Designer_Advanced")); - JPanel jPanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); -// advancedPane.setPreferredSize(new Dimension(600, 341)); + JPanel advancedPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("FR-Designer_Advanced")); + advancedPane.setPreferredSize(new Dimension(600, 341)); JPanel attrPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); attrPane.setBorder(BorderFactory.createEmptyBorder(0, 4, 0, 4)); + this.add(advancedPane); double p = TableLayout.PREFERRED; - double f = TableLayout.FILL; - double rowSize[] = {p, p, p, p, p, p, p}; - double columnSize[] = {p, f}; - int[][] rowCount = {{1, 1}, {1, 1}, {1, 3}, {1, 1}, {1, 1}}; + double rowSize[] = {p, p, p, p}; + double columnSize[] = {p, p}; JPanel labelPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); iconPane = new IconDefinePane(); labelPane.add(iconPane); Component[][] n_components = { - {new UILabel(Inter.getLocText("FR-Designer_Button-Name") + ":"), buttonNameTextField = new UITextField()}, - {new UILabel("背景" + ":"), new UITextField()}, - {new UILabel("字体" + ":"), new UITextField()}, - {new UILabel("图标" + ":"), new UITextField()}, - {new UILabel(Inter.getLocText("FR-Designer_Button-Hotkeys") + ":"), hotkeysTextField = new UITextField()} + {new UILabel(Inter.getLocText("FR-Designer_Button-Name") + ":"), buttonNameTextField = new UITextField(16)}, + {new UILabel(Inter.getLocText("FR-Designer_Button-Icon") + ":"), labelPane}, + {new UILabel(Inter.getLocText("FR-Designer_Button-Type") + ":"), createButtonTypeComboBox()}, + {new UILabel(Inter.getLocText("FR-Designer_Button-Hotkeys") + ":"), hotkeysTextField = new UITextField(16)} }; - buttonNameTextField.addFocusListener(new FocusListener() { - @Override - public void focusGained(FocusEvent e) { - - } - - @Override - public void focusLost(FocusEvent e) { -// creator.getWidget().set - - } - }); hotkeysTextField.setToolTipText(StableUtils.join(ButtonConstants.HOTKEYS, ",")); - JPanel panel = TableLayoutHelper.createGapTableLayoutPane(n_components, rowSize, columnSize, rowCount, 10, 8); - panel.setBorder(BorderFactory.createEmptyBorder(5,5,5,5)); - jPanel.add(panel, BorderLayout.CENTER); - UIExpandablePane advancedPane = new UIExpandablePane("高级", 280, 20, jPanel); - this.add(advancedPane); - } - - //add By kerry - public void addAttributeChangeListener(AttributeChangeListener listener) { - this.listener = listener; + JPanel panel = TableLayoutHelper.createGapTableLayoutPane(n_components, rowSize, columnSize, 0, 8); + advancedPane.add(panel,BorderLayout.NORTH); + Component comp = createCenterPane(); + if(comp != null ) { + advancedPane.add(comp,BorderLayout.CENTER); + } } - protected abstract Component createCenterPane(); @Override @@ -104,11 +78,4 @@ public abstract class ButtonWithHotkeysDetailPane extends Butt button.setHotkeys(hotkeysTextField.getText()); return button; } - - - public void updateBean(Button ob) { - ob.setIconName(iconPane.update()); - ob.setText(buttonNameTextField.getText()); - ob.setHotkeys(hotkeysTextField.getText()); - } } \ No newline at end of file From 576032b7a5638789cd4d8dc7b14cef2398cc0894 Mon Sep 17 00:00:00 2001 From: hzzz Date: Mon, 7 Aug 2017 16:30:33 +0800 Subject: [PATCH 15/30] hzzzz --- .../widget/ui/ListEditorDefinePane.java | 4 +- .../design/widget/ui/MultiFileEditorPane.java | 46 ++++++++----------- .../ui/WriteUnableRepeatEditorPane.java | 5 +- 3 files changed, 24 insertions(+), 31 deletions(-) diff --git a/designer/src/com/fr/design/widget/ui/ListEditorDefinePane.java b/designer/src/com/fr/design/widget/ui/ListEditorDefinePane.java index 818f4ec11..1f23e18dd 100644 --- a/designer/src/com/fr/design/widget/ui/ListEditorDefinePane.java +++ b/designer/src/com/fr/design/widget/ui/ListEditorDefinePane.java @@ -25,8 +25,8 @@ public class ListEditorDefinePane extends WriteUnableRepeatEditorPane this.initComponents(); } - + @Override protected String title4PopupWindow() { return "file"; @@ -34,42 +35,35 @@ public class MultiFileEditorPane extends FieldEditorDefinePane @Override protected JPanel setFirstContentPane() { - acceptType = new DictionaryComboBox(DictionaryConstants.acceptTypes, DictionaryConstants.fileTypeDisplays); - acceptType.setPreferredSize(new Dimension(200, 18)); + JPanel contenter = FRGUIPaneFactory.createMediumHGapFlowInnerContainer_M_Pane_First0(); + JPanel centerPane = FRGUIPaneFactory.createYBoxEmptyBorderPane(); +// centerPane.add(singleFileCheckBox = new UICheckBox(Inter.getLocText("SINGLE_FILE_UPLOAD"))); + + + singleFileCheckBox = new UICheckBox(Inter.getLocText("SINGLE_FILE_UPLOAD")); + acceptType = new DictionaryComboBox(DictionaryConstants.acceptTypes, DictionaryConstants.fileTypeDisplays); + acceptType.setPreferredSize(new Dimension(100, 18)); fileSizeField = new UINumberField(); fileSizeField.setPreferredSize(new Dimension(80, 18)); - - JPanel singleFilePane = FRGUIPaneFactory.createNormalFlowInnerContainer_M_Pane(); - singleFilePane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); + JPanel singleFilePane = FRGUIPaneFactory.createMediumHGapFlowInnerContainer_M_Pane_First0(); singleFilePane.add(singleFileCheckBox); + centerPane.add(singleFilePane); - JPanel allowTypePane = FRGUIPaneFactory.createNormalFlowInnerContainer_M_Pane(); - allowTypePane.setLayout(FRGUIPaneFactory.createLabelFlowLayout()); - allowTypePane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); - allowTypePane.add(new UILabel(" " + Inter.getLocText("File-Allow_Upload_Files") + ":")); + JPanel allowTypePane = FRGUIPaneFactory.createMediumHGapFlowInnerContainer_M_Pane_First0(); + allowTypePane.add(new UILabel(Inter.getLocText("File-Allow_Upload_Files") + ":")); allowTypePane.add(acceptType); + centerPane.add(allowTypePane); - JPanel fileSizePane = FRGUIPaneFactory.createNormalFlowInnerContainer_M_Pane(); - fileSizePane.add(new UILabel(" " + Inter.getLocText("File-File_Size_Limit") + ":")); + JPanel fileSizePane = FRGUIPaneFactory.createMediumHGapFlowInnerContainer_M_Pane_First0(); + fileSizePane.add(new UILabel(Inter.getLocText("File-File_Size_Limit") + ":")); fileSizePane.add(fileSizeField); fileSizePane.add(new UILabel(" KB")); + centerPane.add(fileSizePane); - double f = TableLayout.FILL; - double p = TableLayout.PREFERRED; - Component[][] components = new Component[][]{ - new Component[]{singleFileCheckBox, null }, - new Component[]{new UILabel(" " + Inter.getLocText("File-Allow_Upload_Files") + ":"), acceptType}, - new Component[]{new UILabel(" " + Inter.getLocText("File-File_Size_Limit") + ":"), fileSizeField}, - }; - double[] rowSize = {p, p,p}; - double[] columnSize = {p,f}; - int[][] rowCount = {{1, 1},{1, 1},{1, 1}}; - JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_SMALL, 5); - - - return panel; + contenter.add(centerPane); + return contenter; } @Override diff --git a/designer/src/com/fr/design/widget/ui/WriteUnableRepeatEditorPane.java b/designer/src/com/fr/design/widget/ui/WriteUnableRepeatEditorPane.java index 633572e0f..33b8e3f88 100644 --- a/designer/src/com/fr/design/widget/ui/WriteUnableRepeatEditorPane.java +++ b/designer/src/com/fr/design/widget/ui/WriteUnableRepeatEditorPane.java @@ -20,9 +20,8 @@ public abstract class WriteUnableRepeatEditorPane Date: Mon, 7 Aug 2017 16:43:29 +0800 Subject: [PATCH 16/30] rm button group border --- designer_base/src/com/fr/design/constants/UIConstants.java | 2 +- designer_base/src/com/fr/design/gui/ibutton/UIButtonGroup.java | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/designer_base/src/com/fr/design/constants/UIConstants.java b/designer_base/src/com/fr/design/constants/UIConstants.java index 3945e756f..5332ce13d 100644 --- a/designer_base/src/com/fr/design/constants/UIConstants.java +++ b/designer_base/src/com/fr/design/constants/UIConstants.java @@ -153,7 +153,7 @@ public interface UIConstants { public static final Color BARNOMAL = new Color(232, 232, 233); public static final Color COMPONENT_BACKGROUND_COLOR = new Color(237,237,238); public static final int ARC = 0; - public static final int BUTTON_GROUP_ARC = 6; + public static final int BUTTON_GROUP_ARC = 0; public static final int LARGEARC = 6; public static final Stroke BS = new BasicStroke(1f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND, 2f, new float[]{3, 1}, 0); public static final Icon PREVIEW_DOWN = BaseUtils.readIcon("com/fr/design/images/buttonicon/prevew_down_icon.png"); diff --git a/designer_base/src/com/fr/design/gui/ibutton/UIButtonGroup.java b/designer_base/src/com/fr/design/gui/ibutton/UIButtonGroup.java index a44dde725..ddd9d4494 100644 --- a/designer_base/src/com/fr/design/gui/ibutton/UIButtonGroup.java +++ b/designer_base/src/com/fr/design/gui/ibutton/UIButtonGroup.java @@ -153,14 +153,13 @@ public class UIButtonGroup extends JPanel implements GlobalNameObserver { } protected void initButton(UIToggleButton labelButton) { - labelButton.setRoundBorder(true); labelButton.setBorderPainted(false); labelButtonList.add(labelButton); this.add(labelButton); } protected Border getGroupBorder() { - return BorderFactory.createEmptyBorder(1, 1, 1, 1); + return BorderFactory.createEmptyBorder(0, 0, 0, 0); } protected LayoutManager getGridLayout(int number) { From 51dceb315feb3c67756cbb3a26d6a9bcf42071df Mon Sep 17 00:00:00 2001 From: "yaoh.wu" Date: Mon, 7 Aug 2017 16:33:17 +0800 Subject: [PATCH 17/30] =?UTF-8?q?REPORT-3348=20=E5=9B=BD=E9=99=85=E5=8C=96?= =?UTF-8?q?=EF=BC=8Ctable=20layout=E5=AF=B9=E9=BD=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dscolumn/ResultSetGroupDockingPane.java | 5 +++-- .../dscolumn/SelectedDataColumnPane.java | 16 ++++++++------- .../com/fr/quickeditor/CellQuickEditor.java | 19 +++++++++++------- .../cellquick/CellDSColumnEditor.java | 20 ++++++++++--------- 4 files changed, 35 insertions(+), 25 deletions(-) diff --git a/designer/src/com/fr/design/dscolumn/ResultSetGroupDockingPane.java b/designer/src/com/fr/design/dscolumn/ResultSetGroupDockingPane.java index c2ef1b8a9..874502bf4 100644 --- a/designer/src/com/fr/design/dscolumn/ResultSetGroupDockingPane.java +++ b/designer/src/com/fr/design/dscolumn/ResultSetGroupDockingPane.java @@ -56,10 +56,11 @@ public class ResultSetGroupDockingPane extends ResultSetGroupPane { private JPanel layoutPane() { double p = TableLayout.PREFERRED; double f = TableLayout.FILL; - + UILabel dataSetLabel = new UILabel(Inter.getLocText("Data_Setting")); + dataSetLabel.setPreferredSize(new Dimension(60, 20)); Component[][] components = new Component[][] { - new Component[]{new UILabel(Inter.getLocText("Data_Setting")), goBox}, + new Component[]{dataSetLabel, goBox}, new Component[]{null, cardPane} }; goBox.addItemListener(new ItemListener() { diff --git a/designer/src/com/fr/design/dscolumn/SelectedDataColumnPane.java b/designer/src/com/fr/design/dscolumn/SelectedDataColumnPane.java index eb93e083a..08f59bbf3 100644 --- a/designer/src/com/fr/design/dscolumn/SelectedDataColumnPane.java +++ b/designer/src/com/fr/design/dscolumn/SelectedDataColumnPane.java @@ -132,14 +132,16 @@ public class SelectedDataColumnPane extends BasicPane { columnNameComboBox.setEditable(true); double f = TableLayout.FILL; double p = TableLayout.PREFERRED; - UILabel label1 = new UILabel(Inter.getLocText("TableData") + " "); - UILabel label2 = new UILabel(Inter.getLocText("FR-Designer_Dynamic_Parameter")); - UILabel label3 = new UILabel(Inter.getLocText("DataColumn") + " "); - tableNameComboBox.setPreferredSize(new Dimension(163, 20)); + UILabel dsLabel = new UILabel(Inter.getLocText("TableData")); + UILabel dpLabel = new UILabel(Inter.getLocText("FR-Designer_Dynamic_Parameter")); + UILabel dcLabel = new UILabel(Inter.getLocText("DataColumn")); + dsLabel.setPreferredSize(new Dimension(60, 20)); + dpLabel.setPreferredSize(new Dimension(60, 20)); + dcLabel.setPreferredSize(new Dimension(60, 20)); Component[][] components = { - {label1, tableNameComboBox}, - {label2, paramButton}, - {label3, columnNameComboBox} + {dsLabel, tableNameComboBox}, + {dpLabel, paramButton}, + {dcLabel, columnNameComboBox} }; this.setLayout(new BorderLayout()); this.add(TableLayoutHelper.createTableLayoutPane(components, new double[]{p, p, p}, new double[]{p, f})); diff --git a/designer/src/com/fr/quickeditor/CellQuickEditor.java b/designer/src/com/fr/quickeditor/CellQuickEditor.java index 1688c1b01..0184e57cd 100644 --- a/designer/src/com/fr/quickeditor/CellQuickEditor.java +++ b/designer/src/com/fr/quickeditor/CellQuickEditor.java @@ -1,6 +1,5 @@ package com.fr.quickeditor; -import com.fr.base.BaseUtils; import com.fr.design.actions.utils.DeprecatedActionManager; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ilable.UILabel; @@ -11,6 +10,7 @@ import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.ElementCasePane; import com.fr.design.selection.QuickEditor; import com.fr.design.utils.gui.GUICoreUtils; +import com.fr.general.IOUtils; import com.fr.general.Inter; import com.fr.grid.selection.CellSelection; import com.fr.report.cell.TemplateCellElement; @@ -24,13 +24,13 @@ import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; /** - * @author zhou - * @since 2012-7-23下午5:16:53 + * @author zhou, yaoh.wu + * @version 2017年8月7日16点54分 + * @since 1.0 */ public abstract class CellQuickEditor extends QuickEditor { protected UITextField columnRowTextField; - private UIButton cellElementEditButton; protected TemplateCellElement cellElement; public CellQuickEditor() { @@ -54,9 +54,14 @@ public abstract class CellQuickEditor extends QuickEditor { double f = TableLayout.FILL; double[] columnSize = {p, f}; double[] rowSize = {p, p}; + UILabel cellLabel = new UILabel(Inter.getLocText("Cell")); + cellLabel.setPreferredSize(new Dimension(60, 20)); + UILabel insertContentLabel = new UILabel(Inter.getLocText("HF-Insert_Content")); + insertContentLabel.setPreferredSize(new Dimension(60, 20)); + UIButton cellElementEditButton = initCellElementEditButton(); Component[][] components = new Component[][]{ - new Component[]{new UILabel(Inter.getLocText("Cell") + " "), columnRowTextField = initColumnRowTextField()}, - new Component[]{new UILabel(Inter.getLocText("HF-Insert_Content") + " "), cellElementEditButton = initCellElementEditButton()}, + new Component[]{cellLabel, columnRowTextField = initColumnRowTextField()}, + new Component[]{insertContentLabel, cellElementEditButton}, }; JPanel topContent = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); topContent.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 15)); @@ -71,7 +76,7 @@ public abstract class CellQuickEditor extends QuickEditor { * @return UIButton */ private UIButton initCellElementEditButton() { - final UIButton cellElementEditButton = new UIButton(BaseUtils.readIcon("/com/fr/design/images/buttonicon/add.png")); + final UIButton cellElementEditButton = new UIButton(IOUtils.readIcon("/com/fr/design/images/buttonicon/add.png")); cellElementEditButton.addMouseListener(new MouseAdapter() { @Override diff --git a/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java b/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java index a9fcebdfa..cffaa1ba3 100644 --- a/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java +++ b/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java @@ -218,6 +218,7 @@ public class CellDSColumnEditor extends CellQuickEditor { double[] rowSize = {P}, columnSize = {P, F}; UILabel uiLabel = new UILabel(Inter.getLocText("FR-Designer_Filter_Conditions")); + uiLabel.setPreferredSize(new Dimension(60, 20)); UIButton uiButton = new UIButton(); if (tc != null) { //第一次初始化时tc为空,引发NullPointerException @@ -538,7 +539,7 @@ public class CellDSColumnEditor extends CellQuickEditor { public ResultSetSortConfigPane() { - this.setLayout(new BorderLayout(0, 0)); + this.setLayout(new BorderLayout()); Icon[] iconArray = { IOUtils.readIcon("/com/fr/design/images/expand/none16x16.png"), IOUtils.readIcon("/com/fr/design/images/expand/asc.png"), @@ -555,6 +556,7 @@ public class CellDSColumnEditor extends CellQuickEditor { centerPane.add(new JPanel(), "none"); centerPane.add(tinyFormulaPane, "content"); UILabel sortLabel = new UILabel(Inter.getLocText("Sort-Sort_Order")); + sortLabel.setPreferredSize(new Dimension(60, 20)); sortTypePane.addChangeListener(new ChangeListener() { @Override public void stateChanged(ChangeEvent e) { @@ -649,7 +651,7 @@ public class CellDSColumnEditor extends CellQuickEditor { public ResultSetFilterConfigPane() { this.setLayout(FRGUIPaneFactory.createBorderLayout()); - UILabel filterLabel = new UILabel("结果集筛选"); + UILabel filterLabel = new UILabel(Inter.getLocText("BindColumn-Results_Filter")); //结果集筛选下拉框 rsComboBox = new UIComboBox(new String[]{ Inter.getLocText("Undefined"), @@ -697,12 +699,12 @@ public class CellDSColumnEditor extends CellQuickEditor { tipCardPane = FRGUIPaneFactory.createCardLayout_S_Pane(); //前N个 - topFormulaPane = new DSColumnAdvancedEditorPane.JFormulaField("="); + topFormulaPane = new JFormulaField("="); setCardPane.add(topFormulaPane, FilterType.TOP.name()); tipCardPane.add(new JPanel(), FilterType.TOP.name()); //后N个 - bottomFormulaPane = new DSColumnAdvancedEditorPane.JFormulaField("="); + bottomFormulaPane = new JFormulaField("="); setCardPane.add(bottomFormulaPane, FilterType.BOTTOM.name()); tipCardPane.add(new JPanel(), FilterType.BOTTOM.name()); @@ -829,7 +831,7 @@ public class CellDSColumnEditor extends CellQuickEditor { Component[] buttonComponent = new Component[]{ formulaButton }; - JPanel pane = new JPanel(new BorderLayout(0, 0)); + JPanel pane = new JPanel(new BorderLayout()); pane.add(formulaTextField, BorderLayout.CENTER); pane.add(GUICoreUtils.createFlowPane(buttonComponent, FlowLayout.LEFT, LayoutConstants.HGAP_LARGE), BorderLayout.EAST); Component[][] components = new Component[][]{ @@ -903,12 +905,12 @@ public class CellDSColumnEditor extends CellQuickEditor { private JFormulaField formulaField; public CustomValuePane() { - this.setLayout(FRGUIPaneFactory.createBoxFlowLayout()); - UILabel customValueLabel = new UILabel("显示值"); + this.setLayout(new BorderLayout()); + UILabel customValueLabel = new UILabel(Inter.getLocText("FR-Designer_Display_Value")); + customValueLabel.setPreferredSize(new Dimension(60, 20)); formulaField = new JFormulaField("$$$"); - formulaField.setPreferredSize(new Dimension(159, 20)); this.add(TableLayoutHelper.createTableLayoutPane(new Component[][]{ - {customValueLabel, formulaField}, + new Component[]{customValueLabel, formulaField}, }, new double[]{P}, new double[]{P, F}), BorderLayout.CENTER); } From 94b990083a3825da795caa5fb9664f5c8cd60e15 Mon Sep 17 00:00:00 2001 From: MoMeak Date: Mon, 7 Aug 2017 17:40:29 +0800 Subject: [PATCH 18/30] =?UTF-8?q?REPORT-2897=209.0=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E4=BF=AE=E6=94=B9=20=E8=A7=86=E8=A7=89=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/present/BarCodePane.java | 750 +++++++++--------- .../fr/design/present/CurrencyLinePane.java | 460 +++++------ .../design/widget/ui/MultiFileEditorPane.java | 166 ++-- .../com/fr/design/locale/designer.properties | 1 + .../design/locale/designer_en_US.properties | 3 +- .../design/locale/designer_ja_JP.properties | 1 + .../design/locale/designer_ko_KR.properties | 1 + .../design/locale/designer_zh_CN.properties | 1 + .../design/locale/designer_zh_TW.properties | 3 +- 9 files changed, 694 insertions(+), 692 deletions(-) diff --git a/designer/src/com/fr/design/present/BarCodePane.java b/designer/src/com/fr/design/present/BarCodePane.java index db894b203..583982bcb 100644 --- a/designer/src/com/fr/design/present/BarCodePane.java +++ b/designer/src/com/fr/design/present/BarCodePane.java @@ -1,376 +1,376 @@ -package com.fr.design.present; - -import com.fr.design.beans.FurtherBasicBeanPane; -import com.fr.design.border.UIRoundedBorder; -import com.fr.design.constants.UIConstants; -import com.fr.design.gui.icheckbox.UICheckBox; -import com.fr.design.gui.icombobox.UIComboBox; -import com.fr.design.gui.icombobox.UIComboBoxRenderer; -import com.fr.design.gui.ilable.UILabel; -import com.fr.design.gui.ispinner.UIBasicSpinner; -import com.fr.design.layout.FRGUIPaneFactory; -import com.fr.design.layout.TableLayout; -import com.fr.design.layout.TableLayoutHelper; -import com.fr.design.utils.gui.GUICoreUtils; -import com.fr.general.Inter; -import com.fr.report.cell.cellattr.BarcodeAttr; -import com.fr.report.cell.cellattr.BarcodePresent; -import com.fr.report.cell.painter.barcode.BarcodeImpl; -import com.fr.report.cell.painter.barcode.core.BarCodeUtils; -import com.fr.stable.pinyin.ChineseHelper; - -import javax.swing.*; -import javax.swing.border.TitledBorder; -import javax.swing.event.ChangeEvent; -import javax.swing.event.ChangeListener; -import java.awt.*; -import java.awt.event.ItemEvent; -import java.awt.event.ItemListener; -import java.awt.font.FontRenderContext; -import java.awt.font.LineBreakMeasurer; -import java.awt.font.TextAttribute; -import java.awt.font.TextLayout; -import java.awt.geom.AffineTransform; -import java.text.AttributedCharacterIterator; -import java.text.AttributedString; -import java.util.HashMap; -import java.util.Map; - -/** - * @author zhou - * @since 2012-6-4下午6:49:59 - */ -public class BarCodePane extends FurtherBasicBeanPane { - private final int NUM16 = 16; - private BarCodePreviewPane barCodePreviewPane; - private UIComboBox typeComboBox; - private UIBasicSpinner barWidthSpinner; - private UIBasicSpinner barHeightSpinner; - private UIBasicSpinner RCodesizespinner; - private UICheckBox drawingTextCheckBox; - private UIComboBox RCodeVersionComboBox; - private UIComboBox RCodeErrorCorrectComboBox; - private UILabel typeSetLabel; - - private String testText = "12345"; - - public BarCodePane() { - this.initComponents(); - addlistener(); - } - - public static void main(String[] args) { - JFrame jf = new JFrame("test"); - jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); - JPanel content = (JPanel) jf.getContentPane(); - content.setLayout(new BorderLayout()); - content.add(new BarCodePane(), BorderLayout.CENTER); - GUICoreUtils.centerWindow(jf); - jf.setSize(270, 400); - jf.setVisible(true); - } - - private void initComponents() { - barCodePreviewPane = new BarCodePreviewPane(); - this.barWidthSpinner = new UIBasicSpinner(new SpinnerNumberModel(10.0, 1, 100, 1.0)); - this.barHeightSpinner = new UIBasicSpinner(new SpinnerNumberModel(30, 1, 100, 1)); - this.barWidthSpinner.setPreferredSize(new Dimension(60, 20)); - this.barHeightSpinner.setPreferredSize(new Dimension(60, 20)); - JPanel borderPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); - TitledBorder titledBorder = new TitledBorder(new UIRoundedBorder(UIConstants.LINE_COLOR, 1, 5), Inter.getLocText("StyleFormat-Sample"), 4, 2, this.getFont(), UIConstants.LINE_COLOR); - borderPane.setBorder(titledBorder); - borderPane.add(barCodePreviewPane, BorderLayout.CENTER); - setTypeComboBox(); - setSome(); - RCodesizespinner = new UIBasicSpinner(new SpinnerNumberModel(2, 1, 6, 1)); - RCodeVersionComboBox = new UIComboBox(); - RCodeErrorCorrectComboBox = new UIComboBox(); - typeSetLabel = new UILabel(Inter.getLocText("Type_Set") + ":", UILabel.RIGHT); - initVersionComboBox(); - initErrorCorrectComboBox(); - - drawingTextCheckBox = new UICheckBox(Inter.getLocText("BarCodeD-Drawing_Text")); - drawingTextCheckBox.setSelected(true); - double p = TableLayout.PREFERRED; - double f = TableLayout.FILL; - double[] columnSize = {p, f}; - double[] rowSize = {p, p, p, p, p, p, p, p}; - barCodePreviewPane.setPreferredSize(new Dimension(0, 125)); - final JPanel centerPane = new JPanel(new CardLayout()); - - Component[][] components = new Component[][]{ - new Component[]{typeSetLabel, typeComboBox}, - new Component[]{borderPane, null}, - new Component[]{centerPane, null} - }; - JPanel barCode = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); - centerPane.add(getNormalPane(), "normal"); - centerPane.add(getSpecialPane(), "special"); - typeComboBox.addItemListener(new ItemListener() { - public void itemStateChanged(ItemEvent e) { - CardLayout cardLayout = (CardLayout) centerPane.getLayout(); - cardLayout.show(centerPane, typeComboBox.getSelectedIndex() == NUM16 ? "special" : "normal"); - setTestText(BarCodeUtils.getTestTextByBarCode(typeComboBox.getSelectedIndex())); - repaintPreviewBarCode(); - } - }); - this.setLayout(new BorderLayout()); - this.add(barCode, BorderLayout.CENTER); - } - - private void setTypeComboBox() { - typeComboBox = new UIComboBox(BarCodeUtils.getAllSupportedBarCodeTypeArray()); - typeComboBox.setRenderer(new UIComboBoxRenderer() { - @Override - public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { - super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); - - if (value instanceof Integer) { - this.setText(" " + BarCodeUtils.getBarCodeTypeName(((Integer) value).intValue())); - } - return this; - } - }); - } - - private void setSome() { - JFormattedTextField heightTextField = ((JSpinner.DefaultEditor) barHeightSpinner.getEditor()).getTextField(); - heightTextField.setColumns(2); - - JFormattedTextField widthTextField = ((JSpinner.DefaultEditor) barWidthSpinner.getEditor()).getTextField(); - widthTextField.setColumns(2); - } - - private JPanel getNormalPane() { - double f = TableLayout.FILL; - double p = TableLayout.PREFERRED; - double[] rowSize = {p, p, p, p, p, p, p, p}; - double[] columnSize1 = {p, f, f}; - JPanel barWidthContainer = new JPanel(new FlowLayout(FlowLayout.LEFT, 2, 0)); - barWidthContainer.add(barWidthSpinner); - JPanel barHeightContainer = new JPanel(new FlowLayout(FlowLayout.LEFT, 2, 0)); - barHeightContainer.add(barHeightSpinner); - UILabel uiLabel = new UILabel(Inter.getLocText("Tree-Width") + ":", UILabel.RIGHT); - uiLabel.setPreferredSize(typeSetLabel.getPreferredSize()); - Component[][] components_normal = new Component[][]{ - new Component[]{new UILabel("条形码大小", UILabel.LEFT), barWidthContainer, barHeightContainer}, - new Component[]{null, new UILabel(Inter.getLocText("Tree-Width"), UILabel.CENTER), new UILabel(Inter.getLocText("Height"), UILabel.CENTER)}, - new Component[]{drawingTextCheckBox, null, null} - }; - - - JPanel normalPane = TableLayoutHelper.createTableLayoutPane(components_normal, rowSize, columnSize1); - return normalPane; - } - - - private JPanel getSpecialPane() { - double p = TableLayout.PREFERRED; - double f = TableLayout.FILL; - double[] columnSize1 = {p, p}; - double[] rowSize = {p, p, p, p, p, p, p, p}; - UILabel uiLabel = new UILabel(Inter.getLocText("RCodeVersion") + ":", UILabel.RIGHT); - uiLabel.setPreferredSize(typeSetLabel.getPreferredSize()); - Component[][] components_special = new Component[][]{ - new Component[]{uiLabel, RCodeVersionComboBox}, - new Component[]{new UILabel(Inter.getLocText("RCodeErrorCorrect") + ":", UILabel.RIGHT), RCodeErrorCorrectComboBox}, - new Component[]{new UILabel(Inter.getLocText("RCodeDrawPix") + ":", UILabel.RIGHT), RCodesizespinner} - }; - - JPanel specialPane = TableLayoutHelper.createTableLayoutPane(components_special, rowSize, columnSize1); - return specialPane; - } - - private void addlistener() { - RCodesizespinner.addChangeListener(new ChangeListener() { - public void stateChanged(ChangeEvent e) { - repaintPreviewBarCode(); - } - }); - RCodeVersionComboBox.addItemListener(new ItemListener() { - public void itemStateChanged(ItemEvent e) { - repaintPreviewBarCode(); - } - }); - RCodeErrorCorrectComboBox.addItemListener(new ItemListener() { - public void itemStateChanged(ItemEvent e) { - repaintPreviewBarCode(); - } - }); - this.barWidthSpinner.addChangeListener(new ChangeListener() { - public void stateChanged(ChangeEvent e) { - repaintPreviewBarCode(); - } - }); - this.barHeightSpinner.addChangeListener(new ChangeListener() { - public void stateChanged(ChangeEvent e) { - repaintPreviewBarCode(); - } - }); - drawingTextCheckBox.addChangeListener(new ChangeListener() { - public void stateChanged(ChangeEvent e) { - repaintPreviewBarCode(); - } - }); - repaintPreviewBarCode(); - } - - @Override - /** - * - */ - public String title4PopupWindow() { - return Inter.getLocText("Highlight-Barcode"); - } - - private void initVersionComboBox() { - String[] array = {Inter.getLocText(new String[]{"Auto", "Choose"}), "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16"}; - initcombobox(this.RCodeVersionComboBox, array, 0); - } - - private void initErrorCorrectComboBox() { - String[] array = {"L" + Inter.getLocText("Level") + "7%", "M" + Inter.getLocText("Level") + "15%", "Q" + Inter.getLocText("Level") + "25%", "H" + Inter.getLocText("Level") + "30%"}; - initcombobox(this.RCodeErrorCorrectComboBox, array, 1); - } - - private void initcombobox(UIComboBox combobox, String[] array, int index) { - combobox.removeAllItems(); - for (int i = 0; i < array.length; i++) { - combobox.addItem(array[i]); - } - combobox.setSelectedIndex(index); - } - - private void repaintPreviewBarCode() { - try { - // carl:不支持中文转条形码 - if (ChineseHelper.containChinese(getTestText()) && this.typeComboBox.getSelectedIndex() != NUM16) { - throw new Exception("Illegal Character."); - } - this.barCodePreviewPane.setObject(BarCodeUtils.getBarcodeImpl(this.updateBean().getBarcode(), getTestText())); - } catch (Exception exp) { - this.barCodePreviewPane.setObject(Inter.getLocText("Error") + ": " + exp.getMessage()); - } - } - - /** - * - */ - public void reset() { - populateBean(new BarcodePresent()); - } - - @Override - public void populateBean(BarcodePresent ob) { - BarcodeAttr barcodeAttr = ob.getBarcode(); - if (barcodeAttr == null) { - barcodeAttr = new BarcodeAttr(); - } - this.setTestText(BarCodeUtils.getTestTextByBarCode(barcodeAttr.getType())); - this.typeComboBox.setSelectedIndex(barcodeAttr.getType()); - this.barWidthSpinner.setValue(new Double(barcodeAttr.getBarWidth())); - this.barHeightSpinner.setValue(new Integer(barcodeAttr.getBarHeight())); - this.drawingTextCheckBox.setSelected(barcodeAttr.isDrawingText()); - this.RCodesizespinner.setValue(new Integer(barcodeAttr.getRcodeDrawPix())); - this.repaintPreviewBarCode(); - } - - @Override - public BarcodePresent updateBean() { - BarcodeAttr barcodeAttr = new BarcodeAttr(); - if ((typeComboBox.getSelectedIndex() == NUM16)) { - barcodeAttr.setRCodeVersion(this.RCodeVersionComboBox.getSelectedIndex()); - barcodeAttr.setRCodeErrorCorrect(this.RCodeErrorCorrectComboBox.getSelectedIndex()); - barcodeAttr.setRcodeDrawPix(((Integer) this.RCodesizespinner.getValue()).intValue()); - } - barcodeAttr.setType(this.typeComboBox.getSelectedIndex()); - barcodeAttr.setBarWidth(((Double) this.barWidthSpinner.getValue()).doubleValue() / 10); - barcodeAttr.setBarHeight(((Integer) this.barHeightSpinner.getValue()).intValue()); - barcodeAttr.setDrawingText(this.drawingTextCheckBox.isSelected()); - return new BarcodePresent(barcodeAttr); - } - - public void setTestText(String testText) { - this.testText = testText; - } - - public String getTestText() { - return testText; - } - - private static class BarCodePreviewPane extends JPanel { - private Object obj; - - public BarCodePreviewPane() { -// setBackground(Color.WHITE); - } - - /** - * BarcodeImpl or Error String. - */ - public void setObject(Object obj) { - this.obj = obj; - GUICoreUtils.repaint(this); - } - - @Override - public void paintComponent(Graphics g) { - super.paintComponent(g); - if (obj == null) { - return; - } - if (obj instanceof BarcodeImpl) { - BarcodeImpl barcodeImpl = (BarcodeImpl) obj; - Dimension size = this.getSize(); - barcodeImpl.draw((Graphics2D) g, (int) (size.getWidth() - barcodeImpl.getWidth()) / 2, (int) (size.getHeight() - barcodeImpl.getHeight()) / 2); - } else { - // 在中央画出字符. - Graphics2D graphics2D = (Graphics2D) g; - graphics2D.setPaint(Color.RED); - Map map = new HashMap(); - map.put(TextAttribute.SIZE, new Float(14.0)); - AttributedString vanGogh = new AttributedString(obj.toString(), map); - AttributedCharacterIterator paragraph = vanGogh.getIterator(); - int paragraphStart = paragraph.getBeginIndex(); - int paragraphEnd = paragraph.getEndIndex(); - // Create a new LineBreakMeasurer from the paragraph. - AffineTransform tx = null; - LineBreakMeasurer lineMeasurer = new LineBreakMeasurer(paragraph, new FontRenderContext(tx, false, false)); - // Set formatting width to width of Component. - Dimension size = getSize(); - float formatWidth = size.width; - float drawPosY = 0; - lineMeasurer.setPosition(paragraphStart); - // Get lines from lineMeasurer until the entire - // paragraph has been displayed. - while (lineMeasurer.getPosition() < paragraphEnd) { - // Retrieve next layout. - TextLayout layout = lineMeasurer.nextLayout(formatWidth); - // Move y-coordinate by the ascent of the layout. - drawPosY += layout.getAscent(); - // Compute pen x position. If the paragraph is - // right-to-left, we want to align the TextLayouts - // to the right edge of the panel. - float drawPosX; - if (layout.isLeftToRight()) { - drawPosX = 0; - } else { - drawPosX = formatWidth - layout.getAdvance(); - } - // Draw the TextLayout at (drawPosX, drawPosY). - layout.draw(graphics2D, drawPosX, drawPosY); - // Move y-coordinate in preparation for next layout. - drawPosY += layout.getDescent() + layout.getLeading(); - } - } - } - } - - @Override - /** - * - */ - public boolean accept(Object ob) { - return ob instanceof BarcodePresent; - } +package com.fr.design.present; + +import com.fr.design.beans.FurtherBasicBeanPane; +import com.fr.design.border.UIRoundedBorder; +import com.fr.design.constants.UIConstants; +import com.fr.design.gui.icheckbox.UICheckBox; +import com.fr.design.gui.icombobox.UIComboBox; +import com.fr.design.gui.icombobox.UIComboBoxRenderer; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.ispinner.UIBasicSpinner; +import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.utils.gui.GUICoreUtils; +import com.fr.general.Inter; +import com.fr.report.cell.cellattr.BarcodeAttr; +import com.fr.report.cell.cellattr.BarcodePresent; +import com.fr.report.cell.painter.barcode.BarcodeImpl; +import com.fr.report.cell.painter.barcode.core.BarCodeUtils; +import com.fr.stable.pinyin.ChineseHelper; + +import javax.swing.*; +import javax.swing.border.TitledBorder; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; +import java.awt.*; +import java.awt.event.ItemEvent; +import java.awt.event.ItemListener; +import java.awt.font.FontRenderContext; +import java.awt.font.LineBreakMeasurer; +import java.awt.font.TextAttribute; +import java.awt.font.TextLayout; +import java.awt.geom.AffineTransform; +import java.text.AttributedCharacterIterator; +import java.text.AttributedString; +import java.util.HashMap; +import java.util.Map; + +/** + * @author zhou + * @since 2012-6-4下午6:49:59 + */ +public class BarCodePane extends FurtherBasicBeanPane { + private final int NUM16 = 16; + private BarCodePreviewPane barCodePreviewPane; + private UIComboBox typeComboBox; + private UIBasicSpinner barWidthSpinner; + private UIBasicSpinner barHeightSpinner; + private UIBasicSpinner RCodesizespinner; + private UICheckBox drawingTextCheckBox; + private UIComboBox RCodeVersionComboBox; + private UIComboBox RCodeErrorCorrectComboBox; + private UILabel typeSetLabel; + + private String testText = "12345"; + + public BarCodePane() { + this.initComponents(); + addlistener(); + } + + public static void main(String[] args) { + JFrame jf = new JFrame("test"); + jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + JPanel content = (JPanel) jf.getContentPane(); + content.setLayout(new BorderLayout()); + content.add(new BarCodePane(), BorderLayout.CENTER); + GUICoreUtils.centerWindow(jf); + jf.setSize(270, 400); + jf.setVisible(true); + } + + private void initComponents() { + barCodePreviewPane = new BarCodePreviewPane(); + this.barWidthSpinner = new UIBasicSpinner(new SpinnerNumberModel(10.0, 1, 100, 1.0)); + this.barHeightSpinner = new UIBasicSpinner(new SpinnerNumberModel(30, 1, 100, 1)); + this.barWidthSpinner.setPreferredSize(new Dimension(60, 20)); + this.barHeightSpinner.setPreferredSize(new Dimension(60, 20)); + JPanel borderPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); + TitledBorder titledBorder = new TitledBorder(new UIRoundedBorder(UIConstants.LINE_COLOR, 1, 5), Inter.getLocText("StyleFormat-Sample"), 4, 2, this.getFont(), UIConstants.LINE_COLOR); + borderPane.setBorder(titledBorder); + borderPane.add(barCodePreviewPane, BorderLayout.CENTER); + setTypeComboBox(); + setSome(); + RCodesizespinner = new UIBasicSpinner(new SpinnerNumberModel(2, 1, 6, 1)); + RCodeVersionComboBox = new UIComboBox(); + RCodeErrorCorrectComboBox = new UIComboBox(); + typeSetLabel = new UILabel(Inter.getLocText("Type_Set"), UILabel.RIGHT); + initVersionComboBox(); + initErrorCorrectComboBox(); + + drawingTextCheckBox = new UICheckBox(Inter.getLocText("BarCodeD-Drawing_Text")); + drawingTextCheckBox.setSelected(true); + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = {p, f}; + double[] rowSize = {p, p, p, p, p, p, p, p}; + barCodePreviewPane.setPreferredSize(new Dimension(0, 125)); + final JPanel centerPane = new JPanel(new CardLayout()); + + Component[][] components = new Component[][]{ + new Component[]{typeSetLabel, typeComboBox}, + new Component[]{borderPane, null}, + new Component[]{centerPane, null} + }; + JPanel barCode = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); + centerPane.add(getNormalPane(), "normal"); + centerPane.add(getSpecialPane(), "special"); + typeComboBox.addItemListener(new ItemListener() { + public void itemStateChanged(ItemEvent e) { + CardLayout cardLayout = (CardLayout) centerPane.getLayout(); + cardLayout.show(centerPane, typeComboBox.getSelectedIndex() == NUM16 ? "special" : "normal"); + setTestText(BarCodeUtils.getTestTextByBarCode(typeComboBox.getSelectedIndex())); + repaintPreviewBarCode(); + } + }); + this.setLayout(new BorderLayout()); + this.add(barCode, BorderLayout.CENTER); + } + + private void setTypeComboBox() { + typeComboBox = new UIComboBox(BarCodeUtils.getAllSupportedBarCodeTypeArray()); + typeComboBox.setRenderer(new UIComboBoxRenderer() { + @Override + public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { + super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); + + if (value instanceof Integer) { + this.setText(" " + BarCodeUtils.getBarCodeTypeName(((Integer) value).intValue())); + } + return this; + } + }); + } + + private void setSome() { + JFormattedTextField heightTextField = ((JSpinner.DefaultEditor) barHeightSpinner.getEditor()).getTextField(); + heightTextField.setColumns(2); + + JFormattedTextField widthTextField = ((JSpinner.DefaultEditor) barWidthSpinner.getEditor()).getTextField(); + widthTextField.setColumns(2); + } + + private JPanel getNormalPane() { + double f = TableLayout.FILL; + double p = TableLayout.PREFERRED; + double[] rowSize = {p, p, p, p, p, p, p, p}; + double[] columnSize1 = {p, f, f}; + JPanel barWidthContainer = new JPanel(new FlowLayout(FlowLayout.LEFT, 2, 0)); + barWidthContainer.add(barWidthSpinner); + JPanel barHeightContainer = new JPanel(new FlowLayout(FlowLayout.LEFT, 2, 0)); + barHeightContainer.add(barHeightSpinner); + UILabel uiLabel = new UILabel(Inter.getLocText("Tree-Width") + ":", UILabel.RIGHT); + uiLabel.setPreferredSize(typeSetLabel.getPreferredSize()); + Component[][] components_normal = new Component[][]{ + new Component[]{new UILabel("条形码大小", UILabel.LEFT), barWidthContainer, barHeightContainer}, + new Component[]{null, new UILabel(Inter.getLocText("Tree-Width"), UILabel.CENTER), new UILabel(Inter.getLocText("Height"), UILabel.CENTER)}, + new Component[]{drawingTextCheckBox, null, null} + }; + + + JPanel normalPane = TableLayoutHelper.createTableLayoutPane(components_normal, rowSize, columnSize1); + return normalPane; + } + + + private JPanel getSpecialPane() { + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize1 = {p, p}; + double[] rowSize = {p, p, p, p, p, p, p, p}; + UILabel uiLabel = new UILabel(Inter.getLocText("RCodeVersion") + ":", UILabel.RIGHT); + uiLabel.setPreferredSize(typeSetLabel.getPreferredSize()); + Component[][] components_special = new Component[][]{ + new Component[]{uiLabel, RCodeVersionComboBox}, + new Component[]{new UILabel(Inter.getLocText("RCodeErrorCorrect") + ":", UILabel.RIGHT), RCodeErrorCorrectComboBox}, + new Component[]{new UILabel(Inter.getLocText("RCodeDrawPix") + ":", UILabel.RIGHT), RCodesizespinner} + }; + + JPanel specialPane = TableLayoutHelper.createTableLayoutPane(components_special, rowSize, columnSize1); + return specialPane; + } + + private void addlistener() { + RCodesizespinner.addChangeListener(new ChangeListener() { + public void stateChanged(ChangeEvent e) { + repaintPreviewBarCode(); + } + }); + RCodeVersionComboBox.addItemListener(new ItemListener() { + public void itemStateChanged(ItemEvent e) { + repaintPreviewBarCode(); + } + }); + RCodeErrorCorrectComboBox.addItemListener(new ItemListener() { + public void itemStateChanged(ItemEvent e) { + repaintPreviewBarCode(); + } + }); + this.barWidthSpinner.addChangeListener(new ChangeListener() { + public void stateChanged(ChangeEvent e) { + repaintPreviewBarCode(); + } + }); + this.barHeightSpinner.addChangeListener(new ChangeListener() { + public void stateChanged(ChangeEvent e) { + repaintPreviewBarCode(); + } + }); + drawingTextCheckBox.addChangeListener(new ChangeListener() { + public void stateChanged(ChangeEvent e) { + repaintPreviewBarCode(); + } + }); + repaintPreviewBarCode(); + } + + @Override + /** + * + */ + public String title4PopupWindow() { + return Inter.getLocText("Highlight-Barcode"); + } + + private void initVersionComboBox() { + String[] array = {Inter.getLocText(new String[]{"Auto", "Choose"}), "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16"}; + initcombobox(this.RCodeVersionComboBox, array, 0); + } + + private void initErrorCorrectComboBox() { + String[] array = {"L" + Inter.getLocText("Level") + "7%", "M" + Inter.getLocText("Level") + "15%", "Q" + Inter.getLocText("Level") + "25%", "H" + Inter.getLocText("Level") + "30%"}; + initcombobox(this.RCodeErrorCorrectComboBox, array, 1); + } + + private void initcombobox(UIComboBox combobox, String[] array, int index) { + combobox.removeAllItems(); + for (int i = 0; i < array.length; i++) { + combobox.addItem(array[i]); + } + combobox.setSelectedIndex(index); + } + + private void repaintPreviewBarCode() { + try { + // carl:不支持中文转条形码 + if (ChineseHelper.containChinese(getTestText()) && this.typeComboBox.getSelectedIndex() != NUM16) { + throw new Exception("Illegal Character."); + } + this.barCodePreviewPane.setObject(BarCodeUtils.getBarcodeImpl(this.updateBean().getBarcode(), getTestText())); + } catch (Exception exp) { + this.barCodePreviewPane.setObject(Inter.getLocText("Error") + ": " + exp.getMessage()); + } + } + + /** + * + */ + public void reset() { + populateBean(new BarcodePresent()); + } + + @Override + public void populateBean(BarcodePresent ob) { + BarcodeAttr barcodeAttr = ob.getBarcode(); + if (barcodeAttr == null) { + barcodeAttr = new BarcodeAttr(); + } + this.setTestText(BarCodeUtils.getTestTextByBarCode(barcodeAttr.getType())); + this.typeComboBox.setSelectedIndex(barcodeAttr.getType()); + this.barWidthSpinner.setValue(new Double(barcodeAttr.getBarWidth())); + this.barHeightSpinner.setValue(new Integer(barcodeAttr.getBarHeight())); + this.drawingTextCheckBox.setSelected(barcodeAttr.isDrawingText()); + this.RCodesizespinner.setValue(new Integer(barcodeAttr.getRcodeDrawPix())); + this.repaintPreviewBarCode(); + } + + @Override + public BarcodePresent updateBean() { + BarcodeAttr barcodeAttr = new BarcodeAttr(); + if ((typeComboBox.getSelectedIndex() == NUM16)) { + barcodeAttr.setRCodeVersion(this.RCodeVersionComboBox.getSelectedIndex()); + barcodeAttr.setRCodeErrorCorrect(this.RCodeErrorCorrectComboBox.getSelectedIndex()); + barcodeAttr.setRcodeDrawPix(((Integer) this.RCodesizespinner.getValue()).intValue()); + } + barcodeAttr.setType(this.typeComboBox.getSelectedIndex()); + barcodeAttr.setBarWidth(((Double) this.barWidthSpinner.getValue()).doubleValue() / 10); + barcodeAttr.setBarHeight(((Integer) this.barHeightSpinner.getValue()).intValue()); + barcodeAttr.setDrawingText(this.drawingTextCheckBox.isSelected()); + return new BarcodePresent(barcodeAttr); + } + + public void setTestText(String testText) { + this.testText = testText; + } + + public String getTestText() { + return testText; + } + + private static class BarCodePreviewPane extends JPanel { + private Object obj; + + public BarCodePreviewPane() { +// setBackground(Color.WHITE); + } + + /** + * BarcodeImpl or Error String. + */ + public void setObject(Object obj) { + this.obj = obj; + GUICoreUtils.repaint(this); + } + + @Override + public void paintComponent(Graphics g) { + super.paintComponent(g); + if (obj == null) { + return; + } + if (obj instanceof BarcodeImpl) { + BarcodeImpl barcodeImpl = (BarcodeImpl) obj; + Dimension size = this.getSize(); + barcodeImpl.draw((Graphics2D) g, (int) (size.getWidth() - barcodeImpl.getWidth()) / 2, (int) (size.getHeight() - barcodeImpl.getHeight()) / 2); + } else { + // 在中央画出字符. + Graphics2D graphics2D = (Graphics2D) g; + graphics2D.setPaint(Color.RED); + Map map = new HashMap(); + map.put(TextAttribute.SIZE, new Float(14.0)); + AttributedString vanGogh = new AttributedString(obj.toString(), map); + AttributedCharacterIterator paragraph = vanGogh.getIterator(); + int paragraphStart = paragraph.getBeginIndex(); + int paragraphEnd = paragraph.getEndIndex(); + // Create a new LineBreakMeasurer from the paragraph. + AffineTransform tx = null; + LineBreakMeasurer lineMeasurer = new LineBreakMeasurer(paragraph, new FontRenderContext(tx, false, false)); + // Set formatting width to width of Component. + Dimension size = getSize(); + float formatWidth = size.width; + float drawPosY = 0; + lineMeasurer.setPosition(paragraphStart); + // Get lines from lineMeasurer until the entire + // paragraph has been displayed. + while (lineMeasurer.getPosition() < paragraphEnd) { + // Retrieve next layout. + TextLayout layout = lineMeasurer.nextLayout(formatWidth); + // Move y-coordinate by the ascent of the layout. + drawPosY += layout.getAscent(); + // Compute pen x position. If the paragraph is + // right-to-left, we want to align the TextLayouts + // to the right edge of the panel. + float drawPosX; + if (layout.isLeftToRight()) { + drawPosX = 0; + } else { + drawPosX = formatWidth - layout.getAdvance(); + } + // Draw the TextLayout at (drawPosX, drawPosY). + layout.draw(graphics2D, drawPosX, drawPosY); + // Move y-coordinate in preparation for next layout. + drawPosY += layout.getDescent() + layout.getLeading(); + } + } + } + } + + @Override + /** + * + */ + public boolean accept(Object ob) { + return ob instanceof BarcodePresent; + } } \ No newline at end of file diff --git a/designer/src/com/fr/design/present/CurrencyLinePane.java b/designer/src/com/fr/design/present/CurrencyLinePane.java index b6e0ff853..7922f2186 100644 --- a/designer/src/com/fr/design/present/CurrencyLinePane.java +++ b/designer/src/com/fr/design/present/CurrencyLinePane.java @@ -1,231 +1,231 @@ -package com.fr.design.present; - -import com.fr.design.beans.FurtherBasicBeanPane; -import com.fr.design.border.UIRoundedBorder; -import com.fr.design.constants.UIConstants; -import com.fr.design.gui.ilable.UILabel; -import com.fr.design.gui.ispinner.UIBasicSpinner; -import com.fr.design.gui.itextfield.UITextField; -import com.fr.design.layout.FRGUIPaneFactory; -import com.fr.design.layout.TableLayout; -import com.fr.design.layout.TableLayoutHelper; -import com.fr.design.utils.gui.GUICoreUtils; -import com.fr.general.Inter; -import com.fr.report.cell.cellattr.CurrencyLineAttr; -import com.fr.report.cell.cellattr.CurrencyLinePresent; -import com.fr.report.cell.painter.barcode.BarcodeException; -import com.fr.report.core.CurrencyLineImpl; - -import javax.swing.*; -import javax.swing.border.TitledBorder; -import javax.swing.event.ChangeEvent; -import javax.swing.event.ChangeListener; -import javax.swing.event.DocumentEvent; -import javax.swing.event.DocumentListener; -import java.awt.*; - -/** - * @author zhou - * @since 2012-6-4下午7:34:52 - */ -public class CurrencyLinePane extends FurtherBasicBeanPane { - private static final int VS_NUM = 4; - private static final int VG_NUM = 6; - private UIBasicSpinner intPartSpinner; - private UIBasicSpinner deciPartSpinner; - private UITextField textField; - private CurrencyLinePreviewPane CurrencyLinePreviewPane; - private int intPart = 9; - private int deciPart = 3; - - private static final int POSITION = 8; - ChangeListener listener2 = new ChangeListener() { - - @Override - public void stateChanged(ChangeEvent e) { - CurrencyLinePreviewPane.setObject(textField.getText(), update()); - } - - }; - - DocumentListener listener = new DocumentListener() { - @Override - public void insertUpdate(DocumentEvent e) { - CurrencyLinePreviewPane.setObject(textField.getText(), update()); - } - - @Override - public void removeUpdate(DocumentEvent e) { - CurrencyLinePreviewPane.setObject(textField.getText(), update()); - } - - @Override - public void changedUpdate(DocumentEvent e) { - CurrencyLinePreviewPane.setObject(textField.getText(), update()); - } - }; - - public CurrencyLinePane() { - this.initComponents(); - } - - protected void initComponents() { - // 整数位选择 - intPartSpinner = new UIBasicSpinner(new SpinnerNumberModel(9, 1, 20, 1)); - intPartSpinner.setPreferredSize(new Dimension(135, 20)); - - // 小数位选择 - deciPartSpinner = new UIBasicSpinner(new SpinnerNumberModel(2, 1, 10, 1)); - deciPartSpinner.setPreferredSize(new Dimension(135, 20)); - // 预览区域 - textField = new UITextField(10); - - CurrencyLinePreviewPane = new CurrencyLinePreviewPane(); - CurrencyLinePreviewPane.setPreferredSize(new Dimension(0, 145)); - JPanel borderPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); - TitledBorder titledBorder = new TitledBorder(new UIRoundedBorder(UIConstants.LINE_COLOR, 1, 5), Inter.getLocText("StyleFormat-Sample"), 4, 2, this.getFont(), UIConstants.LINE_COLOR); - borderPane.setBorder(titledBorder); - borderPane.add(CurrencyLinePreviewPane, BorderLayout.CENTER); - - textField.requestFocus(); - - double vs = VS_NUM; - double vg = VG_NUM; - double p = TableLayout.PREFERRED; - double f = TableLayout.FILL; - double[] columnSize = {p, f}; - double[] rowSize = {p, p, p, p}; - - - Component[][] components = new Component[][]{ - new Component[]{new UILabel(Inter.getLocText("Data"), UILabel.LEFT), textField}, - new Component[]{borderPane, null}, - new Component[]{new UILabel(Inter.getLocText("IntPart"), UILabel.LEFT), groupPane(intPartSpinner)}, - new Component[]{new UILabel(Inter.getLocText("DeciPart"), UILabel.LEFT), groupPane(deciPartSpinner)} - - }; - - JPanel linePane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); - this.setLayout(new BorderLayout()); - this.add(linePane, BorderLayout.CENTER); - - - textField.getDocument().addDocumentListener(listener); - intPartSpinner.addChangeListener(listener2); - deciPartSpinner.addChangeListener(listener2); - textField.setText("123456.78"); - } - - @Override - /** - * 窗口名 - * @return 同上 - */ - public String title4PopupWindow() { - return Inter.getLocText("Currency_Line"); - } - - /** - * - */ - public CurrencyLineAttr update() { - CurrencyLineAttr currencylineAttr = new CurrencyLineAttr(); - currencylineAttr.setintPart(((Integer) this.intPartSpinner.getValue()).intValue()); - currencylineAttr.setdeciPart(((Integer) this.deciPartSpinner.getValue()).intValue()); - return currencylineAttr; - } - - /** - * - */ - public void setintPart(int intpart) { - this.intPart = intpart; - } - - /** - * - */ - public void setdeciPart(int decipart) { - this.deciPart = decipart; - } - - private class CurrencyLinePreviewPane extends JPanel { - private String text; - CurrencyLineAttr currencyLineAttr; - - public CurrencyLinePreviewPane() { -// setBackground(Color.WHITE); - } - - public void setObject(String text, CurrencyLineAttr currencyLineAttr) { - this.text = text; - this.currencyLineAttr = currencyLineAttr; - GUICoreUtils.repaint(this); - } - - @Override - public void paintComponent(Graphics g) { - super.paintComponent(g); - if (text == null) { - return; - } - Dimension size = this.getSize(); - try { - CurrencyLineImpl currencyLineImpl = new CurrencyLineImpl(text, currencyLineAttr); - currencyLineImpl.draw((Graphics2D) g, (int) (size.getWidth()), (int) (size.getHeight())); - } catch (BarcodeException e) { - Color oldColor = g.getColor(); - g.setColor(Color.red); - g.drawString(e.getMessage(), (int) (size.getWidth() / POSITION), (int) (size.getHeight() / POSITION)); - g.setColor(oldColor); - } - } - - } - - protected static JPanel groupPane(JComponent comp) { - JPanel jp = new JPanel(); - jp.setBorder(null); - jp.setLayout(new FlowLayout(FlowLayout.LEFT)); - jp.add(comp); - return jp; - } - - @Override - /** - * 是否为该类型 - * @param ob 对象 - * @return 同上 - * - */ - public boolean accept(Object ob) { - return ob instanceof CurrencyLinePresent; - } - - /** - * 重置 - */ - public void reset() { - this.intPartSpinner.setValue(9); - this.deciPartSpinner.setValue(3); - } - - @Override - public void populateBean(CurrencyLinePresent ob) { - CurrencyLineAttr currencyLine = ob.getCurrencyLineAttr(); - if (currencyLine == null) { - currencyLine = new CurrencyLineAttr(); - } - this.intPartSpinner.setValue(new Integer(currencyLine.getintPart())); - this.deciPartSpinner.setValue(new Integer(currencyLine.getdeciPart())); - } - - @Override - public CurrencyLinePresent updateBean() { - CurrencyLineAttr currencylineAttr = new CurrencyLineAttr(); - currencylineAttr.setintPart(((Integer) this.intPartSpinner.getValue()).intValue()); - currencylineAttr.setdeciPart(((Integer) this.deciPartSpinner.getValue()).intValue()); - return new CurrencyLinePresent(currencylineAttr); - } - +package com.fr.design.present; + +import com.fr.design.beans.FurtherBasicBeanPane; +import com.fr.design.border.UIRoundedBorder; +import com.fr.design.constants.UIConstants; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.ispinner.UIBasicSpinner; +import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.utils.gui.GUICoreUtils; +import com.fr.general.Inter; +import com.fr.report.cell.cellattr.CurrencyLineAttr; +import com.fr.report.cell.cellattr.CurrencyLinePresent; +import com.fr.report.cell.painter.barcode.BarcodeException; +import com.fr.report.core.CurrencyLineImpl; + +import javax.swing.*; +import javax.swing.border.TitledBorder; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; +import javax.swing.event.DocumentEvent; +import javax.swing.event.DocumentListener; +import java.awt.*; + +/** + * @author zhou + * @since 2012-6-4下午7:34:52 + */ +public class CurrencyLinePane extends FurtherBasicBeanPane { + private static final int VS_NUM = 4; + private static final int VG_NUM = 6; + private UIBasicSpinner intPartSpinner; + private UIBasicSpinner deciPartSpinner; + private UITextField textField; + private CurrencyLinePreviewPane CurrencyLinePreviewPane; + private int intPart = 9; + private int deciPart = 3; + + private static final int POSITION = 8; + ChangeListener listener2 = new ChangeListener() { + + @Override + public void stateChanged(ChangeEvent e) { + CurrencyLinePreviewPane.setObject(textField.getText(), update()); + } + + }; + + DocumentListener listener = new DocumentListener() { + @Override + public void insertUpdate(DocumentEvent e) { + CurrencyLinePreviewPane.setObject(textField.getText(), update()); + } + + @Override + public void removeUpdate(DocumentEvent e) { + CurrencyLinePreviewPane.setObject(textField.getText(), update()); + } + + @Override + public void changedUpdate(DocumentEvent e) { + CurrencyLinePreviewPane.setObject(textField.getText(), update()); + } + }; + + public CurrencyLinePane() { + this.initComponents(); + } + + protected void initComponents() { + // 整数位选择 + intPartSpinner = new UIBasicSpinner(new SpinnerNumberModel(9, 1, 20, 1)); + intPartSpinner.setPreferredSize(new Dimension(158, 20)); + + // 小数位选择 + deciPartSpinner = new UIBasicSpinner(new SpinnerNumberModel(2, 1, 10, 1)); + deciPartSpinner.setPreferredSize(new Dimension(158, 20)); + // 预览区域 + textField = new UITextField(10); + + CurrencyLinePreviewPane = new CurrencyLinePreviewPane(); + CurrencyLinePreviewPane.setPreferredSize(new Dimension(0, 145)); + JPanel borderPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); + TitledBorder titledBorder = new TitledBorder(new UIRoundedBorder(UIConstants.LINE_COLOR, 1, 5), Inter.getLocText("StyleFormat-Sample"), 4, 2, this.getFont(), UIConstants.LINE_COLOR); + borderPane.setBorder(titledBorder); + borderPane.add(CurrencyLinePreviewPane, BorderLayout.CENTER); + + textField.requestFocus(); + + double vs = VS_NUM; + double vg = VG_NUM; + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = {p, f}; + double[] rowSize = {p, p, p, p}; + + + Component[][] components = new Component[][]{ + new Component[]{new UILabel(Inter.getLocText("Data"), UILabel.LEFT), textField}, + new Component[]{borderPane, null}, + new Component[]{new UILabel(Inter.getLocText("IntPart"), UILabel.LEFT), groupPane(intPartSpinner)}, + new Component[]{new UILabel(Inter.getLocText("DeciPart"), UILabel.LEFT), groupPane(deciPartSpinner)} + + }; + + JPanel linePane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); + this.setLayout(new BorderLayout()); + this.add(linePane, BorderLayout.CENTER); + + + textField.getDocument().addDocumentListener(listener); + intPartSpinner.addChangeListener(listener2); + deciPartSpinner.addChangeListener(listener2); + textField.setText("123456.78"); + } + + @Override + /** + * 窗口名 + * @return 同上 + */ + public String title4PopupWindow() { + return Inter.getLocText("Currency_Line"); + } + + /** + * + */ + public CurrencyLineAttr update() { + CurrencyLineAttr currencylineAttr = new CurrencyLineAttr(); + currencylineAttr.setintPart(((Integer) this.intPartSpinner.getValue()).intValue()); + currencylineAttr.setdeciPart(((Integer) this.deciPartSpinner.getValue()).intValue()); + return currencylineAttr; + } + + /** + * + */ + public void setintPart(int intpart) { + this.intPart = intpart; + } + + /** + * + */ + public void setdeciPart(int decipart) { + this.deciPart = decipart; + } + + private class CurrencyLinePreviewPane extends JPanel { + private String text; + CurrencyLineAttr currencyLineAttr; + + public CurrencyLinePreviewPane() { +// setBackground(Color.WHITE); + } + + public void setObject(String text, CurrencyLineAttr currencyLineAttr) { + this.text = text; + this.currencyLineAttr = currencyLineAttr; + GUICoreUtils.repaint(this); + } + + @Override + public void paintComponent(Graphics g) { + super.paintComponent(g); + if (text == null) { + return; + } + Dimension size = this.getSize(); + try { + CurrencyLineImpl currencyLineImpl = new CurrencyLineImpl(text, currencyLineAttr); + currencyLineImpl.draw((Graphics2D) g, (int) (size.getWidth()), (int) (size.getHeight())); + } catch (BarcodeException e) { + Color oldColor = g.getColor(); + g.setColor(Color.red); + g.drawString(e.getMessage(), (int) (size.getWidth() / POSITION), (int) (size.getHeight() / POSITION)); + g.setColor(oldColor); + } + } + + } + + protected static JPanel groupPane(JComponent comp) { + JPanel jp = new JPanel(); + jp.setBorder(null); + jp.setLayout(new FlowLayout(FlowLayout.LEFT)); + jp.add(comp); + return jp; + } + + @Override + /** + * 是否为该类型 + * @param ob 对象 + * @return 同上 + * + */ + public boolean accept(Object ob) { + return ob instanceof CurrencyLinePresent; + } + + /** + * 重置 + */ + public void reset() { + this.intPartSpinner.setValue(9); + this.deciPartSpinner.setValue(3); + } + + @Override + public void populateBean(CurrencyLinePresent ob) { + CurrencyLineAttr currencyLine = ob.getCurrencyLineAttr(); + if (currencyLine == null) { + currencyLine = new CurrencyLineAttr(); + } + this.intPartSpinner.setValue(new Integer(currencyLine.getintPart())); + this.deciPartSpinner.setValue(new Integer(currencyLine.getdeciPart())); + } + + @Override + public CurrencyLinePresent updateBean() { + CurrencyLineAttr currencylineAttr = new CurrencyLineAttr(); + currencylineAttr.setintPart(((Integer) this.intPartSpinner.getValue()).intValue()); + currencylineAttr.setdeciPart(((Integer) this.deciPartSpinner.getValue()).intValue()); + return new CurrencyLinePresent(currencylineAttr); + } + } \ No newline at end of file diff --git a/designer/src/com/fr/design/widget/ui/MultiFileEditorPane.java b/designer/src/com/fr/design/widget/ui/MultiFileEditorPane.java index ed32fd5f0..6d1871a9b 100644 --- a/designer/src/com/fr/design/widget/ui/MultiFileEditorPane.java +++ b/designer/src/com/fr/design/widget/ui/MultiFileEditorPane.java @@ -1,86 +1,82 @@ -package com.fr.design.widget.ui; - -import java.awt.*; - -import com.fr.design.constants.LayoutConstants; -import com.fr.design.gui.ilable.UILabel; - -import javax.swing.*; - -import com.fr.design.gui.icheckbox.UICheckBox; -import com.fr.design.gui.icombobox.DictionaryComboBox; -import com.fr.design.gui.icombobox.DictionaryConstants; -import com.fr.design.gui.itextfield.UINumberField; -import com.fr.design.layout.FRGUIPaneFactory; -import com.fr.design.layout.FRLeftFlowLayout; -import com.fr.design.layout.TableLayout; -import com.fr.design.layout.TableLayoutHelper; -import com.fr.form.ui.MultiFileEditor; -import com.fr.general.Inter; - -public class MultiFileEditorPane extends FieldEditorDefinePane { - private DictionaryComboBox acceptType; - private UICheckBox singleFileCheckBox; - private UINumberField fileSizeField; - - public MultiFileEditorPane() { - this.initComponents(); - } - - - @Override - protected String title4PopupWindow() { - return "file"; - } - - @Override - protected JPanel setFirstContentPane() { - JPanel contenter = FRGUIPaneFactory.createMediumHGapFlowInnerContainer_M_Pane_First0(); - JPanel centerPane = FRGUIPaneFactory.createYBoxEmptyBorderPane(); -// centerPane.add(singleFileCheckBox = new UICheckBox(Inter.getLocText("SINGLE_FILE_UPLOAD"))); - - - - singleFileCheckBox = new UICheckBox(Inter.getLocText("SINGLE_FILE_UPLOAD")); - acceptType = new DictionaryComboBox(DictionaryConstants.acceptTypes, DictionaryConstants.fileTypeDisplays); - acceptType.setPreferredSize(new Dimension(100, 18)); - fileSizeField = new UINumberField(); - fileSizeField.setPreferredSize(new Dimension(80, 18)); - - JPanel singleFilePane = FRGUIPaneFactory.createMediumHGapFlowInnerContainer_M_Pane_First0(); - singleFilePane.add(singleFileCheckBox); - centerPane.add(singleFilePane); - - JPanel allowTypePane = FRGUIPaneFactory.createMediumHGapFlowInnerContainer_M_Pane_First0(); - allowTypePane.add(new UILabel(Inter.getLocText("File-Allow_Upload_Files") + ":")); - allowTypePane.add(acceptType); - centerPane.add(allowTypePane); - - JPanel fileSizePane = FRGUIPaneFactory.createMediumHGapFlowInnerContainer_M_Pane_First0(); - fileSizePane.add(new UILabel(Inter.getLocText("File-File_Size_Limit") + ":")); - fileSizePane.add(fileSizeField); - fileSizePane.add(new UILabel(" KB")); - centerPane.add(fileSizePane); - - contenter.add(centerPane); - return contenter; - } - - @Override - protected void populateSubFieldEditorBean(MultiFileEditor e) { - // 这里存在兼容问题 getAccept可能没在待选项目中 - acceptType.setSelectedItem(e.getAccept()); - singleFileCheckBox.setSelected(e.isSingleFile()); - fileSizeField.setValue(e.getMaxSize()); - } - - @Override - protected MultiFileEditor updateSubFieldEditorBean() { - MultiFileEditor ob = new MultiFileEditor(); - ob.setAccept((String) acceptType.getSelectedItem()); - ob.setSingleFile(singleFileCheckBox.isSelected()); - ob.setMaxSize(fileSizeField.getValue()); - return ob; - } - +package com.fr.design.widget.ui; + +import com.fr.design.gui.icheckbox.UICheckBox; +import com.fr.design.gui.icombobox.DictionaryComboBox; +import com.fr.design.gui.icombobox.DictionaryConstants; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.ispinner.UISpinner; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.form.ui.MultiFileEditor; +import com.fr.general.Inter; + +import javax.swing.*; +import java.awt.*; + +public class MultiFileEditorPane extends FieldEditorDefinePane { + private DictionaryComboBox acceptType; + private UICheckBox singleFileCheckBox; + private UISpinner fileSizeField; + + public MultiFileEditorPane() { + this.initComponents(); + } + + + @Override + protected String title4PopupWindow() { + return "file"; + } + + @Override + protected JPanel setFirstContentPane() { + JPanel contenter = new JPanel(new BorderLayout()); + + singleFileCheckBox = new UICheckBox(Inter.getLocText("SINGLE_FILE_UPLOAD")); + acceptType = new DictionaryComboBox(DictionaryConstants.acceptTypes, DictionaryConstants.fileTypeDisplays); +// acceptType.setPreferredSize(new Dimension(100, 20)); + fileSizeField = new UISpinner(0, Integer.MAX_VALUE, 1, -1); + fileSizeField.setPreferredSize(new Dimension(140, 20)); + + JPanel fileSizePane = new JPanel(new BorderLayout()); + UILabel fileTypeLabel = new UILabel(Inter.getLocText("Utils-File_type")); + UILabel fileSizeLabel = new UILabel(Inter.getLocText("FR-Designer_Size_Limit")); + fileSizePane.add(fileSizeField, BorderLayout.CENTER); + fileSizePane.add(new UILabel(" KB"), BorderLayout.EAST); + + double f = TableLayout.FILL; + double p = TableLayout.PREFERRED; + Component[][] components = new Component[][]{ + new Component[]{singleFileCheckBox, null}, + new Component[]{fileTypeLabel, acceptType}, + new Component[]{fileSizeLabel, fileSizePane}, + }; + double[] rowSize = {p, p, p}; + double[] columnSize = {p, f}; + int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}}; + JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, 22, 10); + + panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 00)); + contenter.add(panel, BorderLayout.CENTER); + + return contenter; + } + + @Override + protected void populateSubFieldEditorBean(MultiFileEditor e) { + // 这里存在兼容问题 getAccept可能没在待选项目中 + acceptType.setSelectedItem(e.getAccept()); + singleFileCheckBox.setSelected(e.isSingleFile()); + fileSizeField.setValue(e.getMaxSize()); + } + + @Override + protected MultiFileEditor updateSubFieldEditorBean() { + MultiFileEditor ob = new MultiFileEditor(); + ob.setAccept((String) acceptType.getSelectedItem()); + ob.setSingleFile(singleFileCheckBox.isSelected()); + ob.setMaxSize(fileSizeField.getValue()); + return ob; + } + } \ No newline at end of file diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index d6f90cadb..eddc4f19e 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -2116,3 +2116,4 @@ FR-Designer_Widget_Error_Tip=error tip FR-Designer_Widget_Return_Leaf=return leaf FR-Designer_Widget_Return_Path=return path FR-Designer_Widget_Display_Position=Display Position +FR-Designer_Size_Limit=Size_Limit 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 0d44c3036..6a26c41dc 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 @@ -2111,4 +2111,5 @@ FR-Designer_Widget_No_Repeat=no repeat FR-Designer_Widget_Error_Tip=error tip FR-Designer_Widget_Return_Leaf=return leaf FR-Designer_Widget_Return_Path=return path -FR-Designer_Widget_Display_Position=Display Position \ No newline at end of file +FR-Designer_Widget_Display_Position=Display Position +FR-Designer_Size_Limit=Size_Limit \ No newline at end of file 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 f456a229b..1b169ba0e 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 @@ -2115,3 +2115,4 @@ FR-Designer_Widget_Error_Tip= FR-Designer_Widget_Return_Leaf= FR-Designer_Widget_Return_Path= FR-Designer_Widget_Display_Position= +FR-Designer_Size_Limit=\ 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 444d54824..0b77aa7e5 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 @@ -2115,3 +2115,4 @@ FR-Designer_Widget_Error_Tip= FR-Designer_Widget_Return_Leaf= FR-Designer_Widget_Return_Path= FR-Designer_Widget_Display_Position= +FR-Designer_Size_Limit=\ 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 0ec66bd02..b3a44432b 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 @@ -2123,3 +2123,4 @@ FR-Designer_Widget_Error_Tip=\u9519\u8BEF\u63D0\u793A FR-Designer_Widget_Return_Leaf=\u7ED3\u679C\u8FD4\u56DE\u53F6\u5B50\u8282\u70B9 FR-Designer_Widget_Return_Path=\u7ED3\u679C\u8FD4\u56DE\u5B8C\u6574\u5C42\u6B21\u8DEF\u5F84 FR-Designer_Widget_Display_Position=\u663E\u793A\u4F4D\u7F6E +FR-Designer_Size_Limit=\u5927\u5C0F\u9650\u5236 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 23af4dafa..46a9a93b4 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 @@ -2114,4 +2114,5 @@ FR-Designer_Widget_No_Repeat= FR-Designer_Widget_Error_Tip= FR-Designer_Widget_Return_Leaf= FR-Designer_Widget_Return_Path= -FR-Designer_Widget_Display_Position= \ No newline at end of file +FR-Designer_Widget_Display_Position= +FR-Designer_Size_Limit=\ \ No newline at end of file From aaa360823566a2d1366a96abd786d32d7f1a60a2 Mon Sep 17 00:00:00 2001 From: "yaoh.wu" Date: Mon, 7 Aug 2017 19:42:26 +0800 Subject: [PATCH 19/30] =?UTF-8?q?=E5=9B=9E=E9=80=80=E4=B8=80=E4=BA=9B?= =?UTF-8?q?=E5=8F=AF=E8=83=BD=E5=86=B2=E7=AA=81=E7=9A=84=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E5=8C=96=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/layout/FRGUIPaneFactory.java | 902 +++++++++--------- 1 file changed, 436 insertions(+), 466 deletions(-) diff --git a/designer_base/src/com/fr/design/layout/FRGUIPaneFactory.java b/designer_base/src/com/fr/design/layout/FRGUIPaneFactory.java index ef1abd7fb..08571246a 100644 --- a/designer_base/src/com/fr/design/layout/FRGUIPaneFactory.java +++ b/designer_base/src/com/fr/design/layout/FRGUIPaneFactory.java @@ -1,486 +1,456 @@ package com.fr.design.layout; -import com.fr.design.border.UITitledBorder; +import java.awt.BorderLayout; +import java.awt.CardLayout; +import java.awt.Color; +import java.awt.FlowLayout; +import java.awt.LayoutManager; + +import javax.swing.BorderFactory; +import javax.swing.BoxLayout; +import javax.swing.Icon; import com.fr.design.gui.ilable.UILabel; +import javax.swing.JPanel; +import javax.swing.JRadioButton; -import javax.swing.*; -import java.awt.*; +import com.fr.design.border.UITitledBorder; public class FRGUIPaneFactory { - public static final float WIDTH_PARA_F = 80.0f; - public static final int WIDTH_OFFSET_N = 60; - public static final int WIDTH_OFFSET_M = 20; - public static final int WIDTH_PARA_INT = 80; - public static final float WIDTHABS_PARA_F = 2.0f; - public static final int HEIGHT_PARA = 25; - public static final int HEIGHT_OFFSET = 50; + private FRGUIPaneFactory() { + } - private FRGUIPaneFactory() { - } + public static final float WIDTH_PARA_F = 80.0f; + public static final int WIDTH_OFFSET_N = 60; + public static final int WIDTH_OFFSET_M = 20; + public static final int WIDTH_PARA_INT = 80; + public static final float WIDTHABS_PARA_F = 2.0f; + public static final int HEIGHT_PARA = 25; + public static final int HEIGHT_OFFSET = 50; /** * 创建一个靠右靠左的水平间隙为2的流式布局 - * * @return FlowLayout对象 */ - public static LayoutManager createBoxFlowLayout() { // createBoxFlowLayout 图表用到的比较多 - return new FlowLayout(FlowLayout.LEFT, 2, 0); - } + public static LayoutManager createBoxFlowLayout() { // createBoxFlowLayout 图表用到的比较多 + return new FlowLayout(FlowLayout.LEFT, 2, 0); + } - /** - * 创建一个靠左的布局 - * - * @return FlowLayout对象 - */ - public static LayoutManager createLeftZeroLayout() { - return new FlowLayout(FlowLayout.LEFT, 0, 0); - } + /** + * 创建一个靠左的布局 + * @return FlowLayout对象 + */ + public static LayoutManager createLeftZeroLayout() { + return new FlowLayout(FlowLayout.LEFT, 0, 0); + } /** * 创建一个靠左的水平和垂直间隙均为5的流式布局 - * - * @return FlowLayout对象 - */ - public static LayoutManager createLabelFlowLayout() { // createLabelFlowLayout - return new FlowLayout(FlowLayout.LEFT); // 默认 5, 5 - } - - /** - * 创建一个靠左流式布局,间距10,10 - * - * @return FlowLayout对象 - */ - public static LayoutManager createL_FlowLayout() { - return new FlowLayout(FlowLayout.LEFT, 10, 10); - } - - /** - * 创建一个居中流式布局 - * * @return FlowLayout对象 */ - public static LayoutManager createCenterFlowLayout() { - return new FlowLayout(FlowLayout.CENTER); - } - - /** - * 创建一个靠右流式布局 - * - * @return FlowLayout对象 - */ - public static LayoutManager createRightFlowLayout() { - return new FlowLayout(FlowLayout.RIGHT); - } - - /** - * 创建一个边框布局 - * - * @return BorderLayout对象 - */ - public static LayoutManager createBorderLayout() { - return new BorderLayout(); - } - - /** - * 创建一个边框布局,间距4,4 - * - * @return BorderLayout对象 - */ - public static LayoutManager createM_BorderLayout() { - return new BorderLayout(4, 4); - } - - - /** - * 创建一个1列的网格布局 - * - * @return FRGridLayout对象 - */ - public static LayoutManager create1ColumnGridLayout() { - return new FRGridLayout(1); - } - - /** - * 创建一个2列的网格布局 - * - * @return FRGridLayout对象 - */ - public static LayoutManager create2ColumnGridLayout() { - return new FRGridLayout(2); - } - - /** - * 创建一个n列的网格布局 - * - * @param nColumn 列数 - * @return FRGridLayout对象 - */ - public static LayoutManager createNColumnGridLayout(int nColumn) { - return new FRGridLayout(nColumn); - } - - /** - * 创建一个带标题边框面板 - * - * @param string 边框标题 - * @return JPanel对象 - */ - public static JPanel createTitledBorderPane(String string) { - JPanel jp = new JPanel(); - UITitledBorder explainBorder = UITitledBorder.createBorderWithTitle(string); - jp.setBorder(explainBorder); - jp.setLayout(new FlowLayout(FlowLayout.LEFT)); - return jp; - } - - /** - * 创建一个带标题边框面板并且居中显示 - * - * @param borderTitle 边框标题 - * @return JPanel对象 - */ - public static JPanel createTitledBorderPaneCenter(String borderTitle) { - JPanel jp = new JPanel(); - UITitledBorder explainBorder = UITitledBorder.createBorderWithTitle(borderTitle); - jp.setBorder(explainBorder); - jp.setLayout(new FlowLayout(FlowLayout.CENTER)); - return jp; - } - - /** - * 创建一个靠左空边框布局,间隔大 - * - * @return JPanel对象 - */ - public static JPanel createBigHGapFlowInnerContainer_M_Pane() { - JPanel jp = new JPanel(); - jp.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0)); - jp.setLayout(new FRLeftFlowLayout(5, 60, 5)); - return jp; - } - - /** - * 创建一个靠左空边框面板,间隔中等 - * - * @return JPanel对象 - */ - public static JPanel createMediumHGapFlowInnerContainer_M_Pane() { - JPanel jp = new JPanel(); - jp.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0)); - jp.setLayout(new FRLeftFlowLayout(5, 20, 5)); - return jp; - } - - /** - * 创建一个靠左空边框面板,间隔中等 - * - * @return JPanel对象 - */ - public static JPanel createMediumHGapHighTopFlowInnerContainer_M_Pane() { - JPanel jp = new JPanel(); - jp.setBorder(BorderFactory.createEmptyBorder(50, 5, 0, 0)); - jp.setLayout(new FRLeftFlowLayout(5, 20, 5)); - return jp; - } - - /** - * 创建一个正常靠左空边框面板 - * - * @return JPanel对象 - */ - public static JPanel createNormalFlowInnerContainer_M_Pane() { - JPanel jp = new JPanel(); - jp.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0)); - jp.setLayout(new FlowLayout(FlowLayout.LEFT)); - return jp; - } - - /** - * 创建一个靠左0间距边框面板 - * - * @return JPanel对象 - */ - public static JPanel createLeftFlowZeroGapBorderPane() { - JPanel jp = new JPanel(); - jp.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); - jp.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0)); - return jp; - } - - /** - * 创建一个靠左流式布局,正常流式内嵌 - * - * @return JPanel对象 - */ - public static JPanel createNormalFlowInnerContainer_S_Pane() { - JPanel jp = new JPanel(); - jp.setLayout(new FlowLayout(FlowLayout.LEFT)); - return jp; - } - - /** - * 创建一个靠左流式布局,流式内嵌 - * - * @return JPanel对象 - */ - public static JPanel createBoxFlowInnerContainer_S_Pane() { - JPanel jp = new JPanel(); - jp.setLayout(new FlowLayout(FlowLayout.LEFT, 2, 2)); - return jp; - } - - /** - * 创建一个靠右面板 - * - * @return JPanel对象 - */ - public static JPanel createRightFlowInnerContainer_S_Pane() { - JPanel jp = new JPanel(); - jp.setLayout(new FlowLayout(FlowLayout.RIGHT)); - return jp; - } - - /** - * 创建一个居中面板 - * - * @return JPanel对象 - */ - public static JPanel createCenterFlowInnerContainer_S_Pane() { - JPanel jp = new JPanel(); - jp.setLayout(new FlowLayout(FlowLayout.CENTER)); - return jp; - } - - /** - * 创建一个居中0间距面板 - * - * @return JPanel对象 - */ - public static JPanel createCenterFlowZeroGapBorderPane() { - JPanel jp = new JPanel(); - jp.setLayout(new FlowLayout(FlowLayout.CENTER, 0, 0)); - jp.setBorder(BorderFactory.createEmptyBorder()); - return jp; - } - - /** - * 创建纵向排列面板 - * - * @return JPanel对象 - */ - public static JPanel createY_AXISBoxInnerContainer_L_Pane() { - JPanel jp = new JPanel(); - jp.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); - jp.setLayout(new BoxLayout(jp, BoxLayout.Y_AXIS)); - return jp; - } - - /** - * 创建纵向边框面板 - * - * @return JPanel对象 - */ - public static JPanel createYBoxEmptyBorderPane() { - JPanel jp = new JPanel(); - jp.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); - jp.setLayout(new BoxLayout(jp, BoxLayout.Y_AXIS)); - return jp; - } - - /** - * 创建横向面板 - * - * @return JPanel对象 - */ - public static JPanel createX_AXISBoxInnerContainer_L_Pane() { - JPanel jp = new JPanel(); - jp.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); - jp.setLayout(new BoxLayout(jp, BoxLayout.X_AXIS)); - return jp; - } - - /** - * 创建纵向面板M - * - * @return JPanel对象 - */ - public static JPanel createY_AXISBoxInnerContainer_M_Pane() { - JPanel jp = new JPanel(); - jp.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0)); - jp.setLayout(new BoxLayout(jp, BoxLayout.Y_AXIS)); - return jp; - } - - /** - * 创建横向内置boxlayout的面板 - * - * @return JPanel对象 - */ - public static JPanel createX_AXISBoxInnerContainer_M_Pane() { - JPanel jp = new JPanel(); - jp.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0)); - jp.setLayout(new BoxLayout(jp, BoxLayout.X_AXIS)); - return jp; - } - - /** - * 创建纵向内置boxlayout的面板 - * - * @return JPanel对象 - */ - public static JPanel createY_AXISBoxInnerContainer_S_Pane() { - JPanel jp = new JPanel(); - jp.setLayout(new BoxLayout(jp, BoxLayout.Y_AXIS)); - return jp; - } - - /** - * 创建横向内置boxlayout的面板 - * - * @return JPanel对象 - */ - public static JPanel createX_AXISBoxInnerContainer_S_Pane() { - JPanel jp = new JPanel(); - jp.setLayout(new BoxLayout(jp, BoxLayout.X_AXIS)); - return jp; - } - - /** - * 创建n列网格面板 - * - * @param nColumn 列数 - * @return JPanel对象 - */ - public static JPanel createNColumnGridInnerContainer_S_Pane(int nColumn) { - JPanel jp = new JPanel(); - jp.setLayout(new FRGridLayout(nColumn)); - return jp; - } - - /** - * 创建n列网格面板 - * - * @param nColumn 列数 - * @param h 水平间距 - * @param v 垂直间距 - * @return JPanel对象 - */ - public static JPanel createNColumnGridInnerContainer_Pane(int nColumn, int h, int v) { - JPanel jp = new JPanel(); - jp.setLayout(new FRGridLayout(nColumn, h, v)); - return jp; - } - - /** - * 创建顶格n列网格面板 - * - * @param nColumn 列数 - * @return JPanel对象 - */ - public static JPanel createFillColumnPane(int nColumn) { - JPanel jp = new JPanel(); - jp.setLayout(new FRGridLayout(nColumn, 0, 0)); - return jp; - } - - /** - * 创建边框面板L - * - * @return JPanel对象 - */ - public static JPanel createBorderLayout_L_Pane() { - JPanel jp = new JPanel(); - jp.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); - jp.setLayout(FRGUIPaneFactory.createBorderLayout()); - return jp; - } - - /** - * 创建边框面板M - * - * @return JPanel对象 - */ - public static JPanel createBorderLayout_M_Pane() { - JPanel jp = new JPanel(); - jp.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); - jp.setLayout(FRGUIPaneFactory.createM_BorderLayout()); - return jp; - } - - /** - * 创建边框面板S - * - * @return JPanel对象 - */ - public static JPanel createBorderLayout_S_Pane() { - JPanel jp = new JPanel(); - jp.setLayout(FRGUIPaneFactory.createBorderLayout()); - return jp; - } - - /** - * 创建卡片式布局 - * - * @return JPanel对象 - */ - public static JPanel createCardLayout_S_Pane() { - JPanel jp = new JPanel(); - jp.setLayout(new CardLayout()); - return jp; - } - - /** - * 创建图标IconRadio面板 - * - * @param icon 图标 - * @param jradiobtn 按钮 - * @return JPanel对象 - */ - public static JPanel createIconRadio_S_Pane(Icon icon, - JRadioButton jradiobtn) { - jradiobtn.setBorder(BorderFactory.createEmptyBorder(0, 4, 0, 0)); - jradiobtn.setBackground(new Color(255, 255, 255)); - JPanel iconRadioPane = new JPanel(); - iconRadioPane.setLayout(new BoxLayout(iconRadioPane, BoxLayout.X_AXIS)); - - iconRadioPane.add(new UILabel(icon)); - iconRadioPane.add(jradiobtn); - - return iconRadioPane; - } - - /** - * 计算宽度 - * - * @param width 宽度输入值 - * @return w 宽度输出值 - */ - public static int caculateWidth(int width) { - int w = 0; - float m = (width + WIDTH_OFFSET_M) / WIDTH_PARA_F; - float n = (width + WIDTH_OFFSET_N) / WIDTH_PARA_F; - float i = Math.abs((((int) m + (int) (m + 1)) / WIDTHABS_PARA_F) - m); - float j = Math.abs((((int) n + (int) (n + 1)) / WIDTHABS_PARA_F) - n); - float x = i > j ? i : j; - if (x == i) { - w = Math.round(m) * WIDTH_PARA_INT - WIDTH_OFFSET_M; - } else if (x == j) { - w = Math.round(n) * WIDTH_PARA_INT - WIDTH_OFFSET_N; - } - return w; - } - - /** - * 计算高度 - * - * @param height 高度输入值 - * @return 高度输出值 - */ - public static int caculateHeight(int height) { - int h = 0; - float x = (height + HEIGHT_OFFSET) / HEIGHT_PARA; - h = ((int) x + 1) * HEIGHT_PARA; - return h; - } + public static LayoutManager createLabelFlowLayout() { // createLabelFlowLayout + return new FlowLayout(FlowLayout.LEFT); // 默认 5, 5 + } + + /** + * 创建一个靠左流式布局,间距10,10 + * @return FlowLayout对象 + */ + public static LayoutManager createL_FlowLayout() { + return new FlowLayout(FlowLayout.LEFT, 10, 10); + } + + /** + * 创建一个居中流式布局 + * @return FlowLayout对象 + */ + public static LayoutManager createCenterFlowLayout() { + return new FlowLayout(FlowLayout.CENTER); + } + + /** + * 创建一个靠右流式布局 + * @return FlowLayout对象 + */ + public static LayoutManager createRightFlowLayout() { + return new FlowLayout(FlowLayout.RIGHT); + } + + /** + * 创建一个边框布局 + * @return BorderLayout对象 + */ + public static LayoutManager createBorderLayout() { + return new BorderLayout(); + } + + /** + * 创建一个边框布局,间距4,4 + * @return BorderLayout对象 + */ + public static LayoutManager createM_BorderLayout() { + return new BorderLayout(4,4); + } + + // TODO 删掉 + + /** + * 创建一个1列的网格布局 + * @return FRGridLayout对象 + */ + public static LayoutManager create1ColumnGridLayout() { + return new FRGridLayout(1); + } + + /** + * 创建一个2列的网格布局 + * @return FRGridLayout对象 + */ + public static LayoutManager create2ColumnGridLayout() { + return new FRGridLayout(2); + } + + /** + * 创建一个n列的网格布局 + * @param nColumn 列数 + * @return FRGridLayout对象 + */ + public static LayoutManager createNColumnGridLayout(int nColumn) { + return new FRGridLayout(nColumn); + } + + /** + * 创建一个带标题边框面板 + * @param string 边框标题 + * @return JPanel对象 + */ + public static JPanel createTitledBorderPane(String string) { + JPanel jp = new JPanel(); + UITitledBorder explainBorder = UITitledBorder.createBorderWithTitle(string); + jp.setBorder(explainBorder); + jp.setLayout(new FlowLayout(FlowLayout.LEFT)); + return jp; + } + + /** + * 创建一个带标题边框面板并且居中显示 + * @param borderTitle 边框标题 + * @return JPanel对象 + */ + public static JPanel createTitledBorderPaneCenter(String borderTitle) { + JPanel jp = new JPanel(); + UITitledBorder explainBorder = UITitledBorder.createBorderWithTitle(borderTitle); + jp.setBorder(explainBorder); + jp.setLayout(new FlowLayout(FlowLayout.CENTER)); + return jp; + } + + /** + * 创建一个靠左空边框布局,间隔大 + * @return JPanel对象 + */ + public static JPanel createBigHGapFlowInnerContainer_M_Pane() { + JPanel jp = new JPanel(); + jp.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0)); + jp.setLayout(new FRLeftFlowLayout(5, 60, 5)); + return jp; + } + + /** + * 创建一个靠左空边框面板,间隔中等 + * @return JPanel对象 + */ + public static JPanel createMediumHGapFlowInnerContainer_M_Pane() { + JPanel jp = new JPanel(); + jp.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0)); + jp.setLayout(new FRLeftFlowLayout(5, 20, 5)); + return jp; + } + + /** + * 创建一个靠左空边框面板,间隔中等 + * @return JPanel对象 + */ + public static JPanel createMediumHGapHighTopFlowInnerContainer_M_Pane() { + JPanel jp = new JPanel(); + jp.setBorder(BorderFactory.createEmptyBorder(50, 5, 0, 0)); + jp.setLayout(new FRLeftFlowLayout(5, 20, 5)); + return jp; + } + + /** + * 创建一个正常靠左空边框面板 + * @return JPanel对象 + */ + public static JPanel createNormalFlowInnerContainer_M_Pane() { + JPanel jp = new JPanel(); + jp.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0)); + jp.setLayout(new FlowLayout(FlowLayout.LEFT)); + return jp; + } + + /** + * 创建一个靠左0间距边框面板 + * @return JPanel对象 + */ + public static JPanel createLeftFlowZeroGapBorderPane() { + JPanel jp = new JPanel(); + jp.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); + jp.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0)); + return jp; + } + + /** + * 创建一个靠左流式布局,正常流式内嵌 + * @return JPanel对象 + */ + public static JPanel createNormalFlowInnerContainer_S_Pane() { + JPanel jp = new JPanel(); + jp.setLayout(new FlowLayout(FlowLayout.LEFT)); + return jp; + } + + /** + * 创建一个靠左流式布局,流式内嵌 + * @return JPanel对象 + */ + public static JPanel createBoxFlowInnerContainer_S_Pane() { + JPanel jp = new JPanel(); + jp.setLayout(new FlowLayout(FlowLayout.LEFT, 2, 2)); + return jp; + } + + /** + * 创建一个靠右面板 + * @return JPanel对象 + */ + public static JPanel createRightFlowInnerContainer_S_Pane() { + JPanel jp = new JPanel(); + jp.setLayout(new FlowLayout(FlowLayout.RIGHT)); + return jp; + } + + /** + * 创建一个居中面板 + * @return JPanel对象 + */ + public static JPanel createCenterFlowInnerContainer_S_Pane() { + JPanel jp = new JPanel(); + jp.setLayout(new FlowLayout(FlowLayout.CENTER)); + return jp; + } + + /** + * 创建一个居中0间距面板 + * @return JPanel对象 + */ + public static JPanel createCenterFlowZeroGapBorderPane() { + JPanel jp = new JPanel(); + jp.setLayout(new FlowLayout(FlowLayout.CENTER, 0, 0)); + jp.setBorder(BorderFactory.createEmptyBorder()); + return jp; + } + + /** + * 创建纵向排列面板 + * @return JPanel对象 + */ + public static JPanel createY_AXISBoxInnerContainer_L_Pane() { + JPanel jp = new JPanel(); + jp.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); + jp.setLayout(new BoxLayout(jp, BoxLayout.Y_AXIS)); + return jp; + } + + /** + * 创建纵向边框面板 + * @return JPanel对象 + */ + public static JPanel createYBoxEmptyBorderPane() { + JPanel jp = new JPanel(); + jp.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); + jp.setLayout(new BoxLayout(jp, BoxLayout.Y_AXIS)); + return jp; + } + + /** + * 创建横向面板 + * @return JPanel对象 + */ + public static JPanel createX_AXISBoxInnerContainer_L_Pane() { + JPanel jp = new JPanel(); + jp.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); + jp.setLayout(new BoxLayout(jp, BoxLayout.X_AXIS)); + return jp; + } + + /** + * 创建纵向面板M + * @return JPanel对象 + */ + public static JPanel createY_AXISBoxInnerContainer_M_Pane() { + JPanel jp = new JPanel(); + jp.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0)); + jp.setLayout(new BoxLayout(jp, BoxLayout.Y_AXIS)); + return jp; + } + + /** + * 创建横向内置boxlayout的面板 + * @return JPanel对象 + */ + public static JPanel createX_AXISBoxInnerContainer_M_Pane() { + JPanel jp = new JPanel(); + jp.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0)); + jp.setLayout(new BoxLayout(jp, BoxLayout.X_AXIS)); + return jp; + } + + /** + * 创建纵向内置boxlayout的面板 + * @return JPanel对象 + */ + public static JPanel createY_AXISBoxInnerContainer_S_Pane() { + JPanel jp = new JPanel(); + jp.setLayout(new BoxLayout(jp, BoxLayout.Y_AXIS)); + return jp; + } + + /** + * 创建横向内置boxlayout的面板 + * @return JPanel对象 + */ + public static JPanel createX_AXISBoxInnerContainer_S_Pane() { + JPanel jp = new JPanel(); + jp.setLayout(new BoxLayout(jp, BoxLayout.X_AXIS)); + return jp; + } + + /** + * 创建n列网格面板 + * @param nColumn 列数 + * @return JPanel对象 + */ + public static JPanel createNColumnGridInnerContainer_S_Pane(int nColumn) { + JPanel jp = new JPanel(); + jp.setLayout(new FRGridLayout(nColumn)); + return jp; + } + + /** + * 创建n列网格面板 + * @param nColumn 列数 + * @param h 水平间距 + * @param v 垂直间距 + * @return JPanel对象 + */ + public static JPanel createNColumnGridInnerContainer_Pane(int nColumn, int h, int v) { + JPanel jp = new JPanel(); + jp.setLayout(new FRGridLayout(nColumn, h, v)); + return jp; + } + + /** + * 创建顶格n列网格面板 + * @param nColumn 列数 + * @return JPanel对象 + */ + public static JPanel createFillColumnPane(int nColumn) { + JPanel jp = new JPanel(); + jp.setLayout(new FRGridLayout(nColumn, 0, 0)); + return jp; + } + + /** + * 创建边框面板L + * @return JPanel对象 + */ + public static JPanel createBorderLayout_L_Pane() { + JPanel jp = new JPanel(); + jp.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); + jp.setLayout(FRGUIPaneFactory.createBorderLayout()); + return jp; + } + + /** + * 创建边框面板M + * @return JPanel对象 + */ + public static JPanel createBorderLayout_M_Pane() { + JPanel jp = new JPanel(); + jp.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); + jp.setLayout(FRGUIPaneFactory.createM_BorderLayout()); + return jp; + } + + /** + * 创建边框面板S + * @return JPanel对象 + */ + public static JPanel createBorderLayout_S_Pane() { + JPanel jp = new JPanel(); + jp.setLayout(FRGUIPaneFactory.createBorderLayout()); + return jp; + } + + /** + * 创建卡片式布局 + * @return JPanel对象 + */ + public static JPanel createCardLayout_S_Pane() { + JPanel jp = new JPanel(); + jp.setLayout(new CardLayout()); + return jp; + } + + /** + * 创建图标IconRadio面板 + * @param icon 图标 + * @param jradiobtn 按钮 + * @return JPanel对象 + */ + public static JPanel createIconRadio_S_Pane(Icon icon, + JRadioButton jradiobtn) { + jradiobtn.setBorder(BorderFactory.createEmptyBorder(0, 4, 0, 0)); + jradiobtn.setBackground(new Color(255, 255, 255)); + JPanel iconRadioPane = new JPanel(); + iconRadioPane.setLayout(new BoxLayout(iconRadioPane, BoxLayout.X_AXIS)); + + iconRadioPane.add(new UILabel(icon)); + iconRadioPane.add(jradiobtn); + + return iconRadioPane; + } + + /** + * 计算宽度 + * @param width 宽度输入值 + * @return w 宽度输出值 + */ + public static int caculateWidth(int width) { + int w = 0; + float m = (width + WIDTH_OFFSET_M) / WIDTH_PARA_F; + float n = (width + WIDTH_OFFSET_N) / WIDTH_PARA_F; + float i = Math.abs((((int) m + (int) (m + 1)) / WIDTHABS_PARA_F) - m); + float j = Math.abs((((int) n + (int) (n + 1)) / WIDTHABS_PARA_F) - n); + float x = i > j ? i : j; + if (x == i) { + w = Math.round(m) * WIDTH_PARA_INT - WIDTH_OFFSET_M; + } else if (x == j) { + w = Math.round(n) * WIDTH_PARA_INT - WIDTH_OFFSET_N; + } + return w; + } + + /** + * 计算高度 + * @param height 高度输入值 + * @return 高度输出值 + */ + public static int caculateHeight(int height) { + int h = 0; + float x = (height + HEIGHT_OFFSET) / HEIGHT_PARA; + h = ((int) x + 1) * HEIGHT_PARA; + return h; + } } \ No newline at end of file From 94d82828ae45227758608ff5105693ddec1617ba Mon Sep 17 00:00:00 2001 From: hzzz Date: Mon, 7 Aug 2017 20:09:44 +0800 Subject: [PATCH 20/30] update icon --- .../com/fr/design/images/arrow/arrow_down.png | Bin 222 -> 278 bytes .../com/fr/design/images/arrow/arrow_up.png | Bin 216 -> 311 bytes .../com/fr/design/images/buttonicon/add.png | Bin 453 -> 160 bytes .../fr/design/images/buttonicon/add_press.png | Bin 1120 -> 306 bytes .../fr/design/images/buttonicon/addicon.png | Bin 216 -> 232 bytes .../com/fr/design/images/buttonicon/cube.png | Bin 688 -> 500 bytes .../com/fr/design/images/buttonicon/editp.png | Bin 675 -> 802 bytes .../com/fr/design/images/buttonicon/hiden.png | Bin 1230 -> 1227 bytes .../com/fr/design/images/buttonicon/hidep.png | Bin 1202 -> 1314 bytes .../com/fr/design/images/buttonicon/minus.png | Bin 121 -> 148 bytes .../fr/design/images/buttonicon/newcpts.png | Bin 221 -> 218 bytes .../com/fr/design/images/buttonicon/open.png | Bin 359 -> 356 bytes .../fr/design/images/buttonicon/pageb24.png | Bin 739 -> 482 bytes .../com/fr/design/images/buttonicon/pages.png | Bin 414 -> 736 bytes .../com/fr/design/images/buttonicon/plus.png | Bin 169 -> 172 bytes .../com/fr/design/images/buttonicon/redo.png | Bin 424 -> 421 bytes .../fr/design/images/buttonicon/refresh.png | Bin 533 -> 530 bytes .../com/fr/design/images/buttonicon/run24.png | Bin 502 -> 389 bytes .../com/fr/design/images/buttonicon/undo.png | Bin 453 -> 450 bytes .../fr/design/images/buttonicon/writeb24.png | Bin 975 -> 972 bytes .../fr/design/images/buttonicon/writes.png | Bin 479 -> 541 bytes .../com/fr/design/images/chart/ChartStyle.png | Bin 314 -> 309 bytes .../com/fr/design/images/chart/ChartType.png | Bin 362 -> 151 bytes .../com/fr/design/images/chart/InterAttr.png | Bin 641 -> 555 bytes .../com/fr/design/images/control/addPopup.png | Bin 210 -> 257 bytes .../src/com/fr/design/images/control/bar.png | Bin 17258 -> 99 bytes .../src/com/fr/design/images/control/copy.png | Bin 251 -> 214 bytes .../src/com/fr/design/images/control/edit.png | Bin 388 -> 399 bytes .../com/fr/design/images/control/remove.png | Bin 302 -> 511 bytes .../com/fr/design/images/dashboard/files.png | Bin 213 -> 238 bytes .../images/data/bind/distanceconnect.png | Bin 728 -> 650 bytes .../design/images/data/bind/localconnect.png | Bin 306 -> 303 bytes .../fr/design/images/data/dataDictionary.png | Bin 216 -> 167 bytes .../com/fr/design/images/data/dataTable.png | Bin 308 -> 254 bytes .../images/data/dock/serverdatabase.png | Bin 452 -> 428 bytes .../src/com/fr/design/images/data/multi.png | Bin 198 -> 194 bytes .../fr/design/images/data/source/rename.png | Bin 436 -> 433 bytes .../src/com/fr/design/images/file/fold.png | Bin 217 -> 238 bytes .../com/fr/design/images/file/newfolder.png | Bin 277 -> 293 bytes .../design/images/form/toolbar/ec_frozen.png | Bin 213 -> 184 bytes .../fr/design/images/gui/color/background.png | Bin 416 -> 413 bytes .../design/images/lookandfeel/ErrorIcon.png | Bin 763 -> 1244 bytes .../images/lookandfeel/InformationIcon.png | Bin 573 -> 721 bytes .../images/lookandfeel/QuestionIcon.png | Bin 601 -> 831 bytes .../lookandfeel/TreeFolderOpenedIcon.png | Bin 406 -> 356 bytes .../design/images/lookandfeel/WarningIcon.png | Bin 616 -> 1219 bytes .../src/com/fr/design/images/m_edit/copy.png | Bin 258 -> 214 bytes .../src/com/fr/design/images/m_edit/cut.png | Bin 506 -> 503 bytes .../fr/design/images/m_edit/formatBrush.png | Bin 431 -> 428 bytes .../src/com/fr/design/images/m_edit/merge.png | Bin 226 -> 277 bytes .../com/fr/design/images/m_edit/unmerge.png | Bin 195 -> 166 bytes .../fr/design/images/m_file/formExport.png | Bin 212 -> 198 bytes .../src/com/fr/design/images/m_file/pdf.png | Bin 380 -> 383 bytes .../com/fr/design/images/m_file/preview.png | Bin 392 -> 389 bytes .../com/fr/design/images/m_file/saveAs.png | Bin 246 -> 186 bytes .../com/fr/design/images/m_file/switch.png | Bin 360 -> 540 bytes .../src/com/fr/design/images/m_file/text.png | Bin 224 -> 285 bytes .../fr/design/images/m_file/view_folder.png | Bin 231 -> 208 bytes .../src/com/fr/design/images/m_file/word.png | Bin 391 -> 474 bytes .../design/images/m_format/cellstyle/bold.png | Bin 287 -> 284 bytes .../images/m_format/cellstyle/italic.png | Bin 209 -> 221 bytes .../images/m_format/cellstyle/otherset.png | Bin 456 -> 453 bytes .../images/m_format/cellstyle/underline.png | Bin 214 -> 211 bytes .../fr/design/images/m_format/highlight.png | Bin 421 -> 399 bytes .../fr/design/images/m_format/modified.png | Bin 453 -> 363 bytes .../src/com/fr/design/images/m_help/demo.png | Bin 246 -> 207 bytes .../com/fr/design/images/m_help/feedback.png | Bin 398 -> 326 bytes .../src/com/fr/design/images/m_help/help.png | Bin 232 -> 183 bytes .../fr/design/images/m_help/product_forum.png | Bin 323 -> 440 bytes .../com/fr/design/images/m_insert/cell.png | Bin 218 -> 156 bytes .../com/fr/design/images/m_insert/chart.png | Bin 362 -> 151 bytes .../design/images/m_insert/insertColumn.png | Bin 283 -> 263 bytes .../fr/design/images/m_report/background.png | Bin 371 -> 399 bytes .../com/fr/design/images/m_report/close.png | Bin 544 -> 641 bytes .../fr/design/images/m_report/close_over.png | Bin 508 -> 632 bytes .../fr/design/images/m_report/close_press.png | Bin 521 -> 631 bytes .../com/fr/design/images/m_report/footer.png | Bin 213 -> 237 bytes .../com/fr/design/images/m_report/header.png | Bin 215 -> 241 bytes .../fr/design/images/m_report/linearAttr.png | Bin 158 -> 127 bytes .../images/m_report/reportWriteAttr.png | Bin 466 -> 322 bytes .../images/m_report/webreportattribute.png | Bin 545 -> 756 bytes .../src/com/fr/design/images/m_web/cache.png | Bin 379 -> 396 bytes .../com/fr/design/images/server/plugin.png | Bin 470 -> 590 bytes 83 files changed, 0 insertions(+), 0 deletions(-) diff --git a/designer_base/src/com/fr/design/images/arrow/arrow_down.png b/designer_base/src/com/fr/design/images/arrow/arrow_down.png index f044ad4c159f45364a1c9e0e9cd0cda8d3b3786c..ac8c423944ef3ff5d54d9f6ace93fd84b7dab31d 100644 GIT binary patch delta 250 zcmV`;_wV1Iau`HUNczKZD<(4;l?Y$!)DNQ ziP7MmIK$14Dz9QWe8f3@F0f2u5K;&=?h^MfU|A<=t<2M5z~X9r&EZHgM_byQjSWWy t*35div4Ptmxt(!(S`(W9GXoP3!}MU&$hVEwkAe0wc)I$ztaD0e0sz%5J?{Vj diff --git a/designer_base/src/com/fr/design/images/arrow/arrow_up.png b/designer_base/src/com/fr/design/images/arrow/arrow_up.png index a613a4e7b6f015e9bb3085b1e50f0625f3b6219b..283ad88f580e821f28219856d9295165422ede22 100644 GIT binary patch delta 284 zcmV+%0ptGI0k;B>B!2;OQb$4nuFf3k0002-Nklhjjj;L zm;dnLlk~G^Pd6dUp%@?`A+eZ&fl-K&k?|9d{sB}7GUykO{~RL5pe!XNbr%>OH(`b_ z!WihZsi~>ezkmOa0yQ2xbLO-)x;%`J5e6^`V(C!>7#MJd0WkFc6BCd)4fy+4{30+P i9QgmA5tue;2o(SqW=OyZ{6{NHXqJL)pGt1(WOa*JVeFg@joWN@pwIa7i`Ac5ibX@|eo57YhtZDjCt^>bP0l+XkK7k@sY diff --git a/designer_base/src/com/fr/design/images/buttonicon/add.png b/designer_base/src/com/fr/design/images/buttonicon/add.png index 98cde552d3a73172c08c69501c3f65da234fa69f..432fe208aca1f60f4695f6f1d47abb4a4c00cb89 100644 GIT binary patch delta 131 zcmV-}0DS+&1E2wrBzysLQb$4nuFf3k00015Nkl}g97n_@4(9DtQJHa7VW!dNAtf)u-8 l;0+*<5*bh6^Z($G0{|XB4h~{T1;79R002ovPDHLkV1mS&F#!Mo delta 427 zcmV;c0aX5=0mTE5B!2{FK}|sb0I`n?{9y$E00DeSL_t(I5yetHO9Md=oypx95F!YQ zf{kFKAQl0wtPG+7EwvU2+KS{Kh@IGrg4n8sDC8s{sr(047J?)o5*smK$ay>NyJOc& zB4{DF&CI;{dOI^j|NZzo0=dIrURZ63@Qe<~2uqcP{j}rl_vj_WaU(P09Y^nY^wewMQGyXEnGyL<%fY034t~`<4q06a%nv7qlD=8QPFFYh$YnV zbZHAj)7HpZ)_>`uy*(R;Dc$-#AgVkl66Oq=*aEtHP1|Ed{{wjR&>6{dM=b+csn=SC zVP~L8m8|y{ic9LctpJXM^q!Ns_%mpCJ?4XQA$`|Y02hWMVdl^zU|_oyYeul1)%`%9 zS2Qv4n2n_+js$zgsuFOl>dr_$TjhrFbrpakUy^k5DI{FLs^V#L%@gGt+9vr=Z zfO>W~M@M#+Zb?LpaAmm#H{ce*n2D_4VgwHJykrhxm_glfTByB)&#! d!sTju05ll;rwQj%H#sLDbYbrX=@31TwHo)p_#M?Rz9p6`tG|6dBQs!EUv= z--2!ZEh)LbM`jhWb~mVTI82~HBmqY|sN0;wlQ~`v@7-gX1UVPf!;`<0N{g)^W>^pe zsgO@*{M8`LQvP5l%!YS?0Jdo+LI)Th!*anYjtPLJhs4n=rISkvjZ3kx#gp9#nH)`L zvso%zMHyBX?Ppn*W&(5|;KLq1yH7`w?U4mvV z)9Ut8n{dNuM>1(Y#keKq9Yyi~u9~*&ZKEXolkY!??Npx$=_Is`UQ5P<>-4&zOfF_Y z2^m((Fb?Ls*xGF%!|par5R2uy1}a5KR(1DqM-C;5TwJ%2q{}ca@FeD;R8`@a2+KyR zBH{W_sNU~ysE$-es#x5zDE`5Ot3!FLV9321)KMO*{J};FVqHOKCXOsXOFaygM$6DZ zu5eB*oJ+7E-x5|SoJ*)6md44@?s)$icm4=#$lWfB7aPm+hdS20g~csgm<{8LF%=i0 zDd%xtpvVYxYxIJtG| z#IBOSjk|ZZH^gMw`#dvod~l$#V{Y@))d~IQp;H^K5bT@wh4>48amI7`z^2FAw~6&P ze|TG-q$h%3#y-AtKKR!@Dj#??HnJY7l)dtHEZp(B?(C>ER8i}B@%h-Q#c^k7 zW9{j^^useV;n{1KHXgl2uH(OZg!Yoo`K}Z-7k$67vNBn>cITF_WvO7%icQ3xWLs!- S+x?h(=i?16!qxhY6Tbi-q;gFF diff --git a/designer_base/src/com/fr/design/images/buttonicon/addicon.png b/designer_base/src/com/fr/design/images/buttonicon/addicon.png index d12f1faf57ac7c05a0331da6f650832fc149086e..bd90eb7c1e2696604c09d5fff73753666bf7067a 100644 GIT binary patch literal 232 zcmeAS@N?(olHy`uVBq!ia0vp^Vn8gy!3HEdYt9+~DaPU;cPEB*=VV?2Ig319978Mw z-v;02ZBXE0d93w{;lMv;4(1m|rgl=3vpf42bawu`VtwoJjt0a3+f@?`IiK4ombV0V zIk}%%@FDa}lj#2`>-ssnb3VLC_xqG}?2v$!n+}`Nk+(g2`JLU07iQ-Q#-5WXR#_A_ z`)tvy71w%dZ!EStrgrRH>qUvIvOW8PvfoN1-#1(zR?;-1y~t+$>b}B^V>1l7Mb^7- gU-YBxzUUkV?Le#gxN6fyK-V&Oy85}Sb4q9e0F5|YjsO4v literal 216 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Ea{HEjtmSN`?>!lvI6=2o-U3d z7J^3u4+=IY@Gzeby~5b=mtBDELh6K~wq`kgZvLNBT2vfXUwLxriTN?NOg|30>dpP^ z9v_tU&V0R``QQ74%hf*BUyr!LoP9TRcIN)37rpCdmI@t{D1R~gma%!0c!BK2r>wTj zg~xVS-`)FAMltI3?cbkI*m&qMxjnUdbej8zV&Xk!7T)XkMA{A~)G*AbwyNK@JK{Ug OX$+pOelF{r5}E)2>QtNn diff --git a/designer_base/src/com/fr/design/images/buttonicon/cube.png b/designer_base/src/com/fr/design/images/buttonicon/cube.png index 23d27849c01094709b8abba3d652ff02c15d0439..ee024f10ea2876b40852a715f9571620e94971c3 100644 GIT binary patch delta 474 zcmV<00VV#h1@r@uB!2;OQb$4nuFf3k00055NklkMZ{p?78YU( zSyWOOY^)*%K~RIXRzd4DHu(cj zj(3+#*d;Ltg45iYd(Zjib%8$)_LG12f%`c}+^RE%*myTf*MHJh0rsD`Y?PpaBgz5E z1^@;a7NusWqdt~*f+~O%=hDX`qA;P7QFe;NoWyx}pnAKoIK-Gyh68)|e9Q#mbY#B} z*Nb$evPt005`;PBA`d4pYw71}BLP4NOLaWmt z=IJib$^?E3j$oJ0Biw=^jt)UPE+V>!_lA*L3%iQ18#C-Svx=3IlBwMLio#gf^b=w(f6F)``dpb8*B!|U8nwzviGG_aVyG4<;!3daA$Z*7r?_l}F* Q>i_@%07*qoM6N<$g3rF*4*&oF delta 664 zcmV;J0%!g71F!{ng4?P2aXEtAB_?+SXWhdh%@Jp)CnD^T4-~sAWr>@t?#rg(vT8v3p=0Z!-J`OBOa*A z0mp#^EfmFE)q%bIvtBd&Eu@6)VBAohNNbrmP@QSBRNFjDq_`|!$J@x{kO{eJk-!#KlT}9&!Qj^Y z7vNr+U~%~K#62VsFk*+Cnz%?_#%3`Q)crp&UkNT%VWq=2zSJDNz0|86@9ZTI!B!2;OQb$4nuFf3k0008qNkliZllm9z=*1pA>Cvf2t73CSv(tWYZQ03c% z?qxIk^*qTYZ{9@?T$YxWJP0u#5pv9#rpZB@T?HYenWiIUnt!$3!^6WH1aO)j`%>LpRBRBM(A5IEWM#l?40FNtjS{00PQzhC|U7sHmPaI%gh zNs}z=awHN7?d0S{#T*yUdsyhNR4TQdo$twNwOW6XKz}EAHwlObTU%SFg+lQG#tkjd z4vqtjzPGopghF#X4m1b=PoKou*)R3_`u9EbK^aP*6MS>?TRfZ1>Y7&8!{M;-h zm@y-jN|kk8H%L3w1AhhG;F_ix9LLcsE6e^?2<&-0e%g5HTH6N}=m#E)eSU+#@#cR8 z;IQYp+<#T|DSRLSJK%i_*ah!Pz)pBi0lVQ{1x5kyC@?B`TY*u+p9zc_{*M48knlez zzf|ai*bd>9M7TkN46MwvV64*aZhR0|!M>^t~l8sBubd7K`d#KA$U}pI>UpWKz4my=|n?t>a#L4Qwn> z+vRzFO;OTnE|)JWic-#GGIxeym@fr%oB#K4y4y$`|L5`i4+w)`sAt}mLI3~&07*qo JLWsyBs&s`;D6EMCzzeR2U(JFdRoEG z&Ug0V+>odYD2jshS8p&q9pNmi&E!s zexkenBq0Kn_O-Q#==FNYW;e0Fx92D^Gm~WJCN>HC$Na|BO?>wh!Q52sr-O*6kkC?5aB;o$)kC60JJKF}*o#2l*>3f`^}zpP9cduX1aC#1nqX4hgs{p4u818Tdfu(Ny5`-&j%nh=7qx1 zK#U*w67T|lx&9i-WQz9>g438+t5qx3zvEdz1e`=X35bGw5)cU=DOq|&t*ixsed*H(nAxl+wGbwn_noE3>b!vV(}Qw=EX9aOHHa}0?}yHe2K`TWWo#+ lS~lS%5yU3!<kh>GZx^prwHyX}m0RU102fY9Q delta 24 gcmX@jd5&{}3NK5#qpu?a!^VE@KZ&dx_2#kw0AW-I)Bpeg diff --git a/designer_base/src/com/fr/design/images/buttonicon/hidep.png b/designer_base/src/com/fr/design/images/buttonicon/hidep.png index 6e5b72b34b51a066b4b6baa77a905cc69084e356..a40f9db9c81f0338879a1d4bfb23614f87c38cfd 100644 GIT binary patch delta 1295 zcmV+q1@QW^38D&+B!2;OQb$4nuFf3k000EsNklR#s*&k z#uq5TNQg^~5HE<3q(W5;A%shwc<#^0FGyee15zoftRgO{gsPN)Kmvq8NT>)X6mMz= zFc;g{7~5-a&ulo`&BiuF#qGYF>&!Phb7syiAw!Sb?bZ4zPet7CYur`1ttb&feZ$91H+937uj+h2WT3Gy`q| z2O}tK$#tzxr+-t_*Vk+B-nGyb6%}+ziJDR<6cj;l+~sA8O(v7<$;t6WFc^p>63NV? zM-QBE+Tp-K%(2_0oNEneY;4puH#Zv*SSuC28WS{4DQQ}xG#K=ny1Kdwyze?V?8|F_ z-EP<1zu#4DG#Y8F@Jrg8!1Ef=-Q8_zZEdY2N#aYG!hc>V9ED8ja=FUp=jV@vO;?>y zJb+?K3=R&~R#jEzbGKCfv#}IzFc_3WLqqoT_2$hl@5Mqw76APD^Wm?=@K7ie zKRi4*7Yh{XOW~jsd9xDWAlJ~)U>qJEbjsy&!L@<`{r&w;v)OV719oVzR7nZfz?D}WVo;vWDH=wJl%WSvX%J8Jmw-Oj1pI|bX42RN9 zf#>tJx!@xsBlj#8Qz@$XGSCG&u{;>j($b=bF=;ZHRBrdzm3R^5>*>tQ>>(bfQb`u~ zbG7;4;C2M(ung$j-Q7FE|%0q%8xfe8;L{{;<312 z2oC$s&*Mq){;8=c1{g4>QYopPo*o;jR2jia@n+l)27@u&7q{2JVK2il5wQ&P(G4gZ zK#GzR_Ja-c~T)WH5%OSB`Z?DI$*X#KY9|+Ie zw|~F=MMk4hc41*b$j#c?n)2@ME;ANPBof)Jt!+V(6b?lO4jfK3Ea&sB1wl6+gHCio z8SvQWTMZr^9VPiJSY2H`V;KJ#UUa+Ls(O2SZRl*s;8tsBaG78&7aSKEEDP=C=4NPa zZjP^dkn>NT^w~fs-sAT(;n~@b2c2kZYkz+M3jiA!=yy6CPCh+g4hoT8U#8A=tHGN~ z;SkEDrKJFJJ%8Gv79h7f#rFvmw%4zJ`XilA^Jh;e#gMOF@6UgtGr+oB^+qrN3rgP{ z)|#4{%H#3#)WtbCEMHEwox`-7W#C)EudHrst*bHL*{R$|MU0!Zy{|4jc{Tb$N&HU00>D%PDHLk FV1h|Ga%BJj delta 1182 zcmV;P1Y!H43bF~1B!2{FK}|sb0I`n?{9y$E00e1CL_t(o3B_0YPn%U3e)@3@D;pGs z3mawy*O87eWH`_`ic^Oy1m>KEA{ma%#IQxP_;<|9B8$cga}F3bo0OOl$+&GaiV`-F zA-g~mS;7x63sSBH>h~T!r(ZwXQk=l~;p=(NdC&X2H=c9Q?0?&r<;DgMX+5!1Qc`gC zgO5>l{xbo)ZVnK5<*9cO85xP$+1d4VKnXrKH;408=Y#{HVzx#TB{)S+;DdvM0&Pu8 zuo5_Vv1Seg15OSEU4odH7#R2LfnJ}Cq@*Vi9laS*QBlxn0H@Q5$;nAPd^n5;5AI`T zW(MWu6{6wPX@4hRJ~S)wKzjOK;C@H1!LM{KMPTjRIFVz~^r+r$1M#DDPca8y>F_5!E$-M@D?SZu~{ zRC69V1yopA#K6gjDK8HvDo!FKBt+O04jeyz0*2kGV#8*;iH|-!3!N@btOc5=8;;UW z*}U}4*XZoLA&$yTkMg%Fgv=ax>E(PpotY^XtqoUETXPAEi;LL2Ws6w%H}M5dX*U=Q z%tl>p4S&ccALK-4W)>5rgoFeX6&3S6{M_{unwx(RveP*!=DsGp=Dgb}a$fU=g#~eh zY<6}1DC82e8CtCt(y?Q2h?)!!|AD%?8lgm!k&zKESt;vmU#hRK#nhCODG)YHh&i=;%MUVR!d0=;`Seo5e?t!fY;My+OBH zZhvkb+vDJY(oTvU?d@o7X<=vRZ@%=+G87fR%4GW7>ghqt^=2juCcIGn6_%FV$jW+# zZ9ISA01~$+A~A8hxYd*wi@M?H5S7x}@SVt*PN!qUqr6Y<-5tQii`5K+KEeU2$%X1K zF+DvcBIXCxk<-EK>}TZ^j^WQokKh=0;D7i2e%!u&i?Lx$Y%C5Qd=Vzo3kVGr5a{dc z!xx`_3YW{%_&%>=V#Vy79KsRw%F|AqzHQqRa5x+oA0L;qw#42AaWc>E+^L7rXvA)r zQI#D}I!)KUM^n=^uX}*(d)y;Q9#r$a85wM@j@(z;nPPwsIeztu1$MjLrVId{ zN;UUsQC=i285rotjgAiV_WtTmjjam@2>jIP_Ye^gu`KPR>5>VnvC)cMPZ_WyX@^Xs z(ekrQD}zDqn`!w;_7`J0yL|}#ckZzA1VsLKll4HL$b&KRI6Bfsf|KK#_70ny|GT8D w`Qt>jnzPbIg0l?Bj|0yGZ8fg{PZzp>16`IZkD464`2YX_07*qoM6N<$g5(}SmH+?% diff --git a/designer_base/src/com/fr/design/images/buttonicon/minus.png b/designer_base/src/com/fr/design/images/buttonicon/minus.png index bc68e3a8c5473ce538e69ef9e704d7f12ad20c9f..569e998491d9abb662bc63d42794b375b165e03d 100644 GIT binary patch literal 148 zcmeAS@N?(olHy`uVBq!ia0vp^oFL4>1|%O$WD@{VjKx9jP7LeL$-D$|{5)M8LnI`V zZ7M(A31e&fAID?C_}EPC50``0|7u22K{gl7q{f+xmoGnh;NU^V$3}mCd~AMrX=!$X uU5ua)!#b``$0?;pw36<$r5Kq#3u7qM6!lvI6-Ao-U3d z7J|tM60C<6SR@kb49vD&Nlp19&GY#2qW}NXC`FPr(QcWUxirhs-1_mYu4i=9C RrXoPS44$rjF6*2UngH|BA{_t# diff --git a/designer_base/src/com/fr/design/images/buttonicon/newcpts.png b/designer_base/src/com/fr/design/images/buttonicon/newcpts.png index 4b28f291e1b4d704cc53864cc10e1693519b762b..0a68f6c88c2a1112436d36ccc92d03193044d64f 100644 GIT binary patch delta 20 ccmcc1c#Cm@3KwH>kh>GZx^prwCmOB+080)Bwg3PC delta 23 fcmcb`c$aa43NK5#qpu?a!^VE@KZ&dp_0|9YT5|`@ diff --git a/designer_base/src/com/fr/design/images/buttonicon/open.png b/designer_base/src/com/fr/design/images/buttonicon/open.png index 369c79356e0dc7b6821356e2b6c1dac50deae4fa..ed92604ca6e47d9ba9c954223d87a3435472a2b7 100644 GIT binary patch delta 21 dcmaFP^n_`G3KwH>kh>GZx^prwHyWBT0svGG2X_Df delta 24 fcmaFD^qgse3NK5#qpu?a!^VE@KZ&dx^~@LnW6cMS diff --git a/designer_base/src/com/fr/design/images/buttonicon/pageb24.png b/designer_base/src/com/fr/design/images/buttonicon/pageb24.png index 33c1a4bf491a75788924d34782941a67527c1ccf..bf91c74a03d64fc77135d2421bf2e2abf6a2c6a1 100644 GIT binary patch literal 482 zcmV<80UiE{P)Px$oJmAMR5%fhlS@kiQ547jqc#rqu!Zz6vla%GRNx{-B(zqwszuvqBYg!wLZ2Xl zTD8fnmbP$_t#VNmwFn|ik|~nNN8&qY@($jqaRQyqIrq%({O@^i88koNUPYvSCpPNW zGlbJnm|<{6{kE1txGmEuAeBMj#r;ZH6tU7SG5wjkxC>Z)l#^TNB$*@?OL_0yb}~u@ zbkyn8S}Zn#dMU3GI9Tt3#VB`1Imz-l5gW%fMNB2|7tj@W^rdfr#)|SLCu-b)BAFai z01Jy*?%kedVPb@=)j0cslU1A#noXPh5i{?L?u8fV2cK9+23K;56d8N63Gnex*kPL zc}4SA)nLZyNeF@toVX^Drlaa7ByukK?xB0=Bt7wcLnDya29))Xs6#2(piv7MuInwHA*~YRtDViDdAzGaW#JWuV Y0D+f&hN|3qZU6uP07*qoM6N<$f8j4^ zynE-KbKZS-h6il+hoLoK=m9U$;*G?D7c5k*mPSaMQLAPk-VAbrLzPd(0DGxatXf16 z>w$5mg}tcf#m)H+buxz^72T33+%L7nT5nsD3v*+kYkP)j)l+AnQSq|qaxOFIyb}x7 zWuR14_s&T{Jtn9fAW0g{A6;P|UTJ2hmx0l_v0xj`!PFDvscOwcg6&6vnYzG+Q`_W~9whMD+2G;aA_V4O|{h$p$qvM#E%_7l# z0!6NiRzi*GGEhAO!C(;id>(GMca3zozk>aKKYDumaP#}&wVVbr+_O|Fg=8{W5_eN+ zJsuCfeEJAR;HmlQAa%60E+pN*Uf|Z1Gu1qb^-7_D8xP-MvG=4LZ`y@qE0dE+)j+G+ z46ZP*mR7_K&w$Uz!O^9Ca)KyQ9vS}#f5mKU3S4$tj%fkI2Fhgf z_H(%RW)d$)1DK3P!1H-bM8bIbYy=}?VO;i}LSN!JI^(akv@1EopP_5}gGs;JjE}b{uw!0!;&PNYiM`)=7 z15O9L{Q_8iNl`{FbPXX{pbIk$5;iZc-hB*9W*UO?h-%r!7+95?v!7QL{-5~Qfj_^x V#ro?W0?PmZ002ovPDHLkV1k+TOf3Ka diff --git a/designer_base/src/com/fr/design/images/buttonicon/pages.png b/designer_base/src/com/fr/design/images/buttonicon/pages.png index c54f9ca9c9f4facd2e727992e8fad7ec7ca79c11..67127219d8ecf3cdab46e61f8afbbfbbc3819008 100644 GIT binary patch literal 736 zcmV<60w4W}P)Px%nn^@KR9Fe^R!e9TQ4~GXNt4l13-*K7Xbr|7f~JV3E1~T|%t|3EK_m$3P8V(j zK^MAkE4cED5D?Lnq7X%d6p^C1ibf+T{TO0Op-r0)O(xCEn8Z4LlfIeEBb!gB zo^#%PcZLUS_J^T0VCVra(c+E7f)^}Qt(Hben^CJ~Al?jef#kEYB8Wm8hw_5FFYLHxzSeJp(v#r?1QRkK9l5sjO;k0i>UTc93 zKLRcBa!ywVGBiKcnNAn9U;5eF8L7KrwJs#xzh2%L3W||NTP~LFM8!;NRar z4DT*&VbEfK#31tZD#NdLk5P3(c^F=Rsrvi!GDBRLADF8QBn5BZW!UiW2g6?`4ww=! zjnf5U{G2EX8u0YR8x+OQU%X)W%EXT%2I63N;ri?U4A)=(WnliJ z&+u~PK?ZkoHHH^&KQSD?@`yq5(?5nM!cHiLU>E?C{ma6|aOkfU!_mXv8U8W~GO+*S zWAInF%CHwLFmZYTZV)ptESQ)XezJ=&to>lh@a-QfOo}=*0L}+yyeX3~FaQ7m07*qo IM6N<$f}aPyKL7v# diff --git a/designer_base/src/com/fr/design/images/buttonicon/plus.png b/designer_base/src/com/fr/design/images/buttonicon/plus.png index e864ca822d74d6015e55ba2cb09110392b7a90f8..dd5800914d7f8bc1bf53d5182d14fc94b2d862c5 100644 GIT binary patch literal 172 zcmeAS@N?(olHy`uVBq!ia0vp^oFL4>1|%O$WD@{VjKx9jP7LeL$-D$|(mY)pLnI`V zZ7M(A31e&fAID?C_}EPC50``0|7u3jg-o`#x*?1T{LX^x?CfnyVly~Su*_gGHdbzv zx34pZ*;T@;!yC>b%%Eve`bx$}f5x#5d?`#;2Lf1(1tS#$1RtBFFzUQn%TTjd+VN0G ROEb_$22WQ%mvv4FO#ttNE=T|X literal 169 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Ea{HEjtmSN`?>!lvI6-Do-U3d z7J|tM688?=xba0yQQqib_=kAW{Wi?ZjLaOF%bOT`46J*4bxS2B|Fa$bq44Yf|N5^z zJwClFlFnqGpJ!Vqsphs(Jb^87X>YIZzvQV7LQ8J2ZZT{4Xf`RkU0awzC0kh>GZx^prwHyV~R0sukh>GZx^prwHyS=+1OQ0q2ZaCt delta 24 gcmbQlGL>b53NK5#qpu?a!^VE@KZ&dx^`0;S09M5ZoB#j- diff --git a/designer_base/src/com/fr/design/images/buttonicon/run24.png b/designer_base/src/com/fr/design/images/buttonicon/run24.png index ebdac1d6219a8b0374ce06121db364f9b68508c2..8628e02a66496ffae31c4348d8a28f1e6546094b 100644 GIT binary patch literal 389 zcmV;00eb$4P)Px$KS@MER5%f(lD$sDFc8P>6eU!d;Sm6-W1JR6%D~LZ8+3y=U&gjngw!ndef{o#=P-8Q$5p-O2~hX8lXL4~xlE(B*v8id zpqLQ;n-If40Lw^h1p58sE5_ia3Hdi5j^nR3$Wfz_(WEiTa=nYg054H3xoZctL^Sl= zP6eJfyyhGt0Jz|szXR|n&(l{OXarC(W7Q)TjvdEYNGV4E)fD}=2-!cs5kQ@(ILorx zuH(%2{V}SUpuJaNd?m(Kif=yk97bgB4df7Dxo)!oQhy!j&3-*C7=vWax(q=o0TYaBHR!f7)%NzS-{Ksn<#Z} zzCvhV96TU7h(JjZ7NOVxlK4fkaxy5L!y*#h5?CsNf`wS?17ZLugMpGF0q_wN4ZvW! zKyq0G@`bzXQ+RM82cMP1D+V^Ee;_VDC>nqfZ9rC00V)pAiv$>u;`+w0=AObws3j9X sK4_$7;U>cI6J(wP5FZ5M3jhHI0KT}0{97T)bpQYW07*qoM6N<$f}@GQy#N3J diff --git a/designer_base/src/com/fr/design/images/buttonicon/undo.png b/designer_base/src/com/fr/design/images/buttonicon/undo.png index 509ddb3a82bd2413303a90904fa68b1a3179c2ea..f86a17441d3dbfa12ccca09d733776079e4e7547 100644 GIT binary patch delta 21 dcmX@ge29613KwH>kh>GZx^prwHyTc11OQK=2a^B* delta 24 gcmX@ae3W^D3NK5#qpu?a!^VE@KZ&dx^`kh>GZx^prwHyX}k1^`jt2fF|O delta 24 gcmX@Zex7}T3NK5#qpu?a!^VE@KZ&dx_2w}H0AVW!(f|Me diff --git a/designer_base/src/com/fr/design/images/buttonicon/writes.png b/designer_base/src/com/fr/design/images/buttonicon/writes.png index 72a099299d64b8a3b61842ef31ffe1704e5ef445..16ea8e50adae6b8a83a04923e7bd8f6c0c39e5be 100644 GIT binary patch delta 515 zcmV+e0{s2o1DynrB!2;OQb$4nuFf3k0005kNkla-H0ZFgcXrS+LVL}t?{W*t-dm2 z#%OrSXN!ij7{=XmPQzqn<-V<S zgpfc(v{lQvMqqsHO$JFqR-WWP$+K$*h}cF|xJE$fAQ%iH60w5gjM&{j(vXRgMnLJn z56?UW6o@2PS?aaa1v@gZ!&)I2w(xj}8Or zGxmDD@P$|iWxPs2?m3rx9}oEF;b=azRSRjVwg*kKP^}e}$MosEB7eqGDQQC#MWWaFhKZ=b zPGO-|!9evo5Du?Kd_LbS&6((hqIZbHoa?Wzu74@7aD1e(|7pQ`w9M^AB4^akI;q-( zdf26A;P+0z+-Jdyb*ib_yaFTt5*nWNj3RoT#TDl_xH?YY?#e+AA6#a^IcE%ET`;@> zbzR66yrYQiqkjx!`vUNw(h`I1ClI=kyeVNh=*7y21l#8w6Qsm2fmF~S6$mCt0&A;_ zb)Ux#I0s~GCaNHOFU{7m?F61-);KZdL_c|E!a8Z&K)x?B=3Fk1H{Ql*9UG(sKX#&V zlpga)N@*NkWZ)<_{!gQk;SFeonEDVW0h}BwAe8rmv4(~^P6k!j00000NkvXXu0mjfGFi}A diff --git a/designer_base/src/com/fr/design/images/chart/ChartStyle.png b/designer_base/src/com/fr/design/images/chart/ChartStyle.png index 129c25335a6c670c3b846e400cc653063859456d..3d1e6d7e4e4d4a21195d681df853c40e28551aa7 100644 GIT binary patch delta 282 zcmV+#0p0<{8=B!2;OQb$4nuFf3k0002*NkldY^nG7% ziaT6u`<(Nfo+_y+=i3D1w^0Rt)1~GZd!*gj|5l5`QLq0fg=Xbj={ZNNFrE z{Qv)-!OqI^KZqs=vtV-;F<|S~Z2~~*028*TAwshOka_^b`Yc!^6@b(RAO_J3fOvwp zx7PzC`2-*}A0CJx|HGmTC>a3N#E)j~L8!O`5XYm&0x%#z;ZRmpGZDzoC)GR1=^&q+ lz=V5&YUzMfHW)yF0RYCmu=;n55$yl~002ovPDHLkV1oZUbK(F1 diff --git a/designer_base/src/com/fr/design/images/chart/ChartType.png b/designer_base/src/com/fr/design/images/chart/ChartType.png index ef9987a8d4f9dccca0aa472ac2d636fe1f924d79..504ca9484729be763d7f3445dd5d47ca7d0904a0 100644 GIT binary patch delta 122 zcmV-=0EPeR0+#`hBy$0CQb$4nuFf3k0000{NklAV%uCVEY+g6dQ~PXn0o{umDII0I`Em`+tTHB)K4z?JkIl2V#97 zJ^(aKfM^4z+niuvl>>W!Ayf!#2n(^ABUSE$F#`kZfsY%0!(4KKiCE1@U_O5U>j5C0 z2n>S+yaw;CmsL*002ovPDHLkV1lu}g;f9m diff --git a/designer_base/src/com/fr/design/images/chart/InterAttr.png b/designer_base/src/com/fr/design/images/chart/InterAttr.png index 827f83db53d40e1bb4100074e3dcfee01ac3347a..eda00984cf20fadefcfe3c67e70ce101e2e39c08 100644 GIT binary patch delta 530 zcmV+t0`2{Q1*-&*B!2;OQb$4nuFf3k0005yNkl>_kO?M`*WYPEOj7+Sj797rz#*o4`CJxg@26WI4X{1t`QHEN~J{n z9QQr1KN|#8wQYONvYd6DyCu+Sb#^RkZULYf4PdL3dQIe4grKKkNS_UZu5>;U0O=(F zt3m{aL}En)*qWyKQwVvcV?=bJ{YU`8-%`pxCm`@o1K8H<^^TNA1^HvxS42ie=S}Un zuKO2V>?f1SZ-2h;r*vG~RLVR~r_(=bwOUWdhW5U{fQ3%*)^oYsi(7=)VeBt(4x>mc z?Nh7O_JSa63^Y(8V(LFz>pjYq(6C5ZpsJx}}V{=c!%;;9Sbd U<68;u01E&B07*qoM6N<$g1biiP5=M^ delta 616 zcmV-u0+;=(1c3#RB!3BTNLh0L01FcU01FcV0GgZ_0000PbVXQnQ*UN;cVTj606}DL zVr3vnZDD6+Qe|Oed2z{QJOBU!4oO5oRCwBA+_Gis0tN<#cn0#oLKcu_D=RC4DldOw zWVrm5ks(U_A6)F%v19Qp$cjGxVPN2A!C?SUbIwg>hATjW9)JB{U|6F47c9<%tSB3( zVER)ghOKW=gu&ufcbUQL89;eC4ul+BW#>a?h9e)D7^;B^XFNeQAQI?oewP1mKC&y} zDs^~}75r!T|Ns9LAk*>Rzkk1M1pWj4{-1#lsIgrBA22)+2Efho7XHVuoS%^)QsO_u zvmgJTF<)-=VSl>T8~7*Uy*bd3lR7+1Y@7A|Fz6y#gkk^)fCA?4-@mt5ueQ4ZHE#q8 z>9ed5TnIA6Q}EA8CMG5}^uR^&?4Lh>9&|irb8~&=z3Uevn;KL&9%zUIP_sL>*nu1H z`}gn1oln>udLJ=uJk4gN<|J}}6KKeHpwz{GTE**uVSh3irvX2I{(RH*l*1OJ8RTq` z*dl2Mi2XCq|Bm7)6w*8MT05=rMv+fKm#n5z5HOugUg&l^`}dJA3=l zqeq{C*ktrocM z8vk1mR)bpw6K*N$$P9f87?A@45}Cw?Ipc}5XHQ!$U%uS?|NsA6kj-IaWb}!QjNA$m zqd15_1_2FhgjoP$!wiRs;iZj@P5y&0UPVAjpide=n2LM18H?+m5W_MPYXy`Dd3UN1A(-1p~mUFW>-#eM#my^gDFV4-NoKQ4;=107)q`L4iHh($dkr(_Aec^`A?iZ3Ez10_k!Ek7Ei40pbn?Me|!b_sF^` zt4vS9yWHGfFN;sz)0RFz-*?%*J!>Ld))~LnXwJH{C8V#n_tV2qg`Fv#Bh~zxX<^e9 zbz)u|^9M`_J58~VG@=~vH}4dMNvhymC%_b5R9yF+cnbjfrTDy1?%Aay5@(ozB*3cI zou^p#>}z;|qmCN@ive2Uik(v=q6t8`u5-CEP(Bkl>vX|K7B~a|H2!7_IB-f1=y_+0 zn+QD0j%`*29vz#VEe#xy021fh%#$>~3V69}BP^CIy$+-c%;CBdN^>Q`JT7BwB*Tg( z0zr}P(bLSmfUrc1#gzceSQ4(JwE9>->^W*NR z1;6QUZPRSKPCI8oR9&Dzk!gpgBqVDo;X9@5s;2^g+Hmc)FUCuwJ72UvdqL@>^}V}w z>`OpD6OPjyX!%mOUvdJVu&So7aYIK(gA}Vw;%s0^K=xXo(G~D(8TQm`l1X19doN@- zf^R%xJ~!>CW4Y;^*|Jln^lEz_EkZqyzFHxK`RY?Eg=~p?_L)Kn1{Ya>{pu-11R|FWB5Y=5L+@FWxhxP zs7lCu4giHOXRbSWNY(DPGyqtoZ(DeF+2pC$lm(^oDc9x{ma0k;Cs~s)zYeokrUuVy#B$kOjy?*<<;<8TAoLa8_G|#a3V*#~l7w4LVT|SmoyYgiq7ud2d zk`z{pmZ$80OkB5rx3$+^cQu`|8Ke$(1J@`6(j0fAAQkn}G-99hJjsYKr5@?^I~1mU8Q>&}8(;i5l+Jil^#+IHQU;Hh%EE8y0|ZVzi_ik%w5GeY@BOcXk6zh zXBUpk(t7@>DbA-|rk!5zy5+=jmkW;1vt=I4I9;DT$K`6aVQw`cm=NVyvwA~D@rKXa zKa%9m@7lRMeHT8%nUr^X)&b2Kw=v`acZ&wLt5o;mfW!9QYtIk&*ac1eq#lIaWanhb zIYkjrVkoIEHdaZ<-#*vcZ}K>0MYU$NT=gb|6k;jjT!ViOB_}k;s4=9mxY4_p-8-YV zyRk2jm1>^4ICT(9#|{O`6c`q)F4$Sn6j<{Lcc0YF?~)n3J1F1vq}FDT{w`xs^;KU( zU#*4_N?+PAdKL|BOzN+UCcO+eOwF(D-|_6^^a{U%n45kXwYC}mz1czO5u6)-)*M|bzhIQSGyXg&XG)Hx}dy;x4^_sjVzSn+Fe_u1Fa<<}}h9%r3 zo7vpJ${-r6usida{*COL**Ch}eARuAa#G(KsGe9EU7?r|l%VQF&)S#8I1*A3*P-^h zpzhNB!Hndq$;~;B=?|V%n%&xR`jfqGvicp*8)kjW-t`Z;w{5I^o|=`Mb^UF0Cvttz zdXM#=ism|8NYP1aK+(&aZmw-Ds@UX(#hH;mR(DC^ZsR16gdEvje4-fMVpgmb+7Ox; zI(a1R(~^%BpQApMJmbHaF|cZ)m&7%R4vC^|YTGVI1xRU3NSttdvcbdy6R%D}PQ|HM zOqG%I&|t?hOI6>f50mtoeHSOys@#=MRav9{5ml*UH@9JWq*^+hM{M()t!20^>WC*PvTfvD{LSC%ySUuFmS3jApV z8mT8aKP>-L{x;t357q+-id?06GQE4-Z$7$dw)Z(lvXhpim(rf(9M2`?b~GQmqWYq% zx*{#u)Wg6ddb9D)!-@&#mv)51EF6(D9XhfY_H&fp>`30}U|oFdz_Hcm^72=h9(QO+ zYaZyeP`W>) zummS_Kb&2j|Dw%p)rR`bgM4~p-I?7C!H`GEnH5F;%j)m#>X*w=A2`sV zzJb2tDfeiI|6pX*#j3kiQU*kW-nEsN1x;^`8fLr?N!{vM;rcn}bYAgeoyLZeC&8QE z%7@QUS@N{+P*35dMLf5FBI_-KjJns`pG2v7s~42K2z`=o6YOv+Eo#&8O_SeS_jUVo znY89JB_-!&=mf(9bMaVKM{*dmF}XJ>_!4W)Liy{y4W&_48YQec@ulv`SQ>U^_-;r8vZ z&$E28(o$C~HG7cQ%pbBFNeu8@?OEh&S(CO@mHXN*Z^O`?w@*8xJo^h-@8Cn;P1<=Y zbIfwhY(iO|pW)A}WpT+sDZ+xm_pJkoTQmVNd>iU)6%{krK^11EP${P2P zNBvWVBWg-=`PpyTeW$a}V9T`1GzzQvW&z>09u58Qjgl9%aw6B>PeEA#Ac!$SP-2NC3&i2fh?1Ys$ld3Fu@l z5yqp_7#u9m3_h9{3&z4`Bpfy>;Rcw&mkA5P-0dAmqRUnJVZ!~}`LATbyOs6cS|3@(v}U~sg?l6=o&Mdpy$R2G-YWWa=ZiQddWt{EII zEHwW5c3*VXcp(Po8#|C9l1F4A(Yh$)pG-caaStnyO&h&59}<#GBh$$YE(i3X|L9|V zKl+c`e=0fN{nx_anAqF@+5G)_>GVIA=5VcpKm^~A{#5q6ljF>1k&y&4hZ)Ewk*$Nk zThaQ{-E*mwAA|E#CSlKCubs@J{>3Kj8MBQ}g|QJb1@9GW$tDxIOtv$VNyClJvL8=R z;KP$}R>9`m6G>Et@R4ePDe_m-j}iZok8DNcl5wEd0D;0FFhGRC4% zkR)TuUvk(peW(=vZ#mFdj3L$l1I+D~ks{PUoaS3~BB(%&3ra&|EXE}g5mX??1*IV}7UL3$ z2r3Zcg3=Hfi*boW1Qm#JL1~DL#kfQwf(pdApfp6rVq78-K?P!5P#Pj*F)opapaL;2 zC=HRZ7?(&yP=Od1l!nMyj7uaUs6dPhN<(BU#w8LFR3OF$r6DpF;}VGoDiGs>(hwPo zafw6(6^L;`X^4!)xI`j?3dFdeG(^T?Tp|%c1!7!K8X{vcE|G|!0x>Qq4Uw@JmqZ5aWW<5E=g~F4-SHAtW=v z-wg(XKMfHI>y*5#yd#629pE`^Zp3*H9vQQ?dE30?V8BmFuH+U zVOl`^H>E7Lo)(A65&aA6jFhR1tYgK5o}ivPG=g4F;sO(h7O*2q8zuvjn<2|%vE8aCL%00f8) z8=_r+D{M$I09)9Q>;jmYFr;rVBB~e__iyqYj9|nvd=Ms~2aRGn; Z0{~C9xI;khKe+$^002ovPDHLkV1i?iReJyc diff --git a/designer_base/src/com/fr/design/images/control/edit.png b/designer_base/src/com/fr/design/images/control/edit.png index 3ce387e789209df8d1ab42927fc7636ee317f318..7491cb9c23367c4cf94630bd83651bcc83d17318 100644 GIT binary patch delta 372 zcmV-)0gL{G1CIlcB!2;OQb$4nuFf3k0003=NklZ=#)S9hVlcIZBrH-B_-@&>-gS$Qa*|rX zbeJ`&g)OSBQkwo18c={$rD(5Qayp$I)J9rse{omo(Q6dr`K2pnJpBf-3!0*U Ss8ntM0000; z!T{rY1_l=UvuBTA28po1gpq07nt?VlGTdNiXLOD5`cnVjEqc+(E|)7iA;l|@xg-!p+LV&0G;~+XwVEGJ@fSGQ$RLh z05$-q*&LWeV-yq=Rs+E=m^Nc$lm9R_It|PR@bE*IBZ&_HbLo`)E&~>G00000NkvXX Hu0mjfp9Gqg diff --git a/designer_base/src/com/fr/design/images/control/remove.png b/designer_base/src/com/fr/design/images/control/remove.png index 3142c589dfb2ec72d7a0d9bf3707880ec59afd24..5c889b8bac546920f2a0178a18fb9a6bcf8eb8ad 100644 GIT binary patch delta 485 zcmV?2mH6uPXao-yYt4FZDO91e85CyBDxp=_9&mP_kY&(5pXV->a^Pj3~cs- z;*_bUGTwMi?j9A&)nOiM8PN!N0KRj3(Lv-0k zpqHdWw5Go*yuOYW_A#?57GaCawyDZL8r30Ei!m?>YPc zp9Y{>1t0~&7l3L%FhRvZn)ibQfeH-pXa>n$fT{(ngBbv_^?xG}^8@h#Y=%I^4nWm> zgzABK0fzzypc5|;l4C>;L~IJ7Qdl)(7=Xo)FHm6~Y?`qefMm#Fs73~;LAL0ckpq#k zbU-yPP!xz1MI$tMUchAw4nqt;$sQJn3ivdG094EYDa9(FC*?+5nz0zth>?`Z1pomC Z06~9|wIMYhL<|4`002ovPDHLkV1kIL!*fLb(a00RS+!T^{oiH$wDI&$>DHB*xT0KcO#Cwy9%)vNbRWGq)yOX-G^y l;KcPsKV^xDH8YC@L-zz-wYLXm^8l@5@O1TaS?83{1OT+TM5zD( diff --git a/designer_base/src/com/fr/design/images/data/bind/distanceconnect.png b/designer_base/src/com/fr/design/images/data/bind/distanceconnect.png index d8e26b227675c917fdd96af73a59e0f4cc525978..2ec210d208925e7dad7adca22cf2706a89296b72 100644 GIT binary patch delta 625 zcmV-%0*?LI1&RfbB!2;OQb$4nuFf3k0006+NklaIrlr?_sy9z_iFXWD3wa5tW^)Rc4g;OTz}G9s~^tk6=T%HAP7GG zD$xfol}crJZLRf4DRb9oA$#l}`bktgV63#Wx^Va+Q!5m!PRe~ydLlEm+ z&jy4|;x5gc#vm~m*jLQonuutc9(BpTL9^FHMDy0VyUv*x+(4n(46Z|{gU>Y@K};q) z-WO~yr)mqr6^&>kd<p?15ZE!5rAiQRC-$I!VX&x442O0M|#-qoK7t`1-R4 zMW&&^2%b%8IDga5QCkW4b%1jLCT(B_Z})C=x7vXU;Cw6<9#4E1!_#T8t6SI>dBjBj zCnky(6PAoprsg@r6v><+u8tJLD%Pby>MO0twXtP*_tm|mO+Gst1SlcM|Eh&oZc|D? zIYDDJBGMJL0rI967>etE6tlC5qx%&_YaLKk0kqUA34abcWI+RJO4X~v%}TDPXP82j z=h7g-=_f$O5VqWm0oy;D0e1Ibz0Dw7B$A$RsQPt*Q+q7bRS|TxNikB!y>Wt$W`Voo z>MVsv6Nnwdw9P=*I70OWCws#Rj%qK5EF4TG>~HgGj&sim?th?oC@pO)oV5WA3-R{G z3^uGZZGY!%mLQo|!OEDtR*p5xnbIxUF6{SDx%wP{_p{!UMT?_rd(xINm!&v-$BW~= zx&-GiOokshj>{vO!!nVgXB~iOhxg`S!q=w`=6`G7nR$wdIgWz#Pka;T+*DlLx*+w( zN?Q5ii}|5}xPQl&^in@`g|eveaa m2R=|_7c-Xy_}B4MfB^tM(KPh#D-clt0000bjcVilu`(*Bc&-w zDWATqSD?FE7}NlrC_NAdP!hcXAVBn^yuWc(un$mYj z;so=tNv>gpOl?Vwz`}ijY1esR-6tf8_rRmYCy4-h>}p<{OvfIf<#)&s%k(M{LR>iK zx325!X*kQ67Q1R1p&?gs9Pz5E1Wo{;H|}QVW@LBC^r)-B!3BTNLh0L01FcU01FcV0GgZ_0000PbVXQnQ*UN;cVTj606}DL zVr3vnZDD6+Qe|Oed2z{QJOBUyzez+vRCwBA{Qv(y11|76-SG~H=AF4;1(zBoJerRH zDP<6bvWYhUs9^z+vPKfJhKgYTMszPg6~=?uKh=!ifoS$yXMcsD(hGs!Nx*3Uy5YX*WeD5=T$*73mmy#S2x-P=2;-+T2ck6NG6WtA4@H$32x$fZkQ$I$cr-%& zl6YF#21ViFLx)i?GJvX01nFghrnChNBm$ToCI$)t#Rjn8lCZV2CEWn@z#;}P;>*s& d0Du4k0GEV!rVx6aUpfE)002ovPDHLkV1mCYXx{(; diff --git a/designer_base/src/com/fr/design/images/data/dataDictionary.png b/designer_base/src/com/fr/design/images/data/dataDictionary.png index 2f0fc8c87092a57518bebbbf2d323999de404157..516d368b276fa5559696bf9ac6571194120aaff2 100644 GIT binary patch delta 139 zcmV;60CfM@0jB|wB!2;OQb$4nuFf3k0001CNkl{`HF)xaOX^r5xxg~IxS3OQ?+s&pTDcz&JjX5;MY z#`yIgmj%vuzsSC?*>IB0@)Mgs?$Qa~YkR)Pze3>VD}wCde;H{z~JfX=d#Wzp$P!F CvSY6R literal 308 zcmeAS@N?(olHy`uVBq!ia0vp^!ayv*!3HG19C1kkQk(@Ik;M!Q+&~F#VMc~ob0mO* zk|nMYCBgY=CFO}lsSJ)O`AMk?p1FzXsX?iUDV2pMQ*D5X4tlychE&{2`t$$4J@Zxu zVP;Xrz&78xmf!8~#vZdsJtnh?RZ3Zd$#0(3-}`sYOiBE7aXJtCySg@SD~-=aPolb; z_ne$CcV17h+=}^(E9MIxoqd8U@lSYsov`ltCY_a9hYlX#G5L4jJ|ThW<$i~#p7yB= z{?z8Q-L3n~tSmDjS52iqX-1QRb+d`R_TkI@`yZN^OB-MOq|sKm+0am?_5cL~7U@UaI-GAG7t`H|-bR1`unRc1| zNoJfF2JI=O9^xL`c3QsAj?`HL+n#HSxFowCm&>J#PN(C?!k=QApr+JS?vZ|Lp!J=i=*3?Wxcv?FLBHmsz$pF delta 426 zcmV;b0agC21H=Q6B!3BTNLh0L01FcU01FcV0GgZ_0000PbVXQnQ*UN;cVTj606}DL zVr3vnZDD6+Qe|Oed2z{QJOBUzQAtEWRCwBA{Qv(y13E~oXmtQm2|yeG#Qex|KY#vw z{ORjgku9@&xj=jtBuxrXO&~0ftm)sse;+@5`tT7$^i38vqW(NkNYpM7aNe z1>SsRVaQtt2`4U24hC0i3kDlw0|sG10l22O?>{iyee}Em$eh3!mR90M>hF?{;`nc>67j}QZ3nqh310l*Z<@b3M4Fs5xf067~5 zkl9411CWzp&PDY6C?oY0V9B8mfp`HZApry!0Bv-M Upg@GaUH||907*qoM6N<$g38;sDgXcg diff --git a/designer_base/src/com/fr/design/images/data/multi.png b/designer_base/src/com/fr/design/images/data/multi.png index ca55ee911de1ed7ad50681eb3a2a79c5e136ed1a..8242a9e3b46735f00063963119076546963b5654 100644 GIT binary patch delta 166 zcmV;X09pUW0m1>0B!2;OQb$4nuFf3k0001dNklyFhYH=$C0F>J{ U5+p2<+5i9m07*qoM6N<$f)7eZ6#xJL delta 170 zcmX@ac#Ls^Nkh>GZx^prwHySoG0su_c2VejI delta 24 fcmdnUyoGs!3NK5#qpu?a!^VE@KZ&dx^_m$0TWJS( diff --git a/designer_base/src/com/fr/design/images/file/fold.png b/designer_base/src/com/fr/design/images/file/fold.png index da58e790dd4b9acc582939515843b52c4cd7461f..69d482a36fafb54ef55ff1ae009c8ebaa42fb2eb 100644 GIT binary patch delta 210 zcmV;@04@L70qy~iB!2;OQb$4nuFf3k0001}NklIL!*fLb(a00RS+!T^{oiH$wDI&$>DHB*xT0KcO#Cwy9%U}uR@kJ+B8H6U@G=YL;ms;W9c+=6oib|JDn zbzQINZVe>BeVV5Cq9_)K`as?Coa-pay9FjvrP%Vz{D9cd+wyoIMZVtU+644ly1 Q00000NkvXXt^-0~f><+n?EnA( delta 249 zcmV49N>l97plLO`(rEF?G=m4DKlbQg#p3ISu%T!3yfs`!7xu>e$vZYvDDv|EGXg@sg4 z%24nhISgPnlM)Mz=msH+Gm?-SDK-Er00=Mu6AwV)2VUJW00000NkvXXu0mjfe5zja diff --git a/designer_base/src/com/fr/design/images/form/toolbar/ec_frozen.png b/designer_base/src/com/fr/design/images/form/toolbar/ec_frozen.png index d1b29e4692a034c0a869035415c4967a990aa34f..bae5ddaea2151e1b46107a47fc1003a153708073 100644 GIT binary patch delta 156 zcmV;N0Av5v0k{E>B!2;OQb$4nuFf3k0001TNklmMvKz16ju0b)tarRGm80=4FXFPfG zES!&Qpt-s6APNJD199LD00%BCSt5rtAvR18JQ`sFgfvoJ9u)ute;D_sw1T++0000< KMNUMnLSTZn;5vT* delta 185 zcmdnNc$IO2N<{Dv7B)3zzGJU19ivhCozWb zGjnh1+sCa;0A+OjGyvphJ+l2b|ZtsH#etm%rY`FlXFQl;Ne*i k7v$FGG^towl|kVELxWJSn|^}N7NB(up00i_>zopr02H1kh>GZx^prwHyY+M0su*m2P6Oh delta 24 fcmbQsynuOv3NK5#qpu?a!^VE@KZ&dx_3{}3SE&a( diff --git a/designer_base/src/com/fr/design/images/lookandfeel/ErrorIcon.png b/designer_base/src/com/fr/design/images/lookandfeel/ErrorIcon.png index 8404e720370eb54a3f4ae5673b06460de67f76d3..ff0450a5a451ed4e3ab67b3da0b30722dd03dd1c 100644 GIT binary patch delta 1224 zcmV;(1ULKp1>6acB!2;OQb$4nuFf3k000D*Nkl)c6N8}_Ht(+5AJq%=FOYm@6DT!eaqOM?0F!T2Y-01)}F?z-QB0`!qy;T z{3I105%gnB&=10wsiS4Op`VzuQi;if3k%sUwQ~ULJjMMFS}I$;%1yhcC6?yHaos+l9f9&D^?!he*T|6$CXEMu1aLgS4y)1C z7o}1xGxm(7`Y!70HKou+8%Ax7g)lkTlm4+y~i=VPp8V8FSWkbsW2jVTFW zDxJGz27f*R&cRI934F>teZtcHeNH`3rz1(Y;GqjaTi7rcIy5RG5x}NZ&8ads{+5aS z_OT_5gbE%w&^GsGT!9qwNGDzgqen#|VB3t&^X5``KgHHYZby;`0>3sq!U|K<<{grz zicuoKY;mG0Yor`SqMqO#YzjtcA6PlsIW3sDP=756=xc!%i&z2~_pCMun_4{YV&aT{ zX#cfXS@NV2pqXBN1$5QTuLuPIljcM+Sy%8tqhgc@P<71&V7x*Co>xQ^3b8!DZBE9h z5ZG3Wbw^?26D~!oue#O(g#bt9pk}Ge15eDm#yEu&HZbVK6B(mKfP7RlfeQHYCIyfP z8-L*mr?7p(l$455B0xrJBA^A2)n;gzt=$@uCpHm`IT8{^nSjN=n|i|43j|-@q$(5J zaL0D-24BUTw@xBJFVYj<%BcG&@NWBhl0a6^wTr7nz{!v~88fd+@O|smE6hEZK`U&N z3L*g;#zNTCES^N5WXOCJ*6-Y9c{&e4!hgV*?0WWzayX$aY?zB5n{RQ(O9LfoKhsLC zA*bnzmP{OpajJxuO$4C_&pY60r7{r$YE$@}QAfZ>0LE52I$u&o;JS(7M(I$p>s9;G z;tjPwt(TE#rG)FIs@$|^dZ~9XX#i*m;O(D=W>ll!lpt^-DCW^uR9YRlAVvhBh@ouHwDpsB z9`DE!i%(2s8+}BD4e+=UI*DB+^+Af{@2>pFry;UCKeMVt@a%j?Lt?Cyw+a5xP466* m#U@Q-T-VoL*`5dL=z)Ly*dIPQob90i0000wooVQG%cioh}uct1QS@{c-iHQwO+zU0w2-Uht2d28*xybfX|z=1dThou0l z3n0|wM4U(o2;eqv1w%?0LcSnGNCbpb;76(+{z~@7rmm@)_#SpWQ#LZak$ByR=k zluSP#y?M)!RKgFuEQcoQDhbsnnP8-0#C0TO;8oR9#0C+5Q{aVLnkNudsBCnhkhzV{ViO@D9r&7zr$lQ~^5Lp6g|mIa4L0*PHV?f zmCjCz3m0yxn?g5IK~z+bBHf5P-Mf(DKd?J-Q`A+#ieM2$=tkWrxR4^a7*T7Tex%}5 z?36SUa{@1YlbD#ifbF6OhP;n^?>TedeK*nIVtVGa!{`6P@PFWdCb)Dl*sAA_fSnBF zS$vhly<1g-*q%pVH=CGWSjwCg#$c>Cgfg(PVPn3wghpdM&M(m(V=xwDMj<3%(OiLL zS-ySs^Bnji(vIoFSd1A3uO)t{e(_r|)qY=G_8hYoCj}dZfdl(HkPBu1zPQnO@q_-h7KVy-#sc=qcJ zUNzq1lT|~#`5Q%jH~Ne+P85#fRQqwXY2jlH6`>0G%-TDQ|9FfQdo|L1Uv3Ys?>&pb zwquZsFmnbT)?eV>&*?~Fu|aWT%lGlE!xT&2GgA%lpMNJIml}T0o>d_|L_@+W}`eRu;ha`nK^=#DgFb zB6#Lv%{P(;8uTZeDhpt5f3W(z8EN0anZE3ov delta 548 zcmV+<0^9x31-%52B!3BTNLh0L01FcU01FcV0GgZ_0000PbVXQnQ*UN;cVTj606}DL zVr3vnZDD6+Qe|Oed2z{QJOBUz%1J~)RCwBA{Qv(y0|;z8a2&#*6Yz4dWCYPn323Fu=WsPbjv4kQq$0w44~Tn26B;;={y9Wq%WL1S6~{zH$HYe{32k zO`N#Q(NL7dUlda_SKu=XX9&<55DWpj7ev$mcYZ%*SpE4R!{P6j8NUAe0T<_H;$X1l z)MW_ewP#Ram8MM;O#ZN*Va?}51l5J`+A-t`1j3_$Dh^0~(GB$dGosb2uu3r;wVXtq zGyw8BDV9T`>VFx7_@R&q6o&vP&XZsCP~v_=ib4RC;D`Y_JPHiAtrjsvh&!T76;R{= zP--W}^7VR6416qH49&`k=+XfcIRH7UfdI&d`;2=S_*u9yEdTW98$;lwI&>rWsa6ol za)>cZRL^G6<_21--^gIWuZdy#l`jvdTNK+rF2o1{kbfgU;P3x`49tv7crB+m8-hwW zWU%7peuj$MbHHqnB!t#kP?bckNI2V8_7Eswvn!}|SfR-0ftvxVTq7-LHV5<#5 m>S@vHv$8H`_q~0000=7+3fuO&&$qk7HC;xBS7}_r+?DyEGx1kzM#I_|A}8&^x160q3>?*W!doTWNV&rH!-!+qtmQF~Za$L*hNd z{IVV)+Db^k-+$N>^1!Q@hr0;3_Y>R_)w8PiwFroXfh#=nvQ6h19?leTFH=N1$LmP4 z{!YSqE?9?YDWMD72vMnQG93Q;8-}H#g*f(&A=wY?>u^M#+(dZ##VyQ_AT1f_>u^u~ z6qWhfP5x4Kx(~^O`TmWNEG(Y6MINiL=WPi)A$e#awEdnmSbl}UO#M^-r z8{H$X_-$2(X(^#fAbnBb{y}$-6p9RwW-E)XbWM3oO9tc%%KHO+F-sgEv`Y=X!b|PJ zM~2y7@|phkjS1MoYyOr3pIc_QlVSX}>K|DBr7;1Qce%^v(-OnYw+vqkD#HKy#(LmL zryDFWt$!b0%wR-7n6Fpyh_h(T{A74n=GN+#=+84&LeKf?Yg?9=k0~=EfcGly@@B1v z84+;28#vSBl#mc2dccGk5g=CHq0Neb)h8nT5{xvle$0PgvFQaEDIxKgkeWAB^J*@P z2oNvssfGFoX!;Ur2~caY-hL|s^^UkYpOgX0s(*vQ^&Qrd0P)!da0Y@5Z?Rg0?gy4K z)Wa{t-?LsLqRCj4h8`ax&F@&=xhfqgWuVeYo-v}iaEL}44KKKAUWs|+3&dz-Y=GuG z!WwX(W&w<7bo>}iHh{J4l(m%*AvrNf{9AHxtm+K>ZQ9Y`pj#x>WgtLJs|Ik*3Ayg2H6CVB!3BTNLh0L01FcU01FcV0GgZ_0000PbVXQnQ*UN;cVTj606}DL zVr3vnZDD6+Qe|Oed2z{QJOBUz=1D|BRCwBA{Qv(y!%zlH3_~2Sz!+ugo;3ie`XS=( z#;zbKkb4;zK}iVccmW{${ZI;dpa&R-MG|6y`sTxECLZ;`NPjOzsR@)t+2QPWU;i+? z|MqwAdq9exmBCeumqA;S14Hh|?|%$epZ#Fib^SBdJwp`_n8b&VlW1( z0pV3=KQNqm_-*jy0YNTiypBf)AhpOzY`{I>rpb#Tb`}`IGY`LISa{+c!`0_MFy#I8 z_y$iB(w0I^^M4=*uRM#W7eQ&i(nA~^Q!pS2%rAo?1~`Ff8M#CwLjuYV5ywoteUYO(=2et*WHw+zpynD%Mf8bvSXH(mNf z6UWo7IXxs=qsX9a-LugS&49*0SCAClVq~;WJnDhbQfM>@je20z1EU@oEFNeaLhgpU zm66aaC9q6C0Ho}3NM8hEhk=|Rp(F`?1mc8&p539u0|h|GUl^*Hcp}j83x;YbbP?$I zf}vWBf;rN?!%(gV90uEzEGZr+91NM3Tn{V+I)1`ntkD>U`f?k900RJ|D4bwr(tJDs O0000NgJjErA*0Rzntrtt6If47*J7<*2iK82wfq=u34zXQ;9+rb7fGJeYe ziX8)ntP#urB4~Sdc9wE*AOdX;WoBktLWCx;5@Taa4Pe^&aqQT!htOE~&vW9$iIc<{ zz`*d=0jTx>NJ2f>07gcJHNe0kAwB$e1BL?F08ki!l5!C+T8cm>5(9vCo#Nr)UQ3Kx b+N%Koi2Pe^s9c1u00000NkvXXu0mjf3a^s? delta 379 zcmV->0fheK0+s`iB!3BTNLh0L01FcU01FcV0GgZ_0000PbVXQnQ*UN;cVTj606}DL zVr3vnZDD6+Qe|Oed2z{QJOBUzBS}O-RCwBA{Qv(y10{fwVgpW0G{5uV-B)E~K{j@l zKLSEL3k}l`rw}w?N4?H}D<@49!B@{eGCaQjn&Ib<-&i#X2!CH$}{i_a$&XL6VP=WTx=J?20VZKj)9qli2*$} zaDhL6{(>#z6LjF(01m{ruRjBwDnN9=foul>y_AC!zy|#N^N&GDl!s^oK7RPdz|G6? z0Uit7JRA&PKmPLn~Batq1)k(P=2*8gBHvtvT;f+D-wLk|V@usud` zMZp(!TX)Vm-@f17JJXV}(tbk780>G`U*Vj{=2+#)$?-b+<$3)wzk4%K;3A5mPMXO;STkz zxqj_aTY_1Bh0Fk4*!;BiylDXOaMplimr~4>E0saH?eaf1{%Jmi%z*aPx3=Vo4Edtq z6KTY3ZC%d*xWlh#qo$Blu3R_^P?lmy)~9~4CCmABHGc#2##LIM$xEJyP>ceJv5-r6 zR76(-v{T!SRMtn6TK54qXt(yRwLjz7v3mGv>vBDN=P#_}lT2P~2$#~o<)zC96ko3_`GM`1@V#3J=QEyA?noHJ9v0v!H9JG+rh_q~1<=tFf*)U9 zjpxe!iGTUMTX7SIwY((2e##jS%0@a8pw-+-eE60or3deJ%*0{76P}ZnY47egem~DW zw*WXlTto7^QU_rK2o4J*K@o3(Tdf8lt7a|%0EbGnZDwZXmJ5eP5-BZkTRoJEQ!Zyc zHn9hvx|bs3#=Bg#IV=_lFKcJwy%?MVSPKBB{(mUuIhK;EZQ|BDhqVKO4Jp2EjTJ-_ z+tvaU-24L9{u7Crf(EYI92SgewP_3`Z+_00Sjb8MoUg9I7tY6Q1`g!bJBM+xh~XCf z35}Ux4#8Fev=-lCWgZGerggY#b67$S8VkofnP3jVnF2g#cmxx^8H&p2aO<7J($e6V zJAXX4x;f2otz!x9tRGvHzGC~>)mgjy6Mro@5EtUaxwGE`_-pVK9JT!<4o)T2(ZFEY>B_!@qwT#P#QL|=-nmB!R~kV{Aao|4OItob|cJZpnaowNrU zlcBIeW<<(A2kNWVNqJ8D$wSY8ahe|%LEcYZ_#F#t+~x+q|KDV|2{FwL>AC|{`L$BV6BXRZl%|8R+j0|ew{egQfyDRz5y>iDt+^Q@pFUZEF z>G>JZFn6F|$WsxCD{-dw!V;454eIpO)#AJ$07T?3R3Aubah?|dCGmY9P!3V_Ik#VA z+Ntg{LhQuPxfgLeeI(@FBONK^Z7BSg{To*OhjL@`Y>&`dq|x6M_#e(k&QaI%4+a1L N002ovPDHLkV1g~uN3;L{ delta 591 zcmV-V0DN4T+juDk0f^dE%hWTm21cM_kW##&80KWISJV)3EYed z_^2)yO*6U1%tQ*I(_3gMcHKkE=Bxc%C=uv7Pw?|Dh!ld|zxm~SYYBemZwg`R)X>g) zhP*?Ib*7T;2;>9K6Z|gsG6JysFNT|pFfzC?go znxkI;?0$17lYa?Q6P)WVg#@rUX3AJqjXNdzRZX$-4#g+`{J=BG^^Ppg@5K?8$p zN8}l@7pODh(Fi!i<|M5Ch=7J7y|*eGsK%6D0#F^;v}k{@N(w`Rt4mIg+814quWIaodlc& dOten{1^|b~!x5@q;XwcZ002ovPDHLkV1h~@3N`=$ diff --git a/designer_base/src/com/fr/design/images/m_edit/copy.png b/designer_base/src/com/fr/design/images/m_edit/copy.png index caf8872b82ea49ceceb03cf35ca0cd14f579c845..4d93d0ee5b8b5c344f9a9886e78abc753a155ce0 100644 GIT binary patch delta 186 zcmV;r07d_T0@eYLB!2;OQb$4nuFf3k0001xNklfHI>y*5#yd#629pE`^Zp3*H9vQQ?dE30?V8BmFuH+U zVOl`^H>E7Lo)(A65niQkh>GZx^prwHyWN~1OQl52r>Ww delta 24 gcmey){EK;l3NK5#qpu?a!^VE@KZ&dx^-eMZ0BDH_NdN!< diff --git a/designer_base/src/com/fr/design/images/m_edit/formatBrush.png b/designer_base/src/com/fr/design/images/m_edit/formatBrush.png index df49c5049b94fdd57aa9eee90d05ae602b596271..c821df52bed10b48c8fd7248ba071a93d3140a7a 100644 GIT binary patch delta 21 dcmZ3_yoPy#3KwH>kh>GZx^prwHyYM40su?}2T=e3 delta 24 fcmZ3(yqmLJyIyX!PmB#4;kg^C#Mg~rx6>^g75Pah+s%8)mrwgnE z7#M#3`_C}t(SL@kUobVoL~y#`=?{nt6ge3fc!8=Oeurs6rEwbY5NJTr4M@QK#TI%{ zbKnNRq6O7_B6+Y>g-tmwIhZ)bDG{5c^c4dD6Z}4z8@aG200000NkvXXu0mjfN=It| delta 198 zcmbQr^oVhSN^N;8$7(sV_zi7@z}Vfv(d@HnmNI*y^?jh xdBlgAeKN*7k~&#!qdeG{=Lu<^>t$eMWAOVk(f8RjwO*jz44$rjF6*2UngA(zMTGzW diff --git a/designer_base/src/com/fr/design/images/m_edit/unmerge.png b/designer_base/src/com/fr/design/images/m_edit/unmerge.png index b7b57212766d758e9af73dd7777ddd5113df9758..43423aee10419f7bfd0409bb43c5562d859bccf7 100644 GIT binary patch delta 138 zcmV;50CoSv0j2?vB!2;OQb$4nuFf3k0001BNkl;)E>X?)X8!k7%7vdkHf`5*~&F%TaFM!mqmKyfU9LlTxK sz#Jff&IgI3i^2E<9}6&74;&2u_<1tk`%1g;00000NkvXXt^-0~g5K{oQ~&?~ delta 167 zcmZ3+c$jg5NLzc4meG@+@w96%1xgaEM!AVa~)N!Enxb+QWH9 S&wYS~GkCiCxvXd;=aufYH{> zbwwqBm?rqsbDc-)R|1TkZNTbi!n&di$o^f1h+aW@y*i)j8!B5R*5LufVgX~fkGA6= zoz0NmKOmV-e_cwKwE`H_Lua@T@%E0-@dfyNo(r;m%XNX@04AkClH%j+9N=8tmarhp z>^ zHa7kz1VCzl_yZ6xfazmmAQ7acrSSu)0HBK(fcPXEAR!@vVt)wZ2~~BFN%8nJi3A2P zD0g;%!U;nTWB^LwNhHKGuuDrbJZx=4QD}ba28L#kfmpo&GJsgXf-dmw`gH~tUS9GI z5Df}qU?#x;6fZFI@iA~|YB0QBx1NE|+>CS=hz11$y>Nqp8)%3K&?O-6d^&ZC;l+Z5 z_+0?9O>Np#uv!71PM!p7y5Q&pHUK2XrKySE1)7T&fjQS>LbVQz-`X diff --git a/designer_base/src/com/fr/design/images/m_file/saveAs.png b/designer_base/src/com/fr/design/images/m_file/saveAs.png index a2ef8d6001c12382bf63bb049db37afd28169651..fd2303d243647ac943aa3dcdec128bc96785db37 100644 GIT binary patch delta 158 zcmV;P0Ac_30lEQ@B!2;OQb$4nuFf3k0001VNkl~cot%;0cubI(J8C%{708#VxSNZOR7;0Fs`IYKkzykgQ zEu&!|^2V)$N7v^?L5x`V)Qd)n4PXT3h5tk(WsE?ieoDla&WR0!g%mhoAwYlu08&vV U&*x2e#Q*>R07*qoM6N<$f-)~r+W-In diff --git a/designer_base/src/com/fr/design/images/m_file/switch.png b/designer_base/src/com/fr/design/images/m_file/switch.png index e2ae481e00f82ca280642f92d7191cb9a1da040e..cbf7cfb99134abc83b10fa49f64659339e990bfb 100644 GIT binary patch delta 514 zcmV+d0{#8y0-OYpB!2;OQb$4nuFf3k0005jNkl77@ zXsQ%S-tHb8IdTYMVIX3YGDWP7Sc-&85l9zOgn%eQilh((YfaLmiTkcegtG~f;;z5O z7`WTXH@mkYffKdKgZJi}pKsp$5MB21{-pqGqes49-1U9`uz%HReOE5)6Ncfih<95t zQK#*k`gm)?hdLI3~&07*qoM6N<$ Ef;52oxBvhE delta 333 zcmV-T0kZy_1n2^gB!3BTNLh0L01FcU01FcV0GgZ_0000PbVXQnQ*UN;cVTj606}DL zVr3vnZDD6+Qe|Oed2z{QJOBUy^+`lQRCwB?Q{4@MKn&)H?=pfWzRL#U2B`1K2#kUo zpzkJ(aBgrsYoczT6W~`(Ost;tAl*00000NkvXXu0mjfS)q@y diff --git a/designer_base/src/com/fr/design/images/m_file/text.png b/designer_base/src/com/fr/design/images/m_file/text.png index e1895978c3ebf5c56b663742f6766ede40ffa11f..900a6de0c07446fe458e197ede8be40fbc3c912a 100644 GIT binary patch delta 257 zcmV+c0sj8r0i6PnB!2;OQb$4nuFf3k0002jNkl&kOCAJz;%$opnBK
    0fqziY4{Oad$ zHadeO7l?B*qw8nD=>l|>qMd#W|A2xf4d^mJJ}55`0x&i2-@pG4OvYDCOw7PWk>rIB zA3iX+y1HFuU|?Kx=FBP54M5in@(er-V7UtWq6GNlwQ;+-&Ig6)AU4(^R?45kNXC^$cAv}k-` wa6n8=rJYgFAnU*iMhQ##;4nWfmRV544%V)78&qol`;+0P(*d1|_6qa#(@CXBp9yP5v)gRga=h|_7lHuP)-amt-@PG& zw05!g***Z!oWU$;GXU&DC&KU?bpT|oBTxXKIfG%l>Ht6k!Y%L|bpT|oBhUxnjTsEv iRWE&}Ctp4A_x=W#3NI-R-N!=!0000Eoa`2dypILwQ_FH`^k002ovPDHLk FV1m2kOz{8! diff --git a/designer_base/src/com/fr/design/images/m_file/word.png b/designer_base/src/com/fr/design/images/m_file/word.png index b5f2534a9e5f91e9ad98da53194ecca338178402..62bc3aff4407921f0e16b65392feb5d0dd856440 100644 GIT binary patch delta 448 zcmV;x0YCnS1KID0b@^xRu?f9hhEP2s&|A4t)mCW z`|&*QbI)A@1edNGjK@(6fb6@jTmHrSivZ^shS@RuLhOm>^?JRVNQ|w7MSug`o}xfL2*`Xo zojUOS-U*U=nx-7~`+Yo>jHAdg=Z2T(xuA(g5TwoldfUGLxroCK0DGa7<_J-8stQMr z;|vZHeDQAb3V)tgdqptD7_|rqYMQ29prd8R*mR@OxD$iXC?RBZNwS${fDrXOwO!lo>t?r5e9?{uNp|CM%NdZbB zVVVmRcN+;494!_%J3NY-=X|NElK##Jkpim9K9Kk delta 364 zcmV-y0h9jP1BU~UB!3BTNLh0L01FcU01FcV0GgZ_0000PbVXQnQ*UN;cVTj606}DL zVr3vnZDD6+Qe|Oed2z{QJOBUz6iGxuRCwBAeDd_k0tN<#cm@LC$&(j%&CQHe(8ZZR znkV;kGi=|y2`up9*)xXxv=oLfpFe~7AaM}>_U*g!$x~eK^8fIv0g3}PN0V?Y1P{n7! zHYcWMfY~4nGE72B3dPyThOoc{4NXiKwr_$s*VEUJp`)Rm;qdX}!DYbMm|@NGWehfsj(B4SZU878z#2^;2G~IP$o|I$7=h{FKZtSb)_n$I z0n9tnQqqiY1IPg&1K@#3jtfw{FmzqO#6Tec8L*H{y2(|3KwH>kh>GZx^prwCmOy3075_qegFUf delta 23 fcmbQkG@ogL3NK5#qpu?a!^VE@KZ&dp_1*yhP&Wsa diff --git a/designer_base/src/com/fr/design/images/m_format/cellstyle/italic.png b/designer_base/src/com/fr/design/images/m_format/cellstyle/italic.png index d4088b5796e3f3a240703aae333fbf0155a8531a..6b36a5c1ac8a1ec68f29c00914ccbfef13eec912 100644 GIT binary patch delta 193 zcmcb}c$aa4N7f5u;h@*&$)$L`hnImc)I$ztaD0e0ssh`L)riU delta 181 zcmV;m080Pe0nq`FB!2{FK}|sb0I`n?{9y$E004+dL_t(I5$%vM4uBvGMfn;?yoVlw z&D9gTy0OR!^d2S_hTb?=kh>GZx^prwHyTc71OQMU2b=%^ delta 24 gcmX@ge1ds`3NK5#qpu?a!^VE@KZ&dx^`kh>GZx^prwCmJpV07?A^p#T5? delta 23 fcmcc2c#Uy_3NK5#qpu?a!^VE@KZ&dp^_BtvSvUu{ diff --git a/designer_base/src/com/fr/design/images/m_format/highlight.png b/designer_base/src/com/fr/design/images/m_format/highlight.png index 3aee9dd9887b235a532315974604a1e910019f83..7491cb9c23367c4cf94630bd83651bcc83d17318 100644 GIT binary patch delta 372 zcmV-)0gL{n1CIlcB!2;OQb$4nuFf3k0003=NklZ=#)S9hVlcIZBrH-B_-@&>-gS$Qa*|rX zbeJ`&g)OSBQkwo18c={$rD(5Qayp$I)J9rse{omo(Q6dr`K2pnJpBf-3!0*U Ss8ntM00001RCwBA{Qv(y10nFPGGGCaG63QLq4o_AkmVQ& z835EA0HoGKxgUWz0cgkum^>3c&3{jZ8gQ8~-vcr?LWTH2hJOJKEg)zBP_qD#+Q2Hq zbcjEIbpnvxh$Q`h7#Dz?DG#-EKhO}6SRlwCWG`S11EB2#p^ePus~hkJB2Y7O zpdkZL04e|t_<+*@pk@Uibph&ZbYKY7d;wh$ZU8jU4gj$}7R`x3%?q#v6bp=T_*JqR1bW#Coen2RnzyopX-lHG`K6pD@e_$X1fDJf* p{``LiGJv6>AtMt5g#aMH0A7c5Qy|pktN;K207*qoL$K>pI6=)44#P3suck z(m)W~tAKb&Akf8FrfWJ51Tt}#KWMd@hb#&N+RSnM3S&;ENs=_mvOHfdf8LDg-UNb8 zK<@|6h~Tm)idXM$1KLd{87sN82%&_0sJMKfo(RiFa?X*anFuWtWXBMqrzuN6B!3BTNLh0L01FcU01FcV0GgZ_0000PbVXQnQ*UN;cVTj606}DL zVr3vnZDD6+Qe|Oed2z{QJOBUzQb|NXRCwBA{Qv(y10{elZra{WpML!IB~>FI2kYjA znNEHzAk96&dL-Livi1_#QYHop0Sk;_(0&|DU#PTXczo{`PJay=4~{c1zj?yI#pH%+ z06K7Ru*VSld3GPe*PAE6>@t>(4DTxE3BU~i*^CeTyE~PEO-`HPy}AVh8_*EhKW{<8 z2e7(8R!NQF?xW{$zQ~6q3_RaYG5mjXfPv96n&B5vj1A(F3k1VJjcpGD5AzKq!`t^D~_M5ykN7pD13=7|y*BV3=}85AJMOUI1q%Y`Jmk-lHJFi=dzpWhA-(!puIV0%vZdG&=(X7y!Qo VfVbu0Ww!tT002ovPDHLkV1kW7vv&Xh diff --git a/designer_base/src/com/fr/design/images/m_help/demo.png b/designer_base/src/com/fr/design/images/m_help/demo.png index c60877fe6bf5982b49f2e0dcb3afe4ad5c0c71d3..6e34e21bea50b94a7b4bf0cd4effe73cb55b680a 100644 GIT binary patch delta 179 zcmV;k08Ib(0nY)DB!2;OQb$4nuFf3k0001qNklXVBX$ZsFP;L< zgyEq{Ckyi9%bNMMYfN-*^YJ1QOL5n1j`!|KDc#44xgLY>n7!QaAxLSK0}J@J8>j%J z^0YJ;Q~^0B&o75GE>svAvljrS+n_=KS#z)o0L;LzwoKOU8!QAyH2^g8G0gx3jm)$D h6sR*|ASRMtmoLqVHP=lJOW*(i002ovPDHLkV1j_!N>Bg* delta 218 zcmV<0044v=0rmlqB!3BTNLh0L01FcU01FcV0GgZ_0000PbVXQnQ*UN;cVTj606}DL zVr3vnZDD6+Qe|Oed2z{QJOBUygGod|RCwBA{Qv(y10{fwCu8jbARSMJ-i4p12PLq8 zG`m^qk*s^y@k<~}6POq%1QZ(p@&d!!I2DpL@*cm0>4L3$k5gjM*w{F|;O%Tpx*vei z_#Xzg>^Xu$;{#BA_+3D<7qBTH$qVRSA=wM$1SVAy(n8+Mb!25GaBieDI|Bq50Kqw< UKC!p23jhEB07*qoM6N<$f^@P}`Tzg` diff --git a/designer_base/src/com/fr/design/images/m_help/feedback.png b/designer_base/src/com/fr/design/images/m_help/feedback.png index 2b02f585b2576b90f3f8113d9e33a36cfa01347c..7a195fd4edd33a595fb7cef5e91d3e2530a48683 100644 GIT binary patch delta 299 zcmV+`0o4AE1I7Z7B!2;OQb$4nuFf3k00031Nklezkdu%85o#@Ns5Kg(0@?o|NsB@0dW`5xGpB9 zzp6wV0MdN_{{6-O|1(4au{9$jqtNNor&khX0J3I~M;I9ymMbdCcYxR^VE_`q2JYQ^ zm<1G%1j#`(E5@!~z4|Yh4eMZCbpYo@SR^EXTQC3s002ovPDHLkV1lQEe#`&> delta 371 zcmV-(0gV2}0*(WaB!3BTNLh0L01FcU01FcV0GgZ_0000PbVXQnQ*UN;cVTj606}DL zVr3vnZDD6+Qe|Oed2z{QJOBUz8%ab#RCwBA{Qv(y!|YkJ|1*#PQqxiyVQdy8L83GR zEkofmF;ECtkU7DN?%-9tHckaYjAR!){m#O`o4GCks|&E%fPV}wJ^9Em^)?@fxgKap z;^*l>3s4Lw+x;A;=AXa+F+^!{Aq!0aVpIdVTqUt;zW?qgL*1^Y46CmEV@Ox~$}sUd z&qJVa0EQQ^xggV62(0r)I1MoIZ1gK}u4R!PeH6L0em!fs>ORZ{lL4G&=(X7y#*3a75c( RIyL|R002ovPDHLkV1fi7oXY?J diff --git a/designer_base/src/com/fr/design/images/m_help/help.png b/designer_base/src/com/fr/design/images/m_help/help.png index c70b6b77ddbcf6334a9d043a4169bd921221d2a8..e50a5b70c0221b0c95239b803a03524cda692481 100644 GIT binary patch delta 155 zcmV;M0A&B@0k;8=B!2;OQb$4nuFf3k0001SNkl;j4n z!082IV*#fD#D)P*1L)=giUW~i17KmW73OCcjht9;u(yK50Te_$A;^-k2>bv5002ov JPDHLkV1m`bJJkRH delta 204 zcmV;-05ku$0q6mcB!3BTNLh0L01FcU01FcV0GgZ_0000PbVXQnQ*UN;cVTj606}DL zVr3vnZDD6+Qe|Oed2z{QJOBUybxA})RCwBA{Qv(ygGm17O+SDA_GKUeu(PplelyY6 zj|Id5X?C;JW7u{45(9`P1_0H9Eo5S#5U}8qSR1E;RXljn9YqvA#V(+o7tozbGZ)a# z3!pTC4WOqJoCXk^pa$LrgCrI}SreAKaQPiub_US^0R{k>bSGVVp@< z&XSt09Rv|4XQ5910teAmx(Fiv1V0e`1OA0Vnih(a;LstqgAoY^5t`(D-h(SqqBQuz z@qRteb8qf0jQ!L2PrhYY({aoW853JVh$Zv|=e!4ZuW8z;ZGYRZNzONcO2w)R5uX7t zlLRGVk8|z7aqKHq(^X)a)*fT=CGsg%OY!K5okF458w{Si)Rz-ftJRe-j5^5kDWtSg zkjois&1UmSqiz(%M{whkiIN`Ok=t#D)1v&hn0nyMl2;RW zlw>hn?F-@MPJgDkegnNdmDv1Ag!jWC_ra3vdIVnhyXmKYs&p;3E(_fDB;_T6i1e z><1)hMm9u&3F==`H8Vi<6o3p!U?3kPFcA@G_<%eUx(F~}z!)DJ889(W2tcv$fC6tk z1i4@V1rAui1Wld~$*~=zm*SMj1Px(Ox^{qO7-GQ#l+1*bBNL!G(t&`B5`h*kz%T$E u01X5g1j;WUZy_o`u{|gZfCeZ41Q-At(@nc;LB%`(0000AJY5_^ECiDi z76>J<%uLS7`7~eX^SODp%x3K>%>|LCTsplceC4xij+ijlT}Rq>jzgpGG{+ASPMaz} zv;5Z9wQ+u&X!v(;gWwG2cdTk&ml*u?Cp1ZFo;}CF$i{H$&Q{x+l^dr6tz__Y L^>bP0l+XkKKZ!|_ diff --git a/designer_base/src/com/fr/design/images/m_insert/chart.png b/designer_base/src/com/fr/design/images/m_insert/chart.png index f65529fc23495eab72e530dd1014558cb73208e4..504ca9484729be763d7f3445dd5d47ca7d0904a0 100644 GIT binary patch delta 122 zcmV-=0EPeR0+#`hBy$0CQb$4nuFf3k0000{NklAV%uCVEY+g6dQ~PXn0o{umDII0I`Em`+tTHB)K4z?JkIl2V#97 zJ^(aKfM^4z+niuvl>>W!Ayf!#2n(^ABUSE$F#`kZfsY%0!(4KKiCE1@U_O5U>j5C0 z2n>S+yaw(z6HW(IqP h*%w)H1~fo`0RYj}Pbk!N2{`}&002ovPDHLkV1k2cg&Y6? diff --git a/designer_base/src/com/fr/design/images/m_insert/insertColumn.png b/designer_base/src/com/fr/design/images/m_insert/insertColumn.png index e625c25dde0d534c4307ae0faf79fc77835e2eb2..c32da612b6f9adc97d790d2ba3aedc0d103a817b 100644 GIT binary patch delta 235 zcmV0FVlhgdGFJ|3F(&xQ6wIUxUSA0%S0YKzs}XkR@RnKr}9K z3;K-LUm!<-CaBO8Wc0J0=VF$~}m$1q^j1&DM23p^N2ax8!n4>BMs7T~s|DmFRlyJxI@QIfq3cKDu0U;u4kkmmw`0L}ma002ovPDHLk FV1mZDVYL7N diff --git a/designer_base/src/com/fr/design/images/m_report/background.png b/designer_base/src/com/fr/design/images/m_report/background.png index 1a5e533685ecec182677f4a6ae8f0010c193e32d..cc19990d3b0c220cf569962ae93ec16f17ff8617 100644 GIT binary patch delta 372 zcmV-)0gL|g0*?cbB!2;OQb$4nuFf3k0003=Nkleu0SQA_T$N;&d`Pvk)5ZnNeGm9^_Gd%tN60Ua6 zJ%}sd0$3Pe1CG8u%TRY^0>jro@aVy!6uS`EfYOVd4F7oqB!3BTNLh0L01FcU01FcV0GgZ_0000PbVXQnQ*UN;cVTj606}DL zVr3vnZDD6+Qe|Oed2z{QJOBUz07*naRCwBA{Qv(y10{g5v9Xa<6BgFh)g{1rAOna6 zAhkgJ0f-lXTn@raFoV9X?qYZqCIZGFHZG8smc|dH0-Bnd7Jq>FCtFmwp+8B!?JWoQW7` zAAEg^Vddkk47a~LV2C|g0_Nj1;PaoaU`5T>rhxg+f4qXTLEy`uZw%#^y1*_10hBHE_ z?1BsCCj`abM$lI91JtOWVZg>-6!H;CU?rVRz(Q;##zOMg^_+Dk?qfDtQ3t~8+&Od3 zow;}BMv5t|)9I`X2HuYE`&)pOeP5Iamr}f->q;pbb92^RrGHX+rrp$}$>_RnX*3e& zAl}D(&V&is#t^!;ZE@x}4uvBvA<%BS+n(p&09A+}XAk<8CHFQro%=A<3J+Q>_Xx*u z3)@f0NmJlja)dc2JD}$T;8-G}VQ`jj9G8a}?dqKb0zC8K(0`;CSx7Qq`uV(EXG{Wb z8PF8+w^?NHwtr{96cnehn2IV}A~-IrR-GcYd>NSt4LFCRScWO#2sz1ZG0y==q$1+6 z)NVi2AaZIFp^bCIVErO~@s=aE1tnf0W5e7Dvf?5xqRBZ&jBzoHAjNzf^%Rxh7;RGKzF95HzS}Y9?~xRNxcY73Uzg0Ws!NV zJvR{GqHWZ$qgTwu@4|R~-d+vfA^@&Ha*!ktJzluDJvQboj*~NPbvSq!WD$!6KuFhU z%RtTr31M>B`ifHo0>P_?VgXezD)I9XIaqjfb(`D+^?o1!MntVW*0q4{O$v_o^OQ>FNL=1;P$MERQDr5Qq-| z@rI1(&<(iEV8mtt&|r{(3$Pf93xF(309teaU4jXV;S+$=et!}SXMn2R57mp?2S5cN zSI09@1{MN+l7Qg@sO^**4g&GWJ^}jx8s_^Ms0$oHaRT$f0&FU*jSUz?1O;%K0Fnc# z!2!T#GE1mxgOXu7Hp6u_R2fth~3L4U(xVU8{z{;Wr*otRRZU$u{T&V@*a**Li&tAY9JixL@fd$G*z*gAd(1_xbH@MX# zz*7;lCYnga)HxAWyV0-0f%+tYLZ3`THk>Y%J|nH0EdT)q0JPHk4+%aD{Qv*}07*qo IM6N<$g8BE>2><{9 diff --git a/designer_base/src/com/fr/design/images/m_report/close_over.png b/designer_base/src/com/fr/design/images/m_report/close_over.png index 728a46dbcd712f922811e95c388aaf0eab41336e..149ca323a15448f9d740e1cb7d5781e8a8eea67c 100644 GIT binary patch delta 607 zcmV-l0-*i;1Na1xB!2;OQb$4nuFf3k0006qNklpIeUSq`=eCy9{;R9oG#d6fDu4N@LE_h47FrUb79Ymi zl%Oh1Mc4Y#X(8aWB0)r9)U75L;M zaBYftbmtfwE`R03I6x_)S}<`N7WOYM_NuMm+7sh~V)}f6fD_z-sdG;$Y7{;9hetcP za%n3?qyQfls#86onJp<| z1vAMb#&Omto^{fhDG@qN)EG93+~Im@s^%S{)S+$>E`KhWOhtqachBt>!DDlhvYhXb zgQEVj1YB}Mh=h9*?-MBoxN?1-$W})l*^&6Yj1o35a0j^0^}eVkMR0fqR+e@$5^6+% z@g6kgjJUNbhDY}GWUP8b9&zB3c6SbP-$5g$gWOGNEvzDaEEI@xjkQMP0Q<-dmvX{y z1aRx&u~^Wps=?Sy14sDqgs<3?_Abzfi|=>Otx%LkGC9?M=Uc5eUx002ovPDHLkV1h{8A6WnZ delta 482 zcmV<80UiGM1pEV#B!3BTNLh0L01FcU01FcV0GgZ_0000PbVXQnQ*UN;cVTj606}DL zVr3vnZDD6+Qe|Oed2z{QJOBUziAh93RCwBA{Qv(y11@mG(J}x?fv^J*%cDs@1mXig zyg_6C@eR1lV8mtt&|r{(3$Pf93xF(309teaU4jXV;S+$=et!}SXMn2R57mp?2S5cN zSI09@1{MN+l7Qg@sO^**4g&GWJ^}jx8s_^Ms0$oHaRT$f0&FV8a|#$ZR8(=A0Fnc# z!2!T#GG2GE042lq*bEm84rloH^$WwJf-Hs~cWz@CE;nHs0~0q7!~3->8D37AfX$LX zCTKdx03Ua31%De3G5}-{vQLl=2dM$6#Q_4CpqU5*fLsi6Il3k2hGX*`5^w+o(SLj~ zg<|0MZ;+(N$wiFe*fSbVp8yR984NZY$R@^cqAZ{k5VQauL{OK*e1abF_$+uxRQQ9! zJTC)`aiuP7g&-5O$R%tzG|X|OE*t=yld+cN{2tyolUpLXB_Oppzy?@Z^Z;A&49d-* zOoS`7fLsnT97isG2rP>f=u_B1Yodu%G<+hgcB5Z~1NBJ)g+7^xY&cyieMVY0TL1zK Y0B~abS{!cd4*&oF07*qoM6N<$f`SdVy#N3J diff --git a/designer_base/src/com/fr/design/images/m_report/close_press.png b/designer_base/src/com/fr/design/images/m_report/close_press.png index b3dd9dbdc04720d90454d6ff0a3fbf8fb933f592..a75cff254919e52b60736b02abf3065b07a29fc3 100644 GIT binary patch delta 606 zcmV-k0-^nh1os4xB!2;OQb$4nuFf3k0006pNkl&?-XW zuXIK13I9N1MXZFMLD&nc{uPPDS4+C4R^+|wp6N`@Gt(;NCC#08?wxb)n|o)bOg)~b zg@sa<(yE43CCld3PTBA#C&{gjYe|7Frf+T<77q*uhysn7rGIHDydAL6x)2p&F%DCL zRG7{<9o{cJUOze9*+8IPs;qFrXCgA{g8H${+>%Vz%Z>X>KR)qa9xLBqcraa~}odqYjiwaa77+8_r`s^Hm2v&)9O^hX1?689clMPTU+8r8q1N|zZ zkQMxnoWRZX@?1+qAnJ&U*VGbyNBF5j5w_}1`3@&iO zZ3J-Y;a9TIrOE&f@_++e?sn_!1DxMl^_@XPFc%!|E9&x4;el$$o9$fYybcN07*qoM6N<$g21>U^Z)<= delta 495 zcmV=~g;3umB58NFdl)-~m8o zgryOxcmc#yASALPhO)p&1P_o7upuGA1PgRw=v=x%xZkpo<$w4}s+9bam8!XZ=ik1w z8)R8VlJ3`5n*6}n;4$mG?(yjINY)=76NwS{5-=FRjt43U$s$hFbzg)Y_$fcqG2oFk_pjRt*OUDDghu`kI^sOvnZ{_Tx|0|1ci z#D*gVv4Wa#@Gh043xX5K{myk~_XiSWqjt(p@;w|9f@}495xBq6Tmb+O;30z*oIe+V z7fN7c+YH92)jt#bE|H$OapG?Ls06(t>#x?ly-!a(q-g5$ZE~oO+(H$EH8*=wFp279 z?^!;*wJnySn*_0f5_1-LdjZ{yCX%WJGY4Gg;vSzxbJZMn`X-7e2#?L}R^5f8okS&_ l#5TN=OF#JUzb!uk3;_Q>{nx&DfARnT002ovPDHLkV1fj^;S~S? diff --git a/designer_base/src/com/fr/design/images/m_report/footer.png b/designer_base/src/com/fr/design/images/m_report/footer.png index 39c7e0dc09e126a92bf0b169d3b9c65559d117b2..843c8bc592c275712d388fe9ce3b5d93fbf9bbf1 100644 GIT binary patch delta 209 zcmV;?051R40qp^hB!2;OQb$4nuFf3k0001|NklleK#6~dy5>1#P zjjD<9_Sv(i)nH;M1|Uno6cC~*js>s_Kp6v;wh7sYB)=7jO+FIn4jy{*=L*83Ss0e0W5f z6w?ko%e8LXCC+w@A%bBMyUInjA61nLE~Hd4#u{^MFghR+oPJLAmO_HsArpqk2_g(e k35plWHf=KQVBj!dh~f>BY&-pYC(t?uPgg&ebxsLQ09j%`_y7O^ diff --git a/designer_base/src/com/fr/design/images/m_report/header.png b/designer_base/src/com/fr/design/images/m_report/header.png index 00d095ecaa3108b05f948ec6fb28ba6904e8c8c4..e7961cd4ec56c33da2f50a29b33ba1e7aa5871a7 100644 GIT binary patch delta 213 zcmV;`04o320r3HlB!2;OQb$4nuFf3k00021Nkln4jy{*=L*83Ss0bPOIZ zJ2%IB%TuTu7;Gd}JWO#x_B!;jjvi nLuI0(f%3$ua~)Y68WR|DNig)WpGT%PfAtr%uP&B z4N6T+sVqF1Y6DcH?djqeQgJKk&;S4S%&H9&wb*V%M<<#-eQ+_k=f@MbSc6wh51%zL dnldOHU~st<|FGibqDMe&44$rjF6*2UngDaYF5dtE diff --git a/designer_base/src/com/fr/design/images/m_report/reportWriteAttr.png b/designer_base/src/com/fr/design/images/m_report/reportWriteAttr.png index c81fb8e761bdae2f9ccda1b72d6866957632eb5f..99d321e6765d086945171cfe31605a9d5958f96a 100644 GIT binary patch delta 295 zcmV+?0oeZ11HuB3B!2;OQb$4nuFf3k0002|Nkl7lb9TniuV1yT9mUiKh@|58_ z5g1W!lug3ie>%H>4JLO`r)ZkWwS0CgG!od2WfF5Q5ZH>}z<-RfJCPI!K7l;X8z|-U z03HVb*XKOGB}uZZ5Extbslo9TAiiLJgd}^VV8XdGtPs?Vpp`RlAAkh_=?Z~oorkE! z2xOa-Ss>+cBg7o9=~|Bi;{pL$s)p;6ZBl-LGY7bf1@-0xw*5B=+v37@G&AOK2c%3V tOlgtSr+)_eY9NTZR|vx}YJjvaJpl}WV;jEXJ52xp002ovPDHLkV1ldh?AzPK1kr zH*OtR{PUt9xEO{3$R>k8#;mgpo6kLC*j{A^7rXT6BZFt#AqHO~DF$62p9z=qK?;{1 zdC2hT+iwPkhW&7H5E~>0l6&@*8Mgs?a{LT4QjNjvKY#x*R0nB-F^CNUAUP@SzqrGo z;;0~;-5#mSkbmu=3TE?iurO3CyUdU=`z(+rh&v1_j;@2VmBo3mvKjD&0VuSOwm35| zF)}j5PCdnN_3=kA2C+e6Ah{0f_qfvmD5^lA{qO&Oh9AHFGFVjaMUe-|Woj{j4Oj^D zJ4SB&{)dr)n~|5{69Y3tsOndS)wj99;xINh;|~TFMlpuv4F7>P;KDqyYXyKf0LuOk i!ccYqNDjmX2rvL=I;HSxf2hy^0000X?9~KHkC$S!f z%@ku*9H932eEJ$NRwxv7^khj&{tkuCgF6Dv56l%&e}7eS4Bf7{T&<&~`F#o+mBiE} zigY@iZ)s7^P!5faqM`Sp8zU_a`2PrnLT%+TmxkeApPruc3L%~$UPHNq1NbT;iubJS z?*4gd7`@k!D3fhqJQxhNS1R@fpwGZHnrRQm3a&9qJ($N`s6mTZdvX7xw5L1!{o&J$ z(VMnWgnu0Y3q6uou`X09j>D#zehVjT9O4@QQ;1{PY&HVoEQrIV`Rykveg%$Cn!hp4 z%m~fccQtV4z{jwqX*zxLeMoj{+KELWqz(7omR0oe_1CSoL0k8mT0Ghf08Xh3qFXC|lJdl}?1O=e6 zzyLJp1JpGP@4rI=xnjpJFouZ%)hfVT00aF{+d(#i40^Eo@*jq)FaI&5nX$qZJ^S>Z zVb-bN3_t#WTz|}v01CwaSe&?U>ha%mAAkIR2*hCqy7TWphy*el2n?B^iG%?y7A9Pq z9C+A7hG{NH0HlGRgR$RHiTNXv=ETp7f-bN?{feCO0)Sy~fj4d)++|#>jMbG6tZG0e zKNlMV!`2&rLBjKaYUVRR<8vaC0SkcPkbvx@AZ_M+SbsueVr1MzbW#Qd*yQ8C8CV#B zF=NTf@bL%3()nk92LYwnf!G-21x8$%2^3WmkAg!R7XXEo0g3@ADW!3v{Gt1QxBvOa zpa}{vke^|J2W3N|8)N`3%oDp-0Eh#i?EfGPWe0%dKx}{j0{|{()$G$M4v7E&002ov KPDHLkU;%H@HH8NOBg{{5$%;XeZhRDVM*SN!VZ$eKZHMsxv? zbAdKa1d1!cWDd&6{BwK{QA+2;%}wxFkU0gfxTH;52|3%{UDp zRx`)|j4(jg%*?{{n}w639i$i=Kr!G=pT}a50U*H0$oQX`gZ-c|@81B%^z9$9X$FbG z4R|}jGxg7xZ)(vXK_)iVm#n;;;euJ44}$pk061>nPYTrk{q@6HAm<;*xq=1T>+xwq zmSg7Ab*yJ3MB$HFM!G8GyuuD z_DI4DftnML)nOQb#kpYc>)j^?;i4Uk=oT@d3jl5SfKBtCZ$GfQl!;IP;?qpf079Da z8bFL@5MUujGb0n@ey7-{8ENHk)8DgGaGBDQ2w?f1PyrG=dm7W za{yR^nduKRCs})`aKZKo_`Co&;Ozv@f yd5O=tSPghP(M$gC&tE5)SXnv=ITsrM2rvL=e5}Zdg(4pS0000$ diff --git a/designer_base/src/com/fr/design/images/server/plugin.png b/designer_base/src/com/fr/design/images/server/plugin.png index fe80282ed46072d758e3ba0d369bce3c59c0826d..290ce7a19e508fd3c3e54046f79722cde543a89b 100644 GIT binary patch delta 565 zcmV-50?Pf?1I`4HB!2;OQb$4nuFf3k0006ANkl018 zf`gGAv%Wy zeZE^H3^jj;ZW5Y#YUvCTSFq>7!vp$8ZN#)40k#tsMIhTGtkLk-lgY{F)|ntO+C@g6 zcqWOz7l0UtgbKDwYjer->FL=z#0t-JMzEJC!N)b#J4h`6g&?^4$&HMraes`Bf5W_n zu@TXqkuLfh%paW1SQL<-LCf>9sJ~s(T5qA$<9^#;C8*f;pgu>~00000NkvXXu0mjf DftC|< delta 444 zcmV;t0Ym=I1l9wPB!3BTNLh0L01FcU01FcV0GgZ_0000PbVXQnQ*UN;cVTj606}DL zVr3vnZDD6+Qe|Oed2z{QJOBUzV@X6oRCwBA{Qv(y0}Pa{dnN#+767q7ROnz=kdy-h z9>9dgPe9TP0`@>d3rI0Q0E-#{QVh6&MGc17uQ3;?iK+6V?g+MAE zh%W-M0~0Bl1^>JPQ3g=1J`f*ZfrT~@D*&-PF3sV*QyHXK9xyN)vitu%|8pbMfD0fO z2tuRE0BR6c&Bh!D86;UAGW;?YIxy37;{F>F7CUPKb`&t8r2~*b`>|<82D`t7GVJ~u z3Sw@=8wS`kpMU*f57P_+{!Gx+2TO$wgfy@GoQ)y|3dHw7%^RU%AWw>BkQZRF08hR) zqK_DKSno41{Kly{5Ng>6VBk-{NJydTKYj_Z|M@HPrh$|F_albi|JjyTzgc1ha~)6< zBhIAE`R@w@`@gSj{~4J%pNQ0d|H&%1mep=w6j15`Q8jtt$L)O#ix(|n`2CMz#(zc@ mD|U-zA<)3J$7KLOfB^s^Gm7R&PkgKZ0000 Date: Tue, 8 Aug 2017 09:27:08 +0800 Subject: [PATCH 21/30] =?UTF-8?q?REPORT-2897=209.0=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E4=BF=AE=E6=94=B9=20=E4=BF=AE=E6=94=B9=E5=91=BD?= =?UTF-8?q?=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../widget/ui/NumberEditorDefinePane.java | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/designer/src/com/fr/design/widget/ui/NumberEditorDefinePane.java b/designer/src/com/fr/design/widget/ui/NumberEditorDefinePane.java index 6653e723e..a955939f0 100644 --- a/designer/src/com/fr/design/widget/ui/NumberEditorDefinePane.java +++ b/designer/src/com/fr/design/widget/ui/NumberEditorDefinePane.java @@ -29,8 +29,8 @@ import com.fr.form.ui.NumberEditor; import com.fr.general.Inter; public class NumberEditorDefinePane extends FieldEditorDefinePane { - /**FieldEditorDefinePane - * + /** + * FieldEditorDefinePane */ private static final long serialVersionUID = 8011242951911686805L; private UICheckBox allowDecimalsCheckBox; @@ -198,33 +198,33 @@ public class NumberEditorDefinePane extends FieldEditorDefinePane this.minValueSpinner.addChangeListener(changeListener2); UILabel numberLabel = new UILabel(Inter.getLocText(new String[]{"FR-Designer_Double", "Numbers"})); - numberLabel.setBorder(BorderFactory.createEmptyBorder(0,12,0,0)); - - JPanel pane1 = new JPanel(new BorderLayout()); - pane1.add(decimalLength, BorderLayout.CENTER); - pane1.setBorder(BorderFactory.createEmptyBorder(0,12,0,0)); - JPanel pane2 = new JPanel(new BorderLayout()); - pane2.add(maxValueSpinner, BorderLayout.CENTER); - pane2.setBorder(BorderFactory.createEmptyBorder(0,12,0,0)); - JPanel pane3 = new JPanel(new BorderLayout()); - pane3.add(minValueSpinner, BorderLayout.CENTER); - pane3.setBorder(BorderFactory.createEmptyBorder(0,12,0,0)); + numberLabel.setBorder(BorderFactory.createEmptyBorder(0, 12, 0, 0)); + + JPanel decimalPane = new JPanel(new BorderLayout()); + decimalPane.add(decimalLength, BorderLayout.CENTER); + decimalPane.setBorder(BorderFactory.createEmptyBorder(0, 12, 0, 0)); + JPanel maxValueSpinnerPane = new JPanel(new BorderLayout()); + maxValueSpinnerPane.add(maxValueSpinner, BorderLayout.CENTER); + maxValueSpinnerPane.setBorder(BorderFactory.createEmptyBorder(0, 12, 0, 0)); + JPanel minValueSpinnerPane = new JPanel(new BorderLayout()); + minValueSpinnerPane.add(minValueSpinner, BorderLayout.CENTER); + minValueSpinnerPane.setBorder(BorderFactory.createEmptyBorder(0, 12, 0, 0)); double f = TableLayout.FILL; double p = TableLayout.PREFERRED; Component[][] components = new Component[][]{ - new Component[]{allowDecimalsCheckBox, null }, - new Component[]{numberLabel, pane1 }, + new Component[]{allowDecimalsCheckBox, null}, + new Component[]{numberLabel, decimalPane}, new Component[]{allowNegativeCheckBox, null}, - new Component[]{setMaxValueCheckBox, pane2}, - new Component[]{setMinValueCheckBox, pane3}, + new Component[]{setMaxValueCheckBox, maxValueSpinnerPane}, + new Component[]{setMinValueCheckBox, minValueSpinnerPane}, }; double[] rowSize = {p, p, p, p, p}; - double[] columnSize = {p,f}; - int[][] rowCount = {{1, 1},{1, 1},{1, 1},{1, 1},{1, 1}}; - JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_MEDIUM, LayoutConstants.VGAP_MEDIUM); - panel.setBorder(BorderFactory.createEmptyBorder(0,1,0,0)); - return panel; + double[] columnSize = {p, f}; + int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}}; + JPanel pane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_MEDIUM, LayoutConstants.VGAP_MEDIUM); + pane.setBorder(BorderFactory.createEmptyBorder(0, 1, 0, 0)); + return pane; } From 3d12621f62f8121dbb6c9d0e7d93d210eea5f61d Mon Sep 17 00:00:00 2001 From: kerry Date: Tue, 8 Aug 2017 09:33:49 +0800 Subject: [PATCH 22/30] =?UTF-8?q?REPORT-3293=209.0=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E6=8E=A7=E4=BB=B6=E8=AE=BE=E7=BD=AE=E9=87=8D=E7=94=BB?= =?UTF-8?q?=20=E5=88=A0=E9=99=A4=E9=87=8D=E5=A4=8D=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/widget/DataModify.java | 21 ------------------- .../src/com/fr/design/widget/Operator.java | 11 ---------- 2 files changed, 32 deletions(-) delete mode 100644 designer/src/com/fr/design/widget/DataModify.java delete mode 100644 designer/src/com/fr/design/widget/Operator.java diff --git a/designer/src/com/fr/design/widget/DataModify.java b/designer/src/com/fr/design/widget/DataModify.java deleted file mode 100644 index e2fd92b98..000000000 --- a/designer/src/com/fr/design/widget/DataModify.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.fr.design.widget; - -import com.fr.design.data.DataCreatorUI; -import com.fr.design.gui.frpane.TreeSettingPane; -import com.fr.design.present.dict.DictionaryPane; -import com.fr.form.ui.Widget; - -import javax.swing.*; - -public interface DataModify { - - void populateBean(T ob); - - T updateBean(); - - void checkValid() throws Exception; - - DataCreatorUI dataUI(); - - JComponent toSwingComponent(); -} \ No newline at end of file diff --git a/designer/src/com/fr/design/widget/Operator.java b/designer/src/com/fr/design/widget/Operator.java deleted file mode 100644 index f8aad788e..000000000 --- a/designer/src/com/fr/design/widget/Operator.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.fr.design.widget; - -import com.fr.design.data.DataCreatorUI; - -/** - * Created by richie on 15/11/16. - */ -public interface Operator { - - void did(DataCreatorUI ui, String cardName); -} \ No newline at end of file From d6432113359ac931084c07a00d522db4189318f9 Mon Sep 17 00:00:00 2001 From: hzzz Date: Tue, 8 Aug 2017 10:09:19 +0800 Subject: [PATCH 23/30] icon err --- .../com/fr/design/images/buttonicon/pageb24.png | Bin 482 -> 736 bytes .../com/fr/design/images/buttonicon/pages.png | Bin 736 -> 482 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/designer_base/src/com/fr/design/images/buttonicon/pageb24.png b/designer_base/src/com/fr/design/images/buttonicon/pageb24.png index bf91c74a03d64fc77135d2421bf2e2abf6a2c6a1..67127219d8ecf3cdab46e61f8afbbfbbc3819008 100644 GIT binary patch literal 736 zcmV<60w4W}P)Px%nn^@KR9Fe^R!e9TQ4~GXNt4l13-*K7Xbr|7f~JV3E1~T|%t|3EK_m$3P8V(j zK^MAkE4cED5D?Lnq7X%d6p^C1ibf+T{TO0Op-r0)O(xCEn8Z4LlfIeEBb!gB zo^#%PcZLUS_J^T0VCVra(c+E7f)^}Qt(Hben^CJ~Al?jef#kEYB8Wm8hw_5FFYLHxzSeJp(v#r?1QRkK9l5sjO;k0i>UTc93 zKLRcBa!ywVGBiKcnNAn9U;5eF8L7KrwJs#xzh2Px$oJmAMR5%fhlS@kiQ547jqc#rqu!Zz6vla%GRNx{-B(zqwszuvqBYg!wLZ2Xl zTD8fnmbP$_t#VNmwFn|ik|~nNN8&qY@($jqaRQyqIrq%({O@^i88koNUPYvSCpPNW zGlbJnm|<{6{kE1txGmEuAeBMj#r;ZH6tU7SG5wjkxC>Z)l#^TNB$*@?OL_0yb}~u@ zbkyn8S}Zn#dMU3GI9Tt3#VB`1Imz-l5gW%fMNB2|7tj@W^rdfr#)|SLCu-b)BAFai z01Jy*?%kedVPb@=)j0cslU1A#noXPh5i{?L?u8fV2cK9+23K;56d8N63Gnex*kPL zc}4SA)nLZyNeF@toVX^Drlaa7ByukK?xB0=Bt7wcLnDya29))Xs6#2(piv7MuInwHA*~YRtDViDdAzGaW#JWuV Y0D+f&hN|3qZU6uP07*qoM6N<$fPx$oJmAMR5%fhlS@kiQ547jqc#rqu!Zz6vla%GRNx{-B(zqwszuvqBYg!wLZ2Xl zTD8fnmbP$_t#VNmwFn|ik|~nNN8&qY@($jqaRQyqIrq%({O@^i88koNUPYvSCpPNW zGlbJnm|<{6{kE1txGmEuAeBMj#r;ZH6tU7SG5wjkxC>Z)l#^TNB$*@?OL_0yb}~u@ zbkyn8S}Zn#dMU3GI9Tt3#VB`1Imz-l5gW%fMNB2|7tj@W^rdfr#)|SLCu-b)BAFai z01Jy*?%kedVPb@=)j0cslU1A#noXPh5i{?L?u8fV2cK9+23K;56d8N63Gnex*kPL zc}4SA)nLZyNeF@toVX^Drlaa7ByukK?xB0=Bt7wcLnDya29))Xs6#2(piv7MuInwHA*~YRtDViDdAzGaW#JWuV Y0D+f&hN|3qZU6uP07*qoM6N<$fPx%nn^@KR9Fe^R!e9TQ4~GXNt4l13-*K7Xbr|7f~JV3E1~T|%t|3EK_m$3P8V(j zK^MAkE4cED5D?Lnq7X%d6p^C1ibf+T{TO0Op-r0)O(xCEn8Z4LlfIeEBb!gB zo^#%PcZLUS_J^T0VCVra(c+E7f)^}Qt(Hben^CJ~Al?jef#kEYB8Wm8hw_5FFYLHxzSeJp(v#r?1QRkK9l5sjO;k0i>UTc93 zKLRcBa!ywVGBiKcnNAn9U;5eF8L7KrwJs#xzh2 Date: Tue, 8 Aug 2017 09:40:33 +0800 Subject: [PATCH 24/30] =?UTF-8?q?REPORT-3348=20card=20layout=E9=9A=90?= =?UTF-8?q?=E8=97=8F=E6=97=B6=E4=B8=8D=E5=86=8D=E6=98=BE=E7=A4=BA=E7=A9=BA?= =?UTF-8?q?=E7=99=BD=E9=9D=A2=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dscolumn/ResultSetGroupDockingPane.java | 3 + .../cellquick/CellDSColumnEditor.java | 56 ++++++++++++++++--- 2 files changed, 50 insertions(+), 9 deletions(-) diff --git a/designer/src/com/fr/design/dscolumn/ResultSetGroupDockingPane.java b/designer/src/com/fr/design/dscolumn/ResultSetGroupDockingPane.java index 874502bf4..ed4c24cba 100644 --- a/designer/src/com/fr/design/dscolumn/ResultSetGroupDockingPane.java +++ b/designer/src/com/fr/design/dscolumn/ResultSetGroupDockingPane.java @@ -69,10 +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)); } 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)); CellExpandAttr cellExpandAttr = cellElement.getCellExpandAttr(); cellExpandAttr.setDirection(Constants.NONE); } diff --git a/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java b/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java index cffaa1ba3..461be4da7 100644 --- a/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java +++ b/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java @@ -597,7 +597,7 @@ public class CellDSColumnEditor extends CellQuickEditor { if (noContent) { centerPane.setPreferredSize(new Dimension(0, 0)); } else { - centerPane.setPreferredSize(new Dimension(165, 20)); + centerPane.setPreferredSize(new Dimension(155, 20)); } String sortFormula = dSColumn.getSortFormula(); if (sortFormula != null && sortFormula.length() >= 1) { @@ -667,28 +667,44 @@ public class CellDSColumnEditor extends CellQuickEditor { CardLayout setCardPaneLayout = (CardLayout) setCardPane.getLayout(); CardLayout tipCardPaneLayout = (CardLayout) tipCardPane.getLayout(); if (selectIndex == 1) { + //前N个 setCardPaneLayout.show(setCardPane, FilterType.TOP.name()); tipCardPaneLayout.show(tipCardPane, FilterType.TOP.name()); - //todo 隐藏tip + //隐藏tip 显示set + setCardPane.setPreferredSize(new Dimension(155, 20)); + tipCardPane.setPreferredSize(new Dimension(0, 0)); } else if (selectIndex == 2) { + //后N个 setCardPaneLayout.show(setCardPane, FilterType.BOTTOM.name()); tipCardPaneLayout.show(tipCardPane, FilterType.BOTTOM.name()); - //todo 隐藏tip + //隐藏tip 显示set + setCardPane.setPreferredSize(new Dimension(155, 20)); + tipCardPane.setPreferredSize(new Dimension(0, 0)); } else if (selectIndex == 3) { + //奇数 setCardPaneLayout.show(setCardPane, FilterType.ODD.name()); tipCardPaneLayout.show(tipCardPane, FilterType.ODD.name()); - //todo 隐藏set + //隐藏set 显示tip + setCardPane.setPreferredSize(new Dimension(0, 0)); + tipCardPane.setPreferredSize(new Dimension(221, 15)); } else if (selectIndex == 4) { setCardPaneLayout.show(setCardPane, FilterType.EVEN.name()); tipCardPaneLayout.show(tipCardPane, FilterType.EVEN.name()); - //todo 隐藏set + //隐藏set 显示tip + setCardPane.setPreferredSize(new Dimension(0, 0)); + tipCardPane.setPreferredSize(new Dimension(221, 15)); } 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)); } else { setCardPaneLayout.show(setCardPane, FilterType.UNDEFINE.name()); tipCardPaneLayout.show(tipCardPane, FilterType.UNDEFINE.name()); - //todo 隐藏set和tip + //隐藏set和tip + setCardPane.setPreferredSize(new Dimension(0, 0)); + tipCardPane.setPreferredSize(new Dimension(0, 0)); } } @@ -715,13 +731,13 @@ 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...)")), "ODD"); + + "," + Inter.getLocText("BindColumn-Odd_Selected_(1,3,5...)")), 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...)")), "ODD"); + + "," + Inter.getLocText("BindColumn-Even_Selected_(2,4,6...)")), FilterType.EVEN.name()); //输入框占用右半边,提示信息占一行 serialTextField = new UITextField(16); @@ -729,7 +745,7 @@ public class CellDSColumnEditor extends CellQuickEditor { 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__"})), "SPECIFY"); + new String[]{": 1,2-3,5,8 ", ",", "$__count__"})), FilterType.SPECIFY.name()); this.add(TableLayoutHelper.createTableLayoutPane(new Component[][]{ {filterLabel, rsComboBox}, @@ -752,19 +768,41 @@ public class CellDSColumnEditor extends CellQuickEditor { switch (selectCountType) { case SelectCount.TOP: this.topFormulaPane.populate(selectCount.getFormulaCount()); + //隐藏tip 显示set + setCardPane.setPreferredSize(new Dimension(155, 20)); + tipCardPane.setPreferredSize(new Dimension(0, 0)); break; case SelectCount.BOTTOM: this.bottomFormulaPane.populate(selectCount.getFormulaCount()); + //隐藏tip 显示set + setCardPane.setPreferredSize(new Dimension(155, 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)); break; case SelectCount.EVEN: + //隐藏set 显示tip + setCardPane.setPreferredSize(new Dimension(0, 0)); + tipCardPane.setPreferredSize(new Dimension(221, 15)); break; case SelectCount.ODD: + //隐藏set 显示tip + setCardPane.setPreferredSize(new Dimension(0, 0)); + tipCardPane.setPreferredSize(new Dimension(221, 15)); break; default: + //隐藏set和tip + setCardPane.setPreferredSize(new Dimension(0, 0)); + tipCardPane.setPreferredSize(new Dimension(0, 0)); } + } else { + //隐藏set和tip + setCardPane.setPreferredSize(new Dimension(0, 0)); + tipCardPane.setPreferredSize(new Dimension(0, 0)); } } } From 9341ae046149dbd8f5214262b48afd06f9035c03 Mon Sep 17 00:00:00 2001 From: "yaoh.wu" Date: Tue, 8 Aug 2017 10:54:15 +0800 Subject: [PATCH 25/30] =?UTF-8?q?REPORT-3348=20=E5=85=AC=E5=BC=8F=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E8=BE=B9=E7=95=8C=E5=AF=B9=E5=85=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cellquick/CellDSColumnEditor.java | 38 ++++++++----------- 1 file changed, 15 insertions(+), 23 deletions(-) diff --git a/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java b/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java index 461be4da7..326cb5ad4 100644 --- a/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java +++ b/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java @@ -2,7 +2,6 @@ package com.fr.quickeditor.cellquick; import com.fr.base.Formula; import com.fr.design.actions.columnrow.DSColumnConditionAction; -import com.fr.design.constants.LayoutConstants; import com.fr.design.data.DesignTableDataManager; import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.dscolumn.DSColumnAdvancedPane; @@ -11,7 +10,6 @@ import com.fr.design.dscolumn.SelectedDataColumnPane; import com.fr.design.event.UIObserverListener; import com.fr.design.formula.CustomVariableResolver; import com.fr.design.formula.FormulaFactory; -import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.UIFormula; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButtonGroup; @@ -25,7 +23,6 @@ import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.cell.CellEditorPane; -import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.IOUtils; import com.fr.general.Inter; import com.fr.quickeditor.CellQuickEditor; @@ -533,7 +530,7 @@ public class CellDSColumnEditor extends CellQuickEditor { public class ResultSetSortConfigPane extends JPanel { //面板 private UIButtonGroup sortTypePane; - private TinyFormulaPane tinyFormulaPane; + private JFormulaField formulaField; private CardLayout cardLayout; private JPanel centerPane; @@ -552,9 +549,9 @@ public class CellDSColumnEditor extends CellQuickEditor { cardLayout = new CardLayout(); centerPane = new JPanel(cardLayout); - tinyFormulaPane = new TinyFormulaPane(); + formulaField = new JFormulaField(""); centerPane.add(new JPanel(), "none"); - centerPane.add(tinyFormulaPane, "content"); + centerPane.add(formulaField, "content"); UILabel sortLabel = new UILabel(Inter.getLocText("Sort-Sort_Order")); sortLabel.setPreferredSize(new Dimension(60, 20)); sortTypePane.addChangeListener(new ChangeListener() { @@ -601,7 +598,7 @@ public class CellDSColumnEditor extends CellQuickEditor { } String sortFormula = dSColumn.getSortFormula(); if (sortFormula != null && sortFormula.length() >= 1) { - this.tinyFormulaPane.populateBean(sortFormula); + this.formulaField.populate(sortFormula); } } } @@ -618,7 +615,7 @@ public class CellDSColumnEditor extends CellQuickEditor { if (value != null && value instanceof DSColumn) { DSColumn dSColumn = (DSColumn) (cellElement.getValue()); dSColumn.setOrder(this.sortTypePane.getSelectedIndex()); - dSColumn.setSortFormula(this.tinyFormulaPane.updateBean()); + dSColumn.setSortFormula(this.formulaField.getFormulaText()); } } } @@ -630,7 +627,7 @@ public class CellDSColumnEditor extends CellQuickEditor { * @param changeListener 排序类型下拉框改动事件监听器 */ public void addListener(UIObserverListener formulaChangeListener, ChangeListener changeListener) { - tinyFormulaPane.registerChangeListener(formulaChangeListener); + formulaField.addListener(formulaChangeListener); sortTypePane.addChangeListener(changeListener); } } @@ -857,27 +854,22 @@ public class CellDSColumnEditor extends CellQuickEditor { public JFormulaField(String defaultValue) { - double[] columnSize = {F}; - double[] rowSize = {P}; this.defaultValue = defaultValue; formulaTextField = new UITextField(); formulaTextField.setText(defaultValue); + JPanel textFieldPane = new JPanel(new BorderLayout()); + textFieldPane.add(formulaTextField, BorderLayout.CENTER); + textFieldPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 5)); UIButton formulaButton = new UIButton(IOUtils.readIcon("/com/fr/design/images/m_insert/formula.png")); formulaButton.setToolTipText(Inter.getLocText("Formula") + "..."); - formulaButton.setPreferredSize(new Dimension(24, formulaTextField.getPreferredSize().height)); + formulaButton.setPreferredSize(new Dimension(20, formulaTextField.getPreferredSize().height)); formulaButton.addActionListener(formulaButtonActionListener); - Component[] buttonComponent = new Component[]{ - formulaButton - }; + JPanel pane = new JPanel(new BorderLayout()); - pane.add(formulaTextField, BorderLayout.CENTER); - pane.add(GUICoreUtils.createFlowPane(buttonComponent, FlowLayout.LEFT, LayoutConstants.HGAP_LARGE), BorderLayout.EAST); - Component[][] components = new Component[][]{ - new Component[]{pane} - }; - JPanel panel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); + pane.add(textFieldPane, BorderLayout.CENTER); + pane.add(formulaButton, BorderLayout.EAST); this.setLayout(new BorderLayout()); - this.add(panel, BorderLayout.CENTER); + this.add(pane, BorderLayout.NORTH); } public void populate(String formulaContent) { @@ -889,7 +881,7 @@ public class CellDSColumnEditor extends CellQuickEditor { } public String getFormulaText() { - return this.formulaTextField.getText(); + return this.formulaTextField.getText().trim(); } /** From d3f9566a31e2afd2ab8f225157394539b70dbb7b Mon Sep 17 00:00:00 2001 From: "yaoh.wu" Date: Tue, 8 Aug 2017 11:38:41 +0800 Subject: [PATCH 26/30] =?UTF-8?q?=E6=89=BE=E5=9B=9E=E5=A4=84=E7=90=86?= =?UTF-8?q?=E5=86=B2=E7=AA=81=E8=BF=87=E7=A8=8B=E4=B8=AD=E4=B8=A2=E5=A4=B1?= =?UTF-8?q?=E7=9A=84=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/layout/FRGUIPaneFactory.java | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/designer_base/src/com/fr/design/layout/FRGUIPaneFactory.java b/designer_base/src/com/fr/design/layout/FRGUIPaneFactory.java index c6c2c1f7b..e71334430 100644 --- a/designer_base/src/com/fr/design/layout/FRGUIPaneFactory.java +++ b/designer_base/src/com/fr/design/layout/FRGUIPaneFactory.java @@ -7,6 +7,7 @@ import javax.swing.*; import java.awt.*; public class FRGUIPaneFactory { + private FRGUIPaneFactory() { } @@ -171,6 +172,18 @@ public class FRGUIPaneFactory { return jp; } + /** + * 创建一个靠左空边框面板,间隔中等,firsthgap 为0 + * + * @return JPanel对象 + */ + public static JPanel createMediumHGapFlowInnerContainer_M_Pane_First0() { + JPanel jp = new JPanel(); + jp.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); + jp.setLayout(new FRLeftFlowLayout(0, 20, 5)); + return jp; + } + /** * 创建一个靠左空边框面板,间隔中等 * @@ -229,6 +242,17 @@ public class FRGUIPaneFactory { return jp; } + /** + * 创建一个靠左流式布局,流式内嵌,首元素距离左边0 + * + * @return JPanel对象 + */ + public static JPanel createBoxFlowInnerContainer_S_Pane_First0() { + JPanel jp = new JPanel(); + jp.setLayout(new FRLeftFlowLayout(0, 0, 5)); + return jp; + } + /** * 创建一个靠右面板 * @@ -482,4 +506,5 @@ public class FRGUIPaneFactory { h = ((int) x + 1) * HEIGHT_PARA; return h; } + } \ No newline at end of file From 540db25103765c97ca3c0b5e3add7b2a7936913e Mon Sep 17 00:00:00 2001 From: "yaoh.wu" Date: Tue, 8 Aug 2017 11:38:41 +0800 Subject: [PATCH 27/30] =?UTF-8?q?=E6=89=BE=E5=9B=9E=E5=A4=84=E7=90=86?= =?UTF-8?q?=E5=86=B2=E7=AA=81=E8=BF=87=E7=A8=8B=E4=B8=AD=E4=B8=A2=E5=A4=B1?= =?UTF-8?q?=E7=9A=84=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/dscolumn/SelectedDataColumnPane.java | 14 +++++++------- .../quickeditor/cellquick/CellDSColumnEditor.java | 3 +-- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/designer/src/com/fr/design/dscolumn/SelectedDataColumnPane.java b/designer/src/com/fr/design/dscolumn/SelectedDataColumnPane.java index 08f59bbf3..682f9a930 100644 --- a/designer/src/com/fr/design/dscolumn/SelectedDataColumnPane.java +++ b/designer/src/com/fr/design/dscolumn/SelectedDataColumnPane.java @@ -92,22 +92,22 @@ public class SelectedDataColumnPane extends BasicPane { }; columnNameComboBox.setEditable(true); double p = TableLayout.PREFERRED; - UILabel label1 = new UILabel(Inter.getLocText("TableData") + ":"); - UILabel label2 = new UILabel(Inter.getLocText("DataColumn") + ":"); + UILabel dsLabel = new UILabel(Inter.getLocText("TableData") + ":"); + UILabel dcLabel = new UILabel(Inter.getLocText("DataColumn") + ":"); if (showParameterButton) { - label1.setPreferredSize(new Dimension(200, 25)); - label2.setPreferredSize(new Dimension(200, 25)); + dsLabel.setPreferredSize(new Dimension(200, 25)); + dcLabel.setPreferredSize(new Dimension(200, 25)); } if (showParameterButton) { - Component[][] comps = {{label1, null, label2}, {tableNameComboBox, paramButton, columnNameComboBox}}; + Component[][] comps = {{dsLabel, null, dcLabel}, {tableNameComboBox, paramButton, columnNameComboBox}}; this.add(TableLayoutHelper.createTableLayoutPane(comps, new double[]{p, p}, new double[]{p, p, p})); } else { double f = TableLayout.FILL; double[] columnSize = {p, f}; double[] rowSize = {p, p}; Component[][] components = new Component[][]{ - new Component[]{label1, tableNameComboBox}, - new Component[]{label2, columnNameComboBox} + new Component[]{dsLabel, tableNameComboBox}, + new Component[]{dcLabel, columnNameComboBox} }; JPanel jPanel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); this.setLayout(new BorderLayout()); diff --git a/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java b/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java index 326cb5ad4..2336642a2 100644 --- a/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java +++ b/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java @@ -410,10 +410,9 @@ public class CellDSColumnEditor extends CellQuickEditor { /** * 创建内容 + * @return 内容面板 */ - private JPanel createContentPane() { - this.setBorder(BorderFactory.createEmptyBorder(3, 3, 3, 3)); this.setLayout(FRGUIPaneFactory.createBorderLayout()); //结果集排序 sortPane = new ResultSetSortConfigPane(); From 9fd84e024d3116a264beecfc30d874be9cd78c9b Mon Sep 17 00:00:00 2001 From: "yaoh.wu" Date: Tue, 8 Aug 2017 12:11:37 +0800 Subject: [PATCH 28/30] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=95=B0=E5=AD=97?= =?UTF-8?q?=E7=BB=93=E5=B0=BE=E5=91=BD=E5=90=8D=E7=9A=84=E5=8F=98=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer/src/com/fr/design/dscolumn/DSColumnBasicPane.java | 4 ++-- designer/src/com/fr/design/dscolumn/DSColumnPane.java | 4 ++-- .../src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/designer/src/com/fr/design/dscolumn/DSColumnBasicPane.java b/designer/src/com/fr/design/dscolumn/DSColumnBasicPane.java index 07f02a7ef..603356a88 100644 --- a/designer/src/com/fr/design/dscolumn/DSColumnBasicPane.java +++ b/designer/src/com/fr/design/dscolumn/DSColumnBasicPane.java @@ -163,9 +163,9 @@ public class DSColumnBasicPane extends BasicPane { } } - public void putCellElement(TemplateCellElement tplEC2) { + public void putCellElement(TemplateCellElement tplCE) { if (conditionParentPane != null) { - conditionParentPane.putCellElement(tplEC2); + conditionParentPane.putCellElement(tplCE); } } } \ No newline at end of file diff --git a/designer/src/com/fr/design/dscolumn/DSColumnPane.java b/designer/src/com/fr/design/dscolumn/DSColumnPane.java index 74bc68165..68b49b1af 100644 --- a/designer/src/com/fr/design/dscolumn/DSColumnPane.java +++ b/designer/src/com/fr/design/dscolumn/DSColumnPane.java @@ -148,7 +148,7 @@ public class DSColumnPane extends BasicPane { basicPane.putElementcase(t); } - public void putCellElement(TemplateCellElement tplEC2) { - basicPane.putCellElement(tplEC2); + public void putCellElement(TemplateCellElement tplCE) { + basicPane.putCellElement(tplCE); } } \ No newline at end of file diff --git a/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java b/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java index 2336642a2..84b226bb6 100644 --- a/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java +++ b/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java @@ -410,6 +410,7 @@ public class CellDSColumnEditor extends CellQuickEditor { /** * 创建内容 + * * @return 内容面板 */ private JPanel createContentPane() { From f4e24d403178410a2e74dbf4c8a3c96ff925d459 Mon Sep 17 00:00:00 2001 From: MoMeak Date: Tue, 8 Aug 2017 15:49:47 +0800 Subject: [PATCH 29/30] =?UTF-8?q?REPORT-2897=209.0=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E4=BF=AE=E6=94=B9=20=E6=8E=A7=E4=BB=B6=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E7=BD=91=E9=A1=B5=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../widget/ui/IframeEditorDefinePane.java | 185 +++++++++++------- .../frpane/ReportletParameterViewPane.java | 183 +++++++++-------- .../itableeditorpane/UITableEditorPane.java | 179 +++++++++-------- 3 files changed, 303 insertions(+), 244 deletions(-) diff --git a/designer/src/com/fr/design/widget/ui/IframeEditorDefinePane.java b/designer/src/com/fr/design/widget/ui/IframeEditorDefinePane.java index cf7797e81..e154a022c 100644 --- a/designer/src/com/fr/design/widget/ui/IframeEditorDefinePane.java +++ b/designer/src/com/fr/design/widget/ui/IframeEditorDefinePane.java @@ -1,17 +1,13 @@ package com.fr.design.widget.ui; -import java.awt.*; -import java.util.List; - -import javax.swing.BorderFactory; - import com.fr.design.constants.LayoutConstants; +import com.fr.design.dialog.DialogActionListener; +import com.fr.design.dialog.UIDialog; import com.fr.design.foldablepane.UIExpandablePane; -import com.fr.design.gui.ilable.UILabel; -import javax.swing.JPanel; - import com.fr.design.gui.frpane.ReportletParameterViewPane; +import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.icheckbox.UICheckBox; +import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.itextfield.UITextField; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; @@ -20,68 +16,115 @@ import com.fr.form.ui.IframeEditor; import com.fr.general.Inter; import com.fr.stable.ParameterProvider; +import javax.swing.*; +import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.util.ArrayList; +import java.util.List; + public class IframeEditorDefinePane extends AbstractDataModify { - private UITextField srcTextField; - private ReportletParameterViewPane parameterViewPane; - private UICheckBox horizontalCheck; - private UICheckBox verticalCheck; - - public IframeEditorDefinePane() { - this.initComponents(); - } - - private void initComponents() { - this.setLayout(FRGUIPaneFactory.createBorderLayout()); - this.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); - JPanel contentPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_L_Pane(); - contentPane.setBorder(BorderFactory.createEmptyBorder(0, 2, 0, 0)); - JPanel attr = FRGUIPaneFactory.createNormalFlowInnerContainer_M_Pane(); - attr.add(horizontalCheck = new UICheckBox(Inter.getLocText("Preference-Horizontal_Scroll_Bar_Visible"))); - attr.add(verticalCheck = new UICheckBox(Inter.getLocText("Preference-Vertical_Scroll_Bar_Visible"))); - contentPane.add(attr); - double p = TableLayout.PREFERRED; - double f = TableLayout.FILL; - double[] rowSize = { p, p, p, p }; - double[] columnSize = { p, f }; - - java.awt.Component[][] coms = { - { horizontalCheck, null }, - { verticalCheck, null }, - { new UILabel(Inter.getLocText("Form-Url") + ":"), srcTextField = new UITextField() }, - { new UILabel(Inter.getLocText("Parameter") + ":"), parameterViewPane = new ReportletParameterViewPane() } }; - int[][] rowCount = {{1, 1},{1, 1},{1, 1}, {1, 1}}; - JPanel panel = TableLayoutHelper.createGapTableLayoutPane(coms, rowSize, columnSize, rowCount, LayoutConstants.VGAP_SMALL, 5); - - - contentPane.add(panel); - - UIExpandablePane uiExpandablePane = new UIExpandablePane(Inter.getLocText("FR-Designer_Advanced"), 280, 20, contentPane); - this.add(uiExpandablePane, BorderLayout.NORTH); - - } - - - @Override - protected String title4PopupWindow() { - return "iframe"; - } - - @Override - public void populateBean(IframeEditor e) { - srcTextField.setText(e.getSrc()); - parameterViewPane.populate(e.getParameters()); - this.horizontalCheck.setSelected(e.isOverflowx()); - this.verticalCheck.setSelected(e.isOverflowy()); - } - - @Override - public IframeEditor updateBean() { - IframeEditor ob = new IframeEditor(); - ob.setSrc(srcTextField.getText()); - List parameterList = parameterViewPane.update(); - ob.setParameters(parameterList.toArray(new ParameterProvider[parameterList.size()])); - ob.setOverflowx(this.horizontalCheck.isSelected()); - ob.setOverflowy(this.verticalCheck.isSelected()); - return ob; - } + + private static final int P_W = 610; + private static final int P_H = 580; + private UITextField srcTextField; + private ReportletParameterViewPane parameterViewPane; + private UICheckBox horizontalCheck; + private UICheckBox verticalCheck; + private UIButton parameterViewPaneButton; + private List list; + + + public IframeEditorDefinePane() { + this.initComponents(); + } + + private void initComponents() { + this.setLayout(FRGUIPaneFactory.createBorderLayout()); + this.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); + JPanel contentPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_L_Pane(); + contentPane.setBorder(BorderFactory.createEmptyBorder(0, 2, 0, 0)); + JPanel attr = FRGUIPaneFactory.createNormalFlowInnerContainer_M_Pane(); + attr.add(horizontalCheck = new UICheckBox(Inter.getLocText("Preference-Horizontal_Scroll_Bar_Visible"))); + attr.add(verticalCheck = new UICheckBox(Inter.getLocText("Preference-Vertical_Scroll_Bar_Visible"))); + contentPane.add(attr); + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] rowSize = {p, p, p, p}; + double[] columnSize = {p, f}; + + parameterViewPaneButton = new UIButton(Inter.getLocText("FR-Designer_Edit")); + parameterViewPaneButton.addActionListener(parameterListener); + parameterViewPane = new ReportletParameterViewPane(); + + java.awt.Component[][] coms = { + {horizontalCheck, null}, + {verticalCheck, null}, + {new UILabel(Inter.getLocText("Form-Url")), srcTextField = new UITextField()}, + {new UILabel(Inter.getLocText("FR-Designer_Parameters")), parameterViewPaneButton}}; + int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}}; + JPanel panel = TableLayoutHelper.createGapTableLayoutPane(coms, rowSize, columnSize, rowCount, 45, LayoutConstants.VGAP_LARGE); + + + contentPane.add(panel); + + UIExpandablePane uiExpandablePane = new UIExpandablePane(Inter.getLocText("FR-Designer_Advanced"), 280, 24, contentPane); + this.add(uiExpandablePane, BorderLayout.NORTH); + + } + + ActionListener parameterListener = new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + List paraList = parameterViewPane.update(); + list = new ArrayList(); + ParameterProvider pr = null; + for (ParameterProvider parameterProvider : paraList) { + try { + pr = (ParameterProvider) parameterProvider.clone(); + } catch (CloneNotSupportedException e1) { + e1.printStackTrace(); + } + list.add(pr); + } + + UIDialog dialog = parameterViewPane.showUnsizedWindow(SwingUtilities.getWindowAncestor(new JPanel()), new DialogActionListener() { + @Override + public void doOk() { +// list = parameterViewPane.update(); + } + + @Override + public void doCancel() { + parameterViewPane.update(list); + } + }); + dialog.setSize(P_W, P_H); + dialog.setVisible(true); + } + }; + + @Override + protected String title4PopupWindow() { + return "iframe"; + } + + @Override + public void populateBean(IframeEditor e) { + srcTextField.setText(e.getSrc()); + parameterViewPane.populate(e.getParameters()); + this.horizontalCheck.setSelected(e.isOverflowx()); + this.verticalCheck.setSelected(e.isOverflowy()); + } + + @Override + public IframeEditor updateBean() { + IframeEditor ob = new IframeEditor(); + ob.setSrc(srcTextField.getText()); + List parameterList = parameterViewPane.update(); + ob.setParameters(parameterList.toArray(new ParameterProvider[parameterList.size()])); + ob.setOverflowx(this.horizontalCheck.isSelected()); + ob.setOverflowy(this.verticalCheck.isSelected()); + return ob; + } } \ No newline at end of file diff --git a/designer_base/src/com/fr/design/gui/frpane/ReportletParameterViewPane.java b/designer_base/src/com/fr/design/gui/frpane/ReportletParameterViewPane.java index a9cea2cf1..084b11ee4 100644 --- a/designer_base/src/com/fr/design/gui/frpane/ReportletParameterViewPane.java +++ b/designer_base/src/com/fr/design/gui/frpane/ReportletParameterViewPane.java @@ -23,115 +23,124 @@ import java.util.List; /** * Defin hyperlink. * in fact,this is a TablEditorPane + * * @editor zhou * @since 2012-3-23下午3:48:10 */ public class ReportletParameterViewPane extends BasicPane { - private UITableEditorPane editorPane; + private UITableEditorPane editorPane; - public ReportletParameterViewPane() { - this(null, ParameterTableModel.NO_CHART_USE); - } + public ReportletParameterViewPane() { + this(null, ParameterTableModel.NO_CHART_USE); + } - // kunsnat: 控制是否用Chart的热点链接actions - public ReportletParameterViewPane(int useParaType) { - this(null, useParaType); - } + // kunsnat: 控制是否用Chart的热点链接actions + public ReportletParameterViewPane(int useParaType) { + this(null, useParaType); + } - public ReportletParameterViewPane(UITableEditAction[] actions, int useParaType) { - this(actions, useParaType, ValueEditorPaneFactory.createVallueEditorPaneWithUseType(useParaType), - ValueEditorPaneFactory.createVallueEditorPaneWithUseType(useParaType)); - } + public ReportletParameterViewPane(UITableEditAction[] actions, int useParaType) { + this(actions, useParaType, ValueEditorPaneFactory.createVallueEditorPaneWithUseType(useParaType), + ValueEditorPaneFactory.createVallueEditorPaneWithUseType(useParaType)); + } - public ReportletParameterViewPane(int useParaType, ValueEditorPane valueEditorPane, ValueEditorPane valueRenderPane) { - this(null, useParaType, valueEditorPane, valueRenderPane); - } + public ReportletParameterViewPane(int useParaType, ValueEditorPane valueEditorPane, ValueEditorPane valueRenderPane) { + this(null, useParaType, valueEditorPane, valueRenderPane); + } - public ReportletParameterViewPane(UITableEditAction[] actions, int useParaType, ValueEditorPane valueEditorPane, ValueEditorPane valueRenderPane) { - this.initComponent(actions, useParaType, valueEditorPane, valueRenderPane); - } + public ReportletParameterViewPane(UITableEditAction[] actions, int useParaType, ValueEditorPane valueEditorPane, ValueEditorPane valueRenderPane) { + this.initComponent(actions, useParaType, valueEditorPane, valueRenderPane); + } /** * 初始化组件 - * @param actions Chart的热点链接actions - * @param useParaType 类型 + * + * @param actions Chart的热点链接actions + * @param useParaType 类型 */ - public void initComponent(final UITableEditAction[] actions, int useParaType, ValueEditorPane valueEditorPane, ValueEditorPane valueRenderPane) { - this.setLayout(FRGUIPaneFactory.createBorderLayout()); - - if (useParaType != ParameterTableModel.NO_CHART_USE) { - ParameterTableModel model = new ParameterTableModel(valueEditorPane, valueRenderPane, this) { - @Override - public UITableEditAction[] createAction() { - UITableEditAction[] tableEditActions = new UITableEditAction[] { new AddChartParameterAction(), new DeleteAction(this.component), - new MoveUpAction(), new MoveDownAction() }; - return (UITableEditAction[]) ArrayUtils.addAll(tableEditActions, actions); - } - }; - editorPane = new UITableEditorPane(model); - } else { - editorPane = new UITableEditorPane(new ParameterTableModel() { - @Override - public UITableEditAction[] createAction() { - return (UITableEditAction[]) ArrayUtils.addAll(super.createAction(), actions); - } - }); - } - - this.add(editorPane, BorderLayout.CENTER); - } + public void initComponent(final UITableEditAction[] actions, int useParaType, ValueEditorPane valueEditorPane, ValueEditorPane valueRenderPane) { + this.setLayout(FRGUIPaneFactory.createBorderLayout()); + + if (useParaType != ParameterTableModel.NO_CHART_USE) { + ParameterTableModel model = new ParameterTableModel(valueEditorPane, valueRenderPane, this) { + @Override + public UITableEditAction[] createAction() { + UITableEditAction[] tableEditActions = new UITableEditAction[]{new AddChartParameterAction(), new DeleteAction(this.component), + new MoveUpAction(), new MoveDownAction()}; + return (UITableEditAction[]) ArrayUtils.addAll(tableEditActions, actions); + } + }; + editorPane = new UITableEditorPane(model); + } else { + editorPane = new UITableEditorPane(new ParameterTableModel() { + @Override + public UITableEditAction[] createAction() { + return (UITableEditAction[]) ArrayUtils.addAll(super.createAction(), actions); + } + }); + } + + this.add(editorPane, BorderLayout.CENTER); + } /** * 增加事件监听 - * @param l 加的东东 + * + * @param l 加的东东 */ - public void addTableEditorListener(TableModelListener l) { - editorPane.addTableListener(l); - } - - @Override - protected String title4PopupWindow() { - return Inter.getLocText("Parameters"); - } - - public void populate(ParameterProvider[] parameters) { - if (parameters == null) { - return; - } - editorPane.populate(parameters); - } - - public void populate(KV[] kv) { - if (kv == null) { - return; - } - Parameter[] parameters = new Parameter[kv.length]; - for (int i = 0; i < kv.length; i++) { - parameters[i] = new Parameter(kv[i].getKey(), kv[i].getValue()); - } - this.populate(parameters); - } - - public List update() { - return editorPane.update(); - } + public void addTableEditorListener(TableModelListener l) { + editorPane.addTableListener(l); + } + + @Override + protected String title4PopupWindow() { + return Inter.getLocText("Parameters"); + } + + public void populate(ParameterProvider[] parameters) { + if (parameters == null) { + return; + } + editorPane.populate(parameters); + } + + public void populate(KV[] kv) { + if (kv == null) { + return; + } + Parameter[] parameters = new Parameter[kv.length]; + for (int i = 0; i < kv.length; i++) { + parameters[i] = new Parameter(kv[i].getKey(), kv[i].getValue()); + } + this.populate(parameters); + } + + public List update() { + return editorPane.update(); + } + + public void update(List list) { + editorPane.update(list); + } + /** * 更新 - * @return 数组 + * + * @return 数组 */ - public KV[] updateKV() { - List list = this.update(); - int length = list.size(); - KV[] kv = new KV[length]; - for (int i = 0; i < length; i++) { - kv[i] = new KV(); - kv[i].setKey(list.get(i).getName()); - kv[i].setValue( list.get(i).getValue()); - } - return kv; - } + public KV[] updateKV() { + List list = this.update(); + int length = list.size(); + KV[] kv = new KV[length]; + for (int i = 0; i < length; i++) { + kv[i] = new KV(); + kv[i].setKey(list.get(i).getName()); + kv[i].setValue(list.get(i).getValue()); + } + return kv; + } } \ No newline at end of file diff --git a/designer_base/src/com/fr/design/gui/itableeditorpane/UITableEditorPane.java b/designer_base/src/com/fr/design/gui/itableeditorpane/UITableEditorPane.java index a0c09a848..c75f231d3 100644 --- a/designer_base/src/com/fr/design/gui/itableeditorpane/UITableEditorPane.java +++ b/designer_base/src/com/fr/design/gui/itableeditorpane/UITableEditorPane.java @@ -1,12 +1,12 @@ package com.fr.design.gui.itableeditorpane; -import com.fr.design.constants.UIConstants; import com.fr.design.border.UIRoundedBorder; +import com.fr.design.constants.UIConstants; +import com.fr.design.dialog.BasicPane; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.FRGUIPaneFactory; -import com.fr.design.dialog.BasicPane; import com.fr.general.Inter; import javax.swing.*; @@ -16,56 +16,56 @@ import java.util.List; /** * 表格编辑面板,一般是两列.键-值 用泛型实现,用的时候请定义T.model里面的T要一样 - * + * * @editor zhou * @since 2012-3-28下午3:06:30 */ public class UITableEditorPane extends BasicPane { - /** - * - */ - private static final long serialVersionUID = 6855793816972735815L; - private JTable editTable; - // 放置action 的按钮. - private UITableModelAdapter tableModel; - private String leftLabelName; + /** + * + */ + private static final long serialVersionUID = 6855793816972735815L; + private JTable editTable; + // 放置action 的按钮. + private UITableModelAdapter tableModel; + private String leftLabelName; private JPanel buttonPane; - public UITableEditorPane(UITableModelAdapter model) { - this.tableModel = model; - this.initComponent(model.createAction()); - } - - public UITableEditorPane(UITableModelAdapter model, String s) { - leftLabelName = s; - this.tableModel = model; - this.initComponent(model.createAction()); - } - - private void initComponent(UITableEditAction[] action) { - this.setLayout(FRGUIPaneFactory.createBorderLayout()); - JPanel pane = new JPanel(new BorderLayout(4, 4)); - this.add(pane, BorderLayout.CENTER); - - UILabel l = new UILabel(leftLabelName); - editTable = tableModel.createTable(); - - UIScrollPane scrollPane = new UIScrollPane(editTable); - scrollPane.setBorder(new UIRoundedBorder(UIConstants.LINE_COLOR, 1, UIConstants.ARC)); - pane.add(scrollPane, BorderLayout.CENTER); - initbuttonPane(action); - JPanel controlPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); - controlPane.add(buttonPane, BorderLayout.EAST); - controlPane.add(l, BorderLayout.WEST); - pane.add(controlPane, BorderLayout.NORTH); - - } - - public UITableModelAdapter getTableModel(){ + public UITableEditorPane(UITableModelAdapter model) { + this.tableModel = model; + this.initComponent(model.createAction()); + } + + public UITableEditorPane(UITableModelAdapter model, String s) { + leftLabelName = s; + this.tableModel = model; + this.initComponent(model.createAction()); + } + + private void initComponent(UITableEditAction[] action) { + this.setLayout(FRGUIPaneFactory.createBorderLayout()); + JPanel pane = new JPanel(new BorderLayout(4, 4)); + this.add(pane, BorderLayout.CENTER); + + UILabel l = new UILabel(leftLabelName); + editTable = tableModel.createTable(); + + UIScrollPane scrollPane = new UIScrollPane(editTable); + scrollPane.setBorder(new UIRoundedBorder(UIConstants.LINE_COLOR, 1, UIConstants.ARC)); + pane.add(scrollPane, BorderLayout.CENTER); + initbuttonPane(action); + JPanel controlPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); + controlPane.add(buttonPane, BorderLayout.EAST); + controlPane.add(l, BorderLayout.WEST); + pane.add(controlPane, BorderLayout.NORTH); + + } + + public UITableModelAdapter getTableModel() { return tableModel; } - private void initbuttonPane(UITableEditAction[] action){ + private void initbuttonPane(UITableEditAction[] action) { buttonPane = new JPanel(); if (action != null) { @@ -87,54 +87,61 @@ public class UITableEditorPane extends BasicPane { /** * 增加事件监听 - * @param l 加的东东 + * + * @param l 加的东东 */ - public void addTableListener(TableModelListener l) { - tableModel.addTableModelListener(l); - } + public void addTableListener(TableModelListener l) { + tableModel.addTableModelListener(l); + } /** * 移除事件监听 - * @param l 去的东东 + * + * @param l 去的东东 */ - public void removeTableListener(TableModelListener l) { - tableModel.removeTableModelListener(l); - } - - @Override - protected String title4PopupWindow() { - return Inter.getLocText("TableData_Dynamic_Parameter_Setting"); - } - - public void populate(T[] objs) { - tableModel.clear(); - if(objs==null){ - return; - } - for (T obj : objs) { - tableModel.addRow(obj); - } - this.tableModel.fireTableDataChanged(); - if (objs.length > 0) { - this.editTable.getSelectionModel().setSelectionInterval(0, 0); - } - } - - // TODO:august这个最好还是返回数组 - public List update() { - tableModel.stopCellEditing(); - return tableModel.getList(); - } - - public int getSelectedRow() { - return this.editTable.getSelectedRow(); - } - - public int getSelectedColumn() { - return this.editTable.getSelectedColumn(); - } - - public JPanel getbuttonPane(){ + public void removeTableListener(TableModelListener l) { + tableModel.removeTableModelListener(l); + } + + @Override + protected String title4PopupWindow() { + return Inter.getLocText("TableData_Dynamic_Parameter_Setting"); + } + + public void populate(T[] objs) { + tableModel.clear(); + if (objs == null) { + return; + } + for (T obj : objs) { + tableModel.addRow(obj); + } + this.tableModel.fireTableDataChanged(); + if (objs.length > 0) { + this.editTable.getSelectionModel().setSelectionInterval(0, 0); + } + } + + // TODO:august这个最好还是返回数组 + public List update() { + tableModel.stopCellEditing(); + return tableModel.getList(); + } + + public void update(List list) { + tableModel.stopCellEditing(); + tableModel.setList(list); + } + + public int getSelectedRow() { + return this.editTable.getSelectedRow(); + } + + public int getSelectedColumn() { + return this.editTable.getSelectedColumn(); + } + + public JPanel getbuttonPane() { return buttonPane; } From 2269bf41c3dec2b39b7db3f616f83d80f0bcf048 Mon Sep 17 00:00:00 2001 From: MoMeak Date: Tue, 8 Aug 2017 16:20:02 +0800 Subject: [PATCH 30/30] =?UTF-8?q?REPORT-2897=209.0=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E4=BF=AE=E6=94=B9=20=E6=8E=A7=E4=BB=B6=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E7=BD=91=E9=A1=B5=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer/src/com/fr/design/widget/ui/IframeEditorDefinePane.java | 1 - 1 file changed, 1 deletion(-) diff --git a/designer/src/com/fr/design/widget/ui/IframeEditorDefinePane.java b/designer/src/com/fr/design/widget/ui/IframeEditorDefinePane.java index e154a022c..359c8c636 100644 --- a/designer/src/com/fr/design/widget/ui/IframeEditorDefinePane.java +++ b/designer/src/com/fr/design/widget/ui/IframeEditorDefinePane.java @@ -91,7 +91,6 @@ public class IframeEditorDefinePane extends AbstractDataModify { UIDialog dialog = parameterViewPane.showUnsizedWindow(SwingUtilities.getWindowAncestor(new JPanel()), new DialogActionListener() { @Override public void doOk() { -// list = parameterViewPane.update(); } @Override