Browse Source

Merge pull request #1961 in DESIGN/design from release/10.0 to bugfix/10.0

* commit '5d9a6c9824f3fab631f7c5639f3294d7c37925fe':
  REPORT-33518 【10.0.7冒烟】从大数据量表取数建立数据集,预览不正常
  REPORT-35463 调整帮助文档菜单项在帮助菜单和社区菜单的情况
  REPORT-33604 模板加解密接口需求
  REPORT-30708 单元格配置框不跟随右侧配置按钮 修改代码
  REPORT-30708 单元格配置框不跟随右侧配置按钮 修改代码
  REPORT-30708 单元格配置框不跟随右侧配置按钮 格式调整2
  REPORT-30708 单元格配置框不跟随右侧配置按钮 格式调整
  REPORT-30708 单元格配置框不跟随右侧配置按钮
  REPORT-33604 模板加解密接口需求
bugfix/10.0
superman 4 years ago
parent
commit
8902f18022
  1. 18
      designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java
  2. 2
      designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTablePane.java
  3. 10
      designer-base/src/main/java/com/fr/design/locale/impl/SupportLocaleImpl.java
  4. 9
      designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java
  5. 43
      designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java
  6. 14
      designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java
  7. 3
      designer-base/src/main/java/com/fr/design/mainframe/vcs/common/VcsCacheFileNodeFile.java
  8. 3
      designer-base/src/main/java/com/fr/file/FileFILE.java
  9. 3
      designer-base/src/main/java/com/fr/file/FileNodeFILE.java

18
designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java

@ -439,9 +439,14 @@ public abstract class DesignTableDataManager {
* @throws Exception 异常 * @throws Exception 异常
*/ */
public static EmbeddedTableData previewTableDataNeedInputParameters(TableDataSource tableDataSource, TableData tabledata, int rowCount, boolean needLoadingBar) throws Exception { public static EmbeddedTableData previewTableDataNeedInputParameters(TableDataSource tableDataSource, TableData tabledata, int rowCount, boolean needLoadingBar) throws Exception {
return previewTableData(tableDataSource, tabledata, rowCount, true, needLoadingBar); return previewTableDataNeedInputParameters(tableDataSource, tabledata, rowCount, needLoadingBar, null);
} }
public static EmbeddedTableData previewTableDataNeedInputParameters(TableDataSource tableDataSource, TableData tabledata, int rowCount, boolean needLoadingBar, AutoProgressBar progressBar) throws Exception {
return previewTableData(tableDataSource, tabledata, rowCount, true, needLoadingBar, progressBar);
}
/** /**
* 预览不需要参数的数据集 * 预览不需要参数的数据集
* *
@ -478,7 +483,16 @@ public abstract class DesignTableDataManager {
* @return * @return
*/ */
private static EmbeddedTableData previewTableData(TableDataSource tableDataSource, TableData tabledata, int rowCount, boolean isMustInputParameters, boolean needLoadingBar) throws Exception { private static EmbeddedTableData previewTableData(TableDataSource tableDataSource, TableData tabledata, int rowCount, boolean isMustInputParameters, boolean needLoadingBar) throws Exception {
final AutoProgressBar loadingBar = PreviewTablePane.getInstance().getProgressBar(); return previewTableData(tableDataSource, tabledata, rowCount, isMustInputParameters, needLoadingBar, null);
}
private static EmbeddedTableData previewTableData(TableDataSource tableDataSource, TableData tabledata, int rowCount, boolean isMustInputParameters, boolean needLoadingBar, AutoProgressBar progressBar) throws Exception {
final AutoProgressBar loadingBar;
if (progressBar == null) {
loadingBar = PreviewTablePane.getInstance().getProgressBar();
} else {
loadingBar = progressBar;
}
ParameterProvider[] parameters = DataOperator.getInstance().getTableDataParameters(tabledata); ParameterProvider[] parameters = DataOperator.getInstance().getTableDataParameters(tabledata);
if (ArrayUtils.isEmpty(parameters)) { if (ArrayUtils.isEmpty(parameters)) {
parameters = tabledata.getParameters(Calculator.createCalculator()); parameters = tabledata.getParameters(Calculator.createCalculator());

2
designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTablePane.java

@ -372,7 +372,7 @@ public class PreviewTablePane extends BasicPane {
connectionBar.close(); connectionBar.close();
} }
TableDataSource dataSource = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().getTarget(); TableDataSource dataSource = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().getTarget();
previewTableData = DesignTableDataManager.previewTableDataNeedInputParameters(dataSource, tableData, (int) maxPreviewNumberField.getValue(), true); previewTableData = DesignTableDataManager.previewTableDataNeedInputParameters(dataSource, tableData, (int) maxPreviewNumberField.getValue(), true, progressBar);
// parameterInputDialog // parameterInputDialog
// update之后的parameters,转成一个parameterMap,用于预览TableData // update之后的parameters,转成一个parameterMap,用于预览TableData
PreviewTableModel previewModel = new PreviewTableModel(previewTableData.createDataModel(null), (int) maxPreviewNumberField.getValue()); PreviewTableModel previewModel = new PreviewTableModel(previewTableData.createDataModel(null), (int) maxPreviewNumberField.getValue());

10
designer-base/src/main/java/com/fr/design/locale/impl/SupportLocaleImpl.java

@ -138,8 +138,9 @@ public enum SupportLocaleImpl implements SupportLocale {
@Override @Override
public Set<Locale> support() { public Set<Locale> support() {
Set<Locale> set = new HashSet<Locale>(); Set<Locale> set = new HashSet<Locale>();
set.add(Locale.CHINA); set.add(Locale.US);
set.add(Locale.TAIWAN); set.add(Locale.KOREA);
set.add(Locale.JAPAN);
return set; return set;
} }
}, },
@ -151,9 +152,8 @@ public enum SupportLocaleImpl implements SupportLocale {
@Override @Override
public Set<Locale> support() { public Set<Locale> support() {
Set<Locale> set = new HashSet<Locale>(); Set<Locale> set = new HashSet<Locale>();
set.add(Locale.US); set.add(Locale.CHINA);
set.add(Locale.KOREA); set.add(Locale.TAIWAN);
set.add(Locale.JAPAN);
return set; return set;
} }
} }

9
designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java

@ -328,6 +328,8 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
if (DesignModeContext.isAuthorityEditing()) { if (DesignModeContext.isAuthorityEditing()) {
doResize(); doResize();
} }
//刷新FixedPopupPane的位置
EastRegionContainerPane.getInstance().freshCurrentPopupPane();
} }
}); });
this.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); this.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
@ -972,6 +974,8 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
* @param jt 添加的模板. * @param jt 添加的模板.
*/ */
public void addAndActivateJTemplate(JTemplate<?, ?> jt) { public void addAndActivateJTemplate(JTemplate<?, ?> jt) {
//切换文件后清空FixedPopupPane面板
EastRegionContainerPane.getInstance().clearCurrentPopupPane();
//释放模板对象 //释放模板对象
ActionFactory.editorRelease(); ActionFactory.editorRelease();
if (jt == null || jt.getEditingFILE() == null) { if (jt == null || jt.getEditingFILE() == null) {
@ -991,6 +995,8 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
* @param jt 模板 * @param jt 模板
*/ */
public void activateJTemplate(JTemplate<?, ?> jt) { public void activateJTemplate(JTemplate<?, ?> jt) {
//切换文件后清空FixedPopupPane面板
EastRegionContainerPane.getInstance().clearCurrentPopupPane();
//释放模板对象 //释放模板对象
ActionFactory.editorRelease(); ActionFactory.editorRelease();
if (jt == null || jt.getEditingFILE() == null) { if (jt == null || jt.getEditingFILE() == null) {
@ -1101,7 +1107,8 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
* @date 2014-10-14-下午6:31:05 * @date 2014-10-14-下午6:31:05
*/ */
private void openFile(FILE tplFile) { private void openFile(FILE tplFile) {
//切换文件后清空FixedPopupPane面板
EastRegionContainerPane.getInstance().clearCurrentPopupPane();
if (tplFile != null) { if (tplFile != null) {
int index = HistoryTemplateListCache.getInstance().contains(tplFile); int index = HistoryTemplateListCache.getInstance().contains(tplFile);
if (index != -1) { if (index != -1) {

43
designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java

@ -67,6 +67,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
private JPanel leftPane; private JPanel leftPane;
private JPanel rightPane; private JPanel rightPane;
private FixedPopupPane currentPopupPane; private FixedPopupPane currentPopupPane;
private UIButton currentButton;
private static final int CONTAINER_WIDTH = containerWidth(); private static final int CONTAINER_WIDTH = containerWidth();
private static final int TAB_WIDTH = 38; private static final int TAB_WIDTH = 38;
private static final int TAB_BUTTON_WIDTH = 32; private static final int TAB_BUTTON_WIDTH = 32;
@ -495,17 +496,17 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
public void replaceAuthorityEditionPane(JComponent pane) { public void replaceAuthorityEditionPane(JComponent pane) {
propertyItemMap.get(KEY_AUTHORITY_EDITION).replaceContentPane(pane); propertyItemMap.get(KEY_AUTHORITY_EDITION).replaceContentPane(pane);
} }
public JComponent getAuthorityEditionPane() { public JComponent getAuthorityEditionPane() {
return propertyItemMap.get(KEY_AUTHORITY_EDITION).getContentPane(); return propertyItemMap.get(KEY_AUTHORITY_EDITION).getContentPane();
} }
public void replaceConfiguredRolesPane(JComponent pane) { public void replaceConfiguredRolesPane(JComponent pane) {
propertyItemMap.get(KEY_CONFIGURED_ROLES).replaceContentPane(pane); propertyItemMap.get(KEY_CONFIGURED_ROLES).replaceContentPane(pane);
} }
public void replaceKeyPane(final String key, final JComponent pane) { public void replaceKeyPane(final String key, final JComponent pane) {
//需要放到 ui 线程中处理 //需要放到 ui 线程中处理
UIUtil.invokeLaterIfNeeded(new Runnable() { UIUtil.invokeLaterIfNeeded(new Runnable() {
@Override @Override
@ -514,11 +515,11 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
} }
}); });
} }
public JComponent getConfiguredRolesPane() { public JComponent getConfiguredRolesPane() {
return propertyItemMap.get(KEY_CONFIGURED_ROLES).getContentPane(); return propertyItemMap.get(KEY_CONFIGURED_ROLES).getContentPane();
} }
public void addParameterPane(JComponent paraPane) { public void addParameterPane(JComponent paraPane) {
propertyItemMap.get(KEY_WIDGET_SETTINGS).replaceHeaderPane(paraPane); propertyItemMap.get(KEY_WIDGET_SETTINGS).replaceHeaderPane(paraPane);
} }
@ -929,6 +930,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
} else { } else {
hideCurrentPopupPane(); hideCurrentPopupPane();
currentPopupPane = popupPane; currentPopupPane = popupPane;
currentButton = button;
GUICoreUtils.showPopupMenu(popupPane, button, -popupPane.getPreferredSize().width, 0); GUICoreUtils.showPopupMenu(popupPane, button, -popupPane.getPreferredSize().width, 0);
} }
} }
@ -1009,6 +1011,35 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
} }
} }
/**
* @Description:刷新currentPopupPane面板位置当设计器缩放时会调用这个函数
* @param
* @return:
* @Author: Henry.Wang
* @date: 2020/7/30 11:39
*/
public void freshCurrentPopupPane() {
if(currentPopupPane.isVisible()){
hideCurrentPopupPane();
if (currentPopupPane != null && currentButton != null && !isRightPaneVisible()) {
GUICoreUtils.showPopupMenu(currentPopupPane, currentButton, -currentPopupPane.getPreferredSize().width, 0);
}
}
}
/**
* @Description:清空currentPopupPane数据当切换模板时会调用这个函数
* @param
* @return:
* @Author: Henry.Wang
* @date: 2020/7/30 11:42
*/
public void clearCurrentPopupPane() {
hideCurrentPopupPane();
currentPopupPane = null;
currentButton = null;
}
// 弹出属性面板的工具条 // 弹出属性面板的工具条
private class PopupToolPane extends JPanel { private class PopupToolPane extends JPanel {
private String title; private String title;

14
designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java

@ -592,7 +592,12 @@ public abstract class ToolBarMenuDock {
shortCuts.add(SeparatorDef.DEFAULT); shortCuts.add(SeparatorDef.DEFAULT);
shortCuts.add(new VideoAction()); shortCuts.add(new VideoAction());
shortCuts.add(new TutorialAction()); LocaleCenter.buildAction(new LocaleAction() {
@Override
public void execute() {
shortCuts.add(new TutorialAction());
}
}, SupportLocaleImpl.TUTORIAL_COMMUNITY);
shortCuts.add(new QuestionAction()); shortCuts.add(new QuestionAction());
shortCuts.add(new TechSolutionAction()); shortCuts.add(new TechSolutionAction());
@ -625,13 +630,6 @@ public abstract class ToolBarMenuDock {
shortCuts.add(new TechSupportAction()); shortCuts.add(new TechSupportAction());
} }
}, SupportLocaleImpl.TECH_SUPPORT_COMMUNITY); }, SupportLocaleImpl.TECH_SUPPORT_COMMUNITY);
LocaleCenter.buildAction(new LocaleAction() {
@Override
public void execute() {
shortCuts.add(new TutorialAction());
}
}, SupportLocaleImpl.TUTORIAL_COMMUNITY);
shortCuts.add(SeparatorDef.DEFAULT); shortCuts.add(SeparatorDef.DEFAULT);

3
designer-base/src/main/java/com/fr/design/mainframe/vcs/common/VcsCacheFileNodeFile.java

@ -1,5 +1,6 @@
package com.fr.design.mainframe.vcs.common; package com.fr.design.mainframe.vcs.common;
import com.fr.io.FineEncryptUtils;
import com.fr.base.io.XMLEncryptUtils; import com.fr.base.io.XMLEncryptUtils;
import com.fr.file.FileNodeFILE; import com.fr.file.FileNodeFILE;
import com.fr.file.filetree.FileNode; import com.fr.file.filetree.FileNode;
@ -48,7 +49,7 @@ public class VcsCacheFileNodeFile extends FileNodeFILE {
); );
return envPath.endsWith(".cpt") || envPath.endsWith(".frm") return envPath.endsWith(".cpt") || envPath.endsWith(".frm")
? XMLEncryptUtils.decodeInputStream(in) : in; ? XMLEncryptUtils.decodeInputStream(FineEncryptUtils.decode(in)) : in;
} }

3
designer-base/src/main/java/com/fr/file/FileFILE.java

@ -1,5 +1,6 @@
package com.fr.file; package com.fr.file;
import com.fr.io.FineEncryptUtils;
import com.fr.base.io.XMLEncryptUtils; import com.fr.base.io.XMLEncryptUtils;
import com.fr.design.gui.itree.filetree.FileComparator; import com.fr.design.gui.itree.filetree.FileComparator;
import com.fr.design.gui.itree.filetree.FileTreeIcon; import com.fr.design.gui.itree.filetree.FileTreeIcon;
@ -186,7 +187,7 @@ public class FileFILE implements FILE {
public InputStream asInputStream() throws Exception { public InputStream asInputStream() throws Exception {
InputStream in = new java.io.FileInputStream(file); InputStream in = new java.io.FileInputStream(file);
return file.getName().endsWith(".cpt") || file.getName().endsWith(".frm") return file.getName().endsWith(".cpt") || file.getName().endsWith(".frm")
? XMLEncryptUtils.decodeInputStream(EncryptUtils.decodeInputStream(in)) : in; ? XMLEncryptUtils.decodeInputStream(EncryptUtils.decodeInputStream(FineEncryptUtils.decode(in))) : in;
} }
/** /**

3
designer-base/src/main/java/com/fr/file/FileNodeFILE.java

@ -2,6 +2,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.io.FineEncryptUtils;
import com.fr.base.io.XMLEncryptUtils; import com.fr.base.io.XMLEncryptUtils;
import com.fr.design.file.NodeAuthProcessor; import com.fr.design.file.NodeAuthProcessor;
import com.fr.design.gui.itree.filetree.FileNodeComparator; import com.fr.design.gui.itree.filetree.FileNodeComparator;
@ -388,7 +389,7 @@ public class FileNodeFILE implements FILE {
); );
return envPath.endsWith(".cpt") || envPath.endsWith(".frm") return envPath.endsWith(".cpt") || envPath.endsWith(".frm")
? XMLEncryptUtils.decodeInputStream(EncryptUtils.decodeInputStream(in)) : in; ? XMLEncryptUtils.decodeInputStream(EncryptUtils.decodeInputStream(FineEncryptUtils.decode(in))) : in;
} }
/** /**

Loading…
Cancel
Save