Browse Source

CHART-17357 组合图只有一个图形时的留白问题

feature/big-screen
白岳 4 years ago
parent
commit
4c3e72d82d
  1. 7
      designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomDataPane.java
  2. 16
      designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomPlotDataContentsTabPane.java

7
designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomDataPane.java

@ -6,6 +6,7 @@ import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.plugin.chart.custom.VanChartCustomPlot;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import java.awt.BorderLayout;
@ -19,6 +20,12 @@ public class VanChartCustomDataPane extends ChartDataPane {
super(listener);
}
protected void initContentPane() {
leftContentPane = createContentPane();
leftContentPane.setBorder(BorderFactory.createMatteBorder(0, 0, 0, 0, original));
this.add(leftContentPane, BorderLayout.CENTER);
}
@Override
protected JPanel createContentPane() {
JPanel content = new JPanel(new BorderLayout());

16
designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomPlotDataContentsTabPane.java

@ -12,11 +12,13 @@ import com.fr.plugin.chart.custom.type.CustomPlotType;
import com.fr.van.chart.custom.component.VanChartCustomPlotTabPane;
import com.fr.van.chart.custom.component.VanChartDataPane;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.awt.BorderLayout;
/**
* Created by Fangjie on 2016/4/29.
@ -37,6 +39,20 @@ public class VanChartCustomPlotDataContentsTabPane extends VanChartCustomPlotTab
this.supportCellData = supportCellData;
}
@Override
protected void initLayout() {
JPanel tabPanel = new JPanel(new BorderLayout());
if (NameArray.length > 1) {
tabPanel.setBorder(BorderFactory.createMatteBorder(10, 0, 0, 0, getBackground()));
} else {
tabPanel.setBorder(BorderFactory.createMatteBorder(0, 0, 0, 0, getBackground()));
}
tabPanel.add(tabPane, BorderLayout.CENTER);
this.setLayout(new BorderLayout(0, 0));
this.add(tabPanel, BorderLayout.NORTH);
this.add(centerPane, BorderLayout.CENTER);
}
@Override
protected void initTabTitle() {

Loading…
Cancel
Save