Browse Source

Pull request #8472: REPORT-68602 系列堆积和条件属性弹框多了“保存”和“取消”设置项 && 系列REPORT-69013 双击fvs文件,唤起设计器后不会自动打开模板

Merge in DESIGN/design from ~HENRY.WANG/design:release/11.0 to release/11.0

* commit '0057ee14758f6eaa01cffd70b9e0616c14cdf8ed':
  REPORT-68602 系列堆积和条件属性弹框多了“保存”和“取消”设置项 && 系列REPORT-69013 双击fvs文件,唤起设计器后不会自动打开模板
bugfix/11.0
Henry.Wang 3 years ago
parent
commit
37072670a9
  1. 2
      designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java
  2. 26
      designer-base/src/main/java/com/fr/start/BaseDesigner.java
  3. 4
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartUIListControlPane.java

2
designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java

@ -212,7 +212,7 @@ public abstract class UIControlPane extends JControlPane {
} }
// 点击"编辑"按钮,弹出面板 // 点击"编辑"按钮,弹出面板
class PopupEditDialog extends JDialog { protected class PopupEditDialog extends JDialog {
private JComponent editPane; private JComponent editPane;
private PopupToolPane popupToolPane; private PopupToolPane popupToolPane;
private static final int WIDTH = 570; private static final int WIDTH = 570;

26
designer-base/src/main/java/com/fr/start/BaseDesigner.java

@ -3,6 +3,7 @@
*/ */
package com.fr.start; package com.fr.start;
import com.fr.base.extension.FileExtension;
import com.fr.common.report.ReportState; import com.fr.common.report.ReportState;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.ExtraDesignClassManager; import com.fr.design.ExtraDesignClassManager;
@ -34,6 +35,7 @@ import com.fr.stable.OperatingSystem;
import com.fr.start.event.LazyStartupEvent; import com.fr.start.event.LazyStartupEvent;
import com.fr.workspace.base.WorkspaceStatus; import com.fr.workspace.base.WorkspaceStatus;
import java.awt.Window; import java.awt.Window;
import java.io.File; import java.io.File;
import java.lang.reflect.Method; import java.lang.reflect.Method;
@ -121,14 +123,7 @@ public abstract class BaseDesigner extends ToolBarMenuDock {
} }
File f = new File(arg); File f = new File(arg);
String path = f.getAbsolutePath(); String path = f.getAbsolutePath();
boolean pathends1 = path.endsWith(".cpt") if (isAcceptFilePathEnd(path)) {
|| path.endsWith(".xls");
boolean pathends2 = path.endsWith(".xlsx")
|| path.endsWith(".frm");
boolean pathends3 = path.endsWith(".form")
|| path.endsWith(".cht");
boolean pathends4 = pathends1 || pathends2 || pathends3;
if (pathends4 || path.endsWith(".chart")) {
file = new FileFILE(f); file = new FileFILE(f);
} }
} }
@ -148,6 +143,21 @@ public abstract class BaseDesigner extends ToolBarMenuDock {
} }
} }
private boolean isAcceptFilePathEnd(String path) {
FileExtension[] acceptFileExtensions = new FileExtension[]{
FileExtension.CPT, FileExtension.XLS, FileExtension.XLSX, FileExtension.FRM, FileExtension.CHT, FileExtension.VIS
};
for (FileExtension acceptFileExtension : acceptFileExtensions) {
String[] extensions = acceptFileExtension.getExtensions();
for (String extension : extensions) {
if (path.endsWith("." + extension)) {
return true;
}
}
}
return false;
}
private boolean openFile(final DesignerFrame df, boolean isException, FILE file) { private boolean openFile(final DesignerFrame df, boolean isException, FILE file) {
//启动时打开指定文件的接口 //启动时打开指定文件的接口

4
designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartUIListControlPane.java

@ -128,7 +128,7 @@ public abstract class VanChartUIListControlPane extends UIListControlPane implem
public void populate(Nameable[] nameableArray) { public void populate(Nameable[] nameableArray) {
//特殊处理,使用instanceof判断,弹出不同的面板 //特殊处理,使用instanceof判断,弹出不同的面板
if (SwingUtilities.getWindowAncestor(this) instanceof JDialog) { if (SwingUtilities.getWindowAncestor(this) instanceof PopupEditDialog) {
popupEditDialog = new HyperDialog(cardPane); popupEditDialog = new HyperDialog(cardPane);
} }
super.populate(nameableArray); super.populate(nameableArray);
@ -136,7 +136,7 @@ public abstract class VanChartUIListControlPane extends UIListControlPane implem
protected void popupEditDialog(Point mousePos) { protected void popupEditDialog(Point mousePos) {
//特殊处理,处理连续弹窗情况,弹出面板定为方式不同 //特殊处理,处理连续弹窗情况,弹出面板定为方式不同
if (SwingUtilities.getWindowAncestor(this) instanceof JDialog) { if (SwingUtilities.getWindowAncestor(this) instanceof PopupEditDialog) {
GUICoreUtils.centerWindow(popupEditDialog); GUICoreUtils.centerWindow(popupEditDialog);
popupEditDialog.setVisible(true); popupEditDialog.setVisible(true);
return; return;

Loading…
Cancel
Save