Browse Source

Pull request #7870: CHART-22767 切换控件标题自定义-添加的图表很多,切换属性弹框需要增加滚动条

Merge in DESIGN/design from ~FANGLEI/design:feature/x to feature/x

* commit 'db1430c9600367e5de26ae4378eafca73fe0d280':
  CHART-22876 轴标签样式分层自定义-自定义字符样式没法选中最后一个字体
  CHART-22767 切换控件标题自定义-添加的图表很多,切换属性弹框需要增加滚动条
feature/x
fanglei 3 years ago
parent
commit
6d4d01e589
  1. 35
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChangeConfigPane.java
  2. 2
      designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/component/VanChartCategoryStylePaneWithCheckBox.java

35
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChangeConfigPane.java

@ -11,6 +11,7 @@ import com.fr.chart.base.AttrChangeType;
import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
import com.fr.design.dialog.AttrScrollPane;
import com.fr.design.foldablepane.UIExpandablePane; import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.ibutton.UIButtonGroup;
@ -77,11 +78,26 @@ public class ChangeConfigPane extends BasicBeanPane<ChartCollection> {
private int selectedChart; // 设置面板里面选取的图表,不是真正切换的图表 private int selectedChart; // 设置面板里面选取的图表,不是真正切换的图表
public ChangeConfigPane(){ public ChangeConfigPane(){
init();
this.setLayout(new BorderLayout());
this.setBorder(BorderFactory.createEmptyBorder(10, 15, 10, 15));
this.add(createScrollPane(), BorderLayout.CENTER);
}
private JPanel createScrollPane() {
return new AttrScrollPane() {
@Override
protected JPanel createContentPane() {
return contentPane;
}
};
}
private void init() {
initButtonGroup(); initButtonGroup();
configPane = createConfigPane(); configPane = createConfigPane();
contentPane = createContentPane(); contentPane = createContentPane();
contentPane.setBorder(BorderFactory.createEmptyBorder(CONSTANT_TEN, CONSTANT_THIRTY, CONSTANT_TEN, CONSTANT_THIRTY)); contentPane.setBorder(BorderFactory.createEmptyBorder(CONSTANT_TEN, CONSTANT_THIRTY, CONSTANT_TEN, CONSTANT_THIRTY));
this.add(contentPane, BorderLayout.CENTER);
} }
private JPanel createContentPane() { private JPanel createContentPane() {
@ -172,17 +188,18 @@ public class ChangeConfigPane extends BasicBeanPane<ChartCollection> {
chartTypesPane = new JPanel(); chartTypesPane = new JPanel();
chartTypesPane.setLayout(new BoxLayout(chartTypesPane, BoxLayout.Y_AXIS)); chartTypesPane.setLayout(new BoxLayout(chartTypesPane, BoxLayout.Y_AXIS));
chartTypesPane.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0));
switchTitlePane.setLayout(new CardLayout()); switchTitlePane.setLayout(new CardLayout());
buttonContentPane.add(chartTypesPane, BorderLayout.NORTH); JPanel titleEditPane = TableLayout4VanChartHelper.createGapTableLayoutPane(
buttonContentPane.add( Toolkit.i18nText("Fine-Design_Chart_Switch_Title_Label"),
TableLayout4VanChartHelper.createGapTableLayoutPane( switchTitlePane,
Toolkit.i18nText("Fine-Design_Chart_Switch_Title_Label"), EDIT_AREA_WIDTH
switchTitlePane,
EDIT_AREA_WIDTH
),
BorderLayout.CENTER
); );
titleEditPane.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 0));
buttonContentPane.add(chartTypesPane, BorderLayout.NORTH);
buttonContentPane.add(titleEditPane, BorderLayout.CENTER);
UIExpandablePane expandablePane = new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_Button_And_Rotation_Content"), 20, buttonContentPane) { UIExpandablePane expandablePane = new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_Button_And_Rotation_Content"), 20, buttonContentPane) {
protected void setcontentPanelontentPanelBorder() { protected void setcontentPanelontentPanelBorder() {

2
designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/component/VanChartCategoryStylePaneWithCheckBox.java

@ -68,7 +68,7 @@ public class VanChartCategoryStylePaneWithCheckBox extends JPanel {
Point comPoint = settingButton.getLocationOnScreen(); Point comPoint = settingButton.getLocationOnScreen();
Point arrowPoint = new Point(comPoint.x +settingButton.getWidth() - 25, comPoint.y + settingButton.getHeight()); Point arrowPoint = new Point(comPoint.x +settingButton.getWidth() - 25, comPoint.y + settingButton.getHeight());
Dimension size = settingPane.getPreferredSize(); Dimension size = settingPane.getPreferredSize();
UIBubbleFloatPane<VanChartAxisLabelStyle> pane = new UIBubbleFloatPane(Constants.LEFT, arrowPoint, settingPane, size.width, 216) { UIBubbleFloatPane<VanChartAxisLabelStyle> pane = new UIBubbleFloatPane(Constants.LEFT, arrowPoint, settingPane, size.width, 230) {
@Override @Override
public void updateContentPane() { public void updateContentPane() {

Loading…
Cancel
Save