Browse Source

Merge pull request #527 in DESIGN/design from ~JU/design:release/10.0 to release/10.0

* commit '6675c853b82799b507df9b4c1364e8f88ba1cd87':
  无JIRA任务 修改严重findbugs
  REPORT-11123 【10.0冒烟】表单预览国际化问题,点击没反应(master屏蔽移动端预览功能)
  无JIRA任务, 冲突修复.
  无JIRA任务 master屏蔽国际化区分
final/10.0
ju 6 years ago
parent
commit
459e851f74
  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. 4
      designer-form/src/main/java/com/fr/design/mainframe/JForm.java
  6. 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过滤

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