this.presenter=presenter;
allBtnContainer.setVBoxLayoutAlign(VBoxLayoutAlign.STRETCH);
BoxLayoutData vBoxData = new BoxLayoutData(new Margins(5, 5, 5, 5));
ToggleGroup tg=new ToggleGroup();
ToggleButton runningTrend=new ToggleButton("每日失败任务趋势");
runningTrend.setAllowDepress(false);
runningTrend.addValueChangeHandler(new ValueChangeHandler<Boolean>() {
private RunningJobTrend trend=new RunningJobTrend();
public void onValueChange(ValueChangeEvent<Boolean> event) {
if(event.getValue()){
if(allChartContainer.getWidgetIndex(trend)==-1){
allChartContainer.add(trend);
}
allChartContainer.setActiveWidget(trend);
}
}
});
ToggleButton ownerTrend=new ToggleButton("负责人失败任务趋势");
ownerTrend.addValueChangeHandler(new ValueChangeHandler<Boolean>() {
private OwnerJobTrend trend=new OwnerJobTrend();
public void onValueChange(ValueChangeEvent<Boolean> event) {
if(event.getValue()){
if(allChartContainer.getWidgetIndex(trend)==-1){
allChartContainer.add(trend);
}
allChartContainer.setActiveWidget(trend);
}
}
});
ownerTrend.setAllowDepress(false);
tg.add(runningTrend);
tg.add(ownerTrend);
allBtnContainer.add(runningTrend,vBoxData);
allBtnContainer.add(ownerTrend,vBoxData);
allContainer.setWestWidget(allBtnContainer,new BorderLayoutData(300));
allContainer.setCenterWidget(allChartContainer);
panel.add(allContainer, new TabItemConfig("统计报表", false));