|
|
@ -3,7 +3,7 @@ package com.fr.file; |
|
|
|
import com.fr.base.BaseUtils; |
|
|
|
import com.fr.base.BaseUtils; |
|
|
|
import com.fr.base.FRContext; |
|
|
|
import com.fr.base.FRContext; |
|
|
|
import com.fr.base.extension.FileExtension; |
|
|
|
import com.fr.base.extension.FileExtension; |
|
|
|
import com.fr.base.operator.file.LocalFileOperator; |
|
|
|
import com.fr.file.filetree.LocalFileNodes; |
|
|
|
import com.fr.design.DesignerEnvManager; |
|
|
|
import com.fr.design.DesignerEnvManager; |
|
|
|
import com.fr.design.actions.UpdateAction; |
|
|
|
import com.fr.design.actions.UpdateAction; |
|
|
|
import com.fr.design.dialog.BasicPane; |
|
|
|
import com.fr.design.dialog.BasicPane; |
|
|
@ -545,10 +545,10 @@ public class FILEChooserPane extends BasicPane { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
if (editing == null || !editing.isChartBook()) { |
|
|
|
if (editing == null || !editing.isChartBook()) { |
|
|
|
String[] fileSuffix_local = LocalFileOperator.FILE_TYPE; |
|
|
|
String[] fileSuffix_local = LocalFileNodes.FILE_TYPE; |
|
|
|
EnumSet<FileExtension> fileExtensions = EnumSet.of(FileExtension.CPT, FileExtension.CPTX, FileExtension.FRM, FileExtension.FRMX, FileExtension.CHT); |
|
|
|
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 (FRContext.getFileOperator().isSupportLocalFileOperate()) { //本地连接
|
|
|
|
if (FRContext.getFileNodes().isSupportLocalFileOperate()) { //本地连接
|
|
|
|
this.addChooseFILEFilter(new ChooseFileFilter(fileSuffix_local, appName + Inter.getLocText(new String[]{"FR-App-Report_Template", "FR-App-All_File"}))); |
|
|
|
this.addChooseFILEFilter(new ChooseFileFilter(fileSuffix_local, appName + Inter.getLocText(new String[]{"FR-App-Report_Template", "FR-App-All_File"}))); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.addChooseFILEFilter(new ChooseFileFilter(fileExtensions, appName + Inter.getLocText(new String[]{"FR-App-Report_Template", "FR-App-All_File"}))); |
|
|
|
this.addChooseFILEFilter(new ChooseFileFilter(fileExtensions, appName + Inter.getLocText(new String[]{"FR-App-Report_Template", "FR-App-All_File"}))); |
|
|
@ -569,7 +569,7 @@ public class FILEChooserPane extends BasicPane { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 添加 xls 文件类型过滤 kt
|
|
|
|
// 添加 xls 文件类型过滤 kt
|
|
|
|
if (FRContext.getFileOperator().isSupportLocalFileOperate()) { //本地连接
|
|
|
|
if (FRContext.getFileNodes().isSupportLocalFileOperate()) { //本地连接
|
|
|
|
this.addChooseFILEFilter(new ChooseFileFilter(FileExtension.XLS, Inter.getLocText("Import-Excel_Source"))); |
|
|
|
this.addChooseFILEFilter(new ChooseFileFilter(FileExtension.XLS, Inter.getLocText("Import-Excel_Source"))); |
|
|
|
this.addChooseFILEFilter(new ChooseFileFilter(FileExtension.XLSX, Inter.getLocText("Import-Excel2007_Source"))); |
|
|
|
this.addChooseFILEFilter(new ChooseFileFilter(FileExtension.XLSX, Inter.getLocText("Import-Excel2007_Source"))); |
|
|
|
} |
|
|
|
} |
|
|
@ -592,7 +592,7 @@ public class FILEChooserPane extends BasicPane { |
|
|
|
for (FILEFilter aFilterList : filterList) { |
|
|
|
for (FILEFilter aFilterList : filterList) { |
|
|
|
defaultComboBoxModel.addElement(aFilterList); |
|
|
|
defaultComboBoxModel.addElement(aFilterList); |
|
|
|
} |
|
|
|
} |
|
|
|
if (FRContext.getFileOperator().isSupportLocalFileOperate()) { //本地连接
|
|
|
|
if (FRContext.getFileNodes().isSupportLocalFileOperate()) { //本地连接
|
|
|
|
if (!showWebReport) { |
|
|
|
if (!showWebReport) { |
|
|
|
defaultComboBoxModel.addElement(Inter.getLocText("FR-Utils-App_AllFiles") + "(*.*)"); |
|
|
|
defaultComboBoxModel.addElement(Inter.getLocText("FR-Utils-App_AllFiles") + "(*.*)"); |
|
|
|
} |
|
|
|
} |
|
|
|