chartsGroup.add(tasksTable); displayerCoordinator.addDisplayers(metricsGroup); displayerCoordinator.addDisplayers(metricsGroupOptional); displayerCoordinator.addDisplayers(chartsGroup); displayerCoordinator.addNotificationVeto(metricsGroup); displayerCoordinator.addListener(dashboardListener);
chartsGroup.add(processesTable); displayerCoordinator.addDisplayers(metricsGroup); displayerCoordinator.addDisplayers(chartsGroup); displayerCoordinator.addNotificationVeto(metricsGroup); displayerCoordinator.addListener(dashboardListener);
@Before public void init() throws Exception { super.init(); when(beanManager.lookupBean(SelectorLabelItem.class)).thenReturn(labelItemBean); when(labelItemBean.newInstance()).thenReturn(labelItem); when(beanManager.lookupBean(SelectorDropDownItem.class)).thenReturn(dropDownItemBean); when(dropDownItemBean.newInstance()).thenReturn(dropDownItem); allRowsDisplayer = createNewDisplayer(allRows); dateSliderDisplayer = createSliderDisplayer(dateSlider); numberSliderDisplayer = createSliderDisplayer(numberSlider); yearLabelDisplayer = createLabelSetDisplayer(yearLabels); cityDropDownDisplayer = createDropDownDisplayer(dropDownCity); deptDropDownDisplayer = createDropDownDisplayer(dropDownDept); displayerCoordinator = new DisplayerCoordinator(rendererManager); displayerCoordinator.addDisplayers(allRowsDisplayer, dateSliderDisplayer, numberSliderDisplayer, yearLabelDisplayer, cityDropDownDisplayer, deptDropDownDisplayer); displayerCoordinator.addListener(listener); }
@Before public void init() throws Exception { super.init(); when(beanManager.lookupBean(SelectorLabelItem.class)).thenReturn(labelItemBean); when(labelItemBean.newInstance()).thenReturn(labelItem); when(beanManager.lookupBean(SelectorDropDownItem.class)).thenReturn(dropDownItemBean); when(dropDownItemBean.newInstance()).thenReturn(dropDownItem); allRowsDisplayer = createNewDisplayer(allRows); dateSliderDisplayer = createSliderDisplayer(dateSlider); numberSliderDisplayer = createSliderDisplayer(numberSlider); yearLabelDisplayer = createLabelSetDisplayer(yearLabels); cityDropDownDisplayer = createDropDownDisplayer(dropDownCity); deptDropDownDisplayer = createDropDownDisplayer(dropDownDept); displayerCoordinator = new DisplayerCoordinator(rendererManager); displayerCoordinator.addDisplayers(allRowsDisplayer, dateSliderDisplayer, numberSliderDisplayer, yearLabelDisplayer, cityDropDownDisplayer, deptDropDownDisplayer); displayerCoordinator.addListener(listener); }
@Before public void init() throws Exception { super.init(); allRowsTable = createNewDisplayer(allRows); deptPieChart = createNewDisplayer(byDepartment); deptSelector = createNewDisplayer(byDepartmentSelector); yearBarChart = createNewDisplayer(byYear); quarterPieChart = createNewDisplayer(byQuarter); displayerCoordinator = new DisplayerCoordinator(rendererManager); displayerCoordinator.addDisplayers(allRowsTable, deptPieChart, deptSelector, yearBarChart, quarterPieChart); displayerCoordinator.addListener(listener); }
@Before public void init() throws Exception { super.init(); allRowsTable = createNewDisplayer(allRows); deptPieChart = createNewDisplayer(byDepartment); deptSelector = createNewDisplayer(byDepartmentSelector); yearBarChart = createNewDisplayer(byYear); quarterPieChart = createNewDisplayer(byQuarter); displayerCoordinator = new DisplayerCoordinator(rendererManager); displayerCoordinator.addDisplayers(allRowsTable, deptPieChart, deptSelector, yearBarChart, quarterPieChart); displayerCoordinator.addListener(listener); }
/** * Avoid IndexOutOfBoundsException caused when a filter is notified to * a table consuming the whole data set (no data lookup columns set). */ @Test public void testFullTableFilterEvent() { AbstractDisplayer tableNoColumns = createNewDisplayer( DisplayerSettingsFactory.newTableSettings() .dataset(EXPENSES) .filterOn(true, false, true) .buildSettings()); displayerCoordinator = new DisplayerCoordinator(rendererManager); displayerCoordinator.addDisplayers(deptPieChart, tableNoColumns); displayerCoordinator.addListener(listener); displayerCoordinator.drawAll(); // Click on the "Engineering" slice reset(listener); deptPieChart.filterUpdate(COLUMN_DEPARTMENT, 0); // Check the allRowsTable receives the filter request DataSet dataSet = allRowsTable.getDataSetHandler().getLastDataSet(); assertEquals(dataSet.getRowCount(), 19); verify(listener).onDataLookup(allRowsTable); verify(listener).onRedraw(tableNoColumns); } }
/** * Avoid IndexOutOfBoundsException caused when a filter is notified to * a table consuming the whole data set (no data lookup columns set). */ @Test public void testFullTableFilterEvent() { AbstractDisplayer tableNoColumns = createNewDisplayer( DisplayerSettingsFactory.newTableSettings() .dataset(EXPENSES) .filterOn(true, false, true) .buildSettings()); displayerCoordinator = new DisplayerCoordinator(rendererManager); displayerCoordinator.addDisplayers(deptPieChart, tableNoColumns); displayerCoordinator.addListener(listener); displayerCoordinator.drawAll(); // Click on the "Engineering" slice reset(listener); deptPieChart.filterUpdate(COLUMN_DEPARTMENT, 0); // Check the allRowsTable receives the filter request DataSet dataSet = allRowsTable.getDataSetHandler().getLastDataSet(); assertEquals(dataSet.getRowCount(), 19); verify(listener).onDataLookup(allRowsTable); verify(listener).onRedraw(tableNoColumns); } }