Browse Source
* commit 'c9a21400fa70a47131ffd05af824f220bc9c4d69': 代码规范 REPORT-3952 [9.0一轮回归]插入悬浮元素选择插入图表点击取消时会触发保存按钮 REPORT-4005 [9.0一轮回归] 设置事件编辑提交入库失败 REPORT-3850 [9.0一轮回归]退出权限编辑后界面右侧仍显示权限编辑栏master
superman
7 years ago
5 changed files with 139 additions and 67 deletions
@ -1 +1,62 @@ |
|||||||
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<JTemplate<?, ?>> opendedTemplate = HistoryTemplateListPane.getInstance().getHistoryList();
for (int i = 0; i < opendedTemplate.size(); i++) {
//如果在权限编辑时做过操作,则将做过的操作作为一个整体状态赋给正在报表
if (opendedTemplate.get(i).isDoSomethingInAuthority()) {
opendedTemplate.get(i).fireAuthorityStateToNomal();
}
}
}
} |
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() { |
||||||
|
// 遗留代码
|
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
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<JTemplate<?, ?>> opendedTemplate = HistoryTemplateListPane.getInstance().getHistoryList(); |
||||||
|
for (int i = 0; i < opendedTemplate.size(); i++) { |
||||||
|
//如果在权限编辑时做过操作,则将做过的操作作为一个整体状态赋给正在报表
|
||||||
|
if (opendedTemplate.get(i).isDoSomethingInAuthority()) { |
||||||
|
opendedTemplate.get(i).fireAuthorityStateToNomal(); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue