Search in sources :

Example 6 with IndicatorGroup

use of org.activityinfo.shared.dto.IndicatorGroup in project activityinfo by bedatadriven.

the class IndicatorGridPanel method setDatabase.

public void setDatabase(UserDatabaseDTO db) {
    setHeading(db.getName());
    store.removeAll();
    for (ActivityDTO activity : db.getActivities()) {
        store.add(activity);
        for (IndicatorGroup group : activity.groupIndicators()) {
            if (group.getName() == null) {
                for (IndicatorDTO indicator : group.getIndicators()) {
                    store.add(indicator);
                }
            } else {
                store.add(group);
                for (IndicatorDTO indicator : group.getIndicators()) {
                    store.add(indicator);
                }
            }
        }
    }
}
Also used : IndicatorDTO(org.activityinfo.shared.dto.IndicatorDTO) IndicatorGroup(org.activityinfo.shared.dto.IndicatorGroup) ActivityDTO(org.activityinfo.shared.dto.ActivityDTO)

Aggregations

IndicatorGroup (org.activityinfo.shared.dto.IndicatorGroup)6 IndicatorDTO (org.activityinfo.shared.dto.IndicatorDTO)4 ModelData (com.extjs.gxt.ui.client.data.ModelData)2 ActivityDTO (org.activityinfo.shared.dto.ActivityDTO)2 ArrayList (java.util.ArrayList)1 AdminLevelDTO (org.activityinfo.shared.dto.AdminLevelDTO)1 AttributeDTO (org.activityinfo.shared.dto.AttributeDTO)1 AttributeGroupDTO (org.activityinfo.shared.dto.AttributeGroupDTO)1 Cell (org.apache.poi.ss.usermodel.Cell)1 Row (org.apache.poi.ss.usermodel.Row)1 CellRangeAddress (org.apache.poi.ss.util.CellRangeAddress)1