|
|
@ -3,7 +3,6 @@ package com.fr.design.file; |
|
|
|
import com.fr.design.dialog.BasicDialog; |
|
|
|
import com.fr.design.dialog.BasicDialog; |
|
|
|
import com.fr.design.dialog.BasicPane; |
|
|
|
import com.fr.design.dialog.BasicPane; |
|
|
|
import com.fr.design.dialog.DialogActionAdapter; |
|
|
|
import com.fr.design.dialog.DialogActionAdapter; |
|
|
|
import com.fr.design.dialog.FineJOptionPane; |
|
|
|
|
|
|
|
import com.fr.design.event.StateChangeListener; |
|
|
|
import com.fr.design.event.StateChangeListener; |
|
|
|
import com.fr.design.gui.icheckbox.UICheckBox; |
|
|
|
import com.fr.design.gui.icheckbox.UICheckBox; |
|
|
|
import com.fr.design.gui.icontainer.UIScrollPane; |
|
|
|
import com.fr.design.gui.icontainer.UIScrollPane; |
|
|
@ -15,14 +14,19 @@ import com.fr.design.layout.FRGUIPaneFactory; |
|
|
|
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.general.ComparatorUtils; |
|
|
|
import com.fr.general.ComparatorUtils; |
|
|
|
|
|
|
|
|
|
|
|
import com.fr.log.FineLoggerFactory; |
|
|
|
import com.fr.log.FineLoggerFactory; |
|
|
|
import org.jetbrains.annotations.Nullable; |
|
|
|
import org.jetbrains.annotations.Nullable; |
|
|
|
|
|
|
|
|
|
|
|
import javax.swing.*; |
|
|
|
import javax.swing.AbstractListModel; |
|
|
|
import javax.swing.border.EmptyBorder; |
|
|
|
import javax.swing.BorderFactory; |
|
|
|
import java.awt.*; |
|
|
|
import javax.swing.DefaultListCellRenderer; |
|
|
|
import java.awt.event.*; |
|
|
|
import javax.swing.JList; |
|
|
|
|
|
|
|
import javax.swing.JPanel; |
|
|
|
|
|
|
|
import java.awt.BorderLayout; |
|
|
|
|
|
|
|
import java.awt.Component; |
|
|
|
|
|
|
|
import java.awt.Window; |
|
|
|
|
|
|
|
import java.awt.event.MouseAdapter; |
|
|
|
|
|
|
|
import java.awt.event.MouseEvent; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.ArrayList; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -204,6 +208,7 @@ public class SaveSomeTemplatePane extends BasicPane { |
|
|
|
for (int i = 0; i < opendedTemplate.size(); i++) { |
|
|
|
for (int i = 0; i < opendedTemplate.size(); i++) { |
|
|
|
//满足关闭条件的才继续判断文件是否发生了改动
|
|
|
|
//满足关闭条件的才继续判断文件是否发生了改动
|
|
|
|
boolean needClose = option == null || option.shouldClose(opendedTemplate.get(i), currentIndex, i); |
|
|
|
boolean needClose = option == null || option.shouldClose(opendedTemplate.get(i), currentIndex, i); |
|
|
|
|
|
|
|
needClose &= ComparatorUtils.equals(opendedTemplate.get(i).getTemplateTabOperatorType(), currentTemplate.getTemplateTabOperatorType()); |
|
|
|
if (needClose && isneedToAdd(opendedTemplate.get(i), currentTemplate)) { |
|
|
|
if (needClose && isneedToAdd(opendedTemplate.get(i), currentTemplate)) { |
|
|
|
unSavedTemplate.add(opendedTemplate.get(i)); |
|
|
|
unSavedTemplate.add(opendedTemplate.get(i)); |
|
|
|
} |
|
|
|
} |
|
|
|