if (GeneralLineChart.this.chart != null)
GeneralLineChart.this.viewPanel
.remove(GeneralLineChart.this.chart);
GeneralLineChart.this.chart = new LineChart(
createChartDataTable(GeneralStat.LOC),
createChartOptions(GeneralStat.LOC, "blue"));
GeneralLineChart.this.viewPanel
.add(GeneralLineChart.this.chart);
}
}
});
this.funcRadio.addValueChangeHandler(new ValueChangeHandler<Boolean>() {
@Override
public void onValueChange(ValueChangeEvent<Boolean> event) {
if (event.getValue()) {
if (GeneralLineChart.this.chart != null)
GeneralLineChart.this.viewPanel
.remove(GeneralLineChart.this.chart);
GeneralLineChart.this.chart = new LineChart(
createChartDataTable(GeneralStat.FUNC),
createChartOptions(GeneralStat.FUNC, "brown"));
GeneralLineChart.this.viewPanel
.add(GeneralLineChart.this.chart);
}
}
});
clRadio.addValueChangeHandler(new ValueChangeHandler<Boolean>() {
@Override
public void onValueChange(ValueChangeEvent<Boolean> event) {
if (event.getValue()) {
if (GeneralLineChart.this.chart != null)
GeneralLineChart.this.viewPanel
.remove(GeneralLineChart.this.chart);
GeneralLineChart.this.chart = new LineChart(
createChartDataTable(GeneralStat.CL), createChartOptions(
GeneralStat.CL, "orange"));
GeneralLineChart.this.viewPanel
.add(GeneralLineChart.this.chart);
}
}
});
fileRadio.addValueChangeHandler(new ValueChangeHandler<Boolean>() {
@Override
public void onValueChange(ValueChangeEvent<Boolean> event) {
if (event.getValue()) {
if (GeneralLineChart.this.chart != null)
GeneralLineChart.this.viewPanel
.remove(GeneralLineChart.this.chart);
GeneralLineChart.this.chart = new LineChart(
createChartDataTable(GeneralStat.FILE),
createChartOptions(GeneralStat.FILE, "grey"));
GeneralLineChart.this.viewPanel
.add(GeneralLineChart.this.chart);
}
}
});
pkgRadio.addValueChangeHandler(new ValueChangeHandler<Boolean>() {
@Override
public void onValueChange(ValueChangeEvent<Boolean> event) {
if (event.getValue()) {
if (GeneralLineChart.this.chart != null)
GeneralLineChart.this.viewPanel
.remove(GeneralLineChart.this.chart);
GeneralLineChart.this.chart = new LineChart(
createChartDataTable(GeneralStat.PKG),
createChartOptions(GeneralStat.PKG, "yellow"));
GeneralLineChart.this.viewPanel
.add(GeneralLineChart.this.chart);
}
}
});
comRadio.addValueChangeHandler(new ValueChangeHandler<Boolean>() {
@Override
public void onValueChange(ValueChangeEvent<Boolean> event) {
if (event.getValue()) {
if (GeneralLineChart.this.chart != null)
GeneralLineChart.this.viewPanel
.remove(GeneralLineChart.this.chart);
GeneralLineChart.this.chart = new LineChart(
createChartDataTable(GeneralStat.COM),
createChartOptions(GeneralStat.COM, "green"));
GeneralLineChart.this.viewPanel
.add(GeneralLineChart.this.chart);
}
}
});
duplRadio.addValueChangeHandler(new ValueChangeHandler<Boolean>() {
@Override
public void onValueChange(ValueChangeEvent<Boolean> event) {
if (event.getValue()) {
if (GeneralLineChart.this.chart != null)
GeneralLineChart.this.viewPanel
.remove(GeneralLineChart.this.chart);
GeneralLineChart.this.chart = new LineChart(
createChartDataTable(GeneralStat.DUPL),
createChartOptions(GeneralStat.DUPL, "red"));
GeneralLineChart.this.viewPanel
.add(GeneralLineChart.this.chart);