Browse Source

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

* commit '724f7091395e309db306896aaf24165bf34767d1':
  CHART-15955 & CHART-16115 调整富文本界面宽高
  删除多余的语句
  CHART-16226 富文本提示默认居左
  REPORT-38688 设计器在双屏下拖动会有卡屏的现象
  REPORT-38872 修改下变量名
  REPORT-38872 设计器https证书密码明文存储
research/11.0
superman 4 years ago
parent
commit
0a853a2233
  1. 3
      designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java
  2. 6
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartLabelContentPane.java
  3. 2
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorDialog.java
  4. 21
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorPane.java
  5. 3
      designer-chart/src/main/java/com/fr/van/chart/funnel/designer/style/VanChartFunnelLabelContentPane.java
  6. 3
      designer-chart/src/main/java/com/fr/van/chart/map/designer/style/label/VanChartMapLabelContentPane.java
  7. 3
      designer-chart/src/main/java/com/fr/van/chart/multilayer/style/VanChartMultiPieLabelContentPane.java
  8. 3
      designer-chart/src/main/java/com/fr/van/chart/structure/desinger/style/VanChartStructureLabelContentPane.java
  9. 10
      designer-chart/src/main/resources/com/fr/design/editor/rich_editor.html
  10. 1
      designer-chart/src/main/resources/com/fr/design/editor/script/editor.js

3
designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java

@ -548,9 +548,8 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
contentHeight = layeredPane.getHeight(); contentHeight = layeredPane.getHeight();
contentWidth = layeredPane.getWidth(); contentWidth = layeredPane.getWidth();
layeredPane.remove(basePane); // 这个地方remove和add都是一个对象 完全没有必要remove再add 改变了窗口大小重新设置下 然后有repaint即可
basePane.setBounds(0, 0, contentWidth, contentHeight); basePane.setBounds(0, 0, contentWidth, contentHeight);
layeredPane.add(basePane);
layeredPane.repaint(); layeredPane.repaint();
} }

6
designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartLabelContentPane.java

@ -1,5 +1,7 @@
package com.fr.van.chart.designer.component; package com.fr.van.chart.designer.component;
import com.fr.plugin.chart.base.AttrTooltipContent;
import com.fr.plugin.chart.type.TextAlign;
import com.fr.van.chart.designer.style.VanChartStylePane; import com.fr.van.chart.designer.style.VanChartStylePane;
import javax.swing.JPanel; import javax.swing.JPanel;
@ -15,4 +17,8 @@ public class VanChartLabelContentPane extends VanChartTooltipContentPane {
protected VanChartHtmlLabelPane createHtmlLabelPane() { protected VanChartHtmlLabelPane createHtmlLabelPane() {
return new VanChartHtmlLabelPaneWithBackGroundLabel(); return new VanChartHtmlLabelPaneWithBackGroundLabel();
} }
protected AttrTooltipContent createAttrTooltip() {
return new AttrTooltipContent(TextAlign.CENTER);
}
} }

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

@ -10,7 +10,7 @@ import java.awt.Frame;
public class VanChartRichEditorDialog extends BasicDialog { public class VanChartRichEditorDialog extends BasicDialog {
public static final Dimension DEFAULT = new Dimension(660, 600); public static final Dimension DEFAULT = new Dimension(960, 600);
public VanChartRichEditorDialog(Frame parent, BasicPane pane) { public VanChartRichEditorDialog(Frame parent, BasicPane pane) {
super(parent, pane); super(parent, pane);

21
designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorPane.java

@ -2,6 +2,7 @@ package com.fr.van.chart.designer.component;
import com.fr.design.ui.ModernUIPane; import com.fr.design.ui.ModernUIPane;
import com.fr.plugin.chart.base.AttrTooltipRichText; import com.fr.plugin.chart.base.AttrTooltipRichText;
import com.fr.plugin.chart.type.TextAlign;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import com.teamdev.jxbrowser.chromium.Browser; import com.teamdev.jxbrowser.chromium.Browser;
import com.teamdev.jxbrowser.chromium.JSValue; import com.teamdev.jxbrowser.chromium.JSValue;
@ -71,12 +72,18 @@ public class VanChartRichEditorPane {
String content = richText.getContent(); String content = richText.getContent();
String initParams = StringUtils.EMPTY; String initParams = StringUtils.EMPTY;
String align = StringUtils.EMPTY;
if (content.contains("data-id") && !content.contains("class")) { if (content.contains("data-id") && !content.contains("class")) {
initParams = richText.getInitParamsContent(); initParams = richText.getInitParamsContent();
String left = TextAlign.LEFT.getAlign();
String center = TextAlign.CENTER.getAlign();
align = content.contains(left) ? left : center;
} }
return new RichEditorModel(content, richText.isAuto(), paramsStr.toString(), initParams); return new RichEditorModel(content, richText.isAuto(), paramsStr.toString(), initParams, align);
} }
public static class RichEditorModel { public static class RichEditorModel {
@ -84,12 +91,14 @@ public class VanChartRichEditorPane {
private boolean auto; private boolean auto;
private String params; private String params;
private String initParams; private String initParams;
private String align;
public RichEditorModel(String content, boolean auto, String params, String initParams) { public RichEditorModel(String content, boolean auto, String params, String initParams, String align) {
this.content = content; this.content = content;
this.auto = auto; this.auto = auto;
this.params = params; this.params = params;
this.initParams = initParams; this.initParams = initParams;
this.align = align;
} }
public String getContent() { public String getContent() {
@ -123,5 +132,13 @@ public class VanChartRichEditorPane {
public void setInitParams(String initParams) { public void setInitParams(String initParams) {
this.initParams = initParams; this.initParams = initParams;
} }
public String getAlign() {
return align;
}
public void setAlign(String align) {
this.align = align;
}
} }
} }

3
designer-chart/src/main/java/com/fr/van/chart/funnel/designer/style/VanChartFunnelLabelContentPane.java

@ -4,6 +4,7 @@ import com.fr.plugin.chart.base.AttrTooltipContent;
import com.fr.plugin.chart.base.AttrTooltipRichText; import com.fr.plugin.chart.base.AttrTooltipRichText;
import com.fr.plugin.chart.base.format.AttrTooltipFormat; import com.fr.plugin.chart.base.format.AttrTooltipFormat;
import com.fr.plugin.chart.base.format.AttrTooltipNameFormat; import com.fr.plugin.chart.base.format.AttrTooltipNameFormat;
import com.fr.plugin.chart.type.TextAlign;
import com.fr.van.chart.designer.component.VanChartLabelContentPane; import com.fr.van.chart.designer.component.VanChartLabelContentPane;
import com.fr.van.chart.designer.component.format.CategoryNameFormatPaneWithCheckBox; import com.fr.van.chart.designer.component.format.CategoryNameFormatPaneWithCheckBox;
import com.fr.van.chart.designer.component.format.CategoryNameFormatPaneWithoutCheckBox; import com.fr.van.chart.designer.component.format.CategoryNameFormatPaneWithoutCheckBox;
@ -82,7 +83,7 @@ public class VanChartFunnelLabelContentPane extends VanChartLabelContentPane {
} }
protected AttrTooltipContent createAttrTooltip() { protected AttrTooltipContent createAttrTooltip() {
AttrTooltipContent attrTooltipContent = new AttrTooltipContent(); AttrTooltipContent attrTooltipContent = new AttrTooltipContent(TextAlign.CENTER);
attrTooltipContent.getCategoryFormat().setEnable(false); attrTooltipContent.getCategoryFormat().setEnable(false);
attrTooltipContent.getRichTextCategoryFormat().setEnable(false); attrTooltipContent.getRichTextCategoryFormat().setEnable(false);

3
designer-chart/src/main/java/com/fr/van/chart/map/designer/style/label/VanChartMapLabelContentPane.java

@ -3,6 +3,7 @@ package com.fr.van.chart.map.designer.style.label;
import com.fr.plugin.chart.base.AttrTooltipContent; import com.fr.plugin.chart.base.AttrTooltipContent;
import com.fr.plugin.chart.base.format.AttrTooltipAreaNameFormat; import com.fr.plugin.chart.base.format.AttrTooltipAreaNameFormat;
import com.fr.plugin.chart.base.format.AttrTooltipMapValueFormat; import com.fr.plugin.chart.base.format.AttrTooltipMapValueFormat;
import com.fr.plugin.chart.type.TextAlign;
import com.fr.van.chart.designer.component.VanChartLabelContentPane; import com.fr.van.chart.designer.component.VanChartLabelContentPane;
import com.fr.van.chart.designer.component.format.MapAreaNameFormatPaneWithCheckBox; import com.fr.van.chart.designer.component.format.MapAreaNameFormatPaneWithCheckBox;
import com.fr.van.chart.designer.component.format.MapAreaNameFormatPaneWithoutCheckBox; import com.fr.van.chart.designer.component.format.MapAreaNameFormatPaneWithoutCheckBox;
@ -42,7 +43,7 @@ public class VanChartMapLabelContentPane extends VanChartLabelContentPane {
@Override @Override
protected AttrTooltipContent createAttrTooltip() { protected AttrTooltipContent createAttrTooltip() {
AttrTooltipContent content = new AttrTooltipContent(); AttrTooltipContent content = new AttrTooltipContent(TextAlign.CENTER);
content.setCategoryFormat(new AttrTooltipAreaNameFormat()); content.setCategoryFormat(new AttrTooltipAreaNameFormat());
content.setValueFormat(new AttrTooltipMapValueFormat()); content.setValueFormat(new AttrTooltipMapValueFormat());
content.setRichTextCategoryFormat(new AttrTooltipAreaNameFormat()); content.setRichTextCategoryFormat(new AttrTooltipAreaNameFormat());

3
designer-chart/src/main/java/com/fr/van/chart/multilayer/style/VanChartMultiPieLabelContentPane.java

@ -2,6 +2,7 @@ package com.fr.van.chart.multilayer.style;
import com.fr.plugin.chart.base.AttrTooltipContent; import com.fr.plugin.chart.base.AttrTooltipContent;
import com.fr.plugin.chart.multilayer.style.AttrTooltipMultiLevelNameFormat; import com.fr.plugin.chart.multilayer.style.AttrTooltipMultiLevelNameFormat;
import com.fr.plugin.chart.type.TextAlign;
import com.fr.van.chart.designer.component.VanChartLabelContentPane; import com.fr.van.chart.designer.component.VanChartLabelContentPane;
import com.fr.van.chart.designer.component.format.PercentFormatPaneWithCheckBox; import com.fr.van.chart.designer.component.format.PercentFormatPaneWithCheckBox;
import com.fr.van.chart.designer.component.format.PercentFormatPaneWithoutCheckBox; import com.fr.van.chart.designer.component.format.PercentFormatPaneWithoutCheckBox;
@ -36,7 +37,7 @@ public class VanChartMultiPieLabelContentPane extends VanChartLabelContentPane {
} }
protected AttrTooltipContent createAttrTooltip() { protected AttrTooltipContent createAttrTooltip() {
AttrTooltipContent content = new AttrTooltipContent(); AttrTooltipContent content = new AttrTooltipContent(TextAlign.CENTER);
content.setCategoryFormat(new AttrTooltipMultiLevelNameFormat()); content.setCategoryFormat(new AttrTooltipMultiLevelNameFormat());
content.setRichTextCategoryFormat(new AttrTooltipMultiLevelNameFormat()); content.setRichTextCategoryFormat(new AttrTooltipMultiLevelNameFormat());
return content; return content;

3
designer-chart/src/main/java/com/fr/van/chart/structure/desinger/style/VanChartStructureLabelContentPane.java

@ -4,6 +4,7 @@ package com.fr.van.chart.structure.desinger.style;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.plugin.chart.base.AttrTooltipContent; import com.fr.plugin.chart.base.AttrTooltipContent;
import com.fr.plugin.chart.multilayer.style.AttrTooltipMultiLevelNameFormat; import com.fr.plugin.chart.multilayer.style.AttrTooltipMultiLevelNameFormat;
import com.fr.plugin.chart.type.TextAlign;
import com.fr.van.chart.designer.component.VanChartLabelContentPane; import com.fr.van.chart.designer.component.VanChartLabelContentPane;
import com.fr.van.chart.designer.component.format.CategoryNameFormatPaneWithCheckBox; import com.fr.van.chart.designer.component.format.CategoryNameFormatPaneWithCheckBox;
import com.fr.van.chart.designer.component.format.PercentFormatPaneWithCheckBox; import com.fr.van.chart.designer.component.format.PercentFormatPaneWithCheckBox;
@ -60,7 +61,7 @@ public class VanChartStructureLabelContentPane extends VanChartLabelContentPane
@Override @Override
protected AttrTooltipContent createAttrTooltip() { protected AttrTooltipContent createAttrTooltip() {
AttrTooltipContent attrTooltipContent = new AttrTooltipContent(); AttrTooltipContent attrTooltipContent = new AttrTooltipContent(TextAlign.CENTER);
attrTooltipContent.setCategoryFormat(new AttrTooltipMultiLevelNameFormat()); attrTooltipContent.setCategoryFormat(new AttrTooltipMultiLevelNameFormat());
return attrTooltipContent; return attrTooltipContent;
} }

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

@ -41,6 +41,7 @@
var isAuto = Pool.data.isAuto(); var isAuto = Pool.data.isAuto();
var params = Pool.data.getParams(); var params = Pool.data.getParams();
var initParams = Pool.data.getInitParams(); var initParams = Pool.data.getInitParams();
var align = Pool.data.getAlign();
var getDimensionIds = function (params) { var getDimensionIds = function (params) {
var result = []; var result = [];
@ -58,7 +59,7 @@
return result; return result;
} }
var getInitContent = function (params, initParams) { var getInitContent = function (params, initParams, align) {
var editorService = BI.Services.getService("bi.service.design.chart.common.editor"); var editorService = BI.Services.getService("bi.service.design.chart.common.editor");
var paramGroup = params.split("-"); var paramGroup = params.split("-");
@ -68,7 +69,7 @@
var [key, value] = paramGroup[i].split(":"); var [key, value] = paramGroup[i].split(":");
if (initParams.indexOf(value) > -1) { if (initParams.indexOf(value) > -1) {
content += '<p style="text-align: center;">' + editorService.getEditorParamImage(key) + '<br></p>'; content += '<p style="text-align:' + align + ';">' + editorService.getEditorParamImage(key) + '<br></p>';
} }
} }
@ -78,7 +79,7 @@
var dimensionIds = getDimensionIds(params); var dimensionIds = getDimensionIds(params);
if (initParams) { if (initParams) {
content = getInitContent(params, initParams); content = getInitContent(params, initParams, align);
} }
var rich_editor = BI.createWidget({ var rich_editor = BI.createWidget({
@ -118,9 +119,10 @@
var isAuto = Pool.data.isAuto(); var isAuto = Pool.data.isAuto();
var params = Pool.data.getParams(); var params = Pool.data.getParams();
var initParams = Pool.data.getInitParams(); var initParams = Pool.data.getInitParams();
var align = Pool.data.getAlign();
if (initParams) { if (initParams) {
content = getInitContent(params, initParams); content = getInitContent(params, initParams, align);
} }
rich_editor.setValue({ rich_editor.setValue({

1
designer-chart/src/main/resources/com/fr/design/editor/script/editor.js

@ -27,7 +27,6 @@
this.editor = BI.createWidget({ this.editor = BI.createWidget({
type: "bi.nic_editor", type: "bi.nic_editor",
$value: "chart-common-editor", $value: "chart-common-editor",
height: 365,
cls: "editor bi-border bi-focus-shadow " + (o.textAlign === "center" ? "editor-center-text" : ""), cls: "editor bi-border bi-focus-shadow " + (o.textAlign === "center" ? "editor-center-text" : ""),
listeners: [{ listeners: [{
eventName: BI.NicEditor.EVENT_FOCUS, eventName: BI.NicEditor.EVENT_FOCUS,

Loading…
Cancel
Save