|
|
|
@ -5,7 +5,6 @@ package com.fr.design.mainframe;
|
|
|
|
|
|
|
|
|
|
import com.fr.base.BaseUtils; |
|
|
|
|
import com.fr.design.DesignModelAdapter; |
|
|
|
|
import com.fr.design.DesignState; |
|
|
|
|
import com.fr.design.DesignerEnvManager; |
|
|
|
|
import com.fr.design.ExtraDesignClassManager; |
|
|
|
|
import com.fr.design.actions.core.ActionFactory; |
|
|
|
@ -31,7 +30,6 @@ import com.fr.design.i18n.Toolkit;
|
|
|
|
|
import com.fr.design.mainframe.toolbar.ToolBarMenuDock; |
|
|
|
|
import com.fr.design.mainframe.toolbar.ToolBarMenuDockPlus; |
|
|
|
|
import com.fr.design.mainframe.vcs.common.VcsHelper; |
|
|
|
|
import com.fr.design.menu.MenuManager; |
|
|
|
|
import com.fr.design.menu.ShortCut; |
|
|
|
|
import com.fr.design.os.impl.MacOsAddListenerAction; |
|
|
|
|
import com.fr.design.os.impl.SupportOSImpl; |
|
|
|
@ -560,9 +558,6 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
|
|
|
|
|
plus = ToolBarMenuDock.NULLAVOID; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
DesignState designState = new DesignState(plus); |
|
|
|
|
MenuManager.getInstance().setMenus4Designer(designState); |
|
|
|
|
|
|
|
|
|
NorthRegionContainerPane.getInstance().resetToolkitByPlus(plus, ad); |
|
|
|
|
|
|
|
|
|
CenterRegionContainerPane.getInstance().resetToolkitByPlus(plus, ad); |
|
|
|
@ -763,10 +758,14 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
|
|
|
|
|
if (jt == null || jt.getEditingFILE() == null) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if (currentTemplateDeactivateFail()) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
jt.addJTemplateActionListener(this); |
|
|
|
|
jt.addTargetModifiedListener(this); |
|
|
|
|
jt.addJTemplateActionListener(VcsHelper.getInstance()); |
|
|
|
|
getCenterTemplateCardPane().showJTemplate(jt); |
|
|
|
|
refreshBaseContentPane(jt); |
|
|
|
|
setTitle(); |
|
|
|
|
layeredPane.repaint(); |
|
|
|
|
} |
|
|
|
@ -784,11 +783,54 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
|
|
|
|
|
if (jt == null || jt.getEditingFILE() == null) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if (currentTemplateDeactivateFail()) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
getCenterTemplateCardPane().showJTemplate(jt); |
|
|
|
|
refreshBaseContentPane(jt); |
|
|
|
|
setTitle(); |
|
|
|
|
layeredPane.repaint(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 当前模板 停用失败 |
|
|
|
|
* |
|
|
|
|
* @return 是否停用失败 |
|
|
|
|
*/ |
|
|
|
|
private boolean currentTemplateDeactivateFail() { |
|
|
|
|
JTemplate currentEditingTemplate = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); |
|
|
|
|
return currentEditingTemplate != null && !currentEditingTemplate.deactivateTemplate(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 根据模板刷新 设计器整个界面 |
|
|
|
|
* |
|
|
|
|
* @param jTemplate 当前模板 |
|
|
|
|
*/ |
|
|
|
|
private void refreshBaseContentPane(JTemplate jTemplate) { |
|
|
|
|
|
|
|
|
|
JComponent north = jTemplate.north4DesignerFrame(), |
|
|
|
|
center = jTemplate.center4DesignerFrame(), |
|
|
|
|
west = jTemplate.west4DesignerFrame(), |
|
|
|
|
east = jTemplate.east4DesignerFrame(); |
|
|
|
|
|
|
|
|
|
basePane.removeAll(); |
|
|
|
|
|
|
|
|
|
if (north != null) { |
|
|
|
|
basePane.add(north, BorderLayout.NORTH); |
|
|
|
|
} |
|
|
|
|
if (center != null) { |
|
|
|
|
basePane.add(center, BorderLayout.CENTER); |
|
|
|
|
} |
|
|
|
|
if (west != null) { |
|
|
|
|
basePane.add(west, BorderLayout.WEST); |
|
|
|
|
} |
|
|
|
|
if (east != null) { |
|
|
|
|
basePane.add(east, BorderLayout.EAST); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 对象侦听 |
|
|
|
|
* |
|
|
|
|