Browse Source

修改文件路径

feature/big-screen
kerry 5 years ago
parent
commit
157a846b21
  1. 47
      designer-base/src/main/java/com/fr/design/fun/NewTemplateFileProvider.java
  2. 21
      designer-base/src/main/java/com/fr/design/fun/impl/AbstractNewTemplateFileProvider.java
  3. 2
      designer-base/src/main/java/com/fr/design/gui/itree/filetree/FileTreeIcon.java
  4. 1
      designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java
  5. 1
      designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java

47
designer-base/src/main/java/com/fr/design/fun/NewTemplateFileProvider.java

@ -0,0 +1,47 @@
package com.fr.design.fun;
import com.fr.design.mainframe.JTemplate;
import com.fr.file.FILEChooserPane;
import com.fr.file.filetree.FileNode;
import com.fr.stable.fun.mark.Mutable;
import javax.swing.Icon;
/**
* Created by kerry on 2019-10-11
*/
public interface NewTemplateFileProvider extends Mutable {
int CURRENT_LEVEL = 1;
String XML_TAG = "NewFileTypeProvider";
/**
* 向文件选择器中添加指定文件类型过滤器
* @param fileChooser 文件选择器
* @param suffix 文件后缀
*/
void addChooseFileFilter(FILEChooserPane fileChooser, String suffix);
/**
* 获取本地目录文件关联的icon
* @param path 文件路径
* @return 对应的图标
*/
Icon getLocalFileIcon(String path);
/**
* 获取远程目录文件关联的icon
* @param node 文件节点
* @param isShowLock 是否显示被锁住
* @return 对应的图标
*/
Icon getRemoteFileIcon(FileNode node, boolean isShowLock);
/**
* 保存为新类型文件
* @param targetPath 目标路径
* @param jTemplate 模板对象
*/
boolean saveToNewFile(String targetPath, JTemplate jTemplate);
}

21
designer-base/src/main/java/com/fr/design/fun/impl/AbstractNewTemplateFileProvider.java

@ -0,0 +1,21 @@
package com.fr.design.fun.impl;
import com.fr.design.fun.NewTemplateFileProvider;
import com.fr.stable.fun.mark.API;
/**
* Created by kerry on 2019-10-14
*/
@API(level = NewTemplateFileProvider.CURRENT_LEVEL)
public abstract class AbstractNewTemplateFileProvider implements NewTemplateFileProvider {
@Override
public int currentAPILevel() {
return CURRENT_LEVEL;
}
@Override
public String mark4Provider() {
return getClass().getName();
}
}

2
designer-base/src/main/java/com/fr/design/gui/itree/filetree/FileTreeIcon.java

@ -3,7 +3,7 @@ package com.fr.design.gui.itree.filetree;
import com.fr.base.BaseUtils;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.icon.LockIcon;
import com.fr.design.mainframe.NewTemplateFileProvider;
import com.fr.design.fun.NewTemplateFileProvider;
import com.fr.file.filetree.FileNode;
import com.fr.general.ComparatorUtils;
import com.fr.stable.StableUtils;

1
designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java

@ -27,6 +27,7 @@ import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.file.TemplateTreePane;
import com.fr.design.fun.DesignerFrameUpButtonProvider;
import com.fr.design.fun.MenuHandler;
import com.fr.design.fun.NewTemplateFileProvider;
import com.fr.design.fun.PreviewProvider;
import com.fr.design.gui.frpane.HyperlinkGroupPane;
import com.fr.design.gui.frpane.HyperlinkGroupPaneActionProvider;

1
designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java

@ -34,6 +34,7 @@ import com.fr.design.event.TargetModifiedEvent;
import com.fr.design.event.TargetModifiedListener;
import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.file.MutilTempalteTabPane;
import com.fr.design.fun.NewTemplateFileProvider;
import com.fr.design.fun.PreviewProvider;
import com.fr.design.gui.frpane.HyperlinkGroupPane;
import com.fr.design.gui.frpane.HyperlinkGroupPaneActionProvider;

Loading…
Cancel
Save