Browse Source

Merge pull request #10968 in DESIGN/design from bugfix/11.0 to feature/x

* commit '3a04bcf679ddeaf988159d01a2f84ce428b40250':
  REPORT-86364 服务平台设计器适配
  REPORT-86364 服务平台设计器适配
  REPORT-86364 服务平台设计器适配
  REPORT-82895 单元格重复冻结优化 决策报表相关结尾冻结实现,界面优化
  REPORT-85953 【上海理光】模板保存问题 保存的时候不允许触发预览事件
feature/x
superman 2 years ago
parent
commit
a41238bebc
  1. 4
      designer-base/src/main/java/com/fr/design/actions/help/AboutPane.java
  2. 10
      designer-base/src/main/java/com/fr/design/gui/ispinner/UISpinner.java
  3. 30
      designer-base/src/main/java/com/fr/design/mainframe/platform/ServicePlatformAction.java
  4. 7
      designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java
  5. 3
      designer-base/src/main/resources/com/fr/design/images/platform/platform_normal.svg
  6. 18
      designer-realize/src/main/java/com/fr/design/report/freeze/FreezeAndRepeatPane.java
  7. 10
      designer-realize/src/main/java/com/fr/design/report/freeze/RepeatAndFreezeSettingPane.java
  8. 2
      designer-realize/src/main/java/com/fr/start/MainDesigner.java

4
designer-base/src/main/java/com/fr/design/actions/help/AboutPane.java

@ -126,8 +126,8 @@ public class AboutPane extends JPanel {
if (GeneralContext.getLocale().equals(Locale.TAIWAN)) { if (GeneralContext.getLocale().equals(Locale.TAIWAN)) {
return; return;
} }
boxCenterAlignmentPane = new BoxCenterAligmentPane("QQ: " + CloudCenter.getInstance().acquireUrlByKind("help.qq")); JPanel servicePlatformPane = getURLActionPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Service_Platform"), CloudCenter.getInstance().acquireUrlByKind("service.platform"));
contentPane.add(boxCenterAlignmentPane); contentPane.add(servicePlatformPane);
} }
// 是否显示鸣谢面板 // 是否显示鸣谢面板

10
designer-base/src/main/java/com/fr/design/gui/ispinner/UISpinner.java

@ -321,6 +321,16 @@ public class UISpinner extends JPanel implements UIObserver, GlobalNameObserver
textField.setMaxValue(maxValue); textField.setMaxValue(maxValue);
} }
/**
* 设置最小值
*
* @param minValue 最小值
*/
public void setMinValue(double minValue) {
this.minValue = minValue;
textField.setMinValue(minValue);
}
private void componentInitListeners() { private void componentInitListeners() {
preButton.addActionListener(new ActionListener() { preButton.addActionListener(new ActionListener() {
@Override @Override

30
designer-base/src/main/java/com/fr/design/mainframe/platform/ServicePlatformAction.java

@ -0,0 +1,30 @@
package com.fr.design.mainframe.platform;
import com.fr.design.actions.UpdateAction;
import com.fr.design.i18n.Toolkit;
import com.fr.design.utils.BrowseUtils;
import com.fr.general.CloudCenter;
import com.fr.log.FineLoggerFactory;
import java.awt.Desktop;
import java.awt.event.ActionEvent;
import java.net.URI;
/**
* 帮助-服务平台
*
* @author Destiny.Lin
* @version 11.0
* created by Destiny.Lin on 2022-12-14
*/
public class ServicePlatformAction extends UpdateAction {
public ServicePlatformAction() {
this.setName(Toolkit.i18nText("Fine-Design_Basic_Service_Platform_Title"));
this.setSmallIcon("/com/fr/design/images/platform/platform");
}
@Override
public void actionPerformed(ActionEvent e) {
BrowseUtils.browser(CloudCenter.getInstance().acquireUrlByKind("service.platform"));
}
}

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

@ -56,6 +56,7 @@ import com.fr.design.gui.itoolbar.UIToolbar;
import com.fr.design.locale.impl.SupportLocaleImpl; import com.fr.design.locale.impl.SupportLocaleImpl;
import com.fr.design.mainframe.JTemplate; import com.fr.design.mainframe.JTemplate;
import com.fr.design.mainframe.ToolBarNewTemplatePane; import com.fr.design.mainframe.ToolBarNewTemplatePane;
import com.fr.design.mainframe.platform.ServicePlatformAction;
import com.fr.design.menu.MenuDef; import com.fr.design.menu.MenuDef;
import com.fr.design.menu.SeparatorDef; import com.fr.design.menu.SeparatorDef;
import com.fr.design.menu.ShortCut; import com.fr.design.menu.ShortCut;
@ -571,9 +572,11 @@ public abstract class ToolBarMenuDock {
if (AlphaFineConfigManager.isALPHALicAvailable()) { if (AlphaFineConfigManager.isALPHALicAvailable()) {
shortCuts.add(new AlphaFineAction()); shortCuts.add(new AlphaFineAction());
} }
shortCuts.add(new EnvDetectorAction()); shortCuts.add(new EnvDetectorAction());
//服务平台
shortCuts.add(new ServicePlatformAction());
shortCuts.add(SeparatorDef.DEFAULT); shortCuts.add(SeparatorDef.DEFAULT);
if (DesignerEnvManager.getEnvManager().isOpenDebug()) { if (DesignerEnvManager.getEnvManager().isOpenDebug()) {
OSSupportCenter.buildAction(objects -> shortCuts.add(new FineUIAction()), SupportOSImpl.FINEUI); OSSupportCenter.buildAction(objects -> shortCuts.add(new FineUIAction()), SupportOSImpl.FINEUI);

3
designer-base/src/main/resources/com/fr/design/images/platform/platform_normal.svg

@ -0,0 +1,3 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M14 6.5V10.5V12H10V6H12.9776C12.725 3.19675 10.369 1 7.5 1C4.63098 1 2.27504 3.19675 2.02242 6H5V12H2V14H6V13H9V16H6V15H1V12V11.5V10.5V6.5V6H1.01894C1.27426 2.64378 4.07839 0 7.5 0C10.9216 0 13.7257 2.64378 13.9811 6H14V6.5ZM13 10.5V7H11V11H13V10.5ZM2 10.5V7H4V11H2V10.5ZM7 15V14H8V15H7Z" fill="#333334"/>
</svg>

After

Width:  |  Height:  |  Size: 458 B

18
designer-realize/src/main/java/com/fr/design/report/freeze/FreezeAndRepeatPane.java

@ -32,14 +32,18 @@ public abstract class FreezeAndRepeatPane extends BasicBeanPane<FT> {
((UISpinner) start).addChangeListener(new ChangeListener() { ((UISpinner) start).addChangeListener(new ChangeListener() {
@Override @Override
public void stateChanged(ChangeEvent e) { public void stateChanged(ChangeEvent e) {
if (end instanceof UISpinner) { updateEndValue();
((UISpinner) end).setValue(Math.max(((UISpinner) start).getValue(), ((UISpinner) end).getValue()));
}
} }
}); });
} }
if (end instanceof UISpinner) { if (end instanceof UISpinner) {
end.setPreferredSize(size); end.setPreferredSize(size);
((UISpinner) end).addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
updateEndValue();
}
});
} }
this.setLayout(FRGUIPaneFactory.createBoxFlowLayout()); this.setLayout(FRGUIPaneFactory.createBoxFlowLayout());
this.add(start); this.add(start);
@ -81,4 +85,12 @@ public abstract class FreezeAndRepeatPane extends BasicBeanPane<FT> {
} }
} }
private void updateEndValue() {
if (end instanceof UISpinner) {
((UISpinner) end).setMinValue(((UISpinner) start).getValue());
((UISpinner) end).setValue(((UISpinner) end).getValue());
}
}
} }

10
designer-realize/src/main/java/com/fr/design/report/freeze/RepeatAndFreezeSettingPane.java

@ -242,6 +242,7 @@ public class RepeatAndFreezeSettingPane extends BasicPane {
JPanel pagePanel = new JPanel(FRGUIPaneFactory.createBorderLayout()); JPanel pagePanel = new JPanel(FRGUIPaneFactory.createBorderLayout());
JPanel repeatHeadPanel = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(1); JPanel repeatHeadPanel = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(1);
JPanel repeatFootPanel = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(1); JPanel repeatFootPanel = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(1);
tabbedPane = new UITabbedPane();
//添加上方的边界线 //添加上方的边界线
addBorder(repeatHeadPanel, REPEAT_AND_FROZEN_HEAD); addBorder(repeatHeadPanel, REPEAT_AND_FROZEN_HEAD);
@ -268,14 +269,12 @@ public class RepeatAndFreezeSettingPane extends BasicPane {
outfreezePanel.add(initPageFrozenPane(), BorderLayout.NORTH); outfreezePanel.add(initPageFrozenPane(), BorderLayout.NORTH);
outfreezePanel.add(initPageFrozenFootPane(),BorderLayout.CENTER); outfreezePanel.add(initPageFrozenFootPane(),BorderLayout.CENTER);
tabbedPane.addTab(Toolkit.i18nText("Fine-Design_Basic_M_Page_Preview"), pagePanel);
JPanel writePanel = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Engine_Frozen")); JPanel writePanel = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Engine_Frozen"));
addWriteFrozen(writePanel); addWriteFrozen(writePanel);
tabbedPane = new UITabbedPane();
//去除对应的焦点虚线边框 //去除对应的焦点虚线边框
tabbedPane.setFocusable(false); tabbedPane.setFocusable(false);
tabbedPane.addTab(Toolkit.i18nText("Fine-Design_Basic_M_Page_Preview"), pagePanel);
tabbedPane.addTab(Toolkit.i18nText("Fine-Design_Basic_M_Write_Preview"), writePanel);
this.add(tabbedPane); this.add(tabbedPane);
initPageRwoListener(); initPageRwoListener();
initPageColListener(); initPageColListener();
@ -322,6 +321,7 @@ public class RepeatAndFreezeSettingPane extends BasicPane {
protected void addWriteFrozen(JPanel freezePanel) { protected void addWriteFrozen(JPanel freezePanel) {
freezePanel.add(initWriteFrozenPane(), BorderLayout.CENTER); freezePanel.add(initWriteFrozenPane(), BorderLayout.CENTER);
tabbedPane.addTab(Toolkit.i18nText("Fine-Design_Basic_M_Write_Preview"), freezePanel);
} }
protected void addFootColStart(JPanel repeatPanel) { protected void addFootColStart(JPanel repeatPanel) {
@ -509,7 +509,7 @@ public class RepeatAndFreezeSettingPane extends BasicPane {
} }
this.usePageHeadFrozenRCheckBox.setSelected(attribute.isUsePageFrozenRow()); this.usePageHeadFrozenRCheckBox.setSelected(attribute.isUsePageFrozenRow());
this.usePageFootFrozenRCheckBox.setSelected(attribute.isUsePageFrozenRow()); this.usePageFootFrozenRCheckBox.setSelected(attribute.isUsePageFootRowFrozen());
this.freezePageRowPane.setEnabled(attribute.isUsePageFrozenRow()); this.freezePageRowPane.setEnabled(attribute.isUsePageFrozenRow());
} }
@ -536,7 +536,7 @@ public class RepeatAndFreezeSettingPane extends BasicPane {
} }
this.usePageHeadFrozenCCheckBox.setSelected(attribute.isUsePageFrozenColumn()); this.usePageHeadFrozenCCheckBox.setSelected(attribute.isUsePageFrozenColumn());
this.usePageFootFrozenCCheckBox.setSelected(attribute.isUsePageFrozenColumn()); this.usePageFootFrozenCCheckBox.setSelected(attribute.isUsePageFootColFrozen());
this.freezePageColPane.setEnabled(attribute.isUsePageFrozenColumn()); this.freezePageColPane.setEnabled(attribute.isUsePageFrozenColumn());
} }

2
designer-realize/src/main/java/com/fr/start/MainDesigner.java

@ -368,7 +368,7 @@ public class MainDesigner extends BaseDesigner {
@Override @Override
protected void upButtonClickEvent() { protected void upButtonClickEvent() {
JTemplate<?, ?> jt = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); JTemplate<?, ?> jt = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate();
if (jt == null) { if (jt == null || jt.isSaving()) {
return; return;
} }
WebPreviewUtils.preview(jt); WebPreviewUtils.preview(jt);

Loading…
Cancel
Save