Browse Source

Merging in latest from upstream (DESIGN/design:refs/heads/release/10.0)

* commit '0758e21b2235c67d6df70144bd041280547e2afc':
  无JIRA任务 修改严重findbugs
  CHART-3122 流向地球不支持超链
  REPORT-11123 【10.0冒烟】表单预览国际化问题,点击没反应(master屏蔽移动端预览功能)
  无JIRA任务, 冲突修复.
  无JIRA任务 master屏蔽国际化区分
final/10.0
Wim.Zhai 6 years ago
parent
commit
0d065813dc
  1. 11
      designer-base/src/main/java/com/fr/design/gui/itree/filetree/FileNodeComparator.java
  2. 1
      designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java
  3. 1
      designer-base/src/main/java/com/fr/design/preview/MobilePreview.java
  4. 10
      designer-base/src/main/java/com/fr/file/FILEChooserPane.java
  5. 32
      designer-chart/src/main/java/com/fr/extended/chart/ExtendedOtherPane.java
  6. 4
      designer-form/src/main/java/com/fr/design/mainframe/JForm.java
  7. 3
      designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java

11
designer-base/src/main/java/com/fr/design/gui/itree/filetree/FileNodeComparator.java

@ -1,6 +1,6 @@
package com.fr.design.gui.itree.filetree;
import com.fr.file.filetree.LocalFileNodes;
import com.fr.base.FRContext;
import com.fr.file.filetree.FileNode;
import java.util.Comparator;
@ -59,13 +59,14 @@ public class FileNodeComparator implements Comparator<FileNode> {
private int groupByFileType(FileNode nameNode1, FileNode nameNode2,
int i) {
if (i < LocalFileNodes.FILE_TYPE.length) {
if (nameNode1.isFileType(LocalFileNodes.FILE_TYPE[i]))
if (nameNode2.isFileType(LocalFileNodes.FILE_TYPE[i]))
String[] supportTypes = FRContext.getFileNodes().getSupportedTypes();
if (i < supportTypes.length) {
if (nameNode1.isFileType(supportTypes[i]))
if (nameNode2.isFileType(supportTypes[i]))
return nameNode1.getName().toLowerCase().compareTo(nameNode2.getName().toLowerCase());
else
return-1;
else if (nameNode2.isFileType(LocalFileNodes.FILE_TYPE[i]))
else if (nameNode2.isFileType(supportTypes[i]))
return 1;
else{
return groupByFileType(nameNode1, nameNode2, i+1);

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

@ -1091,7 +1091,6 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
public void previewMenuActionPerformed(PreviewProvider provider) {
setPreviewType(provider);
WebPreviewUtils.preview(this, provider);
}
/**

1
designer-base/src/main/java/com/fr/design/preview/MobilePreview.java

@ -1,7 +1,6 @@
package com.fr.design.preview;
import com.fr.design.fun.impl.AbstractPreviewProvider;
import java.util.HashMap;
import java.util.Map;

10
designer-base/src/main/java/com/fr/file/FILEChooserPane.java

@ -23,7 +23,6 @@ import com.fr.design.mainframe.DesignerFrame;
import com.fr.design.mainframe.JTemplate;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.file.filetree.FileNode;
import com.fr.file.filetree.LocalFileNodes;
import com.fr.file.filter.ChooseFileFilter;
import com.fr.file.filter.FILEFilter;
import com.fr.general.ComparatorUtils;
@ -693,14 +692,9 @@ public class FILEChooserPane extends BasicPane {
String appName = ProductConstants.APP_NAME;
JTemplate editing = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate();
if (editing == null || !editing.isChartBook()) {
String[] fileSuffix_local = LocalFileNodes.FILE_TYPE;
EnumSet<FileExtension> fileExtensions = EnumSet.of(FileExtension.CPT, FileExtension.CPTX, FileExtension.FRM, FileExtension.FRMX, FileExtension.CHT);
if (type == JFileChooser.OPEN_DIALOG) {
if (WorkContext.getCurrent().isLocal()) { //本地连接
this.addChooseFILEFilter(new ChooseFileFilter(fileSuffix_local, appName + Toolkit.i18nText("Fine-Design_Report_Template_File")));
} else {
this.addChooseFILEFilter(new ChooseFileFilter(fileExtensions, appName + Toolkit.i18nText("Fine-Design_Report_Template_File")));
}
this.addChooseFILEFilter(new ChooseFileFilter(FRContext.getFileNodes().getSupportedTypes(), appName + Toolkit.i18nText("Fine-Design_Report_Template_File")));
}
// ben:filefilter设置初值为cpt过滤

32
designer-chart/src/main/java/com/fr/extended/chart/ExtendedOtherPane.java

@ -16,22 +16,24 @@ import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.BorderLayout;
import java.awt.Component;
import java.util.Arrays;
/**
* Created by shine on 2018/3/12.
*/
public class ExtendedOtherPane extends AbstractChartAttrPane {
public class ExtendedOtherPane<T extends AbstractChart> extends AbstractChartAttrPane {
private ExtendedChartHyperLinkPane hyperLinkPane;
private UIButtonGroup refreshEnabled;
private UISpinner autoRefreshTime;
private JPanel contentPane;
protected AbstractChart getAbstractChart(Chart chart) {
if (chart != null && chart instanceof AbstractChart) {
return (AbstractChart) chart;
private T chart;
protected void setChart(Chart chart) {
if (chart instanceof AbstractChart) {
this.chart = (T) chart;
}
return null;
}
@Override
@ -40,7 +42,7 @@ public class ExtendedOtherPane extends AbstractChartAttrPane {
return;
}
AbstractChart chart = getAbstractChart(collection.getSelectedChart());
setChart(collection.getSelectedChart());
if (chart != null) {
hyperLinkPane.populateBean(chart);
@ -57,7 +59,7 @@ public class ExtendedOtherPane extends AbstractChartAttrPane {
return;
}
AbstractChart chart = getAbstractChart(collection.getSelectedChart());
setChart(collection.getSelectedChart());
if (chart != null) {
hyperLinkPane.updateBean(chart);
@ -77,16 +79,20 @@ public class ExtendedOtherPane extends AbstractChartAttrPane {
double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {f, e};
double[] rowSize = {p, p, p, p, p, p};
Component[][] components = new Component[][]{
new Component[]{createRefreshPane(), null},
new Component[]{createHyperlinkPane(), null}
};
Component[][] components = getComponents(createRefreshPane(), createHyperlinkPane());
double[] rowSize = new double[components.length];
Arrays.fill(rowSize, p);
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
}
protected Component[][] getComponents(JPanel refresh, JPanel hyperlink) {
return new Component[][]{
new Component[]{refresh, null},
new Component[]{hyperlink, null}
};
}
@Override
public String getIconPath() {
return null;

4
designer-form/src/main/java/com/fr/design/mainframe/JForm.java

@ -6,9 +6,7 @@ import com.fr.base.Parameter;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.DesignState;
import com.fr.design.actions.core.WorkBookSupportable;
import com.fr.design.actions.file.WebPreviewUtils;
import com.fr.design.cell.FloatElementsProvider;
import com.fr.design.constants.UIConstants;
import com.fr.design.designer.TargetComponent;
import com.fr.design.designer.beans.actions.CopyAction;
import com.fr.design.designer.beans.actions.CutAction;
@ -938,7 +936,7 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm {
*/
@Override
public PreviewProvider[] supportPreview() {
return new PreviewProvider[]{new FormPreview(), new MobilePreview()};
return new PreviewProvider[]{new FormPreview()};
}
/**

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

@ -52,7 +52,6 @@ import com.fr.design.menu.ToolBarDef;
import com.fr.design.module.DesignModuleFactory;
import com.fr.design.parameter.ParameterDefinitePane;
import com.fr.design.parameter.ParameterInputPane;
import com.fr.design.preview.MobilePreview;
import com.fr.design.preview.PagePreview;
import com.fr.design.preview.ViewPreview;
import com.fr.design.preview.WriteEnhancePreview;
@ -890,7 +889,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
public PreviewProvider[] supportPreview() {
Set<PreviewProvider> set = ExtraDesignClassManager.getInstance().getArray(PreviewProvider.MARK_STRING);
return ArrayUtils.addAll(new PreviewProvider[]{
new PagePreview(), new WritePreview(), new ViewPreview(), new WriteEnhancePreview(), new MobilePreview()
new PagePreview(), new WritePreview(), new ViewPreview(), new WriteEnhancePreview()
}, set.toArray(new PreviewProvider[set.size()]));
}

Loading…
Cancel
Save