diff --git a/designer-base/src/main/java/com/fr/design/actions/community/WorkOrderCenterAction.java b/designer-base/src/main/java/com/fr/design/actions/community/WorkOrderCenterAction.java
new file mode 100644
index 0000000000..d556548c14
--- /dev/null
+++ b/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);
+ }
+}
\ No newline at end of file
diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTablePane.java b/designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTablePane.java
index da87c10f6e..e95a5999ad 100644
--- a/designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTablePane.java
+++ b/designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTablePane.java
@@ -169,7 +169,6 @@ public class PreviewTablePane extends BasicPane {
this.add(new JScrollPane(preveiwTable), BorderLayout.CENTER);
if (this.dialog == null) {
this.dialog = this.showWindow(new JFrame());
- GUICoreUtils.centerWindow(DesignerContext.getDesignerFrame(), this.dialog);
}
progressBar = new AutoProgressBar(this, Toolkit.i18nText("Fine-Design_Basic_Loading_Data"), "", 0, 100) {
public void doMonitorCanceled() {
diff --git a/designer-base/src/main/java/com/fr/design/extra/PluginWebBridge.java b/designer-base/src/main/java/com/fr/design/extra/PluginWebBridge.java
index d709013506..ba7c0092d2 100644
--- a/designer-base/src/main/java/com/fr/design/extra/PluginWebBridge.java
+++ b/designer-base/src/main/java/com/fr/design/extra/PluginWebBridge.java
@@ -16,6 +16,7 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.locale.impl.BbsRegisterMark;
import com.fr.design.locale.impl.BbsResetMark;
import com.fr.design.locale.impl.BbsSpaceMark;
+import com.fr.design.plugin.DesignerPluginContext;
import com.fr.design.utils.concurrent.ThreadFactoryBuilder;
import com.fr.general.CloudCenter;
import com.fr.general.locale.LocaleCenter;
@@ -401,6 +402,7 @@ public class PluginWebBridge {
if (uiDialog != null) {
uiDialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
uiDialog.setVisible(false);
+ DesignerPluginContext.setPluginDialog(null);
}
}
diff --git a/designer-base/src/main/java/com/fr/design/extra/ShopDialog.java b/designer-base/src/main/java/com/fr/design/extra/ShopDialog.java
index e0170cef88..fed3179894 100644
--- a/designer-base/src/main/java/com/fr/design/extra/ShopDialog.java
+++ b/designer-base/src/main/java/com/fr/design/extra/ShopDialog.java
@@ -3,6 +3,7 @@ package com.fr.design.extra;
import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.UIDialog;
import com.fr.design.jdk.JdkVersion;
+import com.fr.design.plugin.DesignerPluginContext;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.stable.StableUtils;
@@ -25,6 +26,7 @@ public class ShopDialog extends UIDialog {
setSize(createDefaultDimension());
GUICoreUtils.centerWindow(this);
setResizable(false);
+ DesignerPluginContext.setPluginDialog(this);
}
private Dimension createDefaultDimension() {
diff --git a/designer-base/src/main/java/com/fr/design/extra/exe/callback/ModifyStatusCallback.java b/designer-base/src/main/java/com/fr/design/extra/exe/callback/ModifyStatusCallback.java
index 8015e00fbd..78e338f8c1 100644
--- a/designer-base/src/main/java/com/fr/design/extra/exe/callback/ModifyStatusCallback.java
+++ b/designer-base/src/main/java/com/fr/design/extra/exe/callback/ModifyStatusCallback.java
@@ -5,6 +5,7 @@ import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.extra.PluginOperateUtils;
import com.fr.design.i18n.Toolkit;
+import com.fr.design.plugin.DesignerPluginContext;
import com.fr.log.FineLoggerFactory;
import com.fr.plugin.manage.control.PluginTaskCallback;
import com.fr.plugin.manage.control.PluginTaskResult;
@@ -31,9 +32,9 @@ public class ModifyStatusCallback implements PluginTaskCallback{
pluginInfo + Toolkit.i18nText("Fine-Design_Basic_Plugin_Has_Been_Disabled_Duplicate") :
pluginInfo + Toolkit.i18nText("Fine-Design_Plugin_Has_Been_Actived_Duplicate");
FineLoggerFactory.getLogger().info(modifyMessage);
- FineJOptionPane.showMessageDialog(null, modifyMessage);
+ FineJOptionPane.showMessageDialog(DesignerPluginContext.getPluginDialog(), modifyMessage);
} else {
- FineJOptionPane.showMessageDialog(null, pluginInfo, Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
+ FineJOptionPane.showMessageDialog(DesignerPluginContext.getPluginDialog(), pluginInfo, Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"), JOptionPane.ERROR_MESSAGE);
}
}
diff --git a/designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java b/designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java
index 33a2aaadfc..aca9bcc362 100644
--- a/designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java
+++ b/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() {
diff --git a/designer-base/src/main/java/com/fr/design/plugin/DesignerPluginContext.java b/designer-base/src/main/java/com/fr/design/plugin/DesignerPluginContext.java
new file mode 100644
index 0000000000..404477ff4d
--- /dev/null
+++ b/designer-base/src/main/java/com/fr/design/plugin/DesignerPluginContext.java
@@ -0,0 +1,21 @@
+package com.fr.design.plugin;
+
+import com.fr.design.dialog.UIDialog;
+
+/**
+ * @author hades
+ * @version 10.0
+ * Created by hades on 2021/3/8
+ */
+public class DesignerPluginContext {
+
+ private static UIDialog DIALOG;
+
+ public static UIDialog getPluginDialog() {
+ return DIALOG;
+ }
+
+ public static void setPluginDialog(UIDialog pluginDialog) {
+ DesignerPluginContext.DIALOG = pluginDialog;
+ }
+}
diff --git a/designer-base/src/main/java/com/fr/design/upm/UpmFinder.java b/designer-base/src/main/java/com/fr/design/upm/UpmFinder.java
index 4424d9d741..36e558d171 100644
--- a/designer-base/src/main/java/com/fr/design/upm/UpmFinder.java
+++ b/designer-base/src/main/java/com/fr/design/upm/UpmFinder.java
@@ -6,6 +6,7 @@ import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.dialog.UIDialog;
import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.DesignerContext;
+import com.fr.design.plugin.DesignerPluginContext;
import com.fr.design.update.ui.dialog.UpdateMainDialog;
import com.fr.event.Event;
import com.fr.event.EventDispatcher;
@@ -114,6 +115,7 @@ public class UpmFinder {
dialog.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
dialog.setVisible(false);
dialog = null;
+ DesignerPluginContext.setPluginDialog(null);
}
}
}
diff --git a/designer-base/src/main/java/com/fr/design/upm/UpmShowDialog.java b/designer-base/src/main/java/com/fr/design/upm/UpmShowDialog.java
index d5f132e98f..f0c6c6d493 100644
--- a/designer-base/src/main/java/com/fr/design/upm/UpmShowDialog.java
+++ b/designer-base/src/main/java/com/fr/design/upm/UpmShowDialog.java
@@ -2,6 +2,7 @@ package com.fr.design.upm;
import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.UIDialog;
+import com.fr.design.plugin.DesignerPluginContext;
import com.fr.design.utils.gui.GUICoreUtils;
import javax.swing.*;
@@ -25,6 +26,7 @@ public class UpmShowDialog extends UIDialog {
setSize(DEFAULT_SHOP);
GUICoreUtils.centerWindow(this);
setResizable(false);
+ DesignerPluginContext.setPluginDialog(this);
}
@Override
diff --git a/designer-base/src/main/java/com/fr/design/utils/gui/GUICoreUtils.java b/designer-base/src/main/java/com/fr/design/utils/gui/GUICoreUtils.java
index d55382c499..a89e367d64 100644
--- a/designer-base/src/main/java/com/fr/design/utils/gui/GUICoreUtils.java
+++ b/designer-base/src/main/java/com/fr/design/utils/gui/GUICoreUtils.java
@@ -38,6 +38,7 @@ import com.fr.stable.Constants;
import com.fr.stable.OperatingSystem;
import com.fr.stable.StringUtils;
+import java.awt.Container;
import javax.swing.AbstractButton;
import javax.swing.Action;
import javax.swing.BorderFactory;
@@ -318,7 +319,14 @@ public final class GUICoreUtils {
public static void centerWindow(Window win) {
// Toolkit.getDefaultToolkit().getScreenSize()在有多个显示器也只能获取到主屏的大小
// getGraphicsConfiguration().getBounds()能获取多个屏时 设计器主体界面所在屏的大小和对应的坐标
- Rectangle rectangle = win.getGraphicsConfiguration().getBounds();
+ Rectangle rectangle;
+ Container parent = win.getParent();
+ boolean displayByDesignerFrame = (DesignerContext.getDesignerFrame() != null && parent == null) || (parent != null && !parent.isVisible() && DesignerContext.getDesignerFrame() != null);
+ if (displayByDesignerFrame) {
+ rectangle = DesignerContext.getDesignerFrame().getGraphicsConfiguration().getBounds();
+ } else {
+ rectangle = win.getGraphicsConfiguration().getBounds();
+ }
centerWindow(win, rectangle);
}
diff --git a/designer-base/src/main/resources/com/fr/design/images/bbs/workOrderCenter.png b/designer-base/src/main/resources/com/fr/design/images/bbs/workOrderCenter.png
new file mode 100644
index 0000000000..6374a0e8d9
Binary files /dev/null and b/designer-base/src/main/resources/com/fr/design/images/bbs/workOrderCenter.png differ
diff --git a/designer-base/src/main/resources/com/fr/design/images/bbs/workOrderCenter_normal.svg b/designer-base/src/main/resources/com/fr/design/images/bbs/workOrderCenter_normal.svg
new file mode 100644
index 0000000000..da3a6a3a9b
--- /dev/null
+++ b/designer-base/src/main/resources/com/fr/design/images/bbs/workOrderCenter_normal.svg
@@ -0,0 +1,7 @@
+
+
\ No newline at end of file
diff --git a/designer-realize/src/main/java/com/fr/design/report/WriteShortCutsPane.java b/designer-realize/src/main/java/com/fr/design/report/WriteShortCutsPane.java
index 8cf891b929..f48061d33a 100644
--- a/designer-realize/src/main/java/com/fr/design/report/WriteShortCutsPane.java
+++ b/designer-realize/src/main/java/com/fr/design/report/WriteShortCutsPane.java
@@ -8,6 +8,8 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.gui.UIComponentUtils;
import com.fr.general.ComparatorUtils;
+import com.fr.transaction.Configurations;
+import com.fr.transaction.WorkerAdaptor;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
@@ -140,7 +142,13 @@ public class WriteShortCutsPane extends JPanel{
nextRowString = temp;
switchColRow();
- ServerPreferenceConfig.getInstance().setWriteShortCuts(ComparatorUtils.equals(nextColString, "Tab"));
+ Configurations.update(new WorkerAdaptor(ServerPreferenceConfig.class) {
+
+ @Override
+ public void run() {
+ ServerPreferenceConfig.getInstance().setWriteShortCuts(ComparatorUtils.equals(nextColString, "Tab"));
+ }
+ });
}
};
diff --git a/designer-realize/src/main/java/com/fr/poly/creator/ECBlockEditor.java b/designer-realize/src/main/java/com/fr/poly/creator/ECBlockEditor.java
index 809a246e1e..a387e0f3a9 100644
--- a/designer-realize/src/main/java/com/fr/poly/creator/ECBlockEditor.java
+++ b/designer-realize/src/main/java/com/fr/poly/creator/ECBlockEditor.java
@@ -176,6 +176,7 @@ public class ECBlockEditor extends BlockEditor {
// 超级链接
HyperlinkGroupPane hyperlinkGroupPane = DesignerContext.getDesignerFrame().getSelectedJTemplate()
.getHyperLinkPane(HyperlinkGroupPaneActionImpl.getInstance());
+ EastRegionContainerPane.getInstance().replaceHyperlinkPane(hyperlinkGroupPane);
hyperlinkGroupPane.populate(editComponent);
}
@@ -187,4 +188,4 @@ public class ECBlockEditor extends BlockEditor {
ElementCasePane ePane = (ElementCasePane)jTemplate.getCurrentElementCasePane();
return ePane != null && ePane.isSelectedOneCell();
}
-}
\ No newline at end of file
+}