Browse Source

Merge pull request #2637 in DESIGN/design from release/10.0 to bugfix/10.0

* commit '7c73bd1aa15d3ac43cfa09c7d876d9d53ae5d134':
  CHART-16040 箱型图富文本编辑器参数修改
  增加空判断
  CHART-16224 增加富文本条件属性界面事件
  CHART-16040 箱型图富文本参数面板修改
  CHART-15957 & CHART-15957 调整富文本打开时的鼠标位置和字符样式
  CHART-15955 & CHART-16115 调整富文本界面宽高
  删除多余的语句
  CHART-16226 富文本提示默认居左
  CHART-16148 解决组合图中标签颜色颜色触发更新导致的属性储存错误
  CHART-16154 & CHART-16194 删除搜索框、切换自动时,不修改对齐方式
  CHART-16040 箱型图富文本编辑器参数修改
  REPORT-41414 数据集-繁体设计器,共享数据集缓存到磁盘记录数输入框消失 【问题原因】之前的一个改动将MaxMexRowCountPanel中的UISpinner给拉长得过多,超过了设定的最大宽度,因此输入框没能显示 【改动思路】调整拉长幅度,另外根据国际化特点调整了最大宽度
  增加空判断
  CHART-16224 增加富文本条件属性界面事件
  CHART-16040 箱型图富文本参数面板修改
  CHART-15957 & CHART-15957 调整富文本打开时的鼠标位置和字符样式
bugfix/10.0
superman 4 years ago
parent
commit
68f24445da
  1. 4
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MaxMemRowCountPanel.java
  2. 135
      designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipContentPane.java
  3. 30
      designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnPlotLabelDetailPane.java
  4. 25
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java
  5. 4
      designer-chart/src/main/resources/com/fr/design/editor/rich_editor.html

4
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MaxMemRowCountPanel.java

@ -21,7 +21,7 @@ public class MaxMemRowCountPanel extends UIToolbar {
private static final int MAX_IN_MEMORY = 1;
private static final String[] CACHE_LIST = {com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Save_All_Records_In_Memory"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Max_Mem_Row_Count") };
private static final int MAX_WIDTH = getMaxComBoBoxWidth() > 200 ? 400 : 300;
private static final int MAX_WIDTH = getMaxComBoBoxWidth() > 200 ? 350 : 280;
private static final int MAX_COMPONENT_COUNT_OF_MAX_MEMORY = 4;
private static int getMaxComBoBoxWidth() {
int maxWidth = GraphHelper.getWidth(CACHE_LIST[0]);
@ -73,7 +73,7 @@ public class MaxMemRowCountPanel extends UIToolbar {
switchCache = new UIComboBox(CACHE_LIST);
switchCache.addActionListener(switchStateL);
numberSpinner = new UISpinner(0, Integer.MAX_VALUE, 1);
numberSpinner.setNumberFieldColumns(4);
numberSpinner.setNumberFieldColumns(3);
}
private void showAllPanel() {

135
designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipContentPane.java

@ -7,6 +7,13 @@ import com.fr.design.layout.TableLayoutHelper;
import com.fr.plugin.chart.base.AttrTooltipContent;
import com.fr.plugin.chart.base.AttrTooltipRichText;
import com.fr.plugin.chart.base.format.AttrTooltipCategoryFormat;
import com.fr.plugin.chart.base.format.AttrTooltipDataMaxFormat;
import com.fr.plugin.chart.base.format.AttrTooltipDataMedianFormat;
import com.fr.plugin.chart.base.format.AttrTooltipDataMinFormat;
import com.fr.plugin.chart.base.format.AttrTooltipDataNumberFormat;
import com.fr.plugin.chart.base.format.AttrTooltipDataOutlierFormat;
import com.fr.plugin.chart.base.format.AttrTooltipDataQ1Format;
import com.fr.plugin.chart.base.format.AttrTooltipDataQ3Format;
import com.fr.plugin.chart.base.format.AttrTooltipFormat;
import com.fr.plugin.chart.base.format.AttrTooltipSeriesFormat;
import com.fr.plugin.chart.box.attr.AttrBoxTooltipContent;
@ -48,6 +55,9 @@ public class VanChartBoxTooltipContentPane extends VanChartTooltipContentPane {
private JPanel dataNumberPane;
private JPanel dataOutlierPane;
private JPanel richTextNumberPane;
private JPanel richTextOutlierPane;
public VanChartBoxTooltipContentPane(VanChartStylePane parent, JPanel showOnPane, boolean isDetailed) {
super(parent, showOnPane);
checkFormatVisible(isDetailed);
@ -145,6 +155,16 @@ public class VanChartBoxTooltipContentPane extends VanChartTooltipContentPane {
return commonPanel;
}
protected JPanel createRichFormatPanel() {
JPanel richFormatPanel = new JPanel(new BorderLayout());
richFormatPanel.add(createRichTextCateAndSeriesPane(), BorderLayout.NORTH);
richFormatPanel.add(createRichTextDataNumberPane(), BorderLayout.CENTER);
richFormatPanel.add(createRichTextDataDetailPane(), BorderLayout.SOUTH);
return richFormatPanel;
}
protected Component[][] getRichTextComponents() {
return new Component[][]{
new Component[]{getRichTextCategoryNameFormatPane(), null},
@ -229,6 +249,72 @@ public class VanChartBoxTooltipContentPane extends VanChartTooltipContentPane {
return detailPane;
}
private JPanel createRichTextCateAndSeriesPane() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {f, e};
double[] rowSize = {p, p, p};
Component[][] cateAndSeries = new Component[][]{
new Component[]{null, null},
new Component[]{null, getRichTextCategoryNameFormatPane()},
new Component[]{null, getRichTextSeriesNameFormatPane()}
};
return TableLayoutHelper.createTableLayoutPane(cateAndSeries, rowSize, columnSize);
}
private JPanel createRichTextDataNumberPane() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {f, e};
double[] rowSize = {p, p};
Component[][] dataNumber = new Component[][]{
new Component[]{null, null},
new Component[]{null, richTextNumber},
};
richTextNumberPane = TableLayoutHelper.createTableLayoutPane(dataNumber, rowSize, columnSize);
return richTextNumberPane;
}
private JPanel createRichTextDataDetailPane() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {f, e};
JPanel detailPane = new JPanel(new BorderLayout());
Component[][] richTextDetail = new Component[][]{
new Component[]{null, null},
new Component[]{null, richTextMax},
new Component[]{new UILabel(getLabelContentTitle()), richTextQ3},
new Component[]{null, richTextMedian},
new Component[]{null, richTextQ1},
new Component[]{null, richTextMin}
};
Component[][] dataOutlier = new Component[][]{
new Component[]{null, null},
new Component[]{null, richTextOutlier},
};
richTextOutlierPane = TableLayoutHelper.createTableLayoutPane(dataOutlier, new double[]{p, p}, columnSize);
detailPane.add(TableLayoutHelper.createTableLayoutPane(richTextDetail, new double[]{p, p, p, p, p, p}, columnSize), BorderLayout.NORTH);
detailPane.add(richTextOutlierPane, BorderLayout.CENTER);
return detailPane;
}
public boolean isDirty() {
return getCategoryNameFormatPane().isDirty()
|| getSeriesNameFormatPane().isDirty()
@ -291,26 +377,48 @@ public class VanChartBoxTooltipContentPane extends VanChartTooltipContentPane {
if (attrTooltipContent instanceof AttrBoxTooltipContent) {
AttrBoxTooltipContent boxTooltipContent = (AttrBoxTooltipContent) attrTooltipContent;
VanChartFormatPaneWithoutCheckBox[] formatPaneGroup = new VanChartFormatPaneWithoutCheckBox[]{
VanChartFormatPaneWithoutCheckBox[] formatPaneGroup = getFormatPaneGroup();
AttrTooltipFormat[] formatGroup = getFormatGroup(boxTooltipContent);
populateRichTextFormat(formatPaneGroup, formatGroup);
populateRichText(attrTooltipContent.getRichTextAttr());
checkRichEditorState(attrTooltipContent);
}
}
private VanChartFormatPaneWithoutCheckBox[] getFormatPaneGroup() {
if (detailed) {
return new VanChartFormatPaneWithoutCheckBox[]{
richTextNumber, richTextMax, richTextQ3, richTextMedian,
richTextQ1, richTextMin, richTextOutlier
};
}
AttrTooltipFormat[] formatGroup = new AttrTooltipFormat[]{
boxTooltipContent.getRichTextNumber(),
boxTooltipContent.getRichTextMax(),
boxTooltipContent.getRichTextQ3(),
boxTooltipContent.getRichTextMedian(),
boxTooltipContent.getRichTextQ1(),
boxTooltipContent.getRichTextMin(),
boxTooltipContent.getRichTextOutlier()
return new VanChartFormatPaneWithoutCheckBox[]{
richTextMax, richTextQ3, richTextMedian, richTextQ1, richTextMin
};
}
populateRichTextFormat(formatPaneGroup, formatGroup);
populateRichText(attrTooltipContent.getRichTextAttr());
private AttrTooltipFormat[] getFormatGroup(AttrBoxTooltipContent boxTooltipContent) {
AttrTooltipDataNumberFormat richTextNumber = boxTooltipContent.getRichTextNumber();
AttrTooltipDataMaxFormat richTextMaxFormat = boxTooltipContent.getRichTextMax();
AttrTooltipDataQ3Format richTextQ3Format = boxTooltipContent.getRichTextQ3();
AttrTooltipDataMedianFormat richTextMedianFormat = boxTooltipContent.getRichTextMedian();
AttrTooltipDataQ1Format richTextQ1Format = boxTooltipContent.getRichTextQ1();
AttrTooltipDataMinFormat richTextMinFormat = boxTooltipContent.getRichTextMin();
AttrTooltipDataOutlierFormat richTextOutlierFormat = boxTooltipContent.getRichTextOutlier();
checkRichEditorState(attrTooltipContent);
if (detailed) {
return new AttrTooltipFormat[]{
richTextNumber, richTextMaxFormat, richTextQ3Format, richTextMedianFormat,
richTextQ1Format, richTextMinFormat, richTextOutlierFormat
};
}
return new AttrTooltipFormat[]{
richTextMaxFormat, richTextQ3Format, richTextMedianFormat, richTextQ1Format, richTextMinFormat
};
}
protected void updateFormatPane(AttrTooltipContent attrTooltipContent) {
@ -354,5 +462,8 @@ public class VanChartBoxTooltipContentPane extends VanChartTooltipContentPane {
dataNumberPane.setVisible(detailed);
dataOutlierPane.setVisible(detailed);
richTextNumberPane.setVisible(detailed);
richTextOutlierPane.setVisible(detailed);
}
}

30
designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnPlotLabelDetailPane.java

@ -5,6 +5,8 @@ import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.plugin.chart.base.AttrLabelDetail;
import com.fr.plugin.chart.base.AttrTooltipContent;
import com.fr.plugin.chart.column.VanChartColumnPlot;
import com.fr.van.chart.designer.component.VanChartLabelContentPane;
import com.fr.van.chart.designer.component.VanChartTooltipContentPane;
import com.fr.van.chart.designer.style.VanChartStylePane;
import com.fr.van.chart.designer.style.label.VanChartPlotLabelDetailPane;
@ -14,6 +16,34 @@ public class VanChartColumnPlotLabelDetailPane extends VanChartPlotLabelDetailPa
super(plot, parent);
}
protected void initToolTipContentPane(Plot plot) {
VanChartLabelContentPane dataLabelContentPane = new VanChartLabelContentPane(getParentPane(), VanChartColumnPlotLabelDetailPane.this) {
protected void checkCardPane() {
super.checkCardPane();
checkOrientationPane();
}
};
setDataLabelContentPane(dataLabelContentPane);
}
private void checkOrientationPane() {
VanChartLabelContentPane dataLabelContentPane = (VanChartLabelContentPane) getDataLabelContentPane();
UIButtonGroup<Integer> content = dataLabelContentPane.getContent();
UIButtonGroup<Integer> orientation = getOrientation();
if (content == null || orientation == null) {
return;
}
if (content.getSelectedIndex() == VanChartTooltipContentPane.RICH_EDITOR_INDEX) {
orientation.setSelectedIndex(HORIZONTAL_INDEX);
orientation.setEnabled(false);
} else {
orientation.setEnabled(true);
}
}
protected boolean hasLabelOrientationPane() {
return !((VanChartColumnPlot) this.getPlot()).isBar();
}

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

@ -57,10 +57,10 @@ public class VanChartTooltipContentPane extends BasicBeanPane<AttrTooltipContent
private static final int TEXT_ATTR_AUTO_INDEX = 0;
private static final int TEXT_ATTR_CUSTOM_INDEX = 1;
// 标签内容button
private static final int COMMON_INDEX = 0;
private static final int RICH_EDITOR_INDEX = 1;
private static final int CUSTOM_INDEX_WITH_RICH_EDITOR = 2;
private static final int CUSTOM_INDEX_WITHOUT_RICH_EDITOR = 1;
public static final int COMMON_INDEX = 0;
public static final int RICH_EDITOR_INDEX = 1;
public static final int CUSTOM_INDEX_WITH_RICH_EDITOR = 2;
public static final int CUSTOM_INDEX_WITHOUT_RICH_EDITOR = 1;
private UIButtonGroup<Integer> content;
@ -202,6 +202,10 @@ public class VanChartTooltipContentPane extends BasicBeanPane<AttrTooltipContent
this.richTextChangedPercentFormatPane = richTextChangedPercentFormatPane;
}
public UIButtonGroup<Integer> getContent() {
return content;
}
public AttrTooltipRichText getRichTextAttr() {
return richText;
}
@ -384,17 +388,22 @@ public class VanChartTooltipContentPane extends BasicBeanPane<AttrTooltipContent
double[] columnSize = {f, e};
double[] rowSize = {p, p, p};
JPanel formatContent = TableLayoutHelper.createTableLayoutPane(getRichTextComponents(), getRowSize(p), new double[]{f, p});
Component[][] components = new Component[][]{
new Component[]{null, null},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Content_Style")), createRichEditorButton()},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Use_Format")), formatContent}
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Use_Format")), createRichFormatPanel()}
};
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
}
protected JPanel createRichFormatPanel() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
return TableLayoutHelper.createTableLayoutPane(getRichTextComponents(), getRowSize(p), new double[]{f, p});
}
private JComponent createRichEditorButton() {
UIButton contentTextArea = new UIButton(Toolkit.i18nText("Fine-Design_Chart_Rich_Text_Edit"));
@ -508,7 +517,7 @@ public class VanChartTooltipContentPane extends BasicBeanPane<AttrTooltipContent
}
private void checkCardPane() {
protected void checkCardPane() {
if (supportRichEditor()) {
checkCardPaneWithRichEditor();
} else {

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

@ -125,11 +125,15 @@
content = getInitContent(params, initParams, align);
}
rich_editor.editor.bindToolbar(rich_editor.bar);
rich_editor.setValue({
content: content,
isAuto: isAuto,
dimensionIds: getDimensionIds(params)
});
rich_editor.setFocus();
}
Pool.update = function () {

Loading…
Cancel
Save