Browse Source

Merge pull request #10757 in DESIGN/design from release/11.0 to bugfix/11.0

* commit '2b5601763ff5784b5ccc7fb1e9d61fbd45ed346d':
  REPORT-85600修复一下错误的名称 顺带着改个名字,看着难受
  REPORT-85293【启动优化】起始页新增加载进度条视觉效果确认 全屏效果在 windows 上需要处理一下。
  REPORT-75091 && REPORT-80693 数据脱敏一期&二期 【问题原因】迭代延期,屏蔽功能入口 【改动思路】同上 【review建议】
  REPORT-85293【启动优化】起始页新增加载进度条视觉效果确认 ProgressDialog 用错了,这个只能是使用的时候才创建 不然大小有问题
bugfix/11.0
superman 2 years ago
parent
commit
0c57ea06a6
  1. 8
      designer-base/src/main/java/com/fr/design/actions/file/CloseCurrentTemplateAction.java
  2. 5
      designer-base/src/main/java/com/fr/design/actions/file/RenameAction.java
  3. 4
      designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTablePane.java
  4. 18
      designer-base/src/main/java/com/fr/design/file/HistoryTemplateListCache.java
  5. 43
      designer-base/src/main/java/com/fr/design/file/MultiTemplateTabPane.java
  6. 4
      designer-base/src/main/java/com/fr/design/gui/iprogressbar/ProgressDialog.java
  7. 4
      designer-base/src/main/java/com/fr/design/mainframe/CenterRegionContainerPane.java
  8. 4
      designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java
  9. 10
      designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java
  10. 8
      designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/FileVersionCellEditor.java
  11. 8
      designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/FileVersionsPanel.java
  12. 4
      designer-base/src/main/java/com/fr/design/worker/open/OpenWorker.java
  13. 8
      designer-base/src/main/java/com/fr/nx/app/designer/toolbar/TemplateTransformer.java
  14. 6
      designer-base/src/main/java/com/fr/start/BaseDesigner.java
  15. 4
      designer-base/src/main/java/com/fr/start/common/DesignerOpenEmptyPanel.java
  16. 95
      designer-base/src/main/java/com/fr/startup/ui/StartupPageWindow.java
  17. 4
      designer-form/src/main/java/com/fr/design/fit/common/TemplateTool.java
  18. 4
      designer-form/src/main/java/com/fr/design/preview/DeveloperPreview.java
  19. 7
      designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java
  20. 8
      designer-realize/src/main/java/com/fr/start/MainDesigner.java

8
designer-base/src/main/java/com/fr/design/actions/file/CloseCurrentTemplateAction.java

@ -3,7 +3,7 @@ package com.fr.design.actions.file;
import com.fr.design.actions.UpdateAction; import com.fr.design.actions.UpdateAction;
import com.fr.design.file.HistoryTemplateListCache; 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.MultiTemplateTabPane;
import com.fr.design.mainframe.JTemplate; import com.fr.design.mainframe.JTemplate;
import com.fr.design.menu.KeySetUtils; import com.fr.design.menu.KeySetUtils;
@ -28,9 +28,9 @@ public class CloseCurrentTemplateAction extends UpdateAction {
* @param e 事件 * @param e 事件
*/ */
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
MutilTempalteTabPane.getInstance().setIsCloseCurrent(true); MultiTemplateTabPane.getInstance().setIsCloseCurrent(true);
MutilTempalteTabPane.getInstance().closeFormat(HistoryTemplateListPane.getInstance().getCurrentEditingTemplate()); MultiTemplateTabPane.getInstance().closeFormat(HistoryTemplateListPane.getInstance().getCurrentEditingTemplate());
MutilTempalteTabPane.getInstance().closeSpecifiedTemplate(HistoryTemplateListPane.getInstance().getCurrentEditingTemplate()); MultiTemplateTabPane.getInstance().closeSpecifiedTemplate(HistoryTemplateListPane.getInstance().getCurrentEditingTemplate());
} }
@Override @Override

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

@ -7,7 +7,7 @@ import com.fr.design.actions.UpdateAction;
import com.fr.design.dialog.FineJOptionPane; import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.file.FileOperations; import com.fr.design.file.FileOperations;
import com.fr.design.file.HistoryTemplateListCache; import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.file.MutilTempalteTabPane; import com.fr.design.file.MultiTemplateTabPane;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField; import com.fr.design.gui.itextfield.UITextField;
@ -16,7 +16,6 @@ import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.DesignerFrameFileDealerPane; import com.fr.design.mainframe.DesignerFrameFileDealerPane;
import com.fr.design.mainframe.manager.search.TemplateTreeSearchManager;
import com.fr.design.mainframe.vcs.common.VcsHelper; import com.fr.design.mainframe.vcs.common.VcsHelper;
import com.fr.design.utils.TemplateUtils; import com.fr.design.utils.TemplateUtils;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
@ -89,7 +88,7 @@ public class RenameAction extends UpdateAction {
} }
new FileRenameDialog(node); new FileRenameDialog(node);
MutilTempalteTabPane.getInstance().repaint(); MultiTemplateTabPane.getInstance().repaint();
DesignerFrameFileDealerPane.getInstance().stateChange(); DesignerFrameFileDealerPane.getInstance().stateChange();
} }

4
designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTablePane.java

@ -162,8 +162,10 @@ public class PreviewTablePane extends BasicPane {
JPanel northPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel northPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
// 预览行数面板 // 预览行数面板
northPane.add(initPreviewNumberPane(), BorderLayout.CENTER); northPane.add(initPreviewNumberPane(), BorderLayout.CENTER);
/// 迭代延期,暂时屏蔽下功能入口
// 脱敏预览设置面板 // 脱敏预览设置面板
northPane.add(initDesensitizationPane(), BorderLayout.EAST); // northPane.add(initDesensitizationPane(), BorderLayout.EAST);
initDesensitizationPane();
return northPane; return northPane;
} }

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

@ -75,7 +75,7 @@ public class HistoryTemplateListCache implements CallbackEvent {
historyList.remove(contains(selected)); historyList.remove(contains(selected));
selected.getEditingFILE().closeTemplate(); selected.getEditingFILE().closeTemplate();
FineLoggerFactory.getLogger().info(Toolkit.i18nText("Fine-Design_Basic_Template_Closed_Warn_Text", selected.getEditingFILE().getName())); FineLoggerFactory.getLogger().info(Toolkit.i18nText("Fine-Design_Basic_Template_Closed_Warn_Text", selected.getEditingFILE().getName()));
MutilTempalteTabPane.getInstance().refreshOpenedTemplate(historyList); MultiTemplateTabPane.getInstance().refreshOpenedTemplate(historyList);
} catch (Exception e) { } catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e); FineLoggerFactory.getLogger().error(e.getMessage(), e);
} }
@ -134,10 +134,10 @@ public class HistoryTemplateListCache implements CallbackEvent {
if (contains(jt) == -1) { if (contains(jt) == -1) {
addHistory(); addHistory();
} }
MutilTempalteTabPane.getInstance().refreshOpenedTemplate(historyList); MultiTemplateTabPane.getInstance().refreshOpenedTemplate(historyList);
//设置tab栏为当前选中的那一栏 //设置tab栏为当前选中的那一栏
if (editingTemplate != null) { if (editingTemplate != null) {
MutilTempalteTabPane.getInstance().setSelectedIndex(contains(jt)); MultiTemplateTabPane.getInstance().setSelectedIndex(contains(jt));
} }
} }
@ -274,7 +274,7 @@ public class HistoryTemplateListCache implements CallbackEvent {
historyList.set(i, new JVirtualTemplate(overTemplate.getEditingFILE())); historyList.set(i, new JVirtualTemplate(overTemplate.getEditingFILE()));
} }
} }
MutilTempalteTabPane.getInstance().refreshOpenedTemplate(historyList); MultiTemplateTabPane.getInstance().refreshOpenedTemplate(historyList);
} }
@ -297,7 +297,7 @@ public class HistoryTemplateListCache implements CallbackEvent {
int index = iterator.nextIndex(); int index = iterator.nextIndex();
if (size == index + 1 && index > 0) { if (size == index + 1 && index > 0) {
//如果删除的是后一个Tab,则定位到前一个 //如果删除的是后一个Tab,则定位到前一个
MutilTempalteTabPane.getInstance().setSelectedIndex(index - 1); MultiTemplateTabPane.getInstance().setSelectedIndex(index - 1);
} }
} }
} }
@ -307,13 +307,13 @@ public class HistoryTemplateListCache implements CallbackEvent {
DesignerContext.getDesignerFrame().addAndActivateJTemplate(); DesignerContext.getDesignerFrame().addAndActivateJTemplate();
} }
JTemplate selectedFile = MutilTempalteTabPane.getInstance().getSelectedFile(); JTemplate selectedFile = MultiTemplateTabPane.getInstance().getSelectedFile();
if (!isCurrentEditingFile(selectedFile.getPath())) { if (!isCurrentEditingFile(selectedFile.getPath())) {
//如果此时面板上的实时刷新的selectedIndex得到的和历史的不一样 //如果此时面板上的实时刷新的selectedIndex得到的和历史的不一样
DesignerContext.getDesignerFrame().activateJTemplate(selectedFile); DesignerContext.getDesignerFrame().activateJTemplate(selectedFile);
} }
MutilTempalteTabPane.getInstance().repaint(); MultiTemplateTabPane.getInstance().repaint();
} }
@ -474,7 +474,7 @@ public class HistoryTemplateListCache implements CallbackEvent {
int index = contains(this.editingTemplate); int index = contains(this.editingTemplate);
this.editingTemplate = jt; this.editingTemplate = jt;
historyList.set(index, jt); historyList.set(index, jt);
MutilTempalteTabPane.getInstance().refreshOpenedTemplate(historyList); MultiTemplateTabPane.getInstance().refreshOpenedTemplate(historyList);
MutilTempalteTabPane.getInstance().setSelectedIndex(contains(jt)); MultiTemplateTabPane.getInstance().setSelectedIndex(contains(jt));
} }
} }

43
designer-base/src/main/java/com/fr/design/file/MutilTempalteTabPane.java → designer-base/src/main/java/com/fr/design/file/MultiTemplateTabPane.java

@ -18,14 +18,13 @@ import com.fr.design.mainframe.JTemplate;
import com.fr.design.mainframe.TemplateSavingChecker; import com.fr.design.mainframe.TemplateSavingChecker;
import com.fr.design.mainframe.manager.search.TemplateTreeSearchManager; import com.fr.design.mainframe.manager.search.TemplateTreeSearchManager;
import com.fr.design.utils.DesignUtils; import com.fr.design.utils.DesignUtils;
import com.fr.design.utils.TemplateUtils;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.design.utils.gui.GUIPaintUtils; import com.fr.design.utils.gui.GUIPaintUtils;
import com.fr.design.worker.WorkerManager; import com.fr.design.worker.WorkerManager;
import com.fr.design.utils.TemplateUtils;
import com.fr.design.worker.save.CallbackSaveWorker; import com.fr.design.worker.save.CallbackSaveWorker;
import com.fr.file.FILE; import com.fr.file.FILE;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.GeneralContext;
import com.fr.general.IOUtils; import com.fr.general.IOUtils;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.stable.Constants; import com.fr.stable.Constants;
@ -69,7 +68,6 @@ import java.awt.geom.Line2D;
import java.awt.geom.Path2D; import java.awt.geom.Path2D;
import java.awt.geom.RoundRectangle2D; import java.awt.geom.RoundRectangle2D;
import java.util.List; import java.util.List;
import java.util.Locale;
import static com.fr.design.dialog.FineJOptionPane.showConfirmDialog; import static com.fr.design.dialog.FineJOptionPane.showConfirmDialog;
import static javax.swing.JOptionPane.OK_CANCEL_OPTION; import static javax.swing.JOptionPane.OK_CANCEL_OPTION;
@ -77,11 +75,14 @@ import static javax.swing.JOptionPane.OK_OPTION;
import static javax.swing.JOptionPane.WARNING_MESSAGE; import static javax.swing.JOptionPane.WARNING_MESSAGE;
/** /**
* Author : daisy * 改个名字一个拼写 n 个错误
* Date: 13-8-5 *
* Time: 下午6:12 * @author daisy
*/ * @version 11.0
public class MutilTempalteTabPane extends JComponent { * <p>
* created by daisy on 2013/08/05
**/
public class MultiTemplateTabPane extends JComponent {
private static Icon LIST_DOWN = BaseUtils.readIcon("/com/fr/design/images/buttonicon/list_normal.png"); private static Icon LIST_DOWN = BaseUtils.readIcon("/com/fr/design/images/buttonicon/list_normal.png");
private static Icon MOUSE_OVER_LIST_DOWN = BaseUtils.readIcon("/com/fr/design/images/buttonicon/list_pressed.png"); private static Icon MOUSE_OVER_LIST_DOWN = BaseUtils.readIcon("/com/fr/design/images/buttonicon/list_pressed.png");
@ -110,7 +111,7 @@ public class MutilTempalteTabPane extends JComponent {
private static final int MINWIDTH = 100; private static final int MINWIDTH = 100;
private static MutilTempalteTabPane THIS; private static MultiTemplateTabPane THIS;
//用于存放工作簿 //用于存放工作簿
private java.util.List<JTemplate<?, ?>> openedTemplate; private java.util.List<JTemplate<?, ?>> openedTemplate;
//选中的Tab项 //选中的Tab项
@ -144,9 +145,9 @@ public class MutilTempalteTabPane extends JComponent {
private JTemplate<?, ?> temTemplate = null; private JTemplate<?, ?> temTemplate = null;
public static MutilTempalteTabPane getInstance() { public static MultiTemplateTabPane getInstance() {
if (THIS == null) { if (THIS == null) {
THIS = new MutilTempalteTabPane(); THIS = new MultiTemplateTabPane();
} }
return THIS; return THIS;
} }
@ -155,7 +156,7 @@ public class MutilTempalteTabPane extends JComponent {
/** /**
* 多工作簿面板 * 多工作簿面板
*/ */
public MutilTempalteTabPane() { public MultiTemplateTabPane() {
this.setLayout(new BorderLayout(0, 0)); this.setLayout(new BorderLayout(0, 0));
this.addMouseListener(new MultiTemplateTabMouseListener()); this.addMouseListener(new MultiTemplateTabMouseListener());
this.addMouseMotionListener(new MultiTemplateTabMouseMotionListener()); this.addMouseMotionListener(new MultiTemplateTabMouseMotionListener());
@ -169,7 +170,7 @@ public class MutilTempalteTabPane extends JComponent {
public void eventDispatched(AWTEvent event) { public void eventDispatched(AWTEvent event) {
if (event instanceof MouseEvent) { if (event instanceof MouseEvent) {
MouseEvent mv = (MouseEvent) event; MouseEvent mv = (MouseEvent) event;
if (mv.getClickCount() > 0 && !ComparatorUtils.equals(mv.getSource(), MutilTempalteTabPane.this)) { if (mv.getClickCount() > 0 && !ComparatorUtils.equals(mv.getSource(), MultiTemplateTabPane.this)) {
isShowList = false; isShowList = false;
} }
} }
@ -203,7 +204,7 @@ public class MutilTempalteTabPane extends JComponent {
//根据当前i18n语言环境,动态调整popupMenu的宽度 //根据当前i18n语言环境,动态调整popupMenu的宽度
menu.setPreferredSize(new Dimension((int) DesignSizeI18nManager.getInstance(). menu.setPreferredSize(new Dimension((int) DesignSizeI18nManager.getInstance().
i18nDimension("com.fr.design.file.MultiTemplateTabPane.popUpMenu").getWidth(), height)); i18nDimension("com.fr.design.file.MultiTemplateTabPane.popUpMenu").getWidth(), height));
GUICoreUtils.showPopupMenu(menu, MutilTempalteTabPane.getInstance(), e.getX(), MutilTempalteTabPane.getInstance().getY() - 1 + MutilTempalteTabPane.getInstance().getHeight()); GUICoreUtils.showPopupMenu(menu, MultiTemplateTabPane.getInstance(), e.getX(), MultiTemplateTabPane.getInstance().getY() - 1 + MultiTemplateTabPane.getInstance().getHeight());
} }
} }
} }
@ -335,7 +336,7 @@ public class MutilTempalteTabPane extends JComponent {
DesignerContext.getDesignerFrame().activateJTemplate(currentTemplate); DesignerContext.getDesignerFrame().activateJTemplate(currentTemplate);
} }
MutilTempalteTabPane.getInstance().repaint(); MultiTemplateTabPane.getInstance().repaint();
} }
} }
@ -349,7 +350,7 @@ public class MutilTempalteTabPane extends JComponent {
//判断关闭的模板是不是格式刷的被参照的模板 //判断关闭的模板是不是格式刷的被参照的模板
openedTemplate.remove(jTemplate); openedTemplate.remove(jTemplate);
if (jTemplate != currentTemplate) { if (jTemplate != currentTemplate) {
MutilTempalteTabPane.getInstance().closeFormat(jTemplate); MultiTemplateTabPane.getInstance().closeFormat(jTemplate);
HistoryTemplateListCache.getInstance().closeSelectedReport(jTemplate); HistoryTemplateListCache.getInstance().closeSelectedReport(jTemplate);
closeAndFreeLock(jTemplate); closeAndFreeLock(jTemplate);
} }
@ -530,7 +531,7 @@ public class MutilTempalteTabPane extends JComponent {
for (int i = 0; i < items.length; i++) { for (int i = 0; i < items.length; i++) {
menu.add(items[i]); menu.add(items[i]);
} }
GUICoreUtils.showPopupMenu(menu, MutilTempalteTabPane.getInstance(), MutilTempalteTabPane.getInstance().getWidth() - menu.getPreferredSize().width, getY() - 1 + getHeight()); GUICoreUtils.showPopupMenu(menu, MultiTemplateTabPane.getInstance(), MultiTemplateTabPane.getInstance().getWidth() - menu.getPreferredSize().width, getY() - 1 + getHeight());
} }
@ -1106,7 +1107,7 @@ public class MutilTempalteTabPane extends JComponent {
listDownMode = LIST_DOWN; listDownMode = LIST_DOWN;
closeIconIndex = -1; closeIconIndex = -1;
mouseOveredIndex = -1; mouseOveredIndex = -1;
MutilTempalteTabPane.this.repaint(); MultiTemplateTabPane.this.repaint();
} }
/** /**
@ -1185,7 +1186,7 @@ public class MutilTempalteTabPane extends JComponent {
DesignerContext.getDesignerFrame().addAndActivateJTemplate(openedTemplate.get(tempSelectedIndex)); DesignerContext.getDesignerFrame().addAndActivateJTemplate(openedTemplate.get(tempSelectedIndex));
FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Toolkit.i18nText("Fine-Design_Basic_Form_Authority_Edited_Cannot_Be_Supported") FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Toolkit.i18nText("Fine-Design_Basic_Form_Authority_Edited_Cannot_Be_Supported")
+ "!", Toolkit.i18nText("Fine-Design_Basic_Alert"), JOptionPane.WARNING_MESSAGE); + "!", Toolkit.i18nText("Fine-Design_Basic_Alert"), JOptionPane.WARNING_MESSAGE);
MutilTempalteTabPane.this.repaint(); MultiTemplateTabPane.this.repaint();
return; return;
} }
JTemplate evtXTemplate = openedTemplate.get(getTemplateIndex(evtX)); JTemplate evtXTemplate = openedTemplate.get(getTemplateIndex(evtX));
@ -1193,7 +1194,7 @@ public class MutilTempalteTabPane extends JComponent {
} }
isShowList = false; isShowList = false;
} }
MutilTempalteTabPane.this.repaint(); MultiTemplateTabPane.this.repaint();
} }
@ -1234,7 +1235,7 @@ public class MutilTempalteTabPane extends JComponent {
boolean isOverCloseIcon = isOverCloseIcon(evtX); boolean isOverCloseIcon = isOverCloseIcon(evtX);
clodeMode = isOverCloseIcon ? MOUSE_OVER_CLOSE : CLOSE; clodeMode = isOverCloseIcon ? MOUSE_OVER_CLOSE : CLOSE;
closeIconIndex = isOverCloseIcon ? mouseOveredIndex : -1; closeIconIndex = isOverCloseIcon ? mouseOveredIndex : -1;
MutilTempalteTabPane.this.repaint(); MultiTemplateTabPane.this.repaint();
} }
} }

4
designer-base/src/main/java/com/fr/design/gui/iprogressbar/ProgressDialog.java

@ -21,8 +21,8 @@ import java.awt.Frame;
/** /**
* 加载进度弹窗 * 加载进度弹窗
* <em>使用注意点:</em> * <em>使用注意点:</em>
* 1-需要等到 父frame 启动好之后才能启动进度条 * 必须到使用时再初始化不要作为属性存在
* 2-或者到使用时再初始化不要作为属性存在 * 因为涉及到 大小/位置 相对于 parent 的相对判断
* {@link com.fr.design.gui.iprogressbar.ProgressDialogTest} * {@link com.fr.design.gui.iprogressbar.ProgressDialogTest}
*/ */
public class ProgressDialog extends UIDialog { public class ProgressDialog extends UIDialog {

4
designer-base/src/main/java/com/fr/design/mainframe/CenterRegionContainerPane.java

@ -4,7 +4,7 @@ import com.fr.design.DesignState;
import com.fr.design.base.mode.DesignModeContext; import com.fr.design.base.mode.DesignModeContext;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.file.HistoryTemplateListCache; import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.file.MutilTempalteTabPane; import com.fr.design.file.MultiTemplateTabPane;
import com.fr.design.file.NewTemplatePane; import com.fr.design.file.NewTemplatePane;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.imenu.UIMenuHighLight; import com.fr.design.gui.imenu.UIMenuHighLight;
@ -87,7 +87,7 @@ public class CenterRegionContainerPane extends JPanel {
eastCenterPane.add(combineUp, BorderLayout.NORTH); eastCenterPane.add(combineUp, BorderLayout.NORTH);
templateTabPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); templateTabPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
templateTabPane.add(newWorkBookPane = getToolBarMenuDock().getNewTemplatePane(), BorderLayout.WEST); templateTabPane.add(newWorkBookPane = getToolBarMenuDock().getNewTemplatePane(), BorderLayout.WEST);
templateTabPane.add(MutilTempalteTabPane.getInstance(), BorderLayout.CENTER); templateTabPane.add(MultiTemplateTabPane.getInstance(), BorderLayout.CENTER);
eastCenterPane.add(templateTabPane, BorderLayout.CENTER); eastCenterPane.add(templateTabPane, BorderLayout.CENTER);
eastPane.add(eastCenterPane, BorderLayout.CENTER); eastPane.add(eastCenterPane, BorderLayout.CENTER);

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

@ -21,7 +21,7 @@ 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.HistoryTemplateListCache;
import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.file.MutilTempalteTabPane; import com.fr.design.file.MultiTemplateTabPane;
import com.fr.design.file.SaveSomeTemplatePane; import com.fr.design.file.SaveSomeTemplatePane;
import com.fr.design.file.TemplateTreePane; import com.fr.design.file.TemplateTreePane;
import com.fr.design.fun.OemProcessor; import com.fr.design.fun.OemProcessor;
@ -1110,7 +1110,7 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
// 新的form不往前兼容 // 新的form不往前兼容
if (inValidDesigner(jt)) { if (inValidDesigner(jt)) {
this.addAndActivateJTemplate(); this.addAndActivateJTemplate();
MutilTempalteTabPane.getInstance().setTemTemplate( MultiTemplateTabPane.getInstance().setTemTemplate(
HistoryTemplateListCache.getInstance().getCurrentEditingTemplate()); HistoryTemplateListCache.getInstance().getCurrentEditingTemplate());
} else { } else {
this.addAndActivateJTemplate(jt); this.addAndActivateJTemplate(jt);

10
designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java

@ -21,7 +21,7 @@ import com.fr.design.file.FileOperations;
import com.fr.design.file.FileToolbarStateChangeListener; import com.fr.design.file.FileToolbarStateChangeListener;
import com.fr.design.file.HistoryTemplateListCache; 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.MultiTemplateTabPane;
import com.fr.design.file.TemplateTreePane; import com.fr.design.file.TemplateTreePane;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
@ -275,7 +275,7 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt
TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter()); TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter());
HistoryTemplateListPane.getInstance().setCurrentEditingTemplate(jt); HistoryTemplateListPane.getInstance().setCurrentEditingTemplate(jt);
//处理自动新建的模板 //处理自动新建的模板
MutilTempalteTabPane.getInstance().doWithtemTemplate(); MultiTemplateTabPane.getInstance().doWithtemTemplate();
if (DesignerMode.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
RolesAlreadyEditedPane.getInstance().refreshDockingView(); RolesAlreadyEditedPane.getInstance().refreshDockingView();
} }
@ -547,10 +547,10 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt
for (JTemplate jTemplate : HistoryTemplateListCache.getInstance().getHistoryList()) { for (JTemplate jTemplate : HistoryTemplateListCache.getInstance().getHistoryList()) {
if (ComparatorUtils.equals(jTemplate.getEditingFILE().getPath(), path)) { if (ComparatorUtils.equals(jTemplate.getEditingFILE().getPath(), path)) {
if (isCurrentEditing) { if (isCurrentEditing) {
MutilTempalteTabPane.getInstance().setIsCloseCurrent(true); MultiTemplateTabPane.getInstance().setIsCloseCurrent(true);
} }
MutilTempalteTabPane.getInstance().closeFormat(jTemplate); MultiTemplateTabPane.getInstance().closeFormat(jTemplate);
MutilTempalteTabPane.getInstance().closeSpecifiedTemplate(jTemplate); MultiTemplateTabPane.getInstance().closeSpecifiedTemplate(jTemplate);
return; return;
} }
} }

8
designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/FileVersionCellEditor.java

@ -1,7 +1,7 @@
package com.fr.design.mainframe.vcs.ui; package com.fr.design.mainframe.vcs.ui;
import com.fr.design.file.HistoryTemplateListCache; import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.file.MutilTempalteTabPane; import com.fr.design.file.MultiTemplateTabPane;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.DesignerFrameFileDealerPane; import com.fr.design.mainframe.DesignerFrameFileDealerPane;
import com.fr.design.mainframe.JTemplate; import com.fr.design.mainframe.JTemplate;
@ -57,9 +57,9 @@ public class FileVersionCellEditor extends AbstractCellEditor implements TableCe
jt.stopEditing(); jt.stopEditing();
//只有模板路径一致时关闭当前模板 //只有模板路径一致时关闭当前模板
if (ComparatorUtils.equals(fileOfVersion, jt.getPath())) { if (ComparatorUtils.equals(fileOfVersion, jt.getPath())) {
MutilTempalteTabPane.getInstance().setIsCloseCurrent(true); MultiTemplateTabPane.getInstance().setIsCloseCurrent(true);
MutilTempalteTabPane.getInstance().closeFormat(jt); MultiTemplateTabPane.getInstance().closeFormat(jt);
MutilTempalteTabPane.getInstance().closeSpecifiedTemplate(jt); MultiTemplateTabPane.getInstance().closeSpecifiedTemplate(jt);
} }
//再打开cache中的模板 //再打开cache中的模板

8
designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/FileVersionsPanel.java

@ -5,7 +5,7 @@ import com.fr.design.base.mode.DesignModeContext;
import com.fr.design.base.mode.DesignerMode; import com.fr.design.base.mode.DesignerMode;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.design.file.HistoryTemplateListCache; import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.file.MutilTempalteTabPane; import com.fr.design.file.MultiTemplateTabPane;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
@ -115,9 +115,9 @@ public class FileVersionsPanel extends BasicPane {
// 关闭当前打开的版本 // 关闭当前打开的版本
JTemplate<?, ?> jt = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); JTemplate<?, ?> jt = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate();
MutilTempalteTabPane.getInstance().setIsCloseCurrent(true); MultiTemplateTabPane.getInstance().setIsCloseCurrent(true);
MutilTempalteTabPane.getInstance().closeFormat(jt); MultiTemplateTabPane.getInstance().closeFormat(jt);
MutilTempalteTabPane.getInstance().closeSpecifiedTemplate(jt); MultiTemplateTabPane.getInstance().closeSpecifiedTemplate(jt);
updateDesignerFrame(true); updateDesignerFrame(true);

4
designer-base/src/main/java/com/fr/design/worker/open/OpenWorker.java

@ -3,7 +3,7 @@ package com.fr.design.worker.open;
import com.fr.base.chart.exception.ChartNotFoundException; import com.fr.base.chart.exception.ChartNotFoundException;
import com.fr.design.dialog.FineJOptionPane; import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.file.HistoryTemplateListCache; import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.file.MutilTempalteTabPane; import com.fr.design.file.MultiTemplateTabPane;
import com.fr.design.file.TemplateTreePane; import com.fr.design.file.TemplateTreePane;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.design.lock.LockInfoDialog; import com.fr.design.lock.LockInfoDialog;
@ -87,7 +87,7 @@ public class OpenWorker<T> extends SwingWorker<T, Void> {
UIManager.getIcon("OptionPane.errorIcon")); UIManager.getIcon("OptionPane.errorIcon"));
} }
if (cause.getCause() instanceof TplLockedException) { if (cause.getCause() instanceof TplLockedException) {
MutilTempalteTabPane.getInstance().closeCurrentTpl(); MultiTemplateTabPane.getInstance().closeCurrentTpl();
TemplateTreePane.getInstance().getFileNode().setLock(UUID.randomUUID().toString()); TemplateTreePane.getInstance().getFileNode().setLock(UUID.randomUUID().toString());
LockInfoDialog.show(null); LockInfoDialog.show(null);
} }

8
designer-base/src/main/java/com/fr/nx/app/designer/toolbar/TemplateTransformer.java

@ -2,7 +2,7 @@ package com.fr.nx.app.designer.toolbar;
import com.fr.base.extension.FileExtension; import com.fr.base.extension.FileExtension;
import com.fr.design.file.HistoryTemplateListCache; import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.file.MutilTempalteTabPane; import com.fr.design.file.MultiTemplateTabPane;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.JTemplate; import com.fr.design.mainframe.JTemplate;
import com.fr.file.FILE; import com.fr.file.FILE;
@ -103,9 +103,9 @@ public enum TemplateTransformer {
DesignerContext.getDesignerFrame().openTemplate(file); DesignerContext.getDesignerFrame().openTemplate(file);
return; return;
} }
MutilTempalteTabPane.getInstance().setIsCloseCurrent(true); MultiTemplateTabPane.getInstance().setIsCloseCurrent(true);
MutilTempalteTabPane.getInstance().closeFormat(jt); MultiTemplateTabPane.getInstance().closeFormat(jt);
MutilTempalteTabPane.getInstance().closeSpecifiedTemplate(jt); MultiTemplateTabPane.getInstance().closeSpecifiedTemplate(jt);
DesignerContext.getDesignerFrame().openTemplate(file); DesignerContext.getDesignerFrame().openTemplate(file);
} }

6
designer-base/src/main/java/com/fr/start/BaseDesigner.java

@ -8,7 +8,7 @@ import com.fr.design.DesignerEnvManager;
import com.fr.design.ExtraDesignClassManager; import com.fr.design.ExtraDesignClassManager;
import com.fr.design.constants.DesignerLaunchStatus; import com.fr.design.constants.DesignerLaunchStatus;
import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.file.MutilTempalteTabPane; import com.fr.design.file.MultiTemplateTabPane;
import com.fr.design.file.TemplateTreePane; import com.fr.design.file.TemplateTreePane;
import com.fr.design.fun.DesignerStartOpenFileProcessor; import com.fr.design.fun.DesignerStartOpenFileProcessor;
import com.fr.design.fun.impl.DesignerStartWithEmptyFile; import com.fr.design.fun.impl.DesignerStartWithEmptyFile;
@ -193,7 +193,7 @@ public abstract class BaseDesigner extends ToolBarMenuDock {
} else { } else {
df.addAndActivateJTemplate(); df.addAndActivateJTemplate();
// 如果没有模板,则需要确认一下 // 如果没有模板,则需要确认一下
MutilTempalteTabPane.getInstance().setTemTemplate(HistoryTemplateListPane.getInstance().getCurrentEditingTemplate()); MultiTemplateTabPane.getInstance().setTemTemplate(HistoryTemplateListPane.getInstance().getCurrentEditingTemplate());
} }
} }
@ -253,7 +253,7 @@ public abstract class BaseDesigner extends ToolBarMenuDock {
private boolean createNewTemplate(DesignerFrame df) { private boolean createNewTemplate(DesignerFrame df) {
df.addAndActivateJTemplate(); df.addAndActivateJTemplate();
// 如果没有模板,则需要确认一下 // 如果没有模板,则需要确认一下
MutilTempalteTabPane.getInstance().setTemTemplate(HistoryTemplateListPane.getInstance().getCurrentEditingTemplate()); MultiTemplateTabPane.getInstance().setTemTemplate(HistoryTemplateListPane.getInstance().getCurrentEditingTemplate());
return true; return true;
} }

4
designer-base/src/main/java/com/fr/start/common/DesignerOpenEmptyPanel.java

@ -3,7 +3,7 @@ package com.fr.start.common;
import com.fr.base.svg.IconUtils; import com.fr.base.svg.IconUtils;
import com.fr.design.file.HistoryTemplateListCache; 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.MultiTemplateTabPane;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.DesignSizeI18nManager; import com.fr.design.i18n.DesignSizeI18nManager;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
@ -59,7 +59,7 @@ public class DesignerOpenEmptyPanel extends JPanel {
HistoryTemplateListCache.getInstance().setCurrentEditingTemplate(null); HistoryTemplateListCache.getInstance().setCurrentEditingTemplate(null);
df.addAndActivateJTemplate(); df.addAndActivateJTemplate();
// 如果没有模板,则需要确认一下 // 如果没有模板,则需要确认一下
MutilTempalteTabPane.getInstance().setTemTemplate(HistoryTemplateListPane.getInstance().getCurrentEditingTemplate()); MultiTemplateTabPane.getInstance().setTemTemplate(HistoryTemplateListPane.getInstance().getCurrentEditingTemplate());
} }
}); });
createButton.setBorder(new EmptyBorder(0, 10, 0, 10)); createButton.setBorder(new EmptyBorder(0, 10, 0, 10));

95
designer-base/src/main/java/com/fr/startup/ui/StartupPageWindow.java

@ -11,12 +11,14 @@ import com.fr.design.layout.VerticalFlowLayout;
import com.fr.design.ui.util.UIUtil; import com.fr.design.ui.util.UIUtil;
import com.fr.design.utils.ColorUtils; import com.fr.design.utils.ColorUtils;
import com.fr.design.utils.ThemeUtils; import com.fr.design.utils.ThemeUtils;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.exit.DesignerExiter; import com.fr.exit.DesignerExiter;
import com.fr.general.GeneralUtils; import com.fr.general.GeneralUtils;
import com.fr.general.IOUtils; import com.fr.general.IOUtils;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.stable.ProductConstants; import com.fr.stable.ProductConstants;
import com.fr.stable.collections.CollectionUtils; import com.fr.stable.collections.CollectionUtils;
import com.fr.stable.os.OperatingSystem;
import com.fr.start.common.DesignerStartupContext; import com.fr.start.common.DesignerStartupContext;
import com.fr.startup.metric.DesignerMetrics; import com.fr.startup.metric.DesignerMetrics;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
@ -56,9 +58,6 @@ import java.util.Map;
**/ **/
public class StartupPageWindow extends JFrame { public class StartupPageWindow extends JFrame {
private static final int CONTENT_LAYER = 0;
private static final int TRANSPARENT_LAYER = 1;
private static final Color HOVER_COLOR = new Color(65, 155, 249); private static final Color HOVER_COLOR = new Color(65, 155, 249);
private static final Color SEP_COLOR = new Color(224, 224, 225); private static final Color SEP_COLOR = new Color(224, 224, 225);
@ -81,8 +80,6 @@ public class StartupPageWindow extends JFrame {
private JPanel body; private JPanel body;
private StartupLoadingPanel loadingPanel;
public StartupPageWindow(StartupPageModel pageModel) { public StartupPageWindow(StartupPageModel pageModel) {
patchUIAction(pageModel); patchUIAction(pageModel);
@ -102,9 +99,6 @@ public class StartupPageWindow extends JFrame {
setFullScreen(); setFullScreen();
// 必须放最后
// 见 https://work.fineres.com/browse/REPORT-85293
loadingPanel = new StartupLoadingPanel(this);
} }
private void initCenter(StartupPageModel pageModel) { private void initCenter(StartupPageModel pageModel) {
@ -181,11 +175,18 @@ public class StartupPageWindow extends JFrame {
return headerPanel; return headerPanel;
} }
/**
* 1-mac启动时全屏
* 2-windows 则居中处理
*/
private void setFullScreen() { private void setFullScreen() {
Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize(); if (OperatingSystem.isMacos()) {
this.setLocation(0, 0); this.setLocation(0, 0);
this.setSize(screenSize.width, screenSize.height); this.setSize(SCREEN_SIZE.width, SCREEN_SIZE.height);
} else {
GUICoreUtils.setWindowFullScreen(this);
}
} }
private void addDefaultListeners() { private void addDefaultListeners() {
@ -232,45 +233,49 @@ public class StartupPageWindow extends JFrame {
private void enterWorkspace(Runnable action) { private void enterWorkspace(Runnable action) {
UIUtil.invokeAndWaitIfNeeded(() -> { UIUtil.invokeAndWaitIfNeeded(() -> {
// 必须直接初始化
// 见 https://work.fineres.com/browse/REPORT-85293
StartupLoadingPanel loadingPanel = new StartupLoadingPanel(this);
loadingPanel.show(); loadingPanel.show();
setEnabled(false); setEnabled(false);
});
SwingWorker<Void, Void> task = new SwingWorker<Void, Void>() { SwingWorker<Void, Void> task = new SwingWorker<Void, Void>() {
@Override @Override
protected Void doInBackground() throws Exception { protected Void doInBackground() throws Exception {
action.run(); action.run();
return null; return null;
} }
@Override @Override
protected void done() { protected void done() {
try { try {
Void result = get(); Void result = get();
setVisible(false); setVisible(false);
} catch (Exception e) { } catch (Exception e) {
// 处理错误 // 处理错误
UIUtil.invokeLaterIfNeeded(() -> { UIUtil.invokeLaterIfNeeded(() -> {
UIExpandDialog.Builder() UIExpandDialog.Builder()
.owner(StartupPageWindow.this) .owner(StartupPageWindow.this)
.title(Toolkit.i18nText("Fine-Design_Basic_Remote_Env_Try")) .title(Toolkit.i18nText("Fine-Design_Basic_Remote_Env_Try"))
.message(Toolkit.i18nText("Fine-Design_Basic_Connection_Failed")) .message(Toolkit.i18nText("Fine-Design_Basic_Connection_Failed"))
.messageType(UIExpandDialog.WARNING_MESSAGE) .messageType(UIExpandDialog.WARNING_MESSAGE)
.detail(e.getMessage()) .detail(e.getMessage())
.expand(true) .expand(true)
.modal(false) .modal(false)
.build() .build()
.setVisible(true); .setVisible(true);
setEnabled(true); setEnabled(true);
}); });
FineLoggerFactory.getLogger().error(e.getMessage(), e); FineLoggerFactory.getLogger().error(e.getMessage(), e);
} finally { } finally {
loadingPanel.hide(); loadingPanel.hide();
}
} }
} };
}; task.execute();
task.execute(); });
} }
private JPanel generateRecentOpenPanel(StartupPageModel pageModel) { private JPanel generateRecentOpenPanel(StartupPageModel pageModel) {

4
designer-form/src/main/java/com/fr/design/fit/common/TemplateTool.java

@ -1,7 +1,7 @@
package com.fr.design.fit.common; package com.fr.design.fit.common;
import com.fr.design.file.HistoryTemplateListCache; import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.file.MutilTempalteTabPane; import com.fr.design.file.MultiTemplateTabPane;
import com.fr.design.fit.NewJForm; import com.fr.design.fit.NewJForm;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.JTemplate; import com.fr.design.mainframe.JTemplate;
@ -86,7 +86,7 @@ public class TemplateTool {
JTemplate oldJTemplate = jTemplateList.get(i); JTemplate oldJTemplate = jTemplateList.get(i);
if (oldJTemplate != null && ComparatorUtils.equals(oldJTemplate.getEditingFILE(), newJTemplate.getEditingFILE())) { if (oldJTemplate != null && ComparatorUtils.equals(oldJTemplate.getEditingFILE(), newJTemplate.getEditingFILE())) {
jTemplateList.set(i, newJTemplate); jTemplateList.set(i, newJTemplate);
MutilTempalteTabPane.getInstance().refreshOpenedTemplate(jTemplateList); MultiTemplateTabPane.getInstance().refreshOpenedTemplate(jTemplateList);
return; return;
} }
} }

4
designer-form/src/main/java/com/fr/design/preview/DeveloperPreview.java

@ -1,7 +1,7 @@
package com.fr.design.preview; package com.fr.design.preview;
import com.fr.design.file.HistoryTemplateListCache; import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.file.MutilTempalteTabPane; import com.fr.design.file.MultiTemplateTabPane;
import com.fr.design.fun.impl.AbstractPreviewProvider; import com.fr.design.fun.impl.AbstractPreviewProvider;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.JForm; import com.fr.design.mainframe.JForm;
@ -66,7 +66,7 @@ public class DeveloperPreview extends AbstractPreviewProvider {
} }
private void onPreview(JTemplate<?, ?> jt) { private void onPreview(JTemplate<?, ?> jt) {
MutilTempalteTabPane.getInstance().closeCurrentTpl(); MultiTemplateTabPane.getInstance().closeCurrentTpl();
jt.generateForBiddenTemplate(); jt.generateForBiddenTemplate();
} }

7
designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java

@ -6,8 +6,6 @@ import com.fr.base.Parameter;
import com.fr.base.ScreenResolution; import com.fr.base.ScreenResolution;
import com.fr.base.TRL; import com.fr.base.TRL;
import com.fr.base.extension.FileExtension; import com.fr.base.extension.FileExtension;
import com.fr.base.theme.FineColorGather;
import com.fr.base.theme.FineColorManager;
import com.fr.base.theme.FineColorSynchronizer; import com.fr.base.theme.FineColorSynchronizer;
import com.fr.base.theme.ReportTheme; import com.fr.base.theme.ReportTheme;
import com.fr.base.theme.TemplateTheme; import com.fr.base.theme.TemplateTheme;
@ -41,7 +39,7 @@ import com.fr.design.designer.TargetComponent;
import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.file.HistoryTemplateListCache; 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.MultiTemplateTabPane;
import com.fr.design.fun.PreviewProvider; import com.fr.design.fun.PreviewProvider;
import com.fr.design.fun.PropertyItemPaneProvider; import com.fr.design.fun.PropertyItemPaneProvider;
import com.fr.design.fun.ReportSupportedFileUIProvider; import com.fr.design.fun.ReportSupportedFileUIProvider;
@ -80,7 +78,6 @@ import com.fr.file.FILEChooserPane;
import com.fr.file.FileNodeFILE; import com.fr.file.FileNodeFILE;
import com.fr.file.filetree.FileNode; import com.fr.file.filetree.FileNode;
import com.fr.file.filter.ChooseFileFilter; import com.fr.file.filter.ChooseFileFilter;
import com.fr.form.main.Form;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.ModuleContext; import com.fr.general.ModuleContext;
import com.fr.grid.Grid; import com.fr.grid.Grid;
@ -1178,7 +1175,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
public boolean saveShareFile() { public boolean saveShareFile() {
FILE newFile = createNewEmptyFile(); FILE newFile = createNewEmptyFile();
//如果文件已经打开, 那么就覆盖关闭掉他 //如果文件已经打开, 那么就覆盖关闭掉他
MutilTempalteTabPane.getInstance().closeFileTemplate(newFile); MultiTemplateTabPane.getInstance().closeFileTemplate(newFile);
final WorkBook tpl = this.getTarget(); final WorkBook tpl = this.getTarget();
// 弹出输入参数 // 弹出输入参数
java.util.Map<String, Object> parameterMap = inputParameters(tpl); java.util.Map<String, Object> parameterMap = inputParameters(tpl);

8
designer-realize/src/main/java/com/fr/start/MainDesigner.java

@ -16,7 +16,7 @@ import com.fr.design.constants.UIConstants;
import com.fr.design.deeplink.DeepLinkManager; import com.fr.design.deeplink.DeepLinkManager;
import com.fr.design.file.HistoryTemplateListCache; 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.MultiTemplateTabPane;
import com.fr.design.fun.MenuHandler; import com.fr.design.fun.MenuHandler;
import com.fr.design.fun.OemProcessor; import com.fr.design.fun.OemProcessor;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
@ -387,7 +387,7 @@ public class MainDesigner extends BaseDesigner {
for (int i = 0; i < items.length; i++) { for (int i = 0; i < items.length; i++) {
menu.add(items[i]); menu.add(items[i]);
} }
GUICoreUtils.showPopupMenu(menu, MutilTempalteTabPane.getInstance(), MutilTempalteTabPane.getInstance().getX() - PREVIEW_DOWN_X_GAP, MutilTempalteTabPane.getInstance().getY() - 1 + MutilTempalteTabPane.getInstance().getHeight()); GUICoreUtils.showPopupMenu(menu, MultiTemplateTabPane.getInstance(), MultiTemplateTabPane.getInstance().getX() - PREVIEW_DOWN_X_GAP, MultiTemplateTabPane.getInstance().getY() - 1 + MultiTemplateTabPane.getInstance().getHeight());
} }
@Override @Override
@ -409,8 +409,8 @@ public class MainDesigner extends BaseDesigner {
return; return;
} }
saveButton.setEnabled(!jt.isSaved() && !DesignModeContext.isVcsMode() && jt.checkEnable()); saveButton.setEnabled(!jt.isSaved() && !DesignModeContext.isVcsMode() && jt.checkEnable());
MutilTempalteTabPane.getInstance().refreshOpenedTemplate(HistoryTemplateListCache.getInstance().getHistoryList()); MultiTemplateTabPane.getInstance().refreshOpenedTemplate(HistoryTemplateListCache.getInstance().getHistoryList());
MutilTempalteTabPane.getInstance().repaint(); MultiTemplateTabPane.getInstance().repaint();
if (DesignerEnvManager.getEnvManager().isSupportUndo()) { if (DesignerEnvManager.getEnvManager().isSupportUndo()) {
undo.setEnabled(jt.canUndo()); undo.setEnabled(jt.canUndo());
redo.setEnabled(jt.canRedo()); redo.setEnabled(jt.canRedo());

Loading…
Cancel
Save