use of org.jmesa.view.component.Column in project OpenClinica by OpenClinica.
the class EventStatusView method setCustomCellEditors.
/**
* Setting the group cell editor.
*/
private void setCustomCellEditors() {
List<Column> columns = getTable().getRow().getColumns();
for (Column column : columns) {
CellEditor decoratedCellEditor = column.getCellRenderer().getCellEditor();
column.getCellRenderer().setCellEditor(new GroupCellEditor(decoratedCellEditor));
}
}
use of org.jmesa.view.component.Column in project OpenClinica by OpenClinica.
the class StudyStatisticsView method setCustomCellEditors.
/**
* Setting the group cell editor.
*/
private void setCustomCellEditors() {
List<Column> columns = getTable().getRow().getColumns();
for (Column column : columns) {
CellEditor decoratedCellEditor = column.getCellRenderer().getCellEditor();
column.getCellRenderer().setCellEditor(new GroupCellEditor(decoratedCellEditor));
}
}
use of org.jmesa.view.component.Column in project OpenClinica by OpenClinica.
the class ViewCRFServlet method export.
private void export(TableFacade tableFacade) {
// set the column properties
tableFacade.setColumnProperties("versionName", "ruleName", "ruleExpression", "executeOnPlaceHolder", "actionTypePlaceHolder", "actionSummaryPlaceHolder");
Table table = tableFacade.getTable();
table.setCaption("Rules");
Row row = table.getRow();
Column executeOn = row.getColumn("executeOnPlaceHolder");
executeOn.setTitle("Execute On");
executeOn.getCellRenderer().setCellEditor(new CellEditor() {
@SuppressWarnings("unchecked")
public Object getValue(Object item, String property, int rowcount) {
String value = "";
List<RuleActionBean> ruleActions = (List<RuleActionBean>) new BasicCellEditor().getValue(item, "actions", rowcount);
for (int i = 0; i < ruleActions.size(); i++) {
value += ruleActions.get(i).getExpressionEvaluatesTo();
// Do not add horizontal line after last Summary
if (i != ruleActions.size() - 1) {
value += " | ";
}
}
return value;
}
});
Column actionTypePlaceHolder = row.getColumn("actionTypePlaceHolder");
actionTypePlaceHolder.setTitle("Action Type");
actionTypePlaceHolder.getCellRenderer().setCellEditor(new CellEditor() {
@SuppressWarnings("unchecked")
public Object getValue(Object item, String property, int rowcount) {
String value = "";
List<RuleActionBean> ruleActions = (List<RuleActionBean>) new BasicCellEditor().getValue(item, "actions", rowcount);
for (int i = 0; i < ruleActions.size(); i++) {
value += ruleActions.get(i).getActionType().name();
// Do not add horizontal line after last Summary
if (i != ruleActions.size() - 1) {
value += " | ";
}
}
return value;
}
});
Column actionSummaryPlaceHolder = row.getColumn("actionSummaryPlaceHolder");
actionSummaryPlaceHolder.setTitle("Action Summary");
actionSummaryPlaceHolder.getCellRenderer().setCellEditor(new CellEditor() {
@SuppressWarnings("unchecked")
public Object getValue(Object item, String property, int rowcount) {
String value = "";
List<RuleActionBean> ruleActions = (List<RuleActionBean>) new BasicCellEditor().getValue(item, "actions", rowcount);
for (int i = 0; i < ruleActions.size(); i++) {
value += ruleActions.get(i).getSummary();
// Do not add horizontal line after last Summary
if (i != ruleActions.size() - 1) {
value += " | ";
}
}
return value;
}
});
tableFacade.render();
}
use of org.jmesa.view.component.Column in project OpenClinica by OpenClinica.
the class StatisticsView method setCustomCellEditors.
/**
* Setting the group cell editor.
*/
private void setCustomCellEditors() {
List<Column> columns = getTable().getRow().getColumns();
for (Column column : columns) {
CellEditor decoratedCellEditor = column.getCellRenderer().getCellEditor();
column.getCellRenderer().setCellEditor(new GroupCellEditor(decoratedCellEditor));
}
}
use of org.jmesa.view.component.Column in project OpenClinica by OpenClinica.
the class StudySubjectStatusView method setCustomCellEditors.
/**
* Setting the group cell editor.
*/
private void setCustomCellEditors() {
List<Column> columns = getTable().getRow().getColumns();
for (Column column : columns) {
CellEditor decoratedCellEditor = column.getCellRenderer().getCellEditor();
column.getCellRenderer().setCellEditor(new GroupCellEditor(decoratedCellEditor));
}
}
Aggregations