use of org.jmesa.view.component.Row in project OpenClinica by OpenClinica.
the class DefaultToolbar method render.
@SuppressWarnings("unchecked")
@Override
public String render() {
addToolbarItem(ToolbarItemType.FIRST_PAGE_ITEM);
addToolbarItem(ToolbarItemType.PREV_PAGE_ITEM);
addToolbarItem(ToolbarItemType.NEXT_PAGE_ITEM);
addToolbarItem(ToolbarItemType.LAST_PAGE_ITEM);
addToolbarItem(ToolbarItemType.SEPARATOR);
MaxRowsItem maxRowsItem = (MaxRowsItem) addToolbarItem(ToolbarItemType.MAX_ROWS_ITEM);
if (getMaxRowsIncrements() != null) {
maxRowsItem.setIncrements(getMaxRowsIncrements());
}
boolean exportable = ViewUtils.isExportable(getExportTypes());
if (exportable) {
addToolbarItem(ToolbarItemType.SEPARATOR);
addExportToolbarItems(getExportTypes());
}
Row row = getTable().getRow();
List columns = row.getColumns();
boolean filterable = ViewUtils.isFilterable(columns);
if (filterable) {
//addToolbarItem(ToolbarItemType.SEPARATOR);
//addToolbarItem(ToolbarItemType.FILTER_ITEM);
//addToolbarItem(ToolbarItemType.CLEAR_ITEM);
}
boolean editable = ViewUtils.isEditable(getCoreContext().getWorksheet());
if (editable) {
addToolbarItem(ToolbarItemType.SEPARATOR);
addToolbarItem(ToolbarItemType.SAVE_WORKSHEET_ITEM);
addToolbarItem(ToolbarItemType.FILTER_WORKSHEET_ITEM);
}
addToolbarItems();
return super.render();
}
use of org.jmesa.view.component.Row in project OpenClinica by OpenClinica.
the class SiteStatisticsTableFactory method configureColumns.
@Override
protected void configureColumns(TableFacade tableFacade, Locale locale) {
tableFacade.setColumnProperties("name", "enrolled", "expectedTotalEnrollment", "percentage");
((HtmlTableRenderer) tableFacade.getTable().getTableRenderer()).setWidth("375px");
Row row = tableFacade.getTable().getRow();
configureColumn(row.getColumn("name"), reswords.getString("site"), null, null, false, true);
configureColumn(row.getColumn("enrolled"), reswords.getString("enrolled"), null, null, false, true);
configureColumn(row.getColumn("expectedTotalEnrollment"), reswords.getString("expected_enrollment"), null, null, false, true);
configureColumn(row.getColumn("percentage"), reswords.getString("percentage"), new PercentageCellEditor(), null, false, true);
}
use of org.jmesa.view.component.Row in project OpenClinica by OpenClinica.
the class EventStatusStatisticsTableFactory method configureColumns.
@Override
protected void configureColumns(TableFacade tableFacade, Locale locale) {
tableFacade.setColumnProperties("status", "studySubjects", "percentage");
((HtmlTableRenderer) tableFacade.getTable().getTableRenderer()).setWidth("375px");
Row row = tableFacade.getTable().getRow();
configureColumn(row.getColumn("status"), reswords.getString("event_status"), null, null, false, true);
configureColumn(row.getColumn("studySubjects"), reswords.getString("n_events"), null, null, false, true);
configureColumn(row.getColumn("percentage"), reswords.getString("percentage"), new PercentageCellEditor(), null, false, true);
}
use of org.jmesa.view.component.Row in project OpenClinica by OpenClinica.
the class StudyStatisticsTableFactory method configureColumns.
@Override
protected void configureColumns(TableFacade tableFacade, Locale locale) {
tableFacade.setColumnProperties("name", "enrolled", "expectedTotalEnrollment", "percentage");
((HtmlTableRenderer) tableFacade.getTable().getTableRenderer()).setWidth("363px");
Row row = tableFacade.getTable().getRow();
configureColumn(row.getColumn("name"), reswords.getString("study"), null, null, false, true);
configureColumn(row.getColumn("enrolled"), reswords.getString("enrolled"), null, null, false, true);
configureColumn(row.getColumn("expectedTotalEnrollment"), reswords.getString("expected_enrollment"), null, null, false, true);
configureColumn(row.getColumn("percentage"), reswords.getString("percentage"), new PercentageCellEditor(), null, false, true);
}
use of org.jmesa.view.component.Row in project OpenClinica by OpenClinica.
the class StudySubjectStatusStatisticsTableFactory method configureColumns.
@Override
protected void configureColumns(TableFacade tableFacade, Locale locale) {
tableFacade.setColumnProperties("status", "studySubjects", "percentage");
((HtmlTableRenderer) tableFacade.getTable().getTableRenderer()).setWidth("350px");
Row row = tableFacade.getTable().getRow();
configureColumn(row.getColumn("status"), reswords.getString("study_subject_status"), null, null, false, true);
configureColumn(row.getColumn("studySubjects"), reswords.getString("n_study_subjects"), null, null, false, true);
configureColumn(row.getColumn("percentage"), reswords.getString("percentage"), new PercentageCellEditor(), null, false, true);
}
Aggregations