Browse Source

Merge branch 'release/10.0' of http://cloud.finedevelop.com:2015/scm/~hades/design into release/10.0

bugfix/10.0
Hades 6 years ago
parent
commit
602a4be22b
  1. 9
      designer-base/src/main/java/com/fr/design/actions/file/WebPreviewUtils.java
  2. 37
      designer-base/src/main/java/com/fr/design/gui/itree/filetree/TemplateFileTree.java
  3. 5
      designer-chart/src/main/java/com/fr/van/chart/designer/type/AbstractVanChartTypePane.java
  4. 7
      designer-chart/src/main/java/com/fr/van/chart/map/designer/type/VanChartMapPlotPane.java

9
designer-base/src/main/java/com/fr/design/actions/file/WebPreviewUtils.java

@ -1,6 +1,5 @@
package com.fr.design.actions.file;
import com.fr.base.extension.FileExtension;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.fun.PreviewProvider;
import com.fr.design.mainframe.DesignerContext;
@ -11,7 +10,6 @@ import com.fr.file.FileNodeFILE;
import com.fr.general.GeneralUtils;
import com.fr.general.web.ParameterConstants;
import com.fr.stable.project.ProjectConstants;
import com.fr.stable.web.AbstractWebletCreator;
import javax.swing.JOptionPane;
import java.util.Collections;
@ -90,13 +88,6 @@ public final class WebPreviewUtils {
java.util.List<String> parameterNameList = new java.util.ArrayList<String>();
java.util.List<String> parameterValueList = new java.util.ArrayList<String>();
// 暂时屏蔽cptx直接访问
if (path.endsWith(FileExtension.CPTX.getSuffix())) {
path = path.substring(0, path.length() - 1);
parameterNameList.add(AbstractWebletCreator.FORMAT);
parameterValueList.add(AbstractWebletCreator.X);
}
parameterNameList.add(actionType);
parameterValueList.add(path);
if (map != null) {

37
designer-base/src/main/java/com/fr/design/gui/itree/filetree/TemplateFileTree.java

@ -2,8 +2,10 @@ package com.fr.design.gui.itree.filetree;
import com.fr.base.FRContext;
import com.fr.base.extension.FileExtension;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.file.NodeAuthProcessor;
import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode;
import com.fr.design.mainframe.App;
import com.fr.file.filetree.FileNode;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.ArrayUtils;
@ -15,7 +17,9 @@ import javax.swing.tree.DefaultTreeModel;
import javax.swing.tree.TreePath;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
/*
* 显示Env下的reportlets目录下面的所有cpt文件
@ -124,9 +128,28 @@ public class TemplateFileTree extends EnvFileTree {
}
public FileNode[] listFile(String path) {
// 支持插件扩展, 先从env的filter拿, 再从插件拿
Set<FileExtension> supportTypes = createFileExtensionFilter();
return FRContext.getFileNodes().list(
path,
new FileExtension[]{FileExtension.CPT, FileExtension.FRM, FileExtension.CHT, FileExtension.XLS, FileExtension.XLSX});
supportTypes.toArray(new FileExtension[supportTypes.size()])
);
}
private Set<FileExtension> createFileExtensionFilter() {
Set<FileExtension> supportTypes = new HashSet<FileExtension>();
if (filter != null) {
for (String temp : filter.getSupportedTypes()) {
supportTypes.add(FileExtension.parse(temp));
}
}
Set<App> apps = ExtraDesignClassManager.getInstance().getArray(App.MARK_STRING);
for (App temp : apps) {
for (String extendsion : temp.defaultExtensions()) {
supportTypes.add(FileExtension.parse(extendsion));
}
}
return supportTypes;
}
/*
@ -205,18 +228,6 @@ public class TemplateFileTree extends EnvFileTree {
if (fileNodes == null) {
fileNodes = new FileNode[0];
}
// 用FileNodeFilter过滤一下
if (filter != null) {
List<FileNode> list = new ArrayList<FileNode>();
for (FileNode fileNode : fileNodes) {
if (filter.accept(fileNode)) {
list.add(fileNode);
}
}
fileNodes = list.toArray(new FileNode[list.size()]);
}
Arrays.sort(fileNodes, new FileNodeComparator(FRContext.getFileNodes().getSupportedTypes()));
return fileNodes;

5
designer-chart/src/main/java/com/fr/van/chart/designer/type/AbstractVanChartTypePane.java

@ -109,6 +109,7 @@ public abstract class AbstractVanChartTypePane extends AbstractChartTypePane{
resetTitleAttr(chart);
//重置监控刷新选项
resetRefreshMoreLabelAttr((VanChart)chart);
resetFilterDefinition(chart);
}
@ -118,6 +119,10 @@ public abstract class AbstractVanChartTypePane extends AbstractChartTypePane{
chart.setTitle(vanChartPlot.getDefaultTitle());
}
//重置数据配置
protected void resetFilterDefinition(Chart chart){
}
//重置监控刷新面板
protected void resetRefreshMoreLabelAttr(VanChart chart){

7
designer-chart/src/main/java/com/fr/van/chart/map/designer/type/VanChartMapPlotPane.java

@ -6,10 +6,10 @@ import com.fr.chart.chartattr.Plot;
import com.fr.design.mainframe.chart.gui.type.ChartImagePane;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.log.FineLoggerFactory;
import com.fr.plugin.chart.base.VanChartTools;
import com.fr.plugin.chart.map.MapIndependentVanChart;
import com.fr.plugin.chart.map.VanChartMapPlot;
import com.fr.plugin.chart.map.data.VanMapDefinition;
import com.fr.plugin.chart.map.server.CompatibleGEOJSONHelper;
import com.fr.van.chart.designer.type.AbstractVanChartTypePane;
@ -129,6 +129,11 @@ public class VanChartMapPlotPane extends AbstractVanChartTypePane {
}
@Override
protected void resetFilterDefinition(Chart chart) {
chart.setFilterDefinition(new VanMapDefinition());
}
protected void resetAttr(Plot plot) {
sourceChoosePane.resetComponentValue((VanChartMapPlot) plot);
}

Loading…
Cancel
Save