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.design.DesignerEnvManager;
import com.fr.design.base.mode.DesignModeContext;
import com.fr.design.data.DesignTableDataManager;
import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.DesignerContext;
@ -59,6 +60,10 @@ public class HistoryTemplateListCache implements CallbackEvent {
public void closeSelectedReport(JTemplate<?, ?> selected) {
DesignModuleFactory.clearChartPropertyPane();
DesignTableDataManager.closeTemplate(selected);
//直接关闭模板的时候退出权限编辑
if (DesignModeContext.isAuthorityEditing()) {
DesignerContext.getDesignerFrame().closeAuthorityEditing();
}
if (contains(selected) == -1) {
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.ExtraDesignClassManager;
import com.fr.design.actions.core.ActionFactory;
import com.fr.design.base.mode.DesignModeContext;
import com.fr.design.constants.UIConstants;
import com.fr.design.data.DesignTableDataManager;
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.TargetModifiedEvent;
import com.fr.design.event.TargetModifiedListener;
import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.file.MutilTempalteTabPane;
import com.fr.design.file.NewTemplatePane;
@ -224,16 +226,8 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
}
public void mouseReleased(MouseEvent e) {
if (DesignerMode.isAuthorityEditing()) {
DesignerMode.setMode(DesignerMode.NORMAL);
WestRegionContainerPane.getInstance().replaceDownPane(
TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter()));
HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().refreshEastPropertiesPane();
DesignerContext.getDesignerFrame().resetToolkitByPlus(
HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().getToolBarMenuDockPlus());
needToAddAuhtorityPaint();
refreshDottedLine();
fireAuthorityStateToNomal();
if (DesignModeContext.isAuthorityEditing()) {
closeAuthorityEditing();
}
}
@ -332,6 +326,18 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
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.
*

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()) {
propertyCard.show(rightPane, tabName);
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.general.IOUtils;
import com.fr.transaction.CallBackAdaptor;
import com.fr.transaction.Configurations;
import com.fr.transaction.Worker;
import com.fr.transaction.WorkerCallBack;
import com.fr.transaction.WorkerFacade;
import javax.swing.*;
import java.awt.event.ActionEvent;
@ -23,7 +26,7 @@ import java.awt.event.ActionEvent;
public class StyleListAction extends UpdateAction {
public StyleListAction() {
this.setMenuKeySet(PREDEFINED_STYLES);
this.setName(getMenuKeySet().getMenuKeySetName()+ "...");
this.setName(getMenuKeySet().getMenuKeySetName() + "...");
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(IOUtils.readIcon("/com/fr/design/images/m_web/style.png"));
this.generateAndSetSearchText(StyleManagerPane.class.getName());
@ -31,6 +34,7 @@ public class StyleListAction extends UpdateAction {
/**
* 动作
*
* @param evt 事件
*/
public void actionPerformed(ActionEvent evt) {
@ -40,24 +44,23 @@ public class StyleListAction extends UpdateAction {
styleListDialog.addDialogActionListener(new DialogActionAdapter() {
@Override
public void doOk() {
Configurations.update(new Worker() {
Configurations.modify(new WorkerFacade(ServerPreferenceConfig.class) {
@Override
public void run() {
styleListPane.update(ServerPreferenceConfig.getInstance());
}
}.addCallBack(new CallBackAdaptor(){
@Override
public Class<? extends Configuration>[] targets() {
return new Class[]{ServerPreferenceConfig.class};
public void afterCommit() {
DesignerContext.getDesignerBean("predefinedStyle").refreshBeanElement();
}
});
}));
}
});
ServerPreferenceConfig mirror = ServerPreferenceConfig.getInstance().mirror();
styleListPane.populate(mirror);
styleListDialog.setVisible(true);
}
@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.config.ServerPreferenceConfig;
import com.fr.config.StyleMap;
import com.fr.design.gui.controlpane.AbstractNameableCreator;
import com.fr.design.gui.controlpane.JListControlPane;
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.stable.Nameable;
import com.fr.transaction.Configurations;
import com.fr.transaction.WorkerAdaptor;
import java.util.ArrayList;
import java.util.Iterator;
@ -90,17 +93,16 @@ public class StyleArrayPane extends JListControlPane {
/**
* Update.
*/
public void update(ServerPreferenceConfig configManager) {
configManager.clearAllStyle();
public void update(final ServerPreferenceConfig configManager) {
//configManager.clearAllStyle();
// Nameable[]居然不能强转成Parameter[],一定要这么写...
Nameable[] nameables = this.update();
final StyleMap styleMap = new StyleMap();
for (int i = 0; i < nameables.length; i++) {
configManager.putStyle(((NameObject)nameables[i]).getName(), (Style)((NameObject)nameables[i]).getObject());
}
DesignerContext.getDesignerBean("predefinedStyle").refreshBeanElement();
styleMap.put(((NameObject)nameables[i]).getName(), (Style)((NameObject)nameables[i]).getObject());
}
configManager.setStyleMap(styleMap);
}
}

Loading…
Cancel
Save