Browse Source

CHART-16003 调整富文本编辑器自定义JS界面宽度

feature/big-screen
Qinghui.Liu 4 years ago
parent
commit
d7120f36cb
  1. 3
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartHtmlLabelPane.java
  2. 4
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java

3
designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartHtmlLabelPane.java

@ -148,11 +148,12 @@ public class VanChartHtmlLabelPane extends JPanel{
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize = { p, f }; double[] columnSize = { p, f };
double[] rowSize = { p, p}; double[] rowSize = {p, p, p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{isCustomWidth, customWidth}, new Component[]{isCustomWidth, customWidth},
new Component[]{isCustomHeight, customHeight}, new Component[]{isCustomHeight, customHeight},
new Component[] {null, null}
}; };
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
} }

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

@ -246,7 +246,7 @@ public class VanChartTooltipContentPane extends BasicBeanPane<AttrTooltipContent
} else if (content.getSelectedIndex() == RICH_EDITOR_INDEX) { } else if (content.getSelectedIndex() == RICH_EDITOR_INDEX) {
return editorPanel.getPreferredSize(); return editorPanel.getPreferredSize();
} else { } else {
return htmlPanel.getPreferredSize(); return new Dimension(commonPanel.getPreferredSize().width, htmlLabelPane.getPreferredSize().height);
} }
} }
}; };
@ -262,7 +262,7 @@ public class VanChartTooltipContentPane extends BasicBeanPane<AttrTooltipContent
if (content.getSelectedIndex() == COMMON_INDEX) { if (content.getSelectedIndex() == COMMON_INDEX) {
return commonPanel.getPreferredSize(); return commonPanel.getPreferredSize();
} else { } else {
return htmlPanel.getPreferredSize(); return new Dimension(commonPanel.getPreferredSize().width, htmlLabelPane.getPreferredSize().height);
} }
} }
}; };

Loading…
Cancel
Save