|
|
@ -44,19 +44,7 @@ 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 = new ChartCollection(); |
|
|
|
ChartCollection cc = createChartCollection(); |
|
|
|
|
|
|
|
|
|
|
|
Chart chart = ChartTypeManager.getFirstChart(); |
|
|
|
|
|
|
|
if (chart != null){ |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
cc.addChart((Chart)chart.clone()); |
|
|
|
|
|
|
|
} catch (CloneNotSupportedException e) { |
|
|
|
|
|
|
|
FRLogger.getLogger().error(e.getMessage(), e); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}else { |
|
|
|
|
|
|
|
cc.addChart(new Chart(new Bar2DPlot())); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
chartComponent = new ChartComponent(); |
|
|
|
chartComponent = new ChartComponent(); |
|
|
|
chartComponent.setPreferredSize(new Dimension(220, 170));// 在单元格弹出时 需要调整保证属性表的大小.
|
|
|
|
chartComponent.setPreferredSize(new Dimension(220, 170));// 在单元格弹出时 需要调整保证属性表的大小.
|
|
|
@ -70,6 +58,23 @@ public class ChartHyperPoplinkPane extends BasicBeanPane<ChartHyperPoplink> { |
|
|
|
hyperEditPane.useChartComponent(chartComponent); |
|
|
|
hyperEditPane.useChartComponent(chartComponent); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private ChartCollection createChartCollection() { |
|
|
|
|
|
|
|
ChartCollection cc = new ChartCollection(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Chart chart = ChartTypeManager.getFirstChart(); |
|
|
|
|
|
|
|
if (chart != null){ |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
cc.addChart((Chart)chart.clone()); |
|
|
|
|
|
|
|
} catch (CloneNotSupportedException e) { |
|
|
|
|
|
|
|
FRLogger.getLogger().error(e.getMessage(), e); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}else { |
|
|
|
|
|
|
|
cc.addChart(new Chart(new Bar2DPlot())); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return cc; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected int getChartParaType() { |
|
|
|
protected int getChartParaType() { |
|
|
|
return ParameterTableModel.CHART_NORMAL_USE; |
|
|
|
return ParameterTableModel.CHART_NORMAL_USE; |
|
|
|
} |
|
|
|
} |
|
|
@ -99,8 +104,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); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|