From f4ff6dd948fabf847be13937634683d28ab3a9f9 Mon Sep 17 00:00:00 2001 From: plough Date: Tue, 22 Aug 2017 16:37:01 +0800 Subject: [PATCH 1/4] =?UTF-8?q?REPORT-3850=20[9.0=E4=B8=80=E8=BD=AE?= =?UTF-8?q?=E5=9B=9E=E5=BD=92]=E9=80=80=E5=87=BA=E6=9D=83=E9=99=90?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=90=8E=E7=95=8C=E9=9D=A2=E5=8F=B3=E4=BE=A7?= =?UTF-8?q?=E4=BB=8D=E6=98=BE=E7=A4=BA=E6=9D=83=E9=99=90=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E6=A0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../actions/ExitAuthorityEditAction.java | 62 ++++++++++++++++++- 1 file changed, 61 insertions(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/actions/ExitAuthorityEditAction.java b/designer_base/src/com/fr/design/actions/ExitAuthorityEditAction.java index 238e703f19..dfb7f1dd68 100644 --- a/designer_base/src/com/fr/design/actions/ExitAuthorityEditAction.java +++ b/designer_base/src/com/fr/design/actions/ExitAuthorityEditAction.java @@ -1 +1,61 @@ -package com.fr.design.actions; import com.fr.base.BaseUtils; import com.fr.design.data.datapane.TableDataTreePane; import com.fr.design.DesignModelAdapter; import com.fr.design.designer.TargetComponent; import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.mainframe.*; import com.fr.general.Inter; /** * Author : daisy * Date: 13-9-2 * Time: 下午3:36 */ public class ExitAuthorityEditAction extends TemplateComponentAction { public ExitAuthorityEditAction(TargetComponent t) { super(t); this.setName(Inter.getLocText(new String[]{"Exit", "DashBoard-Potence", "Edit"})); this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_report/exit_authority_edit.png")); } public void prepare4Undo() { } public boolean executeActionReturnUndoRecordNeeded() { TargetComponent tc = getEditingComponent(); if (tc == null) { return false; } if (BaseUtils.isAuthorityEditing()) { BaseUtils.setAuthorityEditing(false); WestRegionContainerPane.getInstance().replaceDownPane(TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter())); EastRegionContainerPane.getInstance().replaceDownPane(tc.getEastDownPane()); EastRegionContainerPane.getInstance().replaceUpPane(tc.getEastUpPane()); DesignerContext.getDesignerFrame().resetToolkitByPlus(tc.getToolBarMenuDockPlus()); DesignerContext.getDesignerFrame().needToAddAuhtorityPaint(); DesignerContext.getDesignerFrame().refreshDottedLine(); fireAuthorityStateToNomal(); } return true; } /** * 退出权限编辑时,将所有的做过权限编辑的状态,作为一个状态赋给报、报表主体 */ private void fireAuthorityStateToNomal() { java.util.List> opendedTemplate = HistoryTemplateListPane.getInstance().getHistoryList(); for (int i = 0; i < opendedTemplate.size(); i++) { //如果在权限编辑时做过操作,则将做过的操作作为一个整体状态赋给正在报表 if (opendedTemplate.get(i).isDoSomethingInAuthority()) { opendedTemplate.get(i).fireAuthorityStateToNomal(); } } } } \ No newline at end of file +package com.fr.design.actions; + +import com.fr.base.BaseUtils; +import com.fr.design.data.datapane.TableDataTreePane; +import com.fr.design.DesignModelAdapter; +import com.fr.design.designer.TargetComponent; +import com.fr.design.file.HistoryTemplateListPane; +import com.fr.design.mainframe.*; +import com.fr.general.Inter; + +/** + * Author : daisy + * Date: 13-9-2 + * Time: 下午3:36 + */ +public class ExitAuthorityEditAction extends TemplateComponentAction { + + public ExitAuthorityEditAction(TargetComponent t) { + super(t); + this.setName(Inter.getLocText(new String[]{"Exit", "DashBoard-Potence", "Edit"})); + this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_report/exit_authority_edit.png")); + } + + + public void prepare4Undo() { + + } + + public boolean executeActionReturnUndoRecordNeeded() { + TargetComponent tc = getEditingComponent(); + if (tc == null) { + return false; + } + + if (BaseUtils.isAuthorityEditing()) { + BaseUtils.setAuthorityEditing(false); + WestRegionContainerPane.getInstance().replaceDownPane(TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter())); + HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().refreshEastPropertiesPane(); + DesignerContext.getDesignerFrame().resetToolkitByPlus(tc.getToolBarMenuDockPlus()); + DesignerContext.getDesignerFrame().needToAddAuhtorityPaint(); + DesignerContext.getDesignerFrame().refreshDottedLine(); + + fireAuthorityStateToNomal(); + } + return true; + } + + + /** + * 退出权限编辑时,将所有的做过权限编辑的状态,作为一个状态赋给报、报表主体 + */ + private void fireAuthorityStateToNomal() { + java.util.List> opendedTemplate = HistoryTemplateListPane.getInstance().getHistoryList(); + for (int i = 0; i < opendedTemplate.size(); i++) { + //如果在权限编辑时做过操作,则将做过的操作作为一个整体状态赋给正在报表 + if (opendedTemplate.get(i).isDoSomethingInAuthority()) { + opendedTemplate.get(i).fireAuthorityStateToNomal(); + } + } + } +} \ No newline at end of file From 72d14d396ba3eccd5caaeec64c29e7d62e5ac5e7 Mon Sep 17 00:00:00 2001 From: plough Date: Wed, 23 Aug 2017 09:48:53 +0800 Subject: [PATCH 2/4] =?UTF-8?q?REPORT-4005=20[9.0=E4=B8=80=E8=BD=AE?= =?UTF-8?q?=E5=9B=9E=E5=BD=92]=20=E8=AE=BE=E7=BD=AE=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E6=8F=90=E4=BA=A4=E5=85=A5=E5=BA=93=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/ElementCasePaneDelegate.java | 3 +++ .../write/submit/SmartInsertDBManipulationPane.java | 9 +++------ designer/src/com/fr/poly/creator/ECBlockPane.java | 3 +++ 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java b/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java index c5bd1e9525..17eb281543 100644 --- a/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java +++ b/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java @@ -48,6 +48,9 @@ public class ElementCasePaneDelegate extends ElementCasePane { @Override public void selectionChanged(SelectionEvent e) { + if (!isEditable()) { + return; + } //在编辑权限,所以要更新权限编辑面板 if (BaseUtils.isAuthorityEditing()) { AuthorityPropertyPane authorityPropertyPane = new AuthorityPropertyPane(ElementCasePaneDelegate.this); diff --git a/designer/src/com/fr/design/write/submit/SmartInsertDBManipulationPane.java b/designer/src/com/fr/design/write/submit/SmartInsertDBManipulationPane.java index e80d89c364..4c5cdb4e2f 100644 --- a/designer/src/com/fr/design/write/submit/SmartInsertDBManipulationPane.java +++ b/designer/src/com/fr/design/write/submit/SmartInsertDBManipulationPane.java @@ -34,10 +34,7 @@ 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.mainframe.DesignerContext; -import com.fr.design.mainframe.ElementCasePane; -import com.fr.design.mainframe.JTemplate; -import com.fr.design.mainframe.JWorkBook; +import com.fr.design.mainframe.*; import com.fr.design.selection.SelectionEvent; import com.fr.design.selection.SelectionListener; import com.fr.general.Inter; @@ -196,11 +193,11 @@ public class SmartInsertDBManipulationPane extends DBManipulationPane { /* * 当前的ReportPane不可编辑,不可切换Sheet,加GridSelectionChangeListener */ - ePane.setSelection(NO_SELECTION); ePane.setEditable(false); + ePane.setSelection(NO_SELECTION); ePane.getGrid().setNotShowingTableSelectPane(false); - BasicDialog dlg = bPane.showWindow(SwingUtilities.getWindowAncestor(SmartInsertDBManipulationPane.this)); + BasicDialog dlg = bPane.showWindow(DesignerContext.getDesignerFrame()); dlg.setModal(false); dlg.setVisible(true); diff --git a/designer/src/com/fr/poly/creator/ECBlockPane.java b/designer/src/com/fr/poly/creator/ECBlockPane.java index edd93ce9ac..ba65847673 100644 --- a/designer/src/com/fr/poly/creator/ECBlockPane.java +++ b/designer/src/com/fr/poly/creator/ECBlockPane.java @@ -52,6 +52,9 @@ public class ECBlockPane extends PolyElementCasePane { @Override public void selectionChanged(SelectionEvent e) { + if (!isEditable()) { + return; + } if (BaseUtils.isAuthorityEditing()) { if (designer.getSelection().getEditingElementCasePane() == null) { EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.AUTHORITY_EDITION_DISABLED); From 4ac4dcb2524b15cf05af157797893ffb9aeb0616 Mon Sep 17 00:00:00 2001 From: plough Date: Thu, 24 Aug 2017 15:05:12 +0800 Subject: [PATCH 3/4] =?UTF-8?q?REPORT-3952=20[9.0=E4=B8=80=E8=BD=AE?= =?UTF-8?q?=E5=9B=9E=E5=BD=92]=E6=8F=92=E5=85=A5=E6=82=AC=E6=B5=AE?= =?UTF-8?q?=E5=85=83=E7=B4=A0=E9=80=89=E6=8B=A9=E6=8F=92=E5=85=A5=E5=9B=BE?= =?UTF-8?q?=E8=A1=A8=E7=82=B9=E5=87=BB=E5=8F=96=E6=B6=88=E6=97=B6=E4=BC=9A?= =?UTF-8?q?=E8=A7=A6=E5=8F=91=E4=BF=9D=E5=AD=98=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/actions/insert/flot/ChartFloatAction.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/designer/src/com/fr/design/actions/insert/flot/ChartFloatAction.java b/designer/src/com/fr/design/actions/insert/flot/ChartFloatAction.java index 80b731c1a1..ce05628da4 100644 --- a/designer/src/com/fr/design/actions/insert/flot/ChartFloatAction.java +++ b/designer/src/com/fr/design/actions/insert/flot/ChartFloatAction.java @@ -30,6 +30,8 @@ import java.awt.*; */ public class ChartFloatAction extends ElementCaseAction { + private boolean isRecordNeeded; + /** * 构造函数 图表插入悬浮元素 */ @@ -64,9 +66,10 @@ public class ChartFloatAction extends ElementCaseAction { * @return 是则返回true */ public boolean executeActionReturnUndoRecordNeeded() { + isRecordNeeded = false; final ElementCasePane reportPane = (ElementCasePane) HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().getCurrentElementCasePane(); if (reportPane == null) { - return false; + return isRecordNeeded; } reportPane.stopEditing(); @@ -78,7 +81,7 @@ public class ChartFloatAction extends ElementCaseAction { chartDialog.addDialogActionListener(new DialogActionAdapter() { @Override public void doOk() { - + isRecordNeeded = true; FloatElement newFloatElement; try { newFloatElement = new FloatElement(chartDialog.getChartCollection().clone()); @@ -101,6 +104,6 @@ public class ChartFloatAction extends ElementCaseAction { }); chartDialog.setVisible(true); - return true; + return isRecordNeeded; } } \ No newline at end of file From c9a21400fa70a47131ffd05af824f220bc9c4d69 Mon Sep 17 00:00:00 2001 From: plough Date: Thu, 24 Aug 2017 15:59:05 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=A7=84=E8=8C=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/ElementCasePaneDelegate.java | 84 ++++++++++--------- .../submit/SmartInsertDBManipulationPane.java | 37 ++++---- .../src/com/fr/poly/creator/ECBlockPane.java | 2 +- .../actions/ExitAuthorityEditAction.java | 3 +- 4 files changed, 66 insertions(+), 60 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java b/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java index 17eb281543..0e4c2aa58c 100644 --- a/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java +++ b/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java @@ -45,51 +45,12 @@ public class ElementCasePaneDelegate extends ElementCasePane { public ElementCasePaneDelegate(WorkSheet sheet) { super(sheet); this.addSelectionChangeListener(new SelectionListener() { - @Override public void selectionChanged(SelectionEvent e) { if (!isEditable()) { return; } - //在编辑权限,所以要更新权限编辑面板 - if (BaseUtils.isAuthorityEditing()) { - AuthorityPropertyPane authorityPropertyPane = new AuthorityPropertyPane(ElementCasePaneDelegate.this); - authorityPropertyPane.populate(); - EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.AUTHORITY_EDITION); - EastRegionContainerPane.getInstance().replaceAuthorityEditionPane(authorityPropertyPane); - EastRegionContainerPane.getInstance().replaceConfiguredRolesPane(RolesAlreadyEditedPane.getInstance()); - return; - } - CellWidgetPropertyPane.getInstance().populate(ElementCasePaneDelegate.this); - CellElementPropertyPane.getInstance().populate(ElementCasePaneDelegate.this); - QuickEditorRegion.getInstance().populate(getCurrentEditor()); - JTemplate editingTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); - if (editingTemplate != null && !editingTemplate.isUpMode()) { - Selection editingSelection = ((ElementCasePaneDelegate)e.getSource()).getSelection(); - // 模板初始化完成后,才能初始化超级链接面板 - HyperlinkGroupPane hyperlinkGroupPane = editingTemplate.getHyperLinkPane(HyperlinkGroupPaneActionImpl.getInstance()); - hyperlinkGroupPane.populate(ElementCasePaneDelegate.this); - if (editingSelection instanceof FloatSelection) { - EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.REPORT_FLOAT); - JPanel floatPane = new JPanel(new BorderLayout()); - floatPane.add(ReportFloatPane.getInstance(), BorderLayout.NORTH); - floatPane.add(QuickEditorRegion.getInstance(), BorderLayout.CENTER); - EastRegionContainerPane.getInstance().replaceFloatElementPane(floatPane); - } else { - // 条件属性 - ConditionAttributesGroupPane conditionAttributesGroupPane = ConditionAttributesGroupPane.getInstance(); - conditionAttributesGroupPane.populate(ElementCasePaneDelegate.this); - - EastRegionContainerPane.getInstance().replaceFloatElementPane(ReportFloatPane.getInstance()); - EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.REPORT); - EastRegionContainerPane.getInstance().replaceCellAttrPane(CellElementPropertyPane.getInstance()); - EastRegionContainerPane.getInstance().replaceCellElementPane(QuickEditorRegion.getInstance()); - EastRegionContainerPane.getInstance().replaceConditionAttrPane(conditionAttributesGroupPane); - EastRegionContainerPane.getInstance().replaceWidgetSettingsPane(CellWidgetPropertyPane.getInstance()); - } - EastRegionContainerPane.getInstance().replaceHyperlinkPane(hyperlinkGroupPane); - EastRegionContainerPane.getInstance().removeParameterPane(); - } + doOnSelectionChanged(); } }); this.addTargetModifiedListener(new TargetModifiedListener() { @@ -100,6 +61,48 @@ public class ElementCasePaneDelegate extends ElementCasePane { }); } + private void doOnSelectionChanged() { + //在编辑权限,所以要更新权限编辑面板 + if (BaseUtils.isAuthorityEditing()) { + AuthorityPropertyPane authorityPropertyPane = new AuthorityPropertyPane(ElementCasePaneDelegate.this); + authorityPropertyPane.populate(); + EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.AUTHORITY_EDITION); + EastRegionContainerPane.getInstance().replaceAuthorityEditionPane(authorityPropertyPane); + EastRegionContainerPane.getInstance().replaceConfiguredRolesPane(RolesAlreadyEditedPane.getInstance()); + return; + } + CellWidgetPropertyPane.getInstance().populate(ElementCasePaneDelegate.this); + CellElementPropertyPane.getInstance().populate(ElementCasePaneDelegate.this); + QuickEditorRegion.getInstance().populate(getCurrentEditor()); + JTemplate editingTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); + if (editingTemplate != null && !editingTemplate.isUpMode()) { + Selection editingSelection = ((ElementCasePaneDelegate)e.getSource()).getSelection(); + // 模板初始化完成后,才能初始化超级链接面板 + HyperlinkGroupPane hyperlinkGroupPane = editingTemplate.getHyperLinkPane(HyperlinkGroupPaneActionImpl.getInstance()); + hyperlinkGroupPane.populate(ElementCasePaneDelegate.this); + if (editingSelection instanceof FloatSelection) { + EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.REPORT_FLOAT); + JPanel floatPane = new JPanel(new BorderLayout()); + floatPane.add(ReportFloatPane.getInstance(), BorderLayout.NORTH); + floatPane.add(QuickEditorRegion.getInstance(), BorderLayout.CENTER); + EastRegionContainerPane.getInstance().replaceFloatElementPane(floatPane); + } else { + // 条件属性 + ConditionAttributesGroupPane conditionAttributesGroupPane = ConditionAttributesGroupPane.getInstance(); + conditionAttributesGroupPane.populate(ElementCasePaneDelegate.this); + + EastRegionContainerPane.getInstance().replaceFloatElementPane(ReportFloatPane.getInstance()); + EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.REPORT); + EastRegionContainerPane.getInstance().replaceCellAttrPane(CellElementPropertyPane.getInstance()); + EastRegionContainerPane.getInstance().replaceCellElementPane(QuickEditorRegion.getInstance()); + EastRegionContainerPane.getInstance().replaceConditionAttrPane(conditionAttributesGroupPane); + EastRegionContainerPane.getInstance().replaceWidgetSettingsPane(CellWidgetPropertyPane.getInstance()); + } + EastRegionContainerPane.getInstance().replaceHyperlinkPane(hyperlinkGroupPane); + EastRegionContainerPane.getInstance().removeParameterPane(); + } + } + @Override protected boolean supportRepeatedHeaderFooter() { return true; @@ -126,6 +129,7 @@ public class ElementCasePaneDelegate extends ElementCasePane { * * @return 不是必须在可见范围. */ + @Override public boolean mustInVisibleRange() { return false; } diff --git a/designer/src/com/fr/design/write/submit/SmartInsertDBManipulationPane.java b/designer/src/com/fr/design/write/submit/SmartInsertDBManipulationPane.java index 4c5cdb4e2f..36695d988f 100644 --- a/designer/src/com/fr/design/write/submit/SmartInsertDBManipulationPane.java +++ b/designer/src/com/fr/design/write/submit/SmartInsertDBManipulationPane.java @@ -8,9 +8,7 @@ import java.awt.event.ActionEvent; import javax.swing.BorderFactory; import javax.swing.JDialog; -import javax.swing.JLayeredPane; import javax.swing.JPanel; -import javax.swing.JRootPane; import javax.swing.JTable; import javax.swing.SwingUtilities; import javax.swing.table.DefaultTableCellRenderer; @@ -43,12 +41,15 @@ import com.fr.grid.selection.FloatSelection; import com.fr.grid.selection.Selection; import com.fr.stable.ColumnRow; import com.fr.stable.ColumnRowGroup; +import com.fr.stable.StringUtils; import com.fr.write.DMLConfigJob; public class SmartInsertDBManipulationPane extends DBManipulationPane { private static final Selection NO_SELECTION = new CellSelection(-1, -1, -1, -1); private ElementCasePane ePane; private static int CELL_GROUP_LIMIT = 6; + private static int TOP_PADDING = 30; + private static int LEFT_COLUMN_MAX_WIDTH = 40; public SmartInsertDBManipulationPane(ElementCasePane ePane) { super(ValueEditorPaneFactory.extendedCellGroupEditors()); @@ -57,10 +58,14 @@ public class SmartInsertDBManipulationPane extends DBManipulationPane { public SmartInsertDBManipulationPane() { super(ValueEditorPaneFactory.extendedCellGroupEditors()); - JTemplate jTemplate = DesignerContext.getDesignerFrame().getSelectedJTemplate(); - this.ePane = ((JWorkBook) jTemplate).getEditingElementCasePane(); + init(); } + private void init() { + JTemplate jTemplate = DesignerContext.getDesignerFrame().getSelectedJTemplate(); + this.ePane = ((JWorkBook) jTemplate).getEditingElementCasePane(); + } + @Override protected SubmitJobListPane createSubmitJobListPane() { return new SmartInsertSubmitJobListPane(); @@ -123,7 +128,7 @@ public class SmartInsertDBManipulationPane extends DBManipulationPane { } }; bPane.setLayout(FRGUIPaneFactory.createBorderLayout()); - bPane.setBorder(BorderFactory.createEmptyBorder(30, 0, 0, 0)); + bPane.setBorder(BorderFactory.createEmptyBorder(TOP_PADDING, 0, 0, 0)); final UIBasicSpinner columnSpinner = new UIBasicSpinner(); final UIBasicSpinner rowSpinner = new UIBasicSpinner(); Component[][] coms = new Component[][] { { new UILabel(Inter.getLocText("RWA-Row_Offset")), rowSpinner },{ new UILabel(Inter.getLocText("RWA-Column_Offset")), columnSpinner } }; @@ -289,11 +294,6 @@ public class SmartInsertDBManipulationPane extends DBManipulationPane { } } - private boolean possibleParentContainer(Container p) { - return p instanceof Dialog || p instanceof BasicPane || - p instanceof JPanel || p instanceof JRootPane || p instanceof JLayeredPane; - } - private class SmartJTablePane4DB extends SmartJTablePane { // 是否是单元格组 @@ -329,7 +329,7 @@ public class SmartInsertDBManipulationPane extends DBManipulationPane { * set Width */ TableColumn column0 = table.getColumnModel().getColumn(0); - column0.setMaxWidth(40); + column0.setMaxWidth(LEFT_COLUMN_MAX_WIDTH); /* * 设置Column 1的Renderer */ @@ -410,7 +410,7 @@ public class SmartInsertDBManipulationPane extends DBManipulationPane { // 要考虑多选的情况 要结合之前的看看 可能是增加 也可能需要减少 ColumnRowGroup add = new ColumnRowGroup(); int removeCount = 0; - if (oriCellSelection != null && sameStartPoint(cellselection, oriCellSelection)) { + if (oriCellSelection != null && isSameStartPoint(cellselection, oriCellSelection)) { removeCount = dealDragSelection(add, cellselection); } else if (cellselection.getSelectedType() == CellSelection.CHOOSE_ROW || cellselection.getSelectedType() == CellSelection.CHOOSE_COLUMN) { dealSelectColRow(add, cellselection); @@ -441,7 +441,7 @@ public class SmartInsertDBManipulationPane extends DBManipulationPane { return newValue; } - private boolean sameStartPoint(CellSelection cs1, CellSelection cs2) { + private boolean isSameStartPoint(CellSelection cs1, CellSelection cs2) { return cs1.getColumn() == cs2.getColumn() && cs1.getRow() == cs2.getRow(); } @@ -479,6 +479,7 @@ public class SmartInsertDBManipulationPane extends DBManipulationPane { private SmartJTablePaneAction a = new AbstractSmartJTablePaneAction(this, SmartInsertDBManipulationPane.this) { @Override public void doOk() { + // 遗留代码 } @Override @@ -507,7 +508,7 @@ public class SmartInsertDBManipulationPane extends DBManipulationPane { if (((ColumnValue)value).obj != null) { this.setText(((ColumnValue)value).obj.toString()); } else { - this.setText(""); + this.setText(StringUtils.EMPTY); } } @@ -535,12 +536,12 @@ public class SmartInsertDBManipulationPane extends DBManipulationPane { Object cv = ((ColumnValue) value).obj; if (cv instanceof ColumnRowGroup && ((ColumnRowGroup)cv).getSize() >= CELL_GROUP_LIMIT) { text.setText("[" + Inter.getLocText(new String[]{"Has_Selected", "Classifier-Ge", "Cell"}, - new String[]{((ColumnRowGroup)cv).getSize()+"", ""}) + "]"); + new String[]{((ColumnRowGroup)cv).getSize()+StringUtils.EMPTY, StringUtils.EMPTY}) + "]"); tip = cv.toString() + " " + tip; } else if (cv != null) { text.setText(cv.toString()); } else { - text.setText(""); + text.setText(StringUtils.EMPTY); } } @@ -568,12 +569,12 @@ public class SmartInsertDBManipulationPane extends DBManipulationPane { Object cv = ((ColumnValue) value).obj; if (cv instanceof ColumnRowGroup && ((ColumnRowGroup)cv).getSize() >= CELL_GROUP_LIMIT) { this.setText("[" + Inter.getLocText(new String[]{"Has_Selected", "Classifier-Ge", "Cell"}, - new String[]{((ColumnRowGroup)cv).getSize()+"", ""}) + "]"); + new String[]{((ColumnRowGroup)cv).getSize()+StringUtils.EMPTY, StringUtils.EMPTY}) + "]"); tip = cv.toString() + " " + tip; } else if (cv != null) { this.setText(cv.toString()); } else { - this.setText(""); + this.setText(StringUtils.EMPTY); } } diff --git a/designer/src/com/fr/poly/creator/ECBlockPane.java b/designer/src/com/fr/poly/creator/ECBlockPane.java index ba65847673..ebde8b3b4b 100644 --- a/designer/src/com/fr/poly/creator/ECBlockPane.java +++ b/designer/src/com/fr/poly/creator/ECBlockPane.java @@ -119,7 +119,7 @@ public class ECBlockPane extends PolyElementCasePane { // 插入菜单 private MenuDef createInsertMenuDef() { - MenuDef menuDef = new MenuDef(Inter.getLocText("M-Insert"), 'I'); + MenuDef menuDef = new MenuDef(Inter.getLocText("FR-Designer_M-Insert"), 'I'); // 单元格菜单 menuDef.addShortCut(DeprecatedActionManager.getCellMenu(this)); diff --git a/designer_base/src/com/fr/design/actions/ExitAuthorityEditAction.java b/designer_base/src/com/fr/design/actions/ExitAuthorityEditAction.java index dfb7f1dd68..a470673a0b 100644 --- a/designer_base/src/com/fr/design/actions/ExitAuthorityEditAction.java +++ b/designer_base/src/com/fr/design/actions/ExitAuthorityEditAction.java @@ -23,9 +23,10 @@ public class ExitAuthorityEditAction extends TemplateComponentAction { public void prepare4Undo() { - + // 遗留代码 } + @Override public boolean executeActionReturnUndoRecordNeeded() { TargetComponent tc = getEditingComponent(); if (tc == null) {