Browse Source

Pull request #2483: CHART-15950 & CHART-15939 & CHART-16060 富文本编辑器的dialog不相应enter事件、编辑器title修改、漏斗图参数解析

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

* commit 'f38350202d657a1da66b9d511936e96f0c05fc8e':
  调整漏斗图系列参数
  调整漏斗图富文本参数
  CHART-15950 富文本编辑器的dialog不相应enter事件
feature/big-screen
Qinghui.Liu 4 years ago
parent
commit
b3e5bb5901
  1. 5
      designer-base/src/main/java/com/fr/design/dialog/UIDialog.java
  2. 31
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorDialog.java
  3. 2
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java
  4. 23
      designer-chart/src/main/java/com/fr/van/chart/funnel/designer/style/VanChartFunnelLabelContentPane.java
  5. 4
      designer-chart/src/main/resources/com/fr/design/editor/script/editor.js

5
designer-base/src/main/java/com/fr/design/dialog/UIDialog.java

@ -116,6 +116,11 @@ public abstract class UIDialog extends JDialog {
doCancel(); doCancel();
} }
}); });
applyEnterAction();
}
protected void applyEnterAction() {
JPanel defaultPane = (JPanel) this.getContentPane(); JPanel defaultPane = (JPanel) this.getContentPane();
InputMap inputMapAncestor = defaultPane.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT); InputMap inputMapAncestor = defaultPane.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
ActionMap actionMap = defaultPane.getActionMap(); ActionMap actionMap = defaultPane.getActionMap();

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

@ -0,0 +1,31 @@
package com.fr.van.chart.designer.component;
import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.BasicPane;
import com.fr.design.i18n.Toolkit;
import com.fr.design.utils.gui.GUICoreUtils;
import java.awt.Dimension;
import java.awt.Frame;
public class VanChartRichEditorDialog extends BasicDialog {
public static final Dimension DEFAULT = new Dimension(660, 600);
public VanChartRichEditorDialog(Frame parent, BasicPane pane) {
super(parent, pane);
this.setTitle(Toolkit.i18nText("Fine-Design_Report_RichTextEditor"));
this.setBasicDialogSize(DEFAULT);
GUICoreUtils.centerWindow(this);
this.setResizable(false);
}
protected void applyEnterAction() {
}
public void checkValid() {
}
}

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

@ -407,7 +407,7 @@ public class VanChartTooltipContentPane extends BasicBeanPane<AttrTooltipContent
private void fireRichEditor() { private void fireRichEditor() {
final ModernUIPane<VanChartRichEditorPane.RichEditorModel> pane = VanChartRichEditorPane.createRichEditorPane(richText); final ModernUIPane<VanChartRichEditorPane.RichEditorModel> pane = VanChartRichEditorPane.createRichEditorPane(richText);
BasicDialog dialog = pane.showWindow(new JFrame()); BasicDialog dialog = new VanChartRichEditorDialog(new JFrame(), pane);
pane.populate(VanChartRichEditorPane.getRichEditorModel(richText)); pane.populate(VanChartRichEditorPane.getRichEditorModel(richText));

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

@ -1,15 +1,17 @@
package com.fr.van.chart.funnel.designer.style; package com.fr.van.chart.funnel.designer.style;
import com.fr.plugin.chart.base.AttrTooltipContent; import com.fr.plugin.chart.base.AttrTooltipContent;
import com.fr.plugin.chart.base.AttrTooltipRichText;
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.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;
import com.fr.van.chart.designer.component.format.PercentFormatPaneWithoutCheckBox;
import com.fr.van.chart.designer.component.format.SeriesNameFormatPaneWithCheckBox; import com.fr.van.chart.designer.component.format.SeriesNameFormatPaneWithCheckBox;
import com.fr.van.chart.designer.component.format.SeriesNameFormatPaneWithoutCheckBox; import com.fr.van.chart.designer.component.format.SeriesNameFormatPaneWithoutCheckBox;
import com.fr.van.chart.designer.component.format.ValueFormatPaneWithCheckBox; import com.fr.van.chart.designer.component.format.ValueFormatPaneWithCheckBox;
import com.fr.van.chart.designer.component.format.ValueFormatPaneWithoutCheckBox; import com.fr.van.chart.designer.component.format.ValueFormatPaneWithoutCheckBox;
import com.fr.van.chart.designer.component.format.VanChartFormatPaneWithoutCheckBox;
import com.fr.van.chart.designer.style.VanChartStylePane; import com.fr.van.chart.designer.style.VanChartStylePane;
import javax.swing.JPanel; import javax.swing.JPanel;
@ -59,10 +61,29 @@ public class VanChartFunnelLabelContentPane extends VanChartLabelContentPane {
setRichTextPercentFormatPane(new FunnelPercentFormatPaneWithoutCheckBox(parent, showOnPane)); setRichTextPercentFormatPane(new FunnelPercentFormatPaneWithoutCheckBox(parent, showOnPane));
} }
protected void populateRichEditor(AttrTooltipContent attrTooltipContent) {
VanChartFormatPaneWithoutCheckBox[] formatPaneGroup = new VanChartFormatPaneWithoutCheckBox[]{
getRichTextSeriesNameFormatPane(),
getRichTextValueFormatPane(),
getRichTextPercentFormatPane()
};
AttrTooltipFormat[] formatGroup = new AttrTooltipFormat[]{
attrTooltipContent.getRichTextSeriesFormat(),
attrTooltipContent.getRichTextValueFormat(),
attrTooltipContent.getRichTextPercentFormat()
};
setRichTextAttr(new AttrTooltipRichText());
populateRichTextFormat(formatPaneGroup, formatGroup);
populateRichText(attrTooltipContent.getRichTextAttr());
}
protected AttrTooltipContent createAttrTooltip() { protected AttrTooltipContent createAttrTooltip() {
AttrTooltipContent attrTooltipContent = new AttrTooltipContent(); AttrTooltipContent attrTooltipContent = new AttrTooltipContent();
attrTooltipContent.getCategoryFormat().setEnable(false); attrTooltipContent.getCategoryFormat().setEnable(false);
attrTooltipContent.setSeriesFormat(new AttrTooltipNameFormat()); attrTooltipContent.setSeriesFormat(new AttrTooltipNameFormat());
attrTooltipContent.setRichTextSeriesFormat(new AttrTooltipNameFormat());
return attrTooltipContent; return attrTooltipContent;
} }

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

@ -128,8 +128,8 @@
} }
str += " " + key + "=\"" + value + "\""; str += " " + key + "=\"" + value + "\"";
if (key === "alt" && dataIdMap[value]) { if (key === "alt" && dataIdMap[value.trim()]) {
str += " " + "data-id" + "=\"" + dataIdMap[value] + "\""; str += " " + "data-id" + "=\"" + dataIdMap[value.trim()] + "\"";
} }
}); });

Loading…
Cancel
Save