package org.gcube.portlets.admin.accountingmanager.client.maindata.charts; import org.gcube.portlets.admin.accountingmanager.client.state.AccountingStateData; import org.gcube.portlets.admin.accountingmanager.shared.data.response.SeriesStorage; import org.gcube.portlets.admin.accountingmanager.shared.exception.ChartDrawException; import com.google.gwt.event.shared.EventBus; /** * Accounting Chart 4 Task * * @author "Giancarlo Panichi" email: g.panichi@isti.cnr.it * */ public class AccountingChart4Task extends AccountingChartBuilder { private EventBus eventBus; private AccountingStateData accountingStateData; public AccountingChart4Task(EventBus eventBus, AccountingStateData accountingStateData) { this.eventBus=eventBus; this.accountingStateData = accountingStateData; } @Override public void buildChart() throws ChartDrawException { AccountingChartPanel accountingChartPanel = null; if (accountingStateData == null || accountingStateData.getAccountingType() == null || accountingStateData.getSeriesRequest() == null || accountingStateData.getSeriesResponse() == null) { accountingChartSpec.setChart(accountingChartPanel); return; } if (!(accountingStateData.getSeriesResponse() instanceof SeriesStorage)) { accountingChartSpec.setChart(accountingChartPanel); return; } //StorageChart container=new StorageChart(accountingStateData); //accountingChartPanel = new AccountingChartPanel(container); accountingChartSpec.setChart(accountingChartPanel); } }