Browse Source

Pull request #3199: CHART-17357 组合图只有一个图形时的留白问题

Merge in DESIGN/design from ~BJORN/design:release/10.0 to release/10.0

* commit '4c3e72d82d32bbd68b3aeb129776040cab3ac683':
  CHART-17357 组合图只有一个图形时的留白问题
feature/big-screen
Bjorn 4 years ago
parent
commit
bb900607f1
  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.design.mainframe.chart.gui.ChartDataPane;
import com.fr.plugin.chart.custom.VanChartCustomPlot; import com.fr.plugin.chart.custom.VanChartCustomPlot;
import javax.swing.BorderFactory;
import javax.swing.JPanel; import javax.swing.JPanel;
import java.awt.BorderLayout; import java.awt.BorderLayout;
@ -19,6 +20,12 @@ public class VanChartCustomDataPane extends ChartDataPane {
super(listener); super(listener);
} }
protected void initContentPane() {
leftContentPane = createContentPane();
leftContentPane.setBorder(BorderFactory.createMatteBorder(0, 0, 0, 0, original));
this.add(leftContentPane, BorderLayout.CENTER);
}
@Override @Override
protected JPanel createContentPane() { protected JPanel createContentPane() {
JPanel content = new JPanel(new BorderLayout()); 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.VanChartCustomPlotTabPane;
import com.fr.van.chart.custom.component.VanChartDataPane; import com.fr.van.chart.custom.component.VanChartDataPane;
import javax.swing.BorderFactory;
import javax.swing.JPanel; import javax.swing.JPanel;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.awt.BorderLayout;
/** /**
* Created by Fangjie on 2016/4/29. * Created by Fangjie on 2016/4/29.
@ -37,6 +39,20 @@ public class VanChartCustomPlotDataContentsTabPane extends VanChartCustomPlotTab
this.supportCellData = supportCellData; 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 @Override
protected void initTabTitle() { protected void initTabTitle() {

Loading…
Cancel
Save