Browse Source

Merge pull request #3727 in DESIGN/design from bugfix/10.0 to feature/10.0

* commit 'c6c3cedcedf36e72638cce9b4e679838d783c691':
  REPORT-48324 聚合报表,超链在设计器中切换模板后显示不对
  REPORT-48933 设计器菜单-社区下新增“工单中心”链接
  REPORT-48204 【10.0.15】JDK11设计器遗留问题优化
feature/10.0
superman 4 years ago
parent
commit
aed4c58ddd
  1. 26
      designer-base/src/main/java/com/fr/design/actions/community/WorkOrderCenterAction.java
  2. 14
      designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java
  3. 4
      designer-base/src/main/java/com/fr/design/os/impl/PMDialogAction.java
  4. 28
      designer-base/src/main/java/com/fr/design/os/impl/SupportOSImpl.java
  5. 6
      designer-base/src/main/java/com/fr/design/utils/gui/GUIPaintUtils.java
  6. BIN
      designer-base/src/main/resources/com/fr/design/images/bbs/workOrderCenter.png
  7. 7
      designer-base/src/main/resources/com/fr/design/images/bbs/workOrderCenter_normal.svg
  8. 10
      designer-base/src/test/java/com/fr/design/os/impl/SupportOSImplTest.java
  9. 3
      designer-realize/src/main/java/com/fr/poly/creator/ECBlockEditor.java

26
designer-base/src/main/java/com/fr/design/actions/community/WorkOrderCenterAction.java

@ -0,0 +1,26 @@
package com.fr.design.actions.community;
import com.fr.design.i18n.Toolkit;
import com.fr.design.utils.BrowseUtils;
import com.fr.general.CloudCenter;
import java.awt.event.ActionEvent;
/**
* @Description 工单中心
* @Author Henry.Wang
* @Date 2021/3/8 14:02
**/
public class WorkOrderCenterAction extends UpAction {
public WorkOrderCenterAction() {
this.setSmallIcon("/com/fr/design/images/bbs/workOrderCenter");
this.setName(Toolkit.i18nText("Fine-Design_Basic_Commuinity_Work_Order_Center"));
}
@Override
public void actionPerformed(ActionEvent arg0) {
String url = CloudCenter.getInstance().acquireUrlByKind("bbs.work.order.center");
BrowseUtils.browser(url);
}
}

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

@ -9,17 +9,7 @@ import com.fr.design.DesignState;
import com.fr.design.DesignerEnvManager;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.actions.UpdateAction;
import com.fr.design.actions.community.BBSAction;
import com.fr.design.actions.community.BugAction;
import com.fr.design.actions.community.BugNeedAction;
import com.fr.design.actions.community.CenterAction;
import com.fr.design.actions.community.FacebookFansAction;
import com.fr.design.actions.community.NeedAction;
import com.fr.design.actions.community.QuestionAction;
import com.fr.design.actions.community.SignAction;
import com.fr.design.actions.community.TechSolutionAction;
import com.fr.design.actions.community.TechSupportAction;
import com.fr.design.actions.community.VideoAction;
import com.fr.design.actions.community.*;
import com.fr.design.actions.file.CloseCurrentTemplateAction;
import com.fr.design.actions.file.ExitDesignerAction;
import com.fr.design.actions.file.OpenRecentReportMenuDef;
@ -625,7 +615,7 @@ public abstract class ToolBarMenuDock {
}, SupportLocaleImpl.TECH_SUPPORT_COMMUNITY);
shortCuts.add(SeparatorDef.DEFAULT);
shortCuts.add(new WorkOrderCenterAction());
shortCuts.add(new CenterAction());
shortCuts.add(new SignAction());
LocaleCenter.buildAction(new LocaleAction() {

4
designer-base/src/main/java/com/fr/design/os/impl/PMDialogAction.java

@ -19,11 +19,11 @@ public class PMDialogAction implements OSBasedAction {
private static String PLUGIN_MANAGER_ROUTE = "#management/plugin";
@Override
public void execute(Object... objects) {
if(Arch.getArch() == Arch.ARM || OperatingSystem.isLinux()){
if(Arch.getArch() == Arch.ARM || OperatingSystem.isLinux() || SupportOSImpl.MACOS_WEB_PLUGIN_MANAGEMENT.support()){
DesignUtils.visitEnvServerByParameters( PLUGIN_MANAGER_ROUTE,null,null);
return;
}
if (ServerPreferenceConfig.getInstance().isUseOptimizedUPM() && JdkVersion.LE_8.support()) {
if (ServerPreferenceConfig.getInstance().isUseOptimizedUPM() || SupportOSImpl.MACOS_NEW_PLUGIN_MANAGEMENT.support()) {
UpmFinder.showUPMDialog();
} else {
WebViewDlgHelper.createPluginDialog();

28
designer-base/src/main/java/com/fr/design/os/impl/SupportOSImpl.java

@ -1,6 +1,7 @@
package com.fr.design.os.impl;
import com.fr.base.FRContext;
import com.fr.design.jdk.JdkVersion;
import com.fr.general.CloudCenter;
import com.fr.general.GeneralContext;
import com.fr.json.JSON;
@ -124,6 +125,33 @@ public enum SupportOSImpl implements SupportOS {
public boolean support() {
return OperatingSystem.isWindows();
}
},
MACOS_NEW_PLUGIN_MANAGEMENT {
@Override
public boolean support() {
return JdkVersion.GE_9.support() && OperatingSystem.isMacos() && getMacOsVersion() < BIG_SUR_VERSION_NUMBER;
}
},
MACOS_WEB_PLUGIN_MANAGEMENT {
@Override
public boolean support() {
return JdkVersion.GE_9.support() && OperatingSystem.isMacos() && getMacOsVersion() >= BIG_SUR_VERSION_NUMBER;
}
};
private static final int BIG_SUR_VERSION_NUMBER = 16;
protected int getMacOsVersion() {
String version = System.getProperty("os.version");
String[] versionSlice = version.split("\\.");
try {
return Integer.parseInt(versionSlice[1]);
} catch (Exception ignored) {
return 0;
}
}
}

6
designer-base/src/main/java/com/fr/design/utils/gui/GUIPaintUtils.java

@ -1,6 +1,5 @@
package com.fr.design.utils.gui;
import com.fr.base.BaseUtils;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.constants.UIConstants;
import com.fr.stable.Constants;
@ -40,7 +39,10 @@ public class GUIPaintUtils {
g2d.drawLine(x, y, x, height - 1);
g2d.drawLine(x, height - 1, x + 3, height - 1);
} else {
g2d.drawRoundRect(x, y, width - 1, height - 1, UIConstants.ARC, UIConstants.ARC);
double offsetX = Math.min(GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getDefaultConfiguration().getDefaultTransform().getScaleX() - 1, 0.5d);
double offsetY = Math.min(GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getDefaultConfiguration().getDefaultTransform().getScaleY() - 1, 0.5d);
Shape shape = new RoundRectangle2D.Double(x + offsetX, y + offsetY, width - 1d, height - 1d, UIConstants.ARC, UIConstants.ARC);
g2d.draw(shape);
}
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
} else {

BIN
designer-base/src/main/resources/com/fr/design/images/bbs/workOrderCenter.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 207 B

7
designer-base/src/main/resources/com/fr/design/images/bbs/workOrderCenter_normal.svg

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>icon/社区/工单中心_normal</title>
<g id="icon/社区/工单中心_normal" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<path d="M14,1 L14,10.999 L10,15 L2,15 L2,1 L14,1 Z M13.001,2 L3,2 L3,14 L9.0002,14 L9.0002,9.9998 L13.001,9.9998 L13.001,2 Z M12.5862,10.9998 L10.0002,10.9998 L10.0002,13.5858 L12.5862,10.9998 Z M7,10 L7,11 L5,11 L5,10 L7,10 Z M11,7 L11,8 L5,8 L5,7 L11,7 Z M11,4 L11,5 L5,5 L5,4 L11,4 Z" id="形状结合" fill="#333334"></path>
</g>
</svg>

After

Width:  |  Height:  |  Size: 696 B

10
designer-base/src/test/java/com/fr/design/os/impl/SupportOSImplTest.java

@ -6,6 +6,7 @@ import org.junit.Assert;
import org.junit.Test;
import java.util.Locale;
import org.powermock.reflect.Whitebox;
/**
* @author hades
@ -21,4 +22,13 @@ public class SupportOSImplTest extends TestCase {
Assert.assertFalse(SupportOSImpl.AUTOPUSHUPDATE.support());
}
@Test
public void testGetMacOsVersion() throws Exception {
String backUp = System.getProperty("os.version");
System.setProperty("os.version", "10.16");
int number = Whitebox.invokeMethod(SupportOSImpl.MACOS_WEB_PLUGIN_MANAGEMENT, "getMacOsVersion");
Assert.assertEquals(16, number);
System.setProperty("os.version", backUp);
}
}

3
designer-realize/src/main/java/com/fr/poly/creator/ECBlockEditor.java

@ -176,6 +176,7 @@ public class ECBlockEditor extends BlockEditor<ECBlockPane, PolyECBlock> {
// 超级链接
HyperlinkGroupPane hyperlinkGroupPane = DesignerContext.getDesignerFrame().getSelectedJTemplate()
.getHyperLinkPane(HyperlinkGroupPaneActionImpl.getInstance());
EastRegionContainerPane.getInstance().replaceHyperlinkPane(hyperlinkGroupPane);
hyperlinkGroupPane.populate(editComponent);
}
@ -187,4 +188,4 @@ public class ECBlockEditor extends BlockEditor<ECBlockPane, PolyECBlock> {
ElementCasePane ePane = (ElementCasePane)jTemplate.getCurrentElementCasePane();
return ePane != null && ePane.isSelectedOneCell();
}
}
}

Loading…
Cancel
Save