|
|
@ -43,7 +43,21 @@ public class ChartHyperPoplinkPane extends BasicBeanPane<ChartHyperPoplink> { |
|
|
|
|
|
|
|
|
|
|
|
hyperEditPane = new ChartHyperEditPane(getChartParaType(), getValueEditorPane(), getValueEditorPane()); |
|
|
|
hyperEditPane = new ChartHyperEditPane(getChartParaType(), getValueEditorPane(), getValueEditorPane()); |
|
|
|
this.add(hyperEditPane, BorderLayout.CENTER); |
|
|
|
this.add(hyperEditPane, BorderLayout.CENTER); |
|
|
|
|
|
|
|
ChartCollection cc = createChartCollection(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
chartComponent = new ChartComponent(); |
|
|
|
|
|
|
|
chartComponent.setPreferredSize(new Dimension(220, 170));// 在单元格弹出时 需要调整保证属性表的大小.
|
|
|
|
|
|
|
|
chartComponent.setSupportEdit(false); |
|
|
|
|
|
|
|
chartComponent.populate(cc); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.add(chartComponent, BorderLayout.EAST); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
hyperEditPane.populate(cc); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
hyperEditPane.useChartComponent(chartComponent); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private ChartCollection createChartCollection() { |
|
|
|
ChartCollection cc = new ChartCollection(); |
|
|
|
ChartCollection cc = new ChartCollection(); |
|
|
|
|
|
|
|
|
|
|
|
Chart chart = ChartTypeManager.getFirstChart(); |
|
|
|
Chart chart = ChartTypeManager.getFirstChart(); |
|
|
@ -57,17 +71,7 @@ public class ChartHyperPoplinkPane extends BasicBeanPane<ChartHyperPoplink> { |
|
|
|
}else { |
|
|
|
}else { |
|
|
|
cc.addChart(new Chart(new Bar2DPlot())); |
|
|
|
cc.addChart(new Chart(new Bar2DPlot())); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return cc; |
|
|
|
chartComponent = new ChartComponent(); |
|
|
|
|
|
|
|
chartComponent.setPreferredSize(new Dimension(220, 170));// 在单元格弹出时 需要调整保证属性表的大小.
|
|
|
|
|
|
|
|
chartComponent.setSupportEdit(false); |
|
|
|
|
|
|
|
chartComponent.populate(cc); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.add(chartComponent, BorderLayout.EAST); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
hyperEditPane.populate(cc); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
hyperEditPane.useChartComponent(chartComponent); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected int getChartParaType() { |
|
|
|
protected int getChartParaType() { |
|
|
@ -99,8 +103,7 @@ public class ChartHyperPoplinkPane extends BasicBeanPane<ChartHyperPoplink> { |
|
|
|
|
|
|
|
|
|
|
|
BaseChartCollection cc = chartHyperlink.getChartCollection(); |
|
|
|
BaseChartCollection cc = chartHyperlink.getChartCollection(); |
|
|
|
if (cc == null || cc.getChartCount() < 1) { |
|
|
|
if (cc == null || cc.getChartCount() < 1) { |
|
|
|
cc = new ChartCollection(); |
|
|
|
cc = createChartCollection(); |
|
|
|
cc.addChart(new Chart(ChartFactory.createBar2DPlot())); |
|
|
|
|
|
|
|
chartHyperlink.setChartCollection(cc); |
|
|
|
chartHyperlink.setChartCollection(cc); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|