|
|
@ -1171,6 +1171,10 @@ public class MultiTemplateTabPane extends JComponent { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//参考CloseCurrentTemplateAction,在closeFormat与closeSpecifiedTemplate之前要先设定isCloseCurrent,这样关闭之后才会自动切换tab
|
|
|
|
|
|
|
|
if (checkCurrentClose(template)) { |
|
|
|
|
|
|
|
setIsCloseCurrent(true); |
|
|
|
|
|
|
|
} |
|
|
|
closeFormat(template); |
|
|
|
closeFormat(template); |
|
|
|
closeSpecifiedTemplate(template); |
|
|
|
closeSpecifiedTemplate(template); |
|
|
|
DesignerContext.getDesignerFrame().getContentFrame().repaint(); |
|
|
|
DesignerContext.getDesignerFrame().getContentFrame().repaint(); |
|
|
@ -1204,6 +1208,11 @@ public class MultiTemplateTabPane extends JComponent { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private boolean checkCurrentClose(JTemplate template) { |
|
|
|
|
|
|
|
JTemplate currentTemplate = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); |
|
|
|
|
|
|
|
return currentTemplate != null && ComparatorUtils.equals(template.getPath(), currentTemplate.getPath()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private class MultiTemplateTabMouseMotionListener implements MouseMotionListener { |
|
|
|
private class MultiTemplateTabMouseMotionListener implements MouseMotionListener { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* 鼠标拖拽 |
|
|
|
* 鼠标拖拽 |
|
|
|