diff --git a/designer-base/src/main/java/com/fr/design/actions/file/WebPreviewUtils.java b/designer-base/src/main/java/com/fr/design/actions/file/WebPreviewUtils.java index 8f8d4ae139..2503db1de2 100644 --- a/designer-base/src/main/java/com/fr/design/actions/file/WebPreviewUtils.java +++ b/designer-base/src/main/java/com/fr/design/actions/file/WebPreviewUtils.java @@ -76,7 +76,7 @@ public final class WebPreviewUtils { browserTemplate(jt, baseRoute, map, actionType); } }); - worker.start(jt.getTarget().getTemplateID()); + worker.start(jt.getRuntimeId()); return; } browserTemplate(jt, baseRoute, map, actionType); @@ -97,7 +97,7 @@ public final class WebPreviewUtils { ); if (OK_OPTION == selVal) { CallbackSaveWorker worker = jt.saveAs(); - worker.start(jt.getTarget().getTemplateID()); + worker.start(jt.getRuntimeId()); worker.addSuccessCallback(new Runnable() { @Override public void run() { @@ -125,7 +125,7 @@ public final class WebPreviewUtils { browseUrl(jt.getEditingFILE(), baseRoute, map, actionType, jt); } }); - worker.start(jt.getTarget().getTemplateID()); + worker.start(jt.getRuntimeId()); } } } diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/preview/sql/PreviewPerformedSqlPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/preview/sql/PreviewPerformedSqlPane.java index 462f70b34e..c0239c8fad 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/preview/sql/PreviewPerformedSqlPane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/preview/sql/PreviewPerformedSqlPane.java @@ -208,12 +208,22 @@ public class PreviewPerformedSqlPane extends JDialog implements ActionListener { StringSelection selection = new StringSelection(sql); java.awt.Toolkit.getDefaultToolkit().getSystemClipboard().setContents(selection, selection); // 弹窗 - PreviewPerformedSqlPane pane; if (isShowSpecialCharSqlPane(specialCharParamIndex)) { - pane = new PreviewPerformedSqlPane(DesignerContext.getDesignerFrame(), sql, specialCharParamIndex, ConfigService.getInstance().getPSIConfig().getSelectedSpecialChar(), highlight); + showSpecialCharSqlPane(sql, specialCharParamIndex, highlight); } else { - pane = new PreviewPerformedSqlPane(DesignerContext.getDesignerFrame(), sql); + showNormalPreviewPane(sql); } + } + + // 埋点方法 + private static void showNormalPreviewPane(String sql) { + PreviewPerformedSqlPane pane = new PreviewPerformedSqlPane(DesignerContext.getDesignerFrame(), sql); + pane.setVisible(true); + } + + // 埋点方法 + private static void showSpecialCharSqlPane(String sql, List specialCharParamIndex, boolean highlight) { + PreviewPerformedSqlPane pane = new PreviewPerformedSqlPane(DesignerContext.getDesignerFrame(), sql, specialCharParamIndex, ConfigService.getInstance().getPSIConfig().getSelectedSpecialChar(), highlight); pane.setVisible(true); } diff --git a/designer-base/src/main/java/com/fr/design/dialog/UIExpandDialog.java b/designer-base/src/main/java/com/fr/design/dialog/UIExpandDialog.java index 60ee096c3d..328b59f729 100644 --- a/designer-base/src/main/java/com/fr/design/dialog/UIExpandDialog.java +++ b/designer-base/src/main/java/com/fr/design/dialog/UIExpandDialog.java @@ -6,6 +6,7 @@ import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.itextarea.UITextArea; import com.fr.design.i18n.Toolkit; import com.fr.design.utils.gui.GUICoreUtils; +import com.fr.stable.StringUtils; import javax.swing.BorderFactory; import javax.swing.Icon; @@ -64,7 +65,7 @@ public class UIExpandDialog extends UIDialog { private final UILabel narrow = new UILabel(); private final UILabel narrowHit = new UILabel(); private final UIButton buttonOK; - private final UIButton buttonCancel; + private UIButton buttonCancel = null; private JLabel msg; private final UITextArea textArea = new UITextArea(); @@ -73,7 +74,9 @@ public class UIExpandDialog extends UIDialog { String okText, String cancelText, boolean isExpand) { super(owner); buttonOK = new UIButton(okText); - buttonCancel = new UIButton(cancelText); + if (!StringUtils.isEmpty(cancelText)) { + buttonCancel = new UIButton(cancelText); + } setTitle(title); setModal(isModal); initComponents(messageType, message, detail, isModal, isExpand, null); @@ -82,7 +85,9 @@ public class UIExpandDialog extends UIDialog { public UIExpandDialog(Builder builder) { super(builder.owner); buttonOK = new UIButton(builder.okText); - buttonCancel = new UIButton(builder.cancelText); + if (!StringUtils.isEmpty(builder.cancelText)) { + buttonCancel = new UIButton(builder.cancelText); + } setTitle(builder.title); setModal(builder.modal); initComponents(builder.messageType, builder.message, builder.detail, @@ -91,7 +96,7 @@ public class UIExpandDialog extends UIDialog { public void initComponents(int messageType, String message, String detail, boolean isModal, boolean isExpand, DialogActionListener l) { - + applyClosingAction(); setLayout(new BorderLayout(GAP, GAP)); setResizable(false); setModal(isModal); @@ -133,7 +138,9 @@ public class UIExpandDialog extends UIDialog { // 操作面板 JPanel actionPanel = new JPanel(); actionPanel.setLayout(new FlowLayout(FlowLayout.CENTER, MARGIN, MARGIN)); - actionPanel.add(buttonCancel); + if (buttonCancel != null) { + actionPanel.add(buttonCancel); + } actionPanel.add(buttonOK); add(actionPanel, BorderLayout.SOUTH); @@ -185,11 +192,13 @@ public class UIExpandDialog extends UIDialog { } }); - buttonCancel.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - doCancel(); - } - }); + if (buttonCancel != null) { + buttonCancel.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + doCancel(); + } + }); + } } protected Icon getIconForType(int messageType) { diff --git a/designer-base/src/main/java/com/fr/design/file/MutilTempalteTabPane.java b/designer-base/src/main/java/com/fr/design/file/MutilTempalteTabPane.java index 9fa676f94e..87b7f2f25c 100644 --- a/designer-base/src/main/java/com/fr/design/file/MutilTempalteTabPane.java +++ b/designer-base/src/main/java/com/fr/design/file/MutilTempalteTabPane.java @@ -706,7 +706,7 @@ public class MutilTempalteTabPane extends JComponent { closeTpl(specifiedTemplate); } }); - worker.start(specifiedTemplate.getTarget().getTemplateID()); + worker.start(specifiedTemplate.getRuntimeId()); } else if (returnVal == JOptionPane.NO_OPTION) { closeTpl(specifiedTemplate); } diff --git a/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java b/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java index 3c62f3b583..9e8df6b85f 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java @@ -129,6 +129,11 @@ public abstract class JTemplate> private volatile boolean opening = false; private volatile boolean openFailed = false; + /** + * UI界面模板运行时唯一的id 不存储在模板中 仅在运行时使用 模板界面上关闭就不关注了 + */ + private final String runtimeId = UUID.randomUUID().toString(); + private PluginEventListener pluginListener; public JTemplate() { @@ -1492,10 +1497,6 @@ public abstract class JTemplate> editingFILE = fileChooser.getSelectedFILE(); } - //收集和生成templateID 因为是另存为操作 无论怎么样都需要重新生成templateID - // TODO Hades https://work.fineres.com/browse/REPORT-52936 - // initForCollect(); - FILE finalEditingFILE = editingFILE; CallbackSaveWorker worker = new CallbackSaveWorker(new Callable() { @Override @@ -1587,13 +1588,13 @@ public abstract class JTemplate> @Override public void saveDirectly() { CallbackSaveWorker worker = save(); - worker.start(this.template.getTemplateID()); + worker.start(getRuntimeId()); } @Override public void saveAsDirectly() { CallbackSaveWorker worker = saveAs(); - worker.start(this.template.getTemplateID()); + worker.start(getRuntimeId()); } @Override @@ -1634,4 +1635,7 @@ public abstract class JTemplate> return !isSaving() && !isOpening() && !isOpenFailed(); } + public String getRuntimeId() { + return runtimeId; + } } diff --git a/designer-base/src/main/java/com/fr/design/mainframe/check/CheckButton.java b/designer-base/src/main/java/com/fr/design/mainframe/check/CheckButton.java index 7757ea2f42..0ec50ef248 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/check/CheckButton.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/check/CheckButton.java @@ -116,7 +116,7 @@ public class CheckButton extends UIButton { startCheck(checkThread); } }); - worker.start(jtemplate.getTarget().getTemplateID()); + worker.start(jtemplate.getRuntimeId()); } } else { if (!jtemplate.isSaved()) { @@ -127,7 +127,7 @@ public class CheckButton extends UIButton { startCheck(checkThread); } }); - worker.start(jtemplate.getTarget().getTemplateID()); + worker.start(jtemplate.getRuntimeId()); } else { startCheck(checkThread); } @@ -148,7 +148,7 @@ public class CheckButton extends UIButton { startCheck(checkThread); } }); - worker.start(jtemplate.getTarget().getTemplateID()); + worker.start(jtemplate.getRuntimeId()); } } } diff --git a/designer-base/src/main/java/com/fr/design/mainframe/reuse/ReuseGuideDialog.java b/designer-base/src/main/java/com/fr/design/mainframe/reuse/ReuseGuideDialog.java index 4e0bb3143f..a0e9166592 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/reuse/ReuseGuideDialog.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/reuse/ReuseGuideDialog.java @@ -108,7 +108,7 @@ public class ReuseGuideDialog extends UIDialog implements PromptWindow { JPanel centerPanel = new JPanel(new BorderLayout()); UILabel titleLabel = new UILabel(Toolkit.i18nText("Fine-Design_Share_Drag_And_Make_Component")); - UILabel imageLabel = new UILabel(new ImageIcon(IOUtils.readImage("com/fr/base/images/share/guide.png").getScaledInstance(DEFAULT.width, DEFAULT.height, Image.SCALE_SMOOTH))); + UILabel imageLabel = new UILabel(new ImageIcon(IOUtils.readImage("com/fr/design/images/dashboard/guide.png").getScaledInstance(DEFAULT.width, DEFAULT.height, Image.SCALE_SMOOTH))); titleLabel.setFont(new Font(titleLabel.getFont().getName(), Font.BOLD, TITLE_FONT_SIZE)); titleLabel.setBorder(BorderFactory.createEmptyBorder()); diff --git a/designer-base/src/main/java/com/fr/design/ui/ModernUIPane.java b/designer-base/src/main/java/com/fr/design/ui/ModernUIPane.java index 0afe2ccd31..084820a13e 100644 --- a/designer-base/src/main/java/com/fr/design/ui/ModernUIPane.java +++ b/designer-base/src/main/java/com/fr/design/ui/ModernUIPane.java @@ -8,6 +8,7 @@ import com.fr.design.i18n.Toolkit; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.web.struct.AssembleComponent; import com.teamdev.jxbrowser.chromium.Browser; +import com.teamdev.jxbrowser.chromium.BrowserType; import com.teamdev.jxbrowser.chromium.JSValue; import com.teamdev.jxbrowser.chromium.events.LoadListener; import com.teamdev.jxbrowser.chromium.events.ScriptContextAdapter; @@ -18,11 +19,11 @@ import com.teamdev.jxbrowser.chromium.swing.BrowserView; import javax.swing.JDialog; import javax.swing.SwingUtilities; import javax.swing.WindowConstants; +import java.util.Map; import java.awt.BorderLayout; import java.awt.Dimension; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; -import java.util.Map; /** * @author richie @@ -37,11 +38,11 @@ public class ModernUIPane extends BasicPane { private String variable = "data"; private String expression = "update()"; - private ModernUIPane() { - initialize(); + private ModernUIPane(BrowserType browserType) { + initialize(browserType); } - private void initialize() { + private void initialize(BrowserType browserType) { if (browser == null) { setLayout(new BorderLayout()); Assistant.addChromiumSwitches("--disable-google-traffic"); @@ -76,10 +77,10 @@ public class ModernUIPane extends BasicPane { } }); Assistant.addChromiumSwitches("--remote-debugging-port=9222"); - initializeBrowser(); + initializeBrowser(browserType); add(new BrowserView(browser), BorderLayout.CENTER); } else { - initializeBrowser(); + initializeBrowser(browserType); add(new BrowserView(browser), BorderLayout.CENTER); } } @@ -97,8 +98,8 @@ public class ModernUIPane extends BasicPane { debugger.loadURL(browser.getRemoteDebuggingURL()); } - private void initializeBrowser() { - browser = new Browser(); + private void initializeBrowser(BrowserType browserType) { + browser = new Browser(browserType); // 初始化的时候,就把命名空间对象初始化好,确保window.a.b.c("a.b.c"为命名空间)对象都是初始化过的 browser.addScriptContextListener(new ScriptContextAdapter() { @Override @@ -145,14 +146,22 @@ public class ModernUIPane extends BasicPane { public T update() { JSValue jsValue = browser.executeJavaScriptAndReturnValue("window." + namespace + "." + expression); if (jsValue.isObject()) { - return (T)jsValue.asJavaObject(); + return (T) jsValue.asJavaObject(); } return null; } public static class Builder { - private ModernUIPane pane = new ModernUIPane<>(); + private ModernUIPane pane; + + public Builder() { + this(BrowserType.HEAVYWEIGHT); + } + + public Builder(BrowserType browserType) { + this.pane = new ModernUIPane<>(browserType); + } public Builder prepare(ScriptContextListener contextListener) { pane.browser.addScriptContextListener(contextListener); diff --git a/designer-base/src/main/java/com/fr/design/update/actions/SyncFileProcess.java b/designer-base/src/main/java/com/fr/design/update/actions/SyncFileProcess.java index ea2db13989..b4a1b49071 100644 --- a/designer-base/src/main/java/com/fr/design/update/actions/SyncFileProcess.java +++ b/designer-base/src/main/java/com/fr/design/update/actions/SyncFileProcess.java @@ -5,6 +5,7 @@ import com.fr.decision.update.info.UpdateCallBack; import com.fr.decision.update.info.UpdateProgressCallBack; import com.fr.design.i18n.Toolkit; import com.fr.design.versioncheck.VersionCheckUtils; +import com.fr.json.JSONArray; import com.fr.log.FineLoggerFactory; import java.util.concurrent.ExecutionException; import javax.swing.JProgressBar; @@ -13,6 +14,7 @@ import javax.swing.SwingWorker; public abstract class SyncFileProcess extends SwingWorker { private String buildNo; private JProgressBar bar; + private JSONArray syncFailedPlugins; public SyncFileProcess(JProgressBar bar, String buildNo) { this.bar = bar; @@ -22,13 +24,10 @@ public abstract class SyncFileProcess extends SwingWorker { @Override protected Boolean doInBackground() throws Exception { UpdateCallBack callBack = new UpdateProgressCallBack(bar); - boolean result = SyncExecutor.getInstance().execute(callBack, buildNo); - if (result) { - bar.setValue(0); - bar.setString(Toolkit.i18nText("Fine-Design_Basic_Sync_Plugins")); - VersionCheckUtils.syncPlugins(VersionCheckUtils.checkLocalAndRemotePlugin()); - } - return result; + bar.setValue(0); + bar.setString(Toolkit.i18nText("Fine-Design_Basic_Sync_Plugins")); + syncFailedPlugins = VersionCheckUtils.syncPlugins(VersionCheckUtils.checkLocalAndRemotePlugin()); + return SyncExecutor.getInstance().execute(callBack, buildNo); } @Override @@ -49,6 +48,10 @@ public abstract class SyncFileProcess extends SwingWorker { } } + public JSONArray getSyncFailedPlugins(){ + return syncFailedPlugins; + } + /** * 下载成功 */ diff --git a/designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java b/designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java index 11780409a7..46622c44d8 100644 --- a/designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java +++ b/designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java @@ -243,10 +243,11 @@ public class VersionCheckUtils { return differentPlugins; } - public static void syncPlugins(JSONArray differentPlugins) { + public static JSONArray syncPlugins(JSONArray differentPlugins) { Set uninstallFailed = uninstallPlugins(differentPlugins); List plugins = getSyncPlugins(differentPlugins, uninstallFailed); installPlugins(plugins); + return getPluginsSyncFailed(differentPlugins); } private static List getSyncPlugins(JSONArray differentPlugins, Set uninstallFailed) { @@ -302,7 +303,7 @@ public class VersionCheckUtils { return uninstallFailedID; } - public static JSONArray getPluginsSyncFailed(JSONArray differentPlugins){ + private static JSONArray getPluginsSyncFailed(JSONArray differentPlugins){ JSONArray pluginsNeedSync = JSONArray.create(); List localPlugins = PluginManager.getContexts(); Map localPluginsInfo = new HashMap<>(); diff --git a/designer-base/src/main/java/com/fr/env/CheckServiceDialog.java b/designer-base/src/main/java/com/fr/env/CheckServiceDialog.java index 7e9e74ebcf..222a9a2a57 100644 --- a/designer-base/src/main/java/com/fr/env/CheckServiceDialog.java +++ b/designer-base/src/main/java/com/fr/env/CheckServiceDialog.java @@ -322,14 +322,15 @@ public class CheckServiceDialog extends JDialog implements ActionListener { final JFrame frame = DesignerContext.getDesignerFrame(); final RestartHelper helper = new RestartHelper(); FineProcessContext.getParentPipe().fire(FineProcessEngineEvent.DESTROY); + SyncFailedPluginsDialog syncFailedPluginsDialog = new SyncFailedPluginsDialog(DesignerContext.getDesignerFrame(),JSONArray.create()); new SyncFileProcess(progressBar, remoteBuildNo) { @Override public void onDownloadSuccess() { deleteForDesignerUpdate(installLib); progressBar.setVisible(false); - JSONArray syncFailedPlugins = VersionCheckUtils.getPluginsSyncFailed(differentPlugins); + JSONArray syncFailedPlugins = getSyncFailedPlugins(); if (syncFailedPlugins.size() > 0) { - SyncFailedPluginsDialog syncFailedPluginsDialog = new SyncFailedPluginsDialog(DesignerContext.getDesignerFrame(), syncFailedPlugins); + syncFailedPluginsDialog.showSyncFailedPluginsInfo(syncFailedPlugins); syncFailedPluginsDialog.setVisible(true); } helper.restartForUpdate(frame); @@ -352,8 +353,7 @@ public class CheckServiceDialog extends JDialog implements ActionListener { protected JSONArray doInBackground() { progressBar.setString(Toolkit.i18nText("Fine-Design_Basic_Sync_Plugins")); progressBar.setValue(0); - VersionCheckUtils.syncPlugins(differentPlugins); - return VersionCheckUtils.getPluginsSyncFailed(differentPlugins); + return VersionCheckUtils.syncPlugins(differentPlugins); } @Override diff --git a/designer-base/src/main/java/com/fr/env/SyncFailedPluginsDialog.java b/designer-base/src/main/java/com/fr/env/SyncFailedPluginsDialog.java index 9bf63460da..0a9faab55a 100644 --- a/designer-base/src/main/java/com/fr/env/SyncFailedPluginsDialog.java +++ b/designer-base/src/main/java/com/fr/env/SyncFailedPluginsDialog.java @@ -38,6 +38,7 @@ import javax.swing.UIManager; public class SyncFailedPluginsDialog extends JDialog { private UILabel detailsLabel; private JScrollPane scrollPane; + private UITextArea detailsTextArea; public SyncFailedPluginsDialog(Frame parent, JSONArray syncFailedPlugins) { super(parent, true); JPanel body = FRGUIPaneFactory.createBorderLayout_L_Pane(); @@ -70,14 +71,9 @@ public class SyncFailedPluginsDialog extends JDialog { detailsTitlePanel.add(detailsLabel); detailsTitlePanel.setBorder(BorderFactory.createEmptyBorder(0,0,5,0)); - UITextArea detailsTextArea = new UITextArea(); - StringBuilder detailsText = new StringBuilder(StringUtils.EMPTY); - for (int i = 0; i < syncFailedPlugins.size(); i++) { - JSONObject plugin = syncFailedPlugins.getJSONObject(i); - detailsText.append(plugin.getString("name")).append(",").append(Toolkit.i18nText("Fine-Design_Basic_Sync_Server_Version")).append(plugin.getString("version")).append("\n"); - } - detailsTextArea.setText(detailsText.toString()); + detailsTextArea = new UITextArea(); detailsTextArea.setEditable(false); + showSyncFailedPluginsInfo(syncFailedPlugins); scrollPane = new JScrollPane(detailsTextArea); centerPanel.add(detailsTitlePanel,BorderLayout.NORTH); centerPanel.add(scrollPane,BorderLayout.CENTER); @@ -98,6 +94,18 @@ public class SyncFailedPluginsDialog extends JDialog { GUICoreUtils.centerWindow(this); } + public void showSyncFailedPluginsInfo(JSONArray syncFailedPlugins){ + if(null == syncFailedPlugins){ + return; + } + StringBuilder detailsText = new StringBuilder(StringUtils.EMPTY); + for (int i = 0; i < syncFailedPlugins.size(); i++) { + JSONObject plugin = syncFailedPlugins.getJSONObject(i); + detailsText.append(plugin.getString("name")).append(",").append(Toolkit.i18nText("Fine-Design_Basic_Sync_Server_Version")).append(plugin.getString("version")).append("\n"); + } + detailsTextArea.setText(detailsText.toString()); + } + private MouseListener detailsLabelClickListener = new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { diff --git a/designer-base/src/main/resources/com/fr/design/images/dashboard/guide.png b/designer-base/src/main/resources/com/fr/design/images/dashboard/guide.png index fbd5593bba..411a9a2962 100644 Binary files a/designer-base/src/main/resources/com/fr/design/images/dashboard/guide.png and b/designer-base/src/main/resources/com/fr/design/images/dashboard/guide.png differ diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/richText/VanChartRichEditorPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/richText/VanChartRichEditorPane.java index 312c24e84b..f1d7bfcbf6 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/richText/VanChartRichEditorPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/richText/VanChartRichEditorPane.java @@ -20,8 +20,10 @@ import com.fr.plugin.chart.custom.CustomDefinition; import com.fr.plugin.chart.custom.type.CustomPlotType; import com.fr.plugin.chart.type.TextAlign; import com.fr.stable.StringUtils; +import com.fr.third.org.apache.commons.lang3.SystemUtils; import com.fr.van.chart.designer.PlotFactory; import com.teamdev.jxbrowser.chromium.Browser; +import com.teamdev.jxbrowser.chromium.BrowserType; import com.teamdev.jxbrowser.chromium.JSValue; import com.teamdev.jxbrowser.chromium.events.ScriptContextAdapter; import com.teamdev.jxbrowser.chromium.events.ScriptContextEvent; @@ -152,7 +154,8 @@ public class VanChartRichEditorPane { } public static ModernUIPane initPane(VanChartRichEditorModel model) { - return new ModernUIPane.Builder() + BrowserType type = SystemUtils.IS_OS_WINDOWS_10 ? BrowserType.LIGHTWEIGHT : BrowserType.HEAVYWEIGHT; + return new ModernUIPane.Builder(type) .prepare(new ScriptContextAdapter() { public void onScriptContextCreated(ScriptContextEvent event) { browser = event.getBrowser(); diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/richText/VanChartRichTextDialog.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/richText/VanChartRichTextDialog.java index 993c4bc2ea..509055842a 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/richText/VanChartRichTextDialog.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/richText/VanChartRichTextDialog.java @@ -10,7 +10,7 @@ import java.awt.Frame; public class VanChartRichTextDialog extends BasicDialog { - public static final Dimension DEFAULT = new Dimension(960, 800); + public static final Dimension DEFAULT = new Dimension(960, 700); public VanChartRichTextDialog(Frame parent, BasicPane pane) { super(parent, pane); diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/richText/VanChartRichTextPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/richText/VanChartRichTextPane.java index b6bce1145f..8b3d063960 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/richText/VanChartRichTextPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/richText/VanChartRichTextPane.java @@ -20,7 +20,7 @@ public class VanChartRichTextPane extends BasicBeanPane { private static final int FIELD_PANE_H = 270; private static final int RICH_EDITOR_W = 940; - private static final int RICH_EDITOR_H = 460; + private static final int RICH_EDITOR_H = 400; private VanChartFieldListPane fieldListPane; private VanChartFieldAttrPane fieldAttrPane; diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/app/DesignerAppUtils.java b/designer-realize/src/main/java/com/fr/design/mainframe/app/DesignerAppUtils.java index e0dfb3b6cb..b9f84d23a7 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/app/DesignerAppUtils.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/app/DesignerAppUtils.java @@ -178,6 +178,7 @@ public class DesignerAppUtils { } else { UIExpandDialog.Builder().owner(DesignerContext.getDesignerFrame()) .title(Toolkit.i18nText("Fine-Design_Basic_Tool_Tips")) + .cancelText(StringUtils.EMPTY) .message(Toolkit.i18nText("Fine-Design_Template_Plugin_Error_Message_Remote")) .detail(detail) .build() diff --git a/designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java b/designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java index 2a59607f1c..fee4ddaa90 100644 --- a/designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java +++ b/designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java @@ -166,7 +166,6 @@ public class DesignerActivator extends Activator implements Prepare { storePassport(); AlphaFineHelper.switchConfig4Locale(); RecoverManager.register(new RecoverForDesigner()); - ContentReplacerCenter.getInstance().register(); pushUpdateTask.run(); } @@ -459,5 +458,6 @@ public class DesignerActivator extends Activator implements Prepare { @Override public void prepare() { LoginAuthServer.getInstance().start(); + ContentReplacerCenter.getInstance().register(); } }