Browse Source

Pull request #3580: CHART-18102 & CHART-18066 JXBrowser资源请求增加文件类型、调整富文本编辑器尺寸

Merge in DESIGN/design from ~QINGHUI.LIU/design:release/10.0 to release/10.0

* commit '5e2dc670648102dc290af23eb7fbbf4126e40638':
  CHART-18066 调整富文本编辑器尺寸
  CHART-18102 JXBrowser资源请求增加文件类型
feature/big-screen
Qinghui.Liu 4 years ago
parent
commit
ffae88804b
  1. 15
      designer-base/src/main/java/com/fr/design/ui/Assistant.java
  2. 2
      designer-chart/src/main/java/com/fr/van/chart/designer/component/richText/VanChartRichTextDialog.java
  3. 2
      designer-chart/src/main/java/com/fr/van/chart/designer/component/richText/VanChartRichTextPane.java
  4. 4
      designer-chart/src/main/resources/com/fr/design/editor/rich_editor.html

15
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,19 @@ 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);

2
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);

2
designer-chart/src/main/java/com/fr/van/chart/designer/component/richText/VanChartRichTextPane.java

@ -20,7 +20,7 @@ public class VanChartRichTextPane extends BasicBeanPane<AttrTooltipContent> {
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;

4
designer-chart/src/main/resources/com/fr/design/editor/rich_editor.html

@ -3,8 +3,8 @@
<head>
<meta charset="utf-8"/>
<title></title>
<link rel="stylesheet" type="text/css" href="http://fanruan.design/fineui/2.0/fineui.min.css"/>
<link rel="stylesheet" type="text/css" href="./rich_editor.css"/>
<link rel="stylesheet" type="text/css" href="emb:/com/fr/web/ui/fineui.min.css"/>
<link rel="stylesheet" type="text/css" href="emb:/com/fr/web/ui/materials.min.css"/>
</head>
<body>
<script src="script/enums.js"></script>

Loading…
Cancel
Save