Search in sources :

Example 1 with Row

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();
}
Also used : List(java.util.List) Row(org.jmesa.view.component.Row) MaxRowsItem(org.jmesa.view.html.toolbar.MaxRowsItem)

Example 2 with Row

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);
}
Also used : HtmlTableRenderer(org.jmesa.view.html.renderer.HtmlTableRenderer) Row(org.jmesa.view.component.Row)

Example 3 with Row

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);
}
Also used : HtmlTableRenderer(org.jmesa.view.html.renderer.HtmlTableRenderer) Row(org.jmesa.view.component.Row)

Example 4 with Row

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);
}
Also used : HtmlTableRenderer(org.jmesa.view.html.renderer.HtmlTableRenderer) Row(org.jmesa.view.component.Row)

Example 5 with Row

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);
}
Also used : HtmlTableRenderer(org.jmesa.view.html.renderer.HtmlTableRenderer) Row(org.jmesa.view.component.Row)

Aggregations

Row (org.jmesa.view.component.Row)20 DefaultActionsEditor (org.akaza.openclinica.control.DefaultActionsEditor)11 DateCellEditor (org.jmesa.view.editor.DateCellEditor)5 HtmlTableRenderer (org.jmesa.view.html.renderer.HtmlTableRenderer)4 List (java.util.List)2 CRFBean (org.akaza.openclinica.bean.admin.CRFBean)2 EventDefinitionCRFBean (org.akaza.openclinica.bean.managestudy.EventDefinitionCRFBean)2 StudyEventDefinitionBean (org.akaza.openclinica.bean.managestudy.StudyEventDefinitionBean)2 StudyGroupClassBean (org.akaza.openclinica.bean.managestudy.StudyGroupClassBean)2 EventCRFBean (org.akaza.openclinica.bean.submit.EventCRFBean)2 HtmlColumn (org.jmesa.view.html.component.HtmlColumn)2 HtmlRow (org.jmesa.view.html.component.HtmlRow)2 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 Iterator (java.util.Iterator)1 Map (java.util.Map)1 Set (java.util.Set)1 RuleActionBean (org.akaza.openclinica.domain.rule.action.RuleActionBean)1 SDVUtil (org.akaza.openclinica.web.table.sdv.SDVUtil)1 FilterSet (org.jmesa.limit.FilterSet)1