|
|
@ -201,8 +201,8 @@ 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, MutilTempalteTabPane.getInstance(), e.getX(), MutilTempalteTabPane.getInstance().getY() - 1 + MutilTempalteTabPane.getInstance().getHeight()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -339,7 +339,7 @@ public class MutilTempalteTabPane extends JComponent { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void closeTemplate(JTemplate<?, ?>[] templates, JTemplate<?, ?> currentTemplate) { |
|
|
|
private void closeTemplate(JTemplate<?, ?>[] templates, JTemplate<?, ?> currentTemplate) { |
|
|
|
for (int i = 0; i < templates.length; i++) { |
|
|
|
for (int i = 0; i < templates.length; i++) { |
|
|
|
if (option.shouldClose(tplIndex, i)) { |
|
|
|
if (option.shouldClose(tplIndex, i)) { |
|
|
|
JTemplate<?, ?> jTemplate = templates[i]; |
|
|
|
JTemplate<?, ?> jTemplate = templates[i]; |
|
|
@ -940,7 +940,7 @@ public class MutilTempalteTabPane extends JComponent { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* 后台关闭当前编辑模板 |
|
|
|
* 后台关闭当前编辑模板 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public void closeCurrentTpl(){ |
|
|
|
public void closeCurrentTpl() { |
|
|
|
JTemplate jTemplate = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); |
|
|
|
JTemplate jTemplate = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); |
|
|
|
this.setIsCloseCurrent(true); |
|
|
|
this.setIsCloseCurrent(true); |
|
|
|
this.closeFormat(jTemplate); |
|
|
|
this.closeFormat(jTemplate); |
|
|
@ -1164,7 +1164,7 @@ public class MutilTempalteTabPane extends JComponent { |
|
|
|
boolean completed = WorkerManager.getInstance().isCompleted(template.getTarget().getTemplateID()); |
|
|
|
boolean completed = WorkerManager.getInstance().isCompleted(template.getTarget().getTemplateID()); |
|
|
|
if (!completed) { |
|
|
|
if (!completed) { |
|
|
|
FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), |
|
|
|
FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), |
|
|
|
Toolkit.i18nText("Fine-Design_Close_Template_Tip", template.getEditingFILE().getName())); |
|
|
|
Toolkit.i18nText("Fine-Design_Close_Template_Tip", template.getEditingFILE().getName())); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|