From 27de15b8bee0680845d1e3fec94f1159266996e5 Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Fri, 19 Feb 2021 11:24:31 +0800 Subject: [PATCH 1/2] =?UTF-8?q?CHART-18102=20JXBrowser=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E8=AF=B7=E6=B1=82=E5=A2=9E=E5=8A=A0=E6=96=87=E4=BB=B6=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/ui/Assistant.java | 14 ++++++++++++-- .../com/fr/design/editor/rich_editor.html | 4 ++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/ui/Assistant.java b/designer-base/src/main/java/com/fr/design/ui/Assistant.java index 3962692c7..930aa32bb 100644 --- a/designer-base/src/main/java/com/fr/design/ui/Assistant.java +++ b/designer-base/src/main/java/com/fr/design/ui/Assistant.java @@ -6,14 +6,12 @@ import com.teamdev.jxbrowser.chromium.BrowserContext; import com.teamdev.jxbrowser.chromium.ProtocolService; import com.teamdev.jxbrowser.chromium.URLResponse; -import javax.activation.MimetypesFileTypeMap; import java.io.DataInputStream; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.nio.file.Files; import java.nio.file.Path; -import java.nio.file.Paths; /** * @author richie @@ -50,6 +48,18 @@ public class Assistant { if (path.endsWith(".svg")) { return "image/svg+xml"; } + if (path.endsWith(".png")) { + return "image/png"; + } + if (path.endsWith(".woff")) { + return "font/woff"; + } + if (path.endsWith(".ttf")) { + return "truetype"; + } + if (path.endsWith(".eot")) { + return "embedded-opentype"; + } Path file = new File(path).toPath(); try { return Files.probeContentType(file); diff --git a/designer-chart/src/main/resources/com/fr/design/editor/rich_editor.html b/designer-chart/src/main/resources/com/fr/design/editor/rich_editor.html index 3434e1ae3..c1d533e8d 100644 --- a/designer-chart/src/main/resources/com/fr/design/editor/rich_editor.html +++ b/designer-chart/src/main/resources/com/fr/design/editor/rich_editor.html @@ -3,8 +3,8 @@ - - + + From 5e2dc670648102dc290af23eb7fbbf4126e40638 Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Fri, 19 Feb 2021 11:58:57 +0800 Subject: [PATCH 2/2] =?UTF-8?q?CHART-18066=20=E8=B0=83=E6=95=B4=E5=AF=8C?= =?UTF-8?q?=E6=96=87=E6=9C=AC=E7=BC=96=E8=BE=91=E5=99=A8=E5=B0=BA=E5=AF=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../designer/component/richText/VanChartRichTextDialog.java | 2 +- .../chart/designer/component/richText/VanChartRichTextPane.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 2cf7050dc..993c4bc2e 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, 600); + public static final Dimension DEFAULT = new Dimension(960, 800); 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 d2d0769ee..b6bce1145 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 = 260; + private static final int RICH_EDITOR_H = 460; private VanChartFieldListPane fieldListPane; private VanChartFieldAttrPane fieldAttrPane;