Browse Source

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

feature/x
方磊 3 years ago
parent
commit
f2da7fb7bc
  1. 35
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChangeConfigPane.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.ChartCollection;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.dialog.AttrScrollPane;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.ibutton.UIButtonGroup;
@ -77,11 +78,26 @@ public class ChangeConfigPane extends BasicBeanPane<ChartCollection> {
private int selectedChart; // 设置面板里面选取的图表,不是真正切换的图表
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();
configPane = createConfigPane();
contentPane = createContentPane();
contentPane.setBorder(BorderFactory.createEmptyBorder(CONSTANT_TEN, CONSTANT_THIRTY, CONSTANT_TEN, CONSTANT_THIRTY));
this.add(contentPane, BorderLayout.CENTER);
}
private JPanel createContentPane() {
@ -172,17 +188,18 @@ public class ChangeConfigPane extends BasicBeanPane<ChartCollection> {
chartTypesPane = new JPanel();
chartTypesPane.setLayout(new BoxLayout(chartTypesPane, BoxLayout.Y_AXIS));
chartTypesPane.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0));
switchTitlePane.setLayout(new CardLayout());
buttonContentPane.add(chartTypesPane, BorderLayout.NORTH);
buttonContentPane.add(
TableLayout4VanChartHelper.createGapTableLayoutPane(
Toolkit.i18nText("Fine-Design_Chart_Switch_Title_Label"),
switchTitlePane,
EDIT_AREA_WIDTH
),
BorderLayout.CENTER
JPanel titleEditPane = TableLayout4VanChartHelper.createGapTableLayoutPane(
Toolkit.i18nText("Fine-Design_Chart_Switch_Title_Label"),
switchTitlePane,
EDIT_AREA_WIDTH
);
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) {
protected void setcontentPanelontentPanelBorder() {

Loading…
Cancel
Save