|
|
@ -2,13 +2,13 @@ package com.fr.design.mainframe; |
|
|
|
|
|
|
|
|
|
|
|
import com.fr.design.constants.UIConstants; |
|
|
|
import com.fr.design.constants.UIConstants; |
|
|
|
import com.fr.design.designer.creator.XCreator; |
|
|
|
import com.fr.design.designer.creator.XCreator; |
|
|
|
import com.fr.design.designer.creator.XCreatorUtils; |
|
|
|
|
|
|
|
import com.fr.design.designer.creator.XLayoutContainer; |
|
|
|
import com.fr.design.designer.creator.XLayoutContainer; |
|
|
|
import com.fr.design.designer.treeview.ComponentTreeCellRenderer; |
|
|
|
import com.fr.design.designer.treeview.ComponentTreeCellRenderer; |
|
|
|
import com.fr.design.designer.treeview.ComponentTreeModel; |
|
|
|
import com.fr.design.designer.treeview.ComponentTreeModel; |
|
|
|
import com.fr.design.file.HistoryTemplateListCache; |
|
|
|
import com.fr.design.file.HistoryTemplateListCache; |
|
|
|
import com.fr.design.gui.itree.UITreeUI; |
|
|
|
import com.fr.design.gui.itree.UITreeUI; |
|
|
|
import com.fr.design.utils.gui.GUICoreUtils; |
|
|
|
import com.fr.design.utils.gui.GUICoreUtils; |
|
|
|
|
|
|
|
import com.fr.log.FineLoggerFactory; |
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
|
|
|
|
|
|
|
|
import javax.swing.BorderFactory; |
|
|
|
import javax.swing.BorderFactory; |
|
|
@ -287,22 +287,21 @@ public class ComponentTree extends JTree { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void saveTreePath() { |
|
|
|
private void saveTreePath() { |
|
|
|
String templateID = designer.getTarget().getTemplateID(); |
|
|
|
|
|
|
|
JTemplate<?, ?> jt = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); |
|
|
|
JTemplate<?, ?> jt = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); |
|
|
|
if (templateID != null && jt != null && StringUtils.equals(templateID, jt.getTarget().getTemplateID())) { |
|
|
|
if (jt instanceof JForm && jt.getTarget() == designer.getTarget()) { |
|
|
|
String key = jt.getEditingFILE().getPath() + templateID; |
|
|
|
String key = jt.getEditingFILE().getPath() + "-" + designer.getTarget().getTemplateID(); |
|
|
|
treePathCache.put(key, getExpandTreePaths()); |
|
|
|
treePathCache.put(key, getExpandTreePaths()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private List<TreePath> loadTreePath() { |
|
|
|
private List<TreePath> loadTreePath() { |
|
|
|
|
|
|
|
List<TreePath> result = null; |
|
|
|
JTemplate<?, ?> jt = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); |
|
|
|
JTemplate<?, ?> jt = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); |
|
|
|
if (jt == null) { |
|
|
|
if (jt instanceof JForm) { |
|
|
|
return null; |
|
|
|
String key = jt.getEditingFILE().getPath() + "-" + designer.getTarget().getTemplateID(); |
|
|
|
|
|
|
|
result = treePathCache.get(key); |
|
|
|
} |
|
|
|
} |
|
|
|
String key = jt.getEditingFILE().getPath() + designer.getTarget().getTemplateID(); |
|
|
|
return result == null ? new ArrayList<>() : result; |
|
|
|
|
|
|
|
|
|
|
|
return treePathCache.get(key); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private TreePath buildTreePath(Component comp) { |
|
|
|
private TreePath buildTreePath(Component comp) { |
|
|
|