Browse Source

Merge pull request #695 in DESIGN/design from ~MATA.LI/design:release/10.0 to release/10.0

* commit '8c73e3c5b3553d73fe5f3cc5525c733a60d139aa':
  REPORT-13689 & REPORT-13733 & REPORT-13716 & REPORT-13720
bugfix/10.0
Mata.Li 6 years ago
parent
commit
74b77c14e1
  1. 5
      designer-base/src/main/java/com/fr/design/file/HistoryTemplateListCache.java
  2. 26
      designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java
  3. 2
      designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java
  4. 17
      designer-realize/src/main/java/com/fr/design/actions/server/StyleListAction.java
  5. 16
      designer-realize/src/main/java/com/fr/design/present/StyleArrayPane.java

5
designer-base/src/main/java/com/fr/design/file/HistoryTemplateListCache.java

@ -2,6 +2,7 @@ package com.fr.design.file;
import com.fr.base.chart.chartdata.CallbackEvent; import com.fr.base.chart.chartdata.CallbackEvent;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.base.mode.DesignModeContext;
import com.fr.design.data.DesignTableDataManager; import com.fr.design.data.DesignTableDataManager;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
@ -59,6 +60,10 @@ public class HistoryTemplateListCache implements CallbackEvent {
public void closeSelectedReport(JTemplate<?, ?> selected) { public void closeSelectedReport(JTemplate<?, ?> selected) {
DesignModuleFactory.clearChartPropertyPane(); DesignModuleFactory.clearChartPropertyPane();
DesignTableDataManager.closeTemplate(selected); DesignTableDataManager.closeTemplate(selected);
//直接关闭模板的时候退出权限编辑
if (DesignModeContext.isAuthorityEditing()) {
DesignerContext.getDesignerFrame().closeAuthorityEditing();
}
if (contains(selected) == -1) { if (contains(selected) == -1) {
return; return;
} }

26
designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java

@ -10,6 +10,7 @@ import com.fr.design.DesignState;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.ExtraDesignClassManager; import com.fr.design.ExtraDesignClassManager;
import com.fr.design.actions.core.ActionFactory; import com.fr.design.actions.core.ActionFactory;
import com.fr.design.base.mode.DesignModeContext;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.data.DesignTableDataManager; import com.fr.design.data.DesignTableDataManager;
import com.fr.design.data.datapane.TableDataTreePane; import com.fr.design.data.datapane.TableDataTreePane;
@ -17,6 +18,7 @@ import com.fr.design.env.DesignerWorkspaceInfo;
import com.fr.design.event.DesignerOpenedListener; import com.fr.design.event.DesignerOpenedListener;
import com.fr.design.event.TargetModifiedEvent; import com.fr.design.event.TargetModifiedEvent;
import com.fr.design.event.TargetModifiedListener; import com.fr.design.event.TargetModifiedListener;
import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.file.MutilTempalteTabPane; import com.fr.design.file.MutilTempalteTabPane;
import com.fr.design.file.NewTemplatePane; import com.fr.design.file.NewTemplatePane;
@ -224,16 +226,8 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
} }
public void mouseReleased(MouseEvent e) { public void mouseReleased(MouseEvent e) {
if (DesignerMode.isAuthorityEditing()) { if (DesignModeContext.isAuthorityEditing()) {
DesignerMode.setMode(DesignerMode.NORMAL); closeAuthorityEditing();
WestRegionContainerPane.getInstance().replaceDownPane(
TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter()));
HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().refreshEastPropertiesPane();
DesignerContext.getDesignerFrame().resetToolkitByPlus(
HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().getToolBarMenuDockPlus());
needToAddAuhtorityPaint();
refreshDottedLine();
fireAuthorityStateToNomal();
} }
} }
@ -332,6 +326,18 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
this.progressDialog = new ProgressDialog(this); this.progressDialog = new ProgressDialog(this);
} }
public void closeAuthorityEditing(){
DesignModeContext.switchTo(com.fr.design.base.mode.DesignerMode.NORMAL);
WestRegionContainerPane.getInstance().replaceDownPane(
TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter()));
HistoryTemplateListCache.getInstance().getCurrentEditingTemplate().refreshEastPropertiesPane();
DesignerContext.getDesignerFrame().resetToolkitByPlus(
HistoryTemplateListCache.getInstance().getCurrentEditingTemplate().getToolBarMenuDockPlus());
needToAddAuhtorityPaint();
refreshDottedLine();
fireAuthorityStateToNomal();
}
/** /**
* 注册app. * 注册app.
* *

2
designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java

@ -412,6 +412,8 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
if (propertyItem.isVisible() && propertyItem.isEnabled() && !propertyItem.isPoppedOut()) { if (propertyItem.isVisible() && propertyItem.isEnabled() && !propertyItem.isPoppedOut()) {
propertyCard.show(rightPane, tabName); propertyCard.show(rightPane, tabName);
propertyItem.setTabButtonSelected(); propertyItem.setTabButtonSelected();
//从单元格菜单过来也要关闭弹出窗
hideCurrentPopupPane();
} }
} }

17
designer-realize/src/main/java/com/fr/design/actions/server/StyleListAction.java

@ -10,8 +10,11 @@ import com.fr.design.mainframe.DesignerFrame;
import com.fr.design.menu.MenuKeySet; import com.fr.design.menu.MenuKeySet;
import com.fr.general.IOUtils; import com.fr.general.IOUtils;
import com.fr.transaction.CallBackAdaptor;
import com.fr.transaction.Configurations; import com.fr.transaction.Configurations;
import com.fr.transaction.Worker; import com.fr.transaction.Worker;
import com.fr.transaction.WorkerCallBack;
import com.fr.transaction.WorkerFacade;
import javax.swing.*; import javax.swing.*;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
@ -23,7 +26,7 @@ import java.awt.event.ActionEvent;
public class StyleListAction extends UpdateAction { public class StyleListAction extends UpdateAction {
public StyleListAction() { public StyleListAction() {
this.setMenuKeySet(PREDEFINED_STYLES); this.setMenuKeySet(PREDEFINED_STYLES);
this.setName(getMenuKeySet().getMenuKeySetName()+ "..."); this.setName(getMenuKeySet().getMenuKeySetName() + "...");
this.setMnemonic(getMenuKeySet().getMnemonic()); this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(IOUtils.readIcon("/com/fr/design/images/m_web/style.png")); this.setSmallIcon(IOUtils.readIcon("/com/fr/design/images/m_web/style.png"));
this.generateAndSetSearchText(StyleManagerPane.class.getName()); this.generateAndSetSearchText(StyleManagerPane.class.getName());
@ -31,6 +34,7 @@ public class StyleListAction extends UpdateAction {
/** /**
* 动作 * 动作
*
* @param evt 事件 * @param evt 事件
*/ */
public void actionPerformed(ActionEvent evt) { public void actionPerformed(ActionEvent evt) {
@ -40,24 +44,23 @@ public class StyleListAction extends UpdateAction {
styleListDialog.addDialogActionListener(new DialogActionAdapter() { styleListDialog.addDialogActionListener(new DialogActionAdapter() {
@Override @Override
public void doOk() { public void doOk() {
Configurations.update(new Worker() { Configurations.modify(new WorkerFacade(ServerPreferenceConfig.class) {
@Override @Override
public void run() { public void run() {
styleListPane.update(ServerPreferenceConfig.getInstance()); styleListPane.update(ServerPreferenceConfig.getInstance());
} }
}.addCallBack(new CallBackAdaptor(){
@Override @Override
public Class<? extends Configuration>[] targets() { public void afterCommit() {
return new Class[]{ServerPreferenceConfig.class}; DesignerContext.getDesignerBean("predefinedStyle").refreshBeanElement();
} }
}); }));
} }
}); });
ServerPreferenceConfig mirror = ServerPreferenceConfig.getInstance().mirror(); ServerPreferenceConfig mirror = ServerPreferenceConfig.getInstance().mirror();
styleListPane.populate(mirror); styleListPane.populate(mirror);
styleListDialog.setVisible(true); styleListDialog.setVisible(true);
} }
@Override @Override

16
designer-realize/src/main/java/com/fr/design/present/StyleArrayPane.java

@ -2,6 +2,7 @@ package com.fr.design.present;
import com.fr.base.Style; import com.fr.base.Style;
import com.fr.config.ServerPreferenceConfig; import com.fr.config.ServerPreferenceConfig;
import com.fr.config.StyleMap;
import com.fr.design.gui.controlpane.AbstractNameableCreator; import com.fr.design.gui.controlpane.AbstractNameableCreator;
import com.fr.design.gui.controlpane.JListControlPane; import com.fr.design.gui.controlpane.JListControlPane;
import com.fr.design.gui.controlpane.NameableCreator; import com.fr.design.gui.controlpane.NameableCreator;
@ -13,6 +14,8 @@ import com.fr.design.style.StylePane;
import com.fr.general.NameObject; import com.fr.general.NameObject;
import com.fr.stable.Nameable; import com.fr.stable.Nameable;
import com.fr.transaction.Configurations;
import com.fr.transaction.WorkerAdaptor;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Iterator; import java.util.Iterator;
@ -90,17 +93,16 @@ public class StyleArrayPane extends JListControlPane {
/** /**
* Update. * Update.
*/ */
public void update(ServerPreferenceConfig configManager) { public void update(final ServerPreferenceConfig configManager) {
configManager.clearAllStyle(); //configManager.clearAllStyle();
// Nameable[]居然不能强转成Parameter[],一定要这么写... // Nameable[]居然不能强转成Parameter[],一定要这么写...
Nameable[] nameables = this.update(); Nameable[] nameables = this.update();
final StyleMap styleMap = new StyleMap();
for (int i = 0; i < nameables.length; i++) { for (int i = 0; i < nameables.length; i++) {
configManager.putStyle(((NameObject)nameables[i]).getName(), (Style)((NameObject)nameables[i]).getObject()); styleMap.put(((NameObject)nameables[i]).getName(), (Style)((NameObject)nameables[i]).getObject());
}
DesignerContext.getDesignerBean("predefinedStyle").refreshBeanElement();
} }
configManager.setStyleMap(styleMap);
}
} }

Loading…
Cancel
Save