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; 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 com.fr.file.filetree.FileNode;
import java.util.Comparator; import java.util.Comparator;
@ -59,13 +59,14 @@ public class FileNodeComparator implements Comparator<FileNode> {
private int groupByFileType(FileNode nameNode1, FileNode nameNode2, private int groupByFileType(FileNode nameNode1, FileNode nameNode2,
int i) { int i) {
if (i < LocalFileNodes.FILE_TYPE.length) { String[] supportTypes = FRContext.getFileNodes().getSupportedTypes();
if (nameNode1.isFileType(LocalFileNodes.FILE_TYPE[i])) if (i < supportTypes.length) {
if (nameNode2.isFileType(LocalFileNodes.FILE_TYPE[i])) if (nameNode1.isFileType(supportTypes[i]))
if (nameNode2.isFileType(supportTypes[i]))
return nameNode1.getName().toLowerCase().compareTo(nameNode2.getName().toLowerCase()); return nameNode1.getName().toLowerCase().compareTo(nameNode2.getName().toLowerCase());
else else
return-1; return-1;
else if (nameNode2.isFileType(LocalFileNodes.FILE_TYPE[i])) else if (nameNode2.isFileType(supportTypes[i]))
return 1; return 1;
else{ else{
return groupByFileType(nameNode1, nameNode2, i+1); 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) { public void previewMenuActionPerformed(PreviewProvider provider) {
setPreviewType(provider); setPreviewType(provider);
WebPreviewUtils.preview(this, 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; package com.fr.design.preview;
import com.fr.design.fun.impl.AbstractPreviewProvider; import com.fr.design.fun.impl.AbstractPreviewProvider;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; 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.mainframe.JTemplate;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.file.filetree.FileNode; import com.fr.file.filetree.FileNode;
import com.fr.file.filetree.LocalFileNodes;
import com.fr.file.filter.ChooseFileFilter; import com.fr.file.filter.ChooseFileFilter;
import com.fr.file.filter.FILEFilter; import com.fr.file.filter.FILEFilter;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
@ -693,14 +692,9 @@ public class FILEChooserPane extends BasicPane {
String appName = ProductConstants.APP_NAME; String appName = ProductConstants.APP_NAME;
JTemplate editing = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); JTemplate editing = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate();
if (editing == null || !editing.isChartBook()) { 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 (type == JFileChooser.OPEN_DIALOG) {
if (WorkContext.getCurrent().isLocal()) { //本地连接 this.addChooseFILEFilter(new ChooseFileFilter(FRContext.getFileNodes().getSupportedTypes(), appName + Toolkit.i18nText("Fine-Design_Report_Template_File")));
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")));
}
} }
// ben:filefilter设置初值为cpt过滤 // 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 javax.swing.event.ChangeListener;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Component; import java.awt.Component;
import java.util.Arrays;
/** /**
* Created by shine on 2018/3/12. * Created by shine on 2018/3/12.
*/ */
public class ExtendedOtherPane extends AbstractChartAttrPane { public class ExtendedOtherPane<T extends AbstractChart> extends AbstractChartAttrPane {
private ExtendedChartHyperLinkPane hyperLinkPane; private ExtendedChartHyperLinkPane hyperLinkPane;
private UIButtonGroup refreshEnabled; private UIButtonGroup refreshEnabled;
private UISpinner autoRefreshTime; private UISpinner autoRefreshTime;
private JPanel contentPane; private JPanel contentPane;
protected AbstractChart getAbstractChart(Chart chart) { private T chart;
if (chart != null && chart instanceof AbstractChart) {
return (AbstractChart) chart; protected void setChart(Chart chart) {
if (chart instanceof AbstractChart) {
this.chart = (T) chart;
} }
return null;
} }
@Override @Override
@ -40,7 +42,7 @@ public class ExtendedOtherPane extends AbstractChartAttrPane {
return; return;
} }
AbstractChart chart = getAbstractChart(collection.getSelectedChart()); setChart(collection.getSelectedChart());
if (chart != null) { if (chart != null) {
hyperLinkPane.populateBean(chart); hyperLinkPane.populateBean(chart);
@ -57,7 +59,7 @@ public class ExtendedOtherPane extends AbstractChartAttrPane {
return; return;
} }
AbstractChart chart = getAbstractChart(collection.getSelectedChart()); setChart(collection.getSelectedChart());
if (chart != null) { if (chart != null) {
hyperLinkPane.updateBean(chart); hyperLinkPane.updateBean(chart);
@ -77,16 +79,20 @@ public class ExtendedOtherPane extends AbstractChartAttrPane {
double f = TableLayout.FILL; double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {f, e}; double[] columnSize = {f, e};
double[] rowSize = {p, p, p, p, p, p}; Component[][] components = getComponents(createRefreshPane(), createHyperlinkPane());
double[] rowSize = new double[components.length];
Component[][] components = new Component[][]{ Arrays.fill(rowSize, p);
new Component[]{createRefreshPane(), null},
new Component[]{createHyperlinkPane(), null}
};
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); 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 @Override
public String getIconPath() { public String getIconPath() {
return null; 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.base.vcs.DesignerMode;
import com.fr.design.DesignState; import com.fr.design.DesignState;
import com.fr.design.actions.core.WorkBookSupportable; import com.fr.design.actions.core.WorkBookSupportable;
import com.fr.design.actions.file.WebPreviewUtils;
import com.fr.design.cell.FloatElementsProvider; import com.fr.design.cell.FloatElementsProvider;
import com.fr.design.constants.UIConstants;
import com.fr.design.designer.TargetComponent; import com.fr.design.designer.TargetComponent;
import com.fr.design.designer.beans.actions.CopyAction; import com.fr.design.designer.beans.actions.CopyAction;
import com.fr.design.designer.beans.actions.CutAction; import com.fr.design.designer.beans.actions.CutAction;
@ -938,7 +936,7 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm {
*/ */
@Override @Override
public PreviewProvider[] supportPreview() { 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.module.DesignModuleFactory;
import com.fr.design.parameter.ParameterDefinitePane; import com.fr.design.parameter.ParameterDefinitePane;
import com.fr.design.parameter.ParameterInputPane; import com.fr.design.parameter.ParameterInputPane;
import com.fr.design.preview.MobilePreview;
import com.fr.design.preview.PagePreview; import com.fr.design.preview.PagePreview;
import com.fr.design.preview.ViewPreview; import com.fr.design.preview.ViewPreview;
import com.fr.design.preview.WriteEnhancePreview; import com.fr.design.preview.WriteEnhancePreview;
@ -890,7 +889,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
public PreviewProvider[] supportPreview() { public PreviewProvider[] supportPreview() {
Set<PreviewProvider> set = ExtraDesignClassManager.getInstance().getArray(PreviewProvider.MARK_STRING); Set<PreviewProvider> set = ExtraDesignClassManager.getInstance().getArray(PreviewProvider.MARK_STRING);
return ArrayUtils.addAll(new PreviewProvider[]{ 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()])); }, set.toArray(new PreviewProvider[set.size()]));
} }

Loading…
Cancel
Save