use of org.jmesa.view.component.Row in project OpenClinica by OpenClinica.
the class DiscNotesSubjectStatisticsFactory method configureColumns.
@Override
protected void configureColumns(TableFacade tableFacade, Locale locale) {
//resword = ResourceBundleProvider.getWordsBundle(locale);
//resformat = ResourceBundleProvider.getFormatBundle(locale);
tableFacade.setColumnProperties(columnNames);
Row row = tableFacade.getTable().getRow();
HashMap<Object, Map> items = (HashMap<Object, Map>) getDiscrepancyMap();
Set theKeys = items.keySet();
Iterator theKeysItr = theKeys.iterator();
configureColumn(row.getColumn(columnNames[0]), "_", null, null);
configureColumn(row.getColumn(columnNames[1]), theKeysItr.next().toString(), null, null);
configureColumn(row.getColumn(columnNames[2]), theKeysItr.next().toString(), null, null);
configureColumn(row.getColumn(columnNames[3]), theKeysItr.next().toString(), null, null);
configureColumn(row.getColumn(columnNames[4]), theKeysItr.next().toString(), null, null);
configureColumn(row.getColumn(columnNames[5]), "Totals", null, null);
// study event definition columns
//String actionsHeader = resword.getString("rule_actions") + "               ";
//configureColumn(row.getColumn(columnNames[columnNames.length - 1]), "Summary Statistics", null, null, false,
// false);
}
use of org.jmesa.view.component.Row in project OpenClinica by OpenClinica.
the class ListStudySubjectTableFactory method configureColumns.
@Override
protected void configureColumns(TableFacade tableFacade, Locale locale) {
resword = ResourceBundleProvider.getWordsBundle(locale);
resformat = ResourceBundleProvider.getFormatBundle(locale);
tableFacade.setColumnProperties(columnNames);
Row row = tableFacade.getTable().getRow();
int index = 0;
configureColumn(row.getColumn(columnNames[index]), resword.getString("study_subject_ID"), null, null);
++index;
configureColumn(row.getColumn(columnNames[index]), resword.getString("subject_status"), new StatusCellEditor(), new StatusDroplistFilterEditor());
++index;
configureColumn(row.getColumn(columnNames[index]), resword.getString("site_id"), null, null);
++index;
configureColumn(row.getColumn(columnNames[index]), resword.getString("rule_oid"), null, null);
++index;
configureColumn(row.getColumn(columnNames[index]), resword.getString("gender"), null, null, true, false);
++index;
configureColumn(row.getColumn(columnNames[index]), resword.getString("secondary_ID"), null, null);
++index;
// group class columns
for (int i = index; i < index + studyGroupClasses.size(); i++) {
StudyGroupClassBean studyGroupClass = studyGroupClasses.get(i - index);
// configureColumn(row.getColumn(columnNames[i]),
// studyGroupClass.getName(), new
// StudyGroupClassCellEditor(studyGroupClass), null, false, false);
configureColumn(row.getColumn(columnNames[i]), studyGroupClass.getName(), new StudyGroupClassCellEditor(studyGroupClass), new SubjectGroupClassDroplistFilterEditor(studyGroupClass), true, false);
}
// study event definition columns
for (int i = index + studyGroupClasses.size(); i < columnNames.length - 1; i++) {
StudyEventDefinitionBean studyEventDefinition = studyEventDefinitions.get(i - (index + studyGroupClasses.size()));
configureColumn(row.getColumn(columnNames[i]), studyEventDefinition.getName(), new StudyEventDefinitionMapCellEditor(), new SubjectEventStatusDroplistFilterEditor(), true, false);
}
String actionsHeader = resword.getString("rule_actions") + "                                 ";
configureColumn(row.getColumn(columnNames[columnNames.length - 1]), actionsHeader, new ActionsCellEditor(), new DefaultActionsEditor(locale), true, false);
}
use of org.jmesa.view.component.Row in project OpenClinica by OpenClinica.
the class ViewRuleAssignmentTableFactory method configureExportColumns.
@Override
protected void configureExportColumns(TableFacade tableFacade, Locale locale) {
tableFacade.setColumnProperties(columnNames);
Row row = tableFacade.getTable().getRow();
int index = 0;
configureColumn(row.getColumn(columnNames[index++]), resword.getString("view_rule_assignment_run_schedule"), null, null);
configureColumn(row.getColumn(columnNames[index++]), resword.getString("view_rule_assignment_run_time"), null, null);
configureColumn(row.getColumn(columnNames[index++]), resword.getString("view_rule_assignment_target"), null, null);
configureColumn(row.getColumn(columnNames[index++]), resword.getString("view_rule_assignment_study_event"), null, null);
configureColumn(row.getColumn(columnNames[index++]), resword.getString("view_rule_assignment_crf") + "     ", null, null);
configureColumn(row.getColumn(columnNames[index++]), resword.getString("view_rule_assignment_version"), null, null);
configureColumn(row.getColumn(columnNames[index++]), resword.getString("view_rule_assignment_group"), null, null);
configureColumn(row.getColumn(columnNames[index++]), resword.getString("view_rule_assignment_item_name"), null, null);
configureColumn(row.getColumn(columnNames[index++]), resword.getString("view_rule_assignment_rule_name"), null, null);
configureColumn(row.getColumn(columnNames[index++]), resword.getString("view_rule_assignment_rule_oid"), null, null);
configureColumn(row.getColumn(columnNames[index++]), resword.getString("view_rule_assignment_rule_status"), new StatusCellEditor(), new StatusDroplistFilterEditor());
configureColumn(row.getColumn(columnNames[index++]), resword.getString("view_rule_assignment_rule_description"), null, null);
configureColumn(row.getColumn(columnNames[index++]), resword.getString("view_rule_assignment_expression"), null, null);
configureColumn(row.getColumn(columnNames[index++]), resword.getString("view_rule_assignment_crf_validations"), new ValidationsValueCellEditor(true), null, false, false);
configureColumn(row.getColumn(columnNames[index++]), resword.getString("view_rule_assignment_execute_on"), new ExecuteOnCellEditor(true), new ExpressionEvaluatesToDroplistFilterEditor(), true, false);
configureColumn(row.getColumn(columnNames[index++]), resword.getString("view_rule_assignment_action_type"), new ActionTypeCellEditor(true), new ActionTypeDroplistFilterEditor(), true, false);
configureColumn(row.getColumn(columnNames[index++]), resword.getString("view_rule_assignment_action_summary"), new ActionSummaryCellEditor(true), null, true, false);
}
use of org.jmesa.view.component.Row in project OpenClinica by OpenClinica.
the class SubjectIdSDVFactory method configureColumns.
@Override
protected void configureColumns(TableFacade tableFacade, Locale locale) {
tableFacade.setColumnProperties("sdvStatus", "studySubjectId", "siteId", "personId", "studySubjectStatus", "group", "numberCRFComplete", "numberOfCRFsSDV", "totalEventCRF", "actions");
resword = ResourceBundleProvider.getWordsBundle(locale);
Row row = tableFacade.getTable().getRow();
SDVUtil sdvUtil = new SDVUtil();
String[] allTitles = new String[] { resword.getString("SDV_status"), resword.getString("study_subject_ID"), resword.getString("site_id"), resword.getString("person_ID"), resword.getString("study_subject_status"), resword.getString("group"), resword.getString("num_CRFs_completed"), resword.getString("num_CRFs_SDV"), resword.getString("total_events_CRF"), resword.getString("actions") };
sdvUtil.setTitles(allTitles, (HtmlTable) tableFacade.getTable());
sdvUtil.turnOffFilters(tableFacade, new String[] { "personId", "studySubjectStatus", "group", "numberCRFComplete", "numberOfCRFsSDV", "totalEventCRF", "actions" });
sdvUtil.turnOffSorts(tableFacade, new String[] { "sdvStatus", "studySubjectId", "siteId", "personId", "studySubjectStatus", "group", "numberCRFComplete", "numberOfCRFsSDV", "totalEventCRF" });
sdvUtil.setHtmlCellEditors(tableFacade, new String[] { "sdvStatus", "actions" }, false);
HtmlColumn sdvStatus = ((HtmlRow) row).getColumn("sdvStatus");
sdvStatus.getFilterRenderer().setFilterEditor(new SdvStatusFilter());
String actionsHeader = resword.getString("rule_actions") + "                            ";
configureColumn(row.getColumn("actions"), actionsHeader, sdvUtil.getCellEditorNoEscapes(), new DefaultActionsEditor(locale), true, false);
}
use of org.jmesa.view.component.Row in project OpenClinica by OpenClinica.
the class ScheduledJobTableFactory method configureColumns.
@Override
protected void configureColumns(TableFacade tableFacade, Locale locale) {
tableFacade.setColumnProperties("datasetId", "fireTime", "exportFileName", "jobStatus", "action");
// TODO the following is throwing null pointer, check later
resword = ResourceBundleProvider.getWordsBundle(locale);
Row row = tableFacade.getTable().getRow();
String[] allTitles = new String[] { "DataSet Name", "Fire Time", "Export File", "Job Status", "Actions" };
// TODO check if this is viable
SDVUtil sdvUtil = new SDVUtil();
sdvUtil.setTitles(allTitles, (HtmlTable) tableFacade.getTable());
// HtmlColumn sdvStatus = ((HtmlRow) row).getColumn("checkbox");
// sdvStatus.getFilterRenderer().setFilterEditor(new SdvStatusFilter());
sdvUtil.setHtmlCellEditors(tableFacade, new String[] { "action" }, false);
configureColumn(row.getColumn("action"), "Actions", sdvUtil.getCellEditorNoEscapes(), new DefaultActionsEditor(locale), true, false);
}
Aggregations