Java Code Examples for ims.framework.controls.DynamicGridCellOptions

The following are top voted examples for showing how to use ims.framework.controls.DynamicGridCellOptions. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void createControlsForNotCollection(DynamicGridRow row, SpecimenWorkListItemListVo item)
{
	clearVariableCells(row);

	DynamicGridCell cell = row.getCells().newCell(getColumn(DATE_COL), DynamicCellType.LABEL, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	cell = row.getCells().newCell(getColumn(TIME_COL), DynamicCellType.LABEL, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	cell = row.getCells().newCell(getColumn(QUERY_COL), DynamicCellType.LABEL, DynamicGridCellOptions.LABEL_CELL);
	getColumn(QUERY_COL).setAlignment(Alignment.RIGHT);
	cell.setValue("Reason:");
	cell = row.getCells().newCell(getColumn(TEXT_COL), DynamicCellType.STRING, item !=null?DynamicGridCellOptions.READ_ONLY_DATA_CELL:DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setCellMaxLength(item, cell);
	if(item != null)
	{
		if(item.getSpecimenIsNotNull() && item.getSpecimen().getCollectorCommentIsNotNull())
		{
			cell.setValue(item.getSpecimen().getCollectorComment());
			cell.setTooltip(item.getSpecimen().getCollectorComment());
		}
	}
}
 
Example 2
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void createControlsForNotCollection(DynamicGridRow row, SpecimenWorkListItemListVo item)
{
	clearVariableCells(row);

	DynamicGridCell cell = row.getCells().newCell(getColumn(DATE_COL), DynamicCellType.LABEL, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	cell = row.getCells().newCell(getColumn(TIME_COL), DynamicCellType.LABEL, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	cell = row.getCells().newCell(getColumn(QUERY_COL), DynamicCellType.LABEL, DynamicGridCellOptions.LABEL_CELL);
	cell.setValue("Reason:");
	cell = row.getCells().newCell(getColumn(TEXT_COL), DynamicCellType.STRING, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setCellMaxLength(item, cell);
	if(item != null)
	{
		if(item.getSpecimenIsNotNull() && item.getSpecimen().getCollectorCommentIsNotNull())
		{	
			cell.setValue(item.getSpecimen().getCollectorComment());
			cell.setTooltip(item.getSpecimen().getCollectorComment());
		}
	}
}
 
Example 3
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void createControlsForNotCollection(DynamicGridRow row, SpecimenWorkListItemListVo item)
{
	clearVariableCells(row);

	DynamicGridCell cell = row.getCells().newCell(getColumn(DATE_COL), DynamicCellType.LABEL, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	cell = row.getCells().newCell(getColumn(TIME_COL), DynamicCellType.LABEL, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	cell = row.getCells().newCell(getColumn(QUERY_COL), DynamicCellType.LABEL, DynamicGridCellOptions.LABEL_CELL);
	getColumn(QUERY_COL).setAlignment(Alignment.RIGHT);
	cell.setValue("Reason:");
	cell = row.getCells().newCell(getColumn(TEXT_COL), DynamicCellType.STRING, item != null ? DynamicGridCellOptions.READ_ONLY_DATA_CELL : DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setCellMaxLength(item, cell);
	if (item != null)
	{
		if (item.getSpecimenIsNotNull() && item.getSpecimen().getCollectorCommentIsNotNull())
		{
			cell.setValue(item.getSpecimen().getCollectorComment());
			cell.setTooltip(item.getSpecimen().getCollectorComment());
		}
	}
}
 
Example 4
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void createControlsForNotCollection(DynamicGridRow row, SpecimenWorkListItemListVo item)
{
	clearVariableCells(row);

	DynamicGridCell cell = row.getCells().newCell(getColumn(DATE_COL), DynamicCellType.LABEL, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	cell = row.getCells().newCell(getColumn(TIME_COL), DynamicCellType.LABEL, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	cell = row.getCells().newCell(getColumn(QUERY_COL), DynamicCellType.LABEL, DynamicGridCellOptions.LABEL_CELL);
	cell.setValue("Reason:");
	cell = row.getCells().newCell(getColumn(TEXT_COL), DynamicCellType.STRING, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setCellMaxLength(item, cell);
	if(item != null)
	{
		if(item.getSpecimenIsNotNull() && item.getSpecimen().getCollectorCommentIsNotNull())
		{	
			cell.setValue(item.getSpecimen().getCollectorComment());
			cell.setTooltip(item.getSpecimen().getCollectorComment());
		}
	}
}
 
Example 5
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void createControlsForNotCollection(DynamicGridRow row, SpecimenWorkListItemListVo item)
{
	clearVariableCells(row);

	DynamicGridCell cell = row.getCells().newCell(getColumn(DATE_COL), DynamicCellType.LABEL, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	cell = row.getCells().newCell(getColumn(TIME_COL), DynamicCellType.LABEL, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	cell = row.getCells().newCell(getColumn(QUERY_COL), DynamicCellType.LABEL, DynamicGridCellOptions.LABEL_CELL);
	getColumn(QUERY_COL).setAlignment(Alignment.RIGHT);
	cell.setValue("Reason:");
	cell = row.getCells().newCell(getColumn(TEXT_COL), DynamicCellType.STRING, item !=null?DynamicGridCellOptions.READ_ONLY_DATA_CELL:DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setCellMaxLength(item, cell);
	if(item != null)
	{
		if(item.getSpecimenIsNotNull() && item.getSpecimen().getCollectorCommentIsNotNull())
		{
			cell.setValue(item.getSpecimen().getCollectorComment());
			cell.setTooltip(item.getSpecimen().getCollectorComment());
		}
	}
}
 
Example 6
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void createControlsForNotCollection(DynamicGridRow row, SpecimenWorkListItemListVo item)
{
	clearVariableCells(row);

	DynamicGridCell cell = row.getCells().newCell(getColumn(DATE_COL), DynamicCellType.LABEL, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	cell = row.getCells().newCell(getColumn(TIME_COL), DynamicCellType.LABEL, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	cell = row.getCells().newCell(getColumn(QUERY_COL), DynamicCellType.LABEL, DynamicGridCellOptions.LABEL_CELL);
	cell.setValue("Reason:");
	cell = row.getCells().newCell(getColumn(TEXT_COL), DynamicCellType.STRING, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setCellMaxLength(item, cell);
	if(item != null)
	{
		if(item.getSpecimenIsNotNull() && item.getSpecimen().getCollectorCommentIsNotNull())
		{	
			cell.setValue(item.getSpecimen().getCollectorComment());
			cell.setTooltip(item.getSpecimen().getCollectorComment());
		}
	}
}
 
Example 7
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void createControlsForNotCollection(DynamicGridRow row, SpecimenWorkListItemListVo item)
{
	clearVariableCells(row);

	DynamicGridCell cell = row.getCells().newCell(getColumn(DATE_COL), DynamicCellType.LABEL, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	cell = row.getCells().newCell(getColumn(TIME_COL), DynamicCellType.LABEL, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	cell = row.getCells().newCell(getColumn(QUERY_COL), DynamicCellType.LABEL, DynamicGridCellOptions.LABEL_CELL);
	getColumn(QUERY_COL).setAlignment(Alignment.RIGHT);
	cell.setValue("Reason:");
	cell = row.getCells().newCell(getColumn(TEXT_COL), DynamicCellType.STRING, item != null ? DynamicGridCellOptions.READ_ONLY_DATA_CELL : DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setCellMaxLength(item, cell);
	if (item != null)
	{
		if (item.getSpecimenIsNotNull() && item.getSpecimen().getCollectorCommentIsNotNull())
		{
			cell.setValue(item.getSpecimen().getCollectorComment());
			cell.setTooltip(item.getSpecimen().getCollectorComment());
		}
	}
}
 
Example 8
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void createControlsForNotCollection(DynamicGridRow row, SpecimenWorkListItemListVo item)
{
	clearVariableCells(row);

	DynamicGridCell cell = row.getCells().newCell(getColumn(DATE_COL), DynamicCellType.LABEL, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	cell = row.getCells().newCell(getColumn(TIME_COL), DynamicCellType.LABEL, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	cell = row.getCells().newCell(getColumn(QUERY_COL), DynamicCellType.LABEL, DynamicGridCellOptions.LABEL_CELL);
	cell.setValue("Reason:");
	cell = row.getCells().newCell(getColumn(TEXT_COL), DynamicCellType.STRING, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setCellMaxLength(item, cell);
	if(item != null)
	{
		if(item.getSpecimenIsNotNull() && item.getSpecimen().getCollectorCommentIsNotNull())
		{	
			cell.setValue(item.getSpecimen().getCollectorComment());
			cell.setTooltip(item.getSpecimen().getCollectorComment());
		}
	}
}
 
Example 9
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void createControlsForNotCollection(DynamicGridRow row, SpecimenWorkListItemListVo item)
{
	clearVariableCells(row);

	DynamicGridCell cell = row.getCells().newCell(getColumn(DATE_COL), DynamicCellType.LABEL, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	cell = row.getCells().newCell(getColumn(TIME_COL), DynamicCellType.LABEL, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	cell = row.getCells().newCell(getColumn(QUERY_COL), DynamicCellType.LABEL, DynamicGridCellOptions.LABEL_CELL);
	getColumn(QUERY_COL).setAlignment(Alignment.RIGHT);
	cell.setValue("Reason:");
	cell = row.getCells().newCell(getColumn(TEXT_COL), DynamicCellType.STRING, item !=null?DynamicGridCellOptions.READ_ONLY_DATA_CELL:DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setCellMaxLength(item, cell);
	if(item != null)
	{
		if(item.getSpecimenIsNotNull() && item.getSpecimen().getCollectorCommentIsNotNull())
		{
			cell.setValue(item.getSpecimen().getCollectorComment());
			cell.setTooltip(item.getSpecimen().getCollectorComment());
		}
	}
}
 
Example 10
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void createControlsForNotCollection(DynamicGridRow row, SpecimenWorkListItemListVo item)
{
	clearVariableCells(row);

	DynamicGridCell cell = row.getCells().newCell(getColumn(DATE_COL), DynamicCellType.LABEL, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	cell = row.getCells().newCell(getColumn(TIME_COL), DynamicCellType.LABEL, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	cell = row.getCells().newCell(getColumn(QUERY_COL), DynamicCellType.LABEL, DynamicGridCellOptions.LABEL_CELL);
	cell.setValue("Reason:");
	cell = row.getCells().newCell(getColumn(TEXT_COL), DynamicCellType.STRING, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setCellMaxLength(item, cell);
	if(item != null)
	{
		if(item.getSpecimenIsNotNull() && item.getSpecimen().getCollectorCommentIsNotNull())
		{	
			cell.setValue(item.getSpecimen().getCollectorComment());
			cell.setTooltip(item.getSpecimen().getCollectorComment());
		}
	}
}
 
Example 11
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void createControlsForNotCollection(DynamicGridRow row, SpecimenWorkListItemListVo item)
{
	clearVariableCells(row);

	DynamicGridCell cell = row.getCells().newCell(getColumn(DATE_COL), DynamicCellType.LABEL, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	cell = row.getCells().newCell(getColumn(TIME_COL), DynamicCellType.LABEL, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	cell = row.getCells().newCell(getColumn(QUERY_COL), DynamicCellType.LABEL, DynamicGridCellOptions.LABEL_CELL);
	getColumn(QUERY_COL).setAlignment(Alignment.RIGHT);
	cell.setValue("Reason:");
	cell = row.getCells().newCell(getColumn(TEXT_COL), DynamicCellType.STRING, item != null ? DynamicGridCellOptions.READ_ONLY_DATA_CELL : DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setCellMaxLength(item, cell);
	if (item != null)
	{
		if (item.getSpecimenIsNotNull() && item.getSpecimen().getCollectorCommentIsNotNull())
		{
			cell.setValue(item.getSpecimen().getCollectorComment());
			cell.setTooltip(item.getSpecimen().getCollectorComment());
		}
	}
}
 
Example 12
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void createControlsForNotCollection(DynamicGridRow row, SpecimenWorkListItemListVo item)
{
	clearVariableCells(row);

	DynamicGridCell cell = row.getCells().newCell(getColumn(DATE_COL), DynamicCellType.LABEL, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	cell = row.getCells().newCell(getColumn(TIME_COL), DynamicCellType.LABEL, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	cell = row.getCells().newCell(getColumn(QUERY_COL), DynamicCellType.LABEL, DynamicGridCellOptions.LABEL_CELL);
	cell.setValue("Reason:");
	cell = row.getCells().newCell(getColumn(TEXT_COL), DynamicCellType.STRING, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setCellMaxLength(item, cell);
	if(item != null)
	{
		if(item.getSpecimenIsNotNull() && item.getSpecimen().getCollectorCommentIsNotNull())
		{	
			cell.setValue(item.getSpecimen().getCollectorComment());
			cell.setTooltip(item.getSpecimen().getCollectorComment());
		}
	}
}
 
Example 13
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void createControlsForNotCollection(DynamicGridRow row, SpecimenWorkListItemListVo item)
{
	clearVariableCells(row);

	DynamicGridCell cell = row.getCells().newCell(getColumn(DATE_COL), DynamicCellType.LABEL, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	cell = row.getCells().newCell(getColumn(TIME_COL), DynamicCellType.LABEL, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	cell = row.getCells().newCell(getColumn(QUERY_COL), DynamicCellType.LABEL, DynamicGridCellOptions.LABEL_CELL);
	getColumn(QUERY_COL).setAlignment(Alignment.RIGHT);
	cell.setValue("Reason:");
	cell = row.getCells().newCell(getColumn(TEXT_COL), DynamicCellType.STRING, item !=null?DynamicGridCellOptions.READ_ONLY_DATA_CELL:DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setCellMaxLength(item, cell);
	if(item != null)
	{
		if(item.getSpecimenIsNotNull() && item.getSpecimen().getCollectorCommentIsNotNull())
		{
			cell.setValue(item.getSpecimen().getCollectorComment());
			cell.setTooltip(item.getSpecimen().getCollectorComment());
		}
	}
}
 
Example 14
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void createControlsForNotCollection(DynamicGridRow row, SpecimenWorkListItemListVo item)
{
	clearVariableCells(row);

	DynamicGridCell cell = row.getCells().newCell(getColumn(DATE_COL), DynamicCellType.LABEL, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	cell = row.getCells().newCell(getColumn(TIME_COL), DynamicCellType.LABEL, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	cell = row.getCells().newCell(getColumn(QUERY_COL), DynamicCellType.LABEL, DynamicGridCellOptions.LABEL_CELL);
	cell.setValue("Reason:");
	cell = row.getCells().newCell(getColumn(TEXT_COL), DynamicCellType.STRING, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setCellMaxLength(item, cell);
	if(item != null)
	{
		if(item.getSpecimenIsNotNull() && item.getSpecimen().getCollectorCommentIsNotNull())
		{	
			cell.setValue(item.getSpecimen().getCollectorComment());
			cell.setTooltip(item.getSpecimen().getCollectorComment());
		}
	}
}
 
Example 15
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void createControlsForNotCollection(DynamicGridRow row, SpecimenWorkListItemListVo item)
{
	clearVariableCells(row);

	DynamicGridCell cell = row.getCells().newCell(getColumn(DATE_COL), DynamicCellType.LABEL, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	cell = row.getCells().newCell(getColumn(TIME_COL), DynamicCellType.LABEL, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	cell = row.getCells().newCell(getColumn(QUERY_COL), DynamicCellType.LABEL, DynamicGridCellOptions.LABEL_CELL);
	getColumn(QUERY_COL).setAlignment(Alignment.RIGHT);
	cell.setValue("Reason:");
	cell = row.getCells().newCell(getColumn(TEXT_COL), DynamicCellType.STRING, item != null ? DynamicGridCellOptions.READ_ONLY_DATA_CELL : DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setCellMaxLength(item, cell);
	if (item != null)
	{
		if (item.getSpecimenIsNotNull() && item.getSpecimen().getCollectorCommentIsNotNull())
		{
			cell.setValue(item.getSpecimen().getCollectorComment());
			cell.setTooltip(item.getSpecimen().getCollectorComment());
		}
	}
}
 
Example 16
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void createControlsForNotCollection(DynamicGridRow row, SpecimenWorkListItemListVo item)
{
	clearVariableCells(row);

	DynamicGridCell cell = row.getCells().newCell(getColumn(DATE_COL), DynamicCellType.LABEL, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	cell = row.getCells().newCell(getColumn(TIME_COL), DynamicCellType.LABEL, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	cell = row.getCells().newCell(getColumn(QUERY_COL), DynamicCellType.LABEL, DynamicGridCellOptions.LABEL_CELL);
	cell.setValue("Reason:");
	cell = row.getCells().newCell(getColumn(TEXT_COL), DynamicCellType.STRING, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setCellMaxLength(item, cell);
	if(item != null)
	{
		if(item.getSpecimenIsNotNull() && item.getSpecimen().getCollectorCommentIsNotNull())
		{	
			cell.setValue(item.getSpecimen().getCollectorComment());
			cell.setTooltip(item.getSpecimen().getCollectorComment());
		}
	}
}
 
Example 17
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
/**
 * WDEV-12907
 * Function used to populate Over45 field
 * @param required
 * @param isOver45 - value to be set; if it is <b>null</b> then it will default accordingly to patient age (Yes when age is over 45, No when age is at most 45)
 */
private void populateOver45(Boolean required, Boolean isOver45)
{
	YesNoCollection lookup = ims.core.vo.lookups.LookupHelper.getYesNo(this.domain.getLookupService());

	DynamicGridRow over45Row = form.lyrMain().tabTumourDetails().lyrPrognosticTNM().tabTNM().dynGrdPreTreatment().getRows().newRow();
	DynamicGridCell typeNameCell = over45Row.getCells().newCell(getColumn(COLTYPE_NAME), DynamicCellType.HTMLVIEW);
	typeNameCell.setBackColor(Color.Gray);
	typeNameCell.setOptions(DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	typeNameCell.setValue("<b><p align=center>Over 45</p></b>");

	DynamicGridCell typeValueCell = over45Row.getCells().newCell(getColumn(COLTYPE_VALUE), DynamicCellType.ENUMERATION);
	for (int i = 0; i < lookup.size(); i++)
	{
		typeValueCell.getItems().newItem(lookup.get(i), lookup.get(i).getText());
	}

	if (Boolean.TRUE.equals(required))
	{
		if (isOver45 != null)
		{
			typeValueCell.setValue(Boolean.TRUE.equals(isOver45) ? YesNo.YES : YesNo.NO);
		}
		else
		{
			if (form.getGlobalContext().Core.getPatientShort().getAgeIsNotNull())
			{
				typeValueCell.setValue(form.getGlobalContext().Core.getPatientShort().getAge().intValue() >= 45 ? YesNo.YES : YesNo.NO);
			}
		}
	}

	typeValueCell.setAutoPostBack(true);
	typeValueCell.setIdentifier(OVER45);
}
 
Example 18
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateOverall(TumourGroupSiteOverallStagingVo value)
{
	DynamicGridRow overallRow = form.lyrMain().tabTumourDetails().lyrPrognosticTNM().tabTNM().dynGrdPreTreatment().getRows().newRow();
	overallRow.setIdentifier(OVERALL_VALUE);
	DynamicGridCell typeNameCell = overallRow.getCells().newCell(getColumn(COLTYPE_NAME), DynamicCellType.HTMLVIEW);
	typeNameCell.setBackColor(Color.Gray);
	typeNameCell.setOptions(DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	typeNameCell.setValue("<b><p align=center>Overall Stage</p></b>");

	DynamicGridCell typeValueCell = overallRow.getCells().newCell(getColumn(COLTYPE_VALUE), DynamicCellType.ENUMERATION);
	if (value != null)
		typeValueCell.setIdentifier(value);
	else
		typeValueCell.setIdentifier(OVERALL_VALUE);

	typeValueCell.setAutoPostBack(true);
	if (value != null)
	{
		typeValueCell.getItems().newItem(value, value.toString());
		typeValueCell.setValue(value);
	}

	TNMCertaintyFactorCollection certaintyFactor = ims.oncology.vo.lookups.LookupHelper.getTNMCertaintyFactor(this.domain.getLookupService());

	DynamicGridCell certainNameCell = overallRow.getCells().newCell(getColumn(COLCERTAIN_NAME), DynamicCellType.HTMLVIEW);
	certainNameCell.setBackColor(Color.Gray);
	certainNameCell.setOptions(DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	certainNameCell.setValue("<b><p align=center>Overall Certainty</p></b>");

	DynamicGridCell certainValueCell = overallRow.getCells().newCell(getColumn(COLCERTAIN_VALUE), DynamicCellType.ENUMERATION);
	certainValueCell.setIdentifier(OVERALLCERTAIN_VALUE);
	bindCertaintyFactor(certaintyFactor, certainValueCell, form.getLocalContext().getSelectedRecordIsNotNull() && form.getLocalContext().getSelectedRecord().getID_PrimaryTumourDetailsIsNotNull() ? (form.getLocalContext().getSelectedRecord().getPreTreatmentOverAllCertIsNotNull() ? form.getLocalContext().getSelectedRecord().getPreTreatmentOverAllCert() : null) : null);
}
 
Example 19
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void createCommonCells(DynamicGridRow row)
{
	if(row.getCells().get(getColumn(BTN_COL)) == null)
	{
		DynamicGridCell cell = row.getCells().newCell(getColumn(BTN_COL), DynamicCellType.IMAGEBUTTON, DynamicGridCellOptions.EDITABLE_DATA_CELL);
		cell.setValue(form.getImages().OCRR.SaveGrid);
		cell.setTooltip("Save");
	}
}
 
Example 20
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void createControlsForCollection(DynamicGridRow row)
{
	clearVariableCells(row);
	DynamicGridCell cell = row.getCells().newCell(getColumn(DATE_COL), DynamicCellType.DATE, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setDefaultDateValue(cell);
	cell = row.getCells().newCell(getColumn(TIME_COL), DynamicCellType.TIME, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setDefaultTimeValue(cell);
	cell = row.getCells().newCell(getColumn(QUERY_COL), DynamicCellType.QUERYCOMBOBOX, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	getColumn(QUERY_COL).setAlignment(Alignment.LEFT);
	cell.setAutoPostBack(true);
	setDefaultMosValue(cell);
	cell = row.getCells().newCell(getColumn(TEXT_COL), DynamicCellType.STRING, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setCellMaxLength(((row.getValue() instanceof SpecimenWorkListItemListVo)?((SpecimenWorkListItemListVo)row.getValue()):null), cell);
}
 
Example 21
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void createControlsForCollection(DynamicGridRow row)
{
	clearVariableCells(row);
	DynamicGridCell cell = row.getCells().newCell(getColumn(DATE_COL), DynamicCellType.DATE, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setDefaultDateValue(cell);
	cell = row.getCells().newCell(getColumn(TIME_COL), DynamicCellType.TIME, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setDefaultTimeValue(cell);
	cell = row.getCells().newCell(getColumn(QUERY_COL), DynamicCellType.QUERYCOMBOBOX, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	cell.setAutoPostBack(true);
	setDefaultMosValue(cell);
	cell = row.getCells().newCell(getColumn(TEXT_COL), DynamicCellType.STRING, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setCellMaxLength(((row.getValue() instanceof SpecimenWorkListItemListVo)?((SpecimenWorkListItemListVo)row.getValue()):null), cell);
}
 
Example 22
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void createCommonControls(DynamicGridRow row)
{
	if(row.getCells().get(getColumn(BTN_COL)) == null)
	{
		DynamicGridCell cell = row.getCells().newCell(getColumn(BTN_COL), DynamicCellType.IMAGEBUTTON, DynamicGridCellOptions.EDITABLE_DATA_CELL);
		cell.setValue(form.getImages().OCRR.SaveGrid);
		cell.setTooltip("Save");
	}
}
 
Example 23
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void createCommonCells(DynamicGridRow row)
{
	if (row.getCells().get(getColumn(BTN_COL)) == null)
	{
		DynamicGridCell cell = row.getCells().newCell(getColumn(BTN_COL), DynamicCellType.IMAGEBUTTON, DynamicGridCellOptions.EDITABLE_DATA_CELL);
		cell.setValue(form.getImages().OCRR.SaveGrid);
		cell.setTooltip("Save");
	}
}
 
Example 24
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void createControlsForCollection(DynamicGridRow row)
{
	clearVariableCells(row);
	DynamicGridCell cell = row.getCells().newCell(getColumn(DATE_COL), DynamicCellType.DATE, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setDefaultDateValue(cell);
	cell = row.getCells().newCell(getColumn(TIME_COL), DynamicCellType.TIME, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setDefaultTimeValue(cell);
	cell = row.getCells().newCell(getColumn(QUERY_COL), DynamicCellType.QUERYCOMBOBOX, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	getColumn(QUERY_COL).setAlignment(Alignment.LEFT);
	cell.setAutoPostBack(true);
	setDefaultMosValue(cell);
	cell = row.getCells().newCell(getColumn(TEXT_COL), DynamicCellType.STRING, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setCellMaxLength(((row.getValue() instanceof SpecimenWorkListItemListVo) ? ((SpecimenWorkListItemListVo) row.getValue()) : null), cell);
}
 
Example 25
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void createControlsForCollection(DynamicGridRow row)
{
	clearVariableCells(row);
	DynamicGridCell cell = row.getCells().newCell(getColumn(DATE_COL), DynamicCellType.DATE, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setDefaultDateValue(cell);
	cell = row.getCells().newCell(getColumn(TIME_COL), DynamicCellType.TIME, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setDefaultTimeValue(cell);
	cell = row.getCells().newCell(getColumn(QUERY_COL), DynamicCellType.QUERYCOMBOBOX, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	cell.setAutoPostBack(true);
	setDefaultMosValue(cell);
	cell = row.getCells().newCell(getColumn(TEXT_COL), DynamicCellType.STRING, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setCellMaxLength(((row.getValue() instanceof SpecimenWorkListItemListVo)?((SpecimenWorkListItemListVo)row.getValue()):null), cell);
}
 
Example 26
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void createCommonControls(DynamicGridRow row)
{
	if(row.getCells().get(getColumn(BTN_COL)) == null)
	{
		DynamicGridCell cell = row.getCells().newCell(getColumn(BTN_COL), DynamicCellType.IMAGEBUTTON, DynamicGridCellOptions.EDITABLE_DATA_CELL);
		cell.setValue(form.getImages().OCRR.SaveGrid);
		cell.setTooltip("Save");
	}
}
 
Example 27
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
/**
 * WDEV-12907
 * Function used to populate Over45 field
 * @param required
 * @param isOver45 - value to be set; if it is <b>null</b> then it will default accordingly to patient age (Yes when age is over 45, No when age is at most 45)
 */
private void populateOver45(Boolean required, Boolean isOver45)
{
	YesNoCollection lookup = ims.core.vo.lookups.LookupHelper.getYesNo(this.domain.getLookupService());

	DynamicGridRow over45Row = form.lyrMain().tabTumourDetails().lyrPrognosticTNM().tabTNM().dynGrdPreTreatment().getRows().newRow();
	DynamicGridCell typeNameCell = over45Row.getCells().newCell(getColumn(COLTYPE_NAME), DynamicCellType.HTMLVIEW);
	typeNameCell.setBackColor(Color.Gray);
	typeNameCell.setOptions(DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	typeNameCell.setValue("<b><p align=center>Over 45</p></b>");

	DynamicGridCell typeValueCell = over45Row.getCells().newCell(getColumn(COLTYPE_VALUE), DynamicCellType.ENUMERATION);
	for (int i = 0; i < lookup.size(); i++)
	{
		typeValueCell.getItems().newItem(lookup.get(i), lookup.get(i).getText());
	}

	if (Boolean.TRUE.equals(required))
	{
		if (isOver45 != null)
		{
			typeValueCell.setValue(Boolean.TRUE.equals(isOver45) ? YesNo.YES : YesNo.NO);
		}
		else
		{
			if (form.getGlobalContext().Core.getPatientShort().getAgeIsNotNull())
			{
				typeValueCell.setValue(form.getGlobalContext().Core.getPatientShort().getAge().intValue() >= 45 ? YesNo.YES : YesNo.NO);
			}
		}
	}

	typeValueCell.setAutoPostBack(true);
	typeValueCell.setIdentifier(OVER45);
}
 
Example 28
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateOverall(TumourGroupSiteOverallStagingVo value)
{
	DynamicGridRow overallRow = form.lyrMain().tabTumourDetails().lyrPrognosticTNM().tabTNM().dynGrdPreTreatment().getRows().newRow();
	overallRow.setIdentifier(OVERALL_VALUE);
	DynamicGridCell typeNameCell = overallRow.getCells().newCell(getColumn(COLTYPE_NAME), DynamicCellType.HTMLVIEW);
	typeNameCell.setBackColor(Color.Gray);
	typeNameCell.setOptions(DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	typeNameCell.setValue("<b><p align=center>Overall Stage</p></b>");

	DynamicGridCell typeValueCell = overallRow.getCells().newCell(getColumn(COLTYPE_VALUE), DynamicCellType.ENUMERATION);
	if (value != null)
		typeValueCell.setIdentifier(value);
	else
		typeValueCell.setIdentifier(OVERALL_VALUE);

	typeValueCell.setAutoPostBack(true);
	if (value != null)
	{
		typeValueCell.getItems().newItem(value, value.toString());
		typeValueCell.setValue(value);
	}

	TNMCertaintyFactorCollection certaintyFactor = ims.oncology.vo.lookups.LookupHelper.getTNMCertaintyFactor(this.domain.getLookupService());

	DynamicGridCell certainNameCell = overallRow.getCells().newCell(getColumn(COLCERTAIN_NAME), DynamicCellType.HTMLVIEW);
	certainNameCell.setBackColor(Color.Gray);
	certainNameCell.setOptions(DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	certainNameCell.setValue("<b><p align=center>Overall Certainty</p></b>");

	DynamicGridCell certainValueCell = overallRow.getCells().newCell(getColumn(COLCERTAIN_VALUE), DynamicCellType.ENUMERATION);
	certainValueCell.setIdentifier(OVERALLCERTAIN_VALUE);
	bindCertaintyFactor(certaintyFactor, certainValueCell, form.getLocalContext().getSelectedRecordIsNotNull() && form.getLocalContext().getSelectedRecord().getID_PrimaryTumourDetailsIsNotNull() ? (form.getLocalContext().getSelectedRecord().getPreTreatmentOverAllCertIsNotNull() ? form.getLocalContext().getSelectedRecord().getPreTreatmentOverAllCert() : null) : null);
}
 
Example 29
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void createCommonCells(DynamicGridRow row)
{
	if(row.getCells().get(getColumn(BTN_COL)) == null)
	{
		DynamicGridCell cell = row.getCells().newCell(getColumn(BTN_COL), DynamicCellType.IMAGEBUTTON, DynamicGridCellOptions.EDITABLE_DATA_CELL);
		cell.setValue(form.getImages().OCRR.SaveGrid);
		cell.setTooltip("Save");
	}
}
 
Example 30
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void createControlsForCollection(DynamicGridRow row)
{
	clearVariableCells(row);
	DynamicGridCell cell = row.getCells().newCell(getColumn(DATE_COL), DynamicCellType.DATE, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setDefaultDateValue(cell);
	cell = row.getCells().newCell(getColumn(TIME_COL), DynamicCellType.TIME, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setDefaultTimeValue(cell);
	cell = row.getCells().newCell(getColumn(QUERY_COL), DynamicCellType.QUERYCOMBOBOX, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	getColumn(QUERY_COL).setAlignment(Alignment.LEFT);
	cell.setAutoPostBack(true);
	setDefaultMosValue(cell);
	cell = row.getCells().newCell(getColumn(TEXT_COL), DynamicCellType.STRING, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setCellMaxLength(((row.getValue() instanceof SpecimenWorkListItemListVo)?((SpecimenWorkListItemListVo)row.getValue()):null), cell);
}
 
Example 31
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void createControlsForCollection(DynamicGridRow row)
{
	clearVariableCells(row);
	DynamicGridCell cell = row.getCells().newCell(getColumn(DATE_COL), DynamicCellType.DATE, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setDefaultDateValue(cell);
	cell = row.getCells().newCell(getColumn(TIME_COL), DynamicCellType.TIME, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setDefaultTimeValue(cell);
	cell = row.getCells().newCell(getColumn(QUERY_COL), DynamicCellType.QUERYCOMBOBOX, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	cell.setAutoPostBack(true);
	setDefaultMosValue(cell);
	cell = row.getCells().newCell(getColumn(TEXT_COL), DynamicCellType.STRING, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setCellMaxLength(((row.getValue() instanceof SpecimenWorkListItemListVo)?((SpecimenWorkListItemListVo)row.getValue()):null), cell);
}
 
Example 32
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void createCommonControls(DynamicGridRow row)
{
	if(row.getCells().get(getColumn(BTN_COL)) == null)
	{
		DynamicGridCell cell = row.getCells().newCell(getColumn(BTN_COL), DynamicCellType.IMAGEBUTTON, DynamicGridCellOptions.EDITABLE_DATA_CELL);
		cell.setValue(form.getImages().OCRR.SaveGrid);
		cell.setTooltip("Save");
	}
}
 
Example 33
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void createCommonCells(DynamicGridRow row)
{
	if (row.getCells().get(getColumn(BTN_COL)) == null)
	{
		DynamicGridCell cell = row.getCells().newCell(getColumn(BTN_COL), DynamicCellType.IMAGEBUTTON, DynamicGridCellOptions.EDITABLE_DATA_CELL);
		cell.setValue(form.getImages().OCRR.SaveGrid);
		cell.setTooltip("Save");
	}
}
 
Example 34
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void createControlsForCollection(DynamicGridRow row)
{
	clearVariableCells(row);
	DynamicGridCell cell = row.getCells().newCell(getColumn(DATE_COL), DynamicCellType.DATE, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setDefaultDateValue(cell);
	cell = row.getCells().newCell(getColumn(TIME_COL), DynamicCellType.TIME, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setDefaultTimeValue(cell);
	cell = row.getCells().newCell(getColumn(QUERY_COL), DynamicCellType.QUERYCOMBOBOX, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	getColumn(QUERY_COL).setAlignment(Alignment.LEFT);
	cell.setAutoPostBack(true);
	setDefaultMosValue(cell);
	cell = row.getCells().newCell(getColumn(TEXT_COL), DynamicCellType.STRING, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setCellMaxLength(((row.getValue() instanceof SpecimenWorkListItemListVo) ? ((SpecimenWorkListItemListVo) row.getValue()) : null), cell);
}
 
Example 35
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void createControlsForCollection(DynamicGridRow row)
{
	clearVariableCells(row);
	DynamicGridCell cell = row.getCells().newCell(getColumn(DATE_COL), DynamicCellType.DATE, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setDefaultDateValue(cell);
	cell = row.getCells().newCell(getColumn(TIME_COL), DynamicCellType.TIME, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setDefaultTimeValue(cell);
	cell = row.getCells().newCell(getColumn(QUERY_COL), DynamicCellType.QUERYCOMBOBOX, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	cell.setAutoPostBack(true);
	setDefaultMosValue(cell);
	cell = row.getCells().newCell(getColumn(TEXT_COL), DynamicCellType.STRING, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setCellMaxLength(((row.getValue() instanceof SpecimenWorkListItemListVo)?((SpecimenWorkListItemListVo)row.getValue()):null), cell);
}
 
Example 36
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void createCommonControls(DynamicGridRow row)
{
	if(row.getCells().get(getColumn(BTN_COL)) == null)
	{
		DynamicGridCell cell = row.getCells().newCell(getColumn(BTN_COL), DynamicCellType.IMAGEBUTTON, DynamicGridCellOptions.EDITABLE_DATA_CELL);
		cell.setValue(form.getImages().OCRR.SaveGrid);
		cell.setTooltip("Save");
	}
}
 
Example 37
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
/**
 * WDEV-12907
 * Function used to populate Over45 field
 * @param required
 * @param isOver45 - value to be set; if it is <b>null</b> then it will default accordingly to patient age (Yes when age is over 45, No when age is at most 45)
 */
private void populateOver45(Boolean required, Boolean isOver45)
{
	YesNoCollection lookup = ims.core.vo.lookups.LookupHelper.getYesNo(this.domain.getLookupService());

	DynamicGridRow over45Row = form.lyrMain().tabTumourDetails().lyrPrognosticTNM().tabTNM().dynGrdPreTreatment().getRows().newRow();
	DynamicGridCell typeNameCell = over45Row.getCells().newCell(getColumn(COLTYPE_NAME), DynamicCellType.HTMLVIEW);
	typeNameCell.setBackColor(Color.Gray);
	typeNameCell.setOptions(DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	typeNameCell.setValue("<b><p align=center>Over 45</p></b>");

	DynamicGridCell typeValueCell = over45Row.getCells().newCell(getColumn(COLTYPE_VALUE), DynamicCellType.ENUMERATION);
	for (int i = 0; i < lookup.size(); i++)
	{
		typeValueCell.getItems().newItem(lookup.get(i), lookup.get(i).getText());
	}

	if (Boolean.TRUE.equals(required))
	{
		if (isOver45 != null)
		{
			typeValueCell.setValue(Boolean.TRUE.equals(isOver45) ? YesNo.YES : YesNo.NO);
		}
		else
		{
			if (form.getGlobalContext().Core.getPatientShort().getAgeIsNotNull())
			{
				typeValueCell.setValue(form.getGlobalContext().Core.getPatientShort().getAge().intValue() >= 45 ? YesNo.YES : YesNo.NO);
			}
		}
	}

	typeValueCell.setAutoPostBack(true);
	typeValueCell.setIdentifier(OVER45);
}
 
Example 38
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateOverall(TumourGroupSiteOverallStagingVo value)
{
	DynamicGridRow overallRow = form.lyrMain().tabTumourDetails().lyrPrognosticTNM().tabTNM().dynGrdPreTreatment().getRows().newRow();
	overallRow.setIdentifier(OVERALL_VALUE);
	DynamicGridCell typeNameCell = overallRow.getCells().newCell(getColumn(COLTYPE_NAME), DynamicCellType.HTMLVIEW);
	typeNameCell.setBackColor(Color.Gray);
	typeNameCell.setOptions(DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	typeNameCell.setValue("<b><p align=center>Overall Stage</p></b>");

	DynamicGridCell typeValueCell = overallRow.getCells().newCell(getColumn(COLTYPE_VALUE), DynamicCellType.ENUMERATION);
	if (value != null)
		typeValueCell.setIdentifier(value);
	else
		typeValueCell.setIdentifier(OVERALL_VALUE);

	typeValueCell.setAutoPostBack(true);
	if (value != null)
	{
		typeValueCell.getItems().newItem(value, value.toString());
		typeValueCell.setValue(value);
	}

	TNMCertaintyFactorCollection certaintyFactor = ims.oncology.vo.lookups.LookupHelper.getTNMCertaintyFactor(this.domain.getLookupService());

	DynamicGridCell certainNameCell = overallRow.getCells().newCell(getColumn(COLCERTAIN_NAME), DynamicCellType.HTMLVIEW);
	certainNameCell.setBackColor(Color.Gray);
	certainNameCell.setOptions(DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	certainNameCell.setValue("<b><p align=center>Overall Certainty</p></b>");

	DynamicGridCell certainValueCell = overallRow.getCells().newCell(getColumn(COLCERTAIN_VALUE), DynamicCellType.ENUMERATION);
	certainValueCell.setIdentifier(OVERALLCERTAIN_VALUE);
	bindCertaintyFactor(certaintyFactor, certainValueCell, form.getLocalContext().getSelectedRecordIsNotNull() && form.getLocalContext().getSelectedRecord().getID_PrimaryTumourDetailsIsNotNull() ? (form.getLocalContext().getSelectedRecord().getPreTreatmentOverAllCertIsNotNull() ? form.getLocalContext().getSelectedRecord().getPreTreatmentOverAllCert() : null) : null);
}
 
Example 39
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void createCommonCells(DynamicGridRow row)
{
	if(row.getCells().get(getColumn(BTN_COL)) == null)
	{
		DynamicGridCell cell = row.getCells().newCell(getColumn(BTN_COL), DynamicCellType.IMAGEBUTTON, DynamicGridCellOptions.EDITABLE_DATA_CELL);
		cell.setValue(form.getImages().OCRR.SaveGrid);
		cell.setTooltip("Save");
	}
}
 
Example 40
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void createControlsForCollection(DynamicGridRow row)
{
	clearVariableCells(row);
	DynamicGridCell cell = row.getCells().newCell(getColumn(DATE_COL), DynamicCellType.DATE, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setDefaultDateValue(cell);
	cell = row.getCells().newCell(getColumn(TIME_COL), DynamicCellType.TIME, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setDefaultTimeValue(cell);
	cell = row.getCells().newCell(getColumn(QUERY_COL), DynamicCellType.QUERYCOMBOBOX, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	getColumn(QUERY_COL).setAlignment(Alignment.LEFT);
	cell.setAutoPostBack(true);
	setDefaultMosValue(cell);
	cell = row.getCells().newCell(getColumn(TEXT_COL), DynamicCellType.STRING, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setCellMaxLength(((row.getValue() instanceof SpecimenWorkListItemListVo)?((SpecimenWorkListItemListVo)row.getValue()):null), cell);
}
 
Example 41
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void createControlsForCollection(DynamicGridRow row)
{
	clearVariableCells(row);
	DynamicGridCell cell = row.getCells().newCell(getColumn(DATE_COL), DynamicCellType.DATE, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setDefaultDateValue(cell);
	cell = row.getCells().newCell(getColumn(TIME_COL), DynamicCellType.TIME, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setDefaultTimeValue(cell);
	cell = row.getCells().newCell(getColumn(QUERY_COL), DynamicCellType.QUERYCOMBOBOX, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	cell.setAutoPostBack(true);
	setDefaultMosValue(cell);
	cell = row.getCells().newCell(getColumn(TEXT_COL), DynamicCellType.STRING, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setCellMaxLength(((row.getValue() instanceof SpecimenWorkListItemListVo)?((SpecimenWorkListItemListVo)row.getValue()):null), cell);
}
 
Example 42
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void createCommonControls(DynamicGridRow row)
{
	if(row.getCells().get(getColumn(BTN_COL)) == null)
	{
		DynamicGridCell cell = row.getCells().newCell(getColumn(BTN_COL), DynamicCellType.IMAGEBUTTON, DynamicGridCellOptions.EDITABLE_DATA_CELL);
		cell.setValue(form.getImages().OCRR.SaveGrid);
		cell.setTooltip("Save");
	}
}
 
Example 43
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void createCommonCells(DynamicGridRow row)
{
	if (row.getCells().get(getColumn(BTN_COL)) == null)
	{
		DynamicGridCell cell = row.getCells().newCell(getColumn(BTN_COL), DynamicCellType.IMAGEBUTTON, DynamicGridCellOptions.EDITABLE_DATA_CELL);
		cell.setValue(form.getImages().OCRR.SaveGrid);
		cell.setTooltip("Save");
	}
}
 
Example 44
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void createControlsForCollection(DynamicGridRow row)
{
	clearVariableCells(row);
	DynamicGridCell cell = row.getCells().newCell(getColumn(DATE_COL), DynamicCellType.DATE, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setDefaultDateValue(cell);
	cell = row.getCells().newCell(getColumn(TIME_COL), DynamicCellType.TIME, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setDefaultTimeValue(cell);
	cell = row.getCells().newCell(getColumn(QUERY_COL), DynamicCellType.QUERYCOMBOBOX, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	getColumn(QUERY_COL).setAlignment(Alignment.LEFT);
	cell.setAutoPostBack(true);
	setDefaultMosValue(cell);
	cell = row.getCells().newCell(getColumn(TEXT_COL), DynamicCellType.STRING, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setCellMaxLength(((row.getValue() instanceof SpecimenWorkListItemListVo) ? ((SpecimenWorkListItemListVo) row.getValue()) : null), cell);
}
 
Example 45
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void createControlsForCollection(DynamicGridRow row)
{
	clearVariableCells(row);
	DynamicGridCell cell = row.getCells().newCell(getColumn(DATE_COL), DynamicCellType.DATE, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setDefaultDateValue(cell);
	cell = row.getCells().newCell(getColumn(TIME_COL), DynamicCellType.TIME, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setDefaultTimeValue(cell);
	cell = row.getCells().newCell(getColumn(QUERY_COL), DynamicCellType.QUERYCOMBOBOX, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	cell.setAutoPostBack(true);
	setDefaultMosValue(cell);
	cell = row.getCells().newCell(getColumn(TEXT_COL), DynamicCellType.STRING, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setCellMaxLength(((row.getValue() instanceof SpecimenWorkListItemListVo)?((SpecimenWorkListItemListVo)row.getValue()):null), cell);
}
 
Example 46
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void createCommonControls(DynamicGridRow row)
{
	if(row.getCells().get(getColumn(BTN_COL)) == null)
	{
		DynamicGridCell cell = row.getCells().newCell(getColumn(BTN_COL), DynamicCellType.IMAGEBUTTON, DynamicGridCellOptions.EDITABLE_DATA_CELL);
		cell.setValue(form.getImages().OCRR.SaveGrid);
		cell.setTooltip("Save");
	}
}
 
Example 47
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
/**
 * WDEV-12907
 * Function used to populate Over45 field
 * @param required
 * @param isOver45 - value to be set; if it is <b>null</b> then it will default accordingly to patient age (Yes when age is over 45, No when age is at most 45)
 */
private void populateOver45(Boolean required, Boolean isOver45)
{
	YesNoCollection lookup = ims.core.vo.lookups.LookupHelper.getYesNo(this.domain.getLookupService());

	DynamicGridRow over45Row = form.lyrMain().tabTumourDetails().lyrPrognosticTNM().tabTNM().dynGrdPreTreatment().getRows().newRow();
	DynamicGridCell typeNameCell = over45Row.getCells().newCell(getColumn(COLTYPE_NAME), DynamicCellType.HTMLVIEW);
	typeNameCell.setBackColor(Color.Gray);
	typeNameCell.setOptions(DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	typeNameCell.setValue("<b><p align=center>Over 45</p></b>");

	DynamicGridCell typeValueCell = over45Row.getCells().newCell(getColumn(COLTYPE_VALUE), DynamicCellType.ENUMERATION);
	for (int i = 0; i < lookup.size(); i++)
	{
		typeValueCell.getItems().newItem(lookup.get(i), lookup.get(i).getText());
	}

	if (Boolean.TRUE.equals(required))
	{
		if (isOver45 != null)
		{
			typeValueCell.setValue(Boolean.TRUE.equals(isOver45) ? YesNo.YES : YesNo.NO);
		}
		else
		{
			if (form.getGlobalContext().Core.getPatientShort().getAgeIsNotNull())
			{
				typeValueCell.setValue(form.getGlobalContext().Core.getPatientShort().getAge().intValue() >= 45 ? YesNo.YES : YesNo.NO);
			}
		}
	}

	typeValueCell.setAutoPostBack(true);
	typeValueCell.setIdentifier(OVER45);
}
 
Example 48
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateOverall(TumourGroupSiteOverallStagingVo value)
{
	DynamicGridRow overallRow = form.lyrMain().tabTumourDetails().lyrPrognosticTNM().tabTNM().dynGrdPreTreatment().getRows().newRow();
	overallRow.setIdentifier(OVERALL_VALUE);
	DynamicGridCell typeNameCell = overallRow.getCells().newCell(getColumn(COLTYPE_NAME), DynamicCellType.HTMLVIEW);
	typeNameCell.setBackColor(Color.Gray);
	typeNameCell.setOptions(DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	typeNameCell.setValue("<b><p align=center>Overall Stage</p></b>");

	DynamicGridCell typeValueCell = overallRow.getCells().newCell(getColumn(COLTYPE_VALUE), DynamicCellType.ENUMERATION);
	if (value != null)
		typeValueCell.setIdentifier(value);
	else
		typeValueCell.setIdentifier(OVERALL_VALUE);

	typeValueCell.setAutoPostBack(true);
	if (value != null)
	{
		typeValueCell.getItems().newItem(value, value.toString());
		typeValueCell.setValue(value);
	}

	TNMCertaintyFactorCollection certaintyFactor = ims.oncology.vo.lookups.LookupHelper.getTNMCertaintyFactor(this.domain.getLookupService());

	DynamicGridCell certainNameCell = overallRow.getCells().newCell(getColumn(COLCERTAIN_NAME), DynamicCellType.HTMLVIEW);
	certainNameCell.setBackColor(Color.Gray);
	certainNameCell.setOptions(DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	certainNameCell.setValue("<b><p align=center>Overall Certainty</p></b>");

	DynamicGridCell certainValueCell = overallRow.getCells().newCell(getColumn(COLCERTAIN_VALUE), DynamicCellType.ENUMERATION);
	certainValueCell.setIdentifier(OVERALLCERTAIN_VALUE);
	bindCertaintyFactor(certaintyFactor, certainValueCell, form.getLocalContext().getSelectedRecordIsNotNull() && form.getLocalContext().getSelectedRecord().getID_PrimaryTumourDetailsIsNotNull() ? (form.getLocalContext().getSelectedRecord().getPreTreatmentOverAllCertIsNotNull() ? form.getLocalContext().getSelectedRecord().getPreTreatmentOverAllCert() : null) : null);
}
 
Example 49
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private void createCommonCells(DynamicGridRow row)
{
	if(row.getCells().get(getColumn(BTN_COL)) == null)
	{
		DynamicGridCell cell = row.getCells().newCell(getColumn(BTN_COL), DynamicCellType.IMAGEBUTTON, DynamicGridCellOptions.EDITABLE_DATA_CELL);
		cell.setValue(form.getImages().OCRR.SaveGrid);
		cell.setTooltip("Save");
	}
}
 
Example 50
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private void createControlsForCollection(DynamicGridRow row)
{
	clearVariableCells(row);
	DynamicGridCell cell = row.getCells().newCell(getColumn(DATE_COL), DynamicCellType.DATE, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setDefaultDateValue(cell);
	cell = row.getCells().newCell(getColumn(TIME_COL), DynamicCellType.TIME, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setDefaultTimeValue(cell);
	cell = row.getCells().newCell(getColumn(QUERY_COL), DynamicCellType.QUERYCOMBOBOX, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	getColumn(QUERY_COL).setAlignment(Alignment.LEFT);
	cell.setAutoPostBack(true);
	setDefaultMosValue(cell);
	cell = row.getCells().newCell(getColumn(TEXT_COL), DynamicCellType.STRING, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setCellMaxLength(((row.getValue() instanceof SpecimenWorkListItemListVo)?((SpecimenWorkListItemListVo)row.getValue()):null), cell);
}
 
Example 51
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private void createControlsForCollection(DynamicGridRow row)
{
	clearVariableCells(row);
	DynamicGridCell cell = row.getCells().newCell(getColumn(DATE_COL), DynamicCellType.DATE, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setDefaultDateValue(cell);
	cell = row.getCells().newCell(getColumn(TIME_COL), DynamicCellType.TIME, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setDefaultTimeValue(cell);
	cell = row.getCells().newCell(getColumn(QUERY_COL), DynamicCellType.QUERYCOMBOBOX, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	cell.setAutoPostBack(true);
	setDefaultMosValue(cell);
	cell = row.getCells().newCell(getColumn(TEXT_COL), DynamicCellType.STRING, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setCellMaxLength(((row.getValue() instanceof SpecimenWorkListItemListVo)?((SpecimenWorkListItemListVo)row.getValue()):null), cell);
}
 
Example 52
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private void createCommonControls(DynamicGridRow row)
{
	if(row.getCells().get(getColumn(BTN_COL)) == null)
	{
		DynamicGridCell cell = row.getCells().newCell(getColumn(BTN_COL), DynamicCellType.IMAGEBUTTON, DynamicGridCellOptions.EDITABLE_DATA_CELL);
		cell.setValue(form.getImages().OCRR.SaveGrid);
		cell.setTooltip("Save");
	}
}
 
Example 53
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private void createCommonCells(DynamicGridRow row)
{
	if (row.getCells().get(getColumn(BTN_COL)) == null)
	{
		DynamicGridCell cell = row.getCells().newCell(getColumn(BTN_COL), DynamicCellType.IMAGEBUTTON, DynamicGridCellOptions.EDITABLE_DATA_CELL);
		cell.setValue(form.getImages().OCRR.SaveGrid);
		cell.setTooltip("Save");
	}
}
 
Example 54
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private void createControlsForCollection(DynamicGridRow row)
{
	clearVariableCells(row);
	DynamicGridCell cell = row.getCells().newCell(getColumn(DATE_COL), DynamicCellType.DATE, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setDefaultDateValue(cell);
	cell = row.getCells().newCell(getColumn(TIME_COL), DynamicCellType.TIME, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setDefaultTimeValue(cell);
	cell = row.getCells().newCell(getColumn(QUERY_COL), DynamicCellType.QUERYCOMBOBOX, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	getColumn(QUERY_COL).setAlignment(Alignment.LEFT);
	cell.setAutoPostBack(true);
	setDefaultMosValue(cell);
	cell = row.getCells().newCell(getColumn(TEXT_COL), DynamicCellType.STRING, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setCellMaxLength(((row.getValue() instanceof SpecimenWorkListItemListVo) ? ((SpecimenWorkListItemListVo) row.getValue()) : null), cell);
}
 
Example 55
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private void createControlsForCollection(DynamicGridRow row)
{
	clearVariableCells(row);
	DynamicGridCell cell = row.getCells().newCell(getColumn(DATE_COL), DynamicCellType.DATE, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setDefaultDateValue(cell);
	cell = row.getCells().newCell(getColumn(TIME_COL), DynamicCellType.TIME, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setDefaultTimeValue(cell);
	cell = row.getCells().newCell(getColumn(QUERY_COL), DynamicCellType.QUERYCOMBOBOX, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	cell.setAutoPostBack(true);
	setDefaultMosValue(cell);
	cell = row.getCells().newCell(getColumn(TEXT_COL), DynamicCellType.STRING, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setCellMaxLength(((row.getValue() instanceof SpecimenWorkListItemListVo)?((SpecimenWorkListItemListVo)row.getValue()):null), cell);
}
 
Example 56
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private void createCommonControls(DynamicGridRow row)
{
	if(row.getCells().get(getColumn(BTN_COL)) == null)
	{
		DynamicGridCell cell = row.getCells().newCell(getColumn(BTN_COL), DynamicCellType.IMAGEBUTTON, DynamicGridCellOptions.EDITABLE_DATA_CELL);
		cell.setValue(form.getImages().OCRR.SaveGrid);
		cell.setTooltip("Save");
	}
}
 
Example 57
Project: AvoinApotti   File: Logic.java   Source Code and License 4 votes vote down vote up
private void populateGrid(CarePlanTitleCollection voCPs)
{
	form.dyngrdInterventions().getRows().clear();
	
	CarePlanCollection voCarePlans = null;
	
	if (voCPs != null && voCPs.size() > 0)
		voCarePlans = domain.listCarePlans(voCPs);
	
	for (int i = 0 ; voCarePlans != null && i < voCarePlans.size() ; i++)
	{
		voCarePlans.get(i).getInterventions().sort();
		
		for (int j = 0 ; voCarePlans.get(i).getInterventionsIsNotNull() && j < voCarePlans.get(i).getInterventions().size() ; j++)
		{
			CarePlanInterventions voInt = voCarePlans.get(i).getInterventions().get(j);
			
			DynamicGridRow row = form.dyngrdInterventions().getRows().newRow();
			//WDEV-16795 
			String removalInfo = "";
			if (voInt != null && Boolean.TRUE.equals(voInt.getIsRemoved()))
			{
				row.setReadOnly(true);
				row.setBackColor(Color.Gray);
				removalInfo = "<b>Care Plan Action Removed since: </b>" + voInt.getRemovedDate().toString(DateFormat.STANDARD);
			}
			
			DynamicGridCell cellOrdNum = row.getCells().newCell(getColumn(COLORDERNUMBER), DynamicCellType.STRING);
			cellOrdNum.setValue(voInt.getOrder().toString());
			//WDEV-16795
			cellOrdNum.setTooltip(voInt.getOrder().toString()+ (removalInfo.length() > 0 ? "<br/>" + removalInfo : ""));
			cellOrdNum.setReadOnly(Boolean.TRUE);

			DynamicGridCell cellDesc = row.getCells().newCell(getColumn(COLDESC), DynamicCellType.STRING);
			cellDesc.setValue(voInt.getDescription().toString());
			//WDEV-16795
			cellDesc.setTooltip(voInt.getDescriptionIsNotNull() ? voInt.getDescription().toString() + (removalInfo.length() > 0 ? "<br/>" + removalInfo : ""): "" + (removalInfo.length() > 0 ? "<br/>" + removalInfo : ""));
			cellDesc.setReadOnly(Boolean.TRUE);
			
			DynamicGridCell cellInfo = row.getCells().newCell(getColumn(COLADDINFO), DynamicCellType.STRING);
			cellInfo.setValue(voInt.getAdditionalInfo());
			//WDEV-16795 
			cellInfo.setTooltip(voInt.getAdditionalInfoIsNotNull() ? voInt.getAdditionalInfo() : "" + (removalInfo.length() > 0 ? "<br/>" + removalInfo : ""));
			cellInfo.setReadOnly(Boolean.TRUE);
			
			DynamicGridCell cellComp = row.getCells().newCell(getColumn(COLCOMPLETED), DynamicCellType.BOOL, DynamicGridCellOptions.EDITABLE_DATA_CELL);
			cellComp.setValue(voInt.getStopDateIsNotNull() ? Boolean.TRUE : Boolean.FALSE);
			cellComp.setReadOnly(voInt.getStopDateIsNotNull() && !voInt.getIsRemoved());//WDEV-16795
			cellComp.setAutoPostBack(Boolean.TRUE);
			
			DynamicGridCell cellCompInfo = row.getCells().newCell(getColumn(COLWHENWHO), DynamicCellType.STRING);
			cellCompInfo.setValue(voInt.getStopDateIsNotNull() || voInt.getStopByIsNotNull() ? 
					(voInt.getStopDateIsNotNull() ? voInt.getStopDate().toString() : "" ) + " " + (voInt.getStopByIsNotNull() ? voInt.getStopBy().getName().toString() : "" ) : "");
			//WDEV-16795 
			cellCompInfo.setTooltip(voInt.getStopDateIsNotNull() || voInt.getStopByIsNotNull() ? 
					(voInt.getStopDateIsNotNull() ? voInt.getStopDate().toString() + (removalInfo.length() > 0 ? "\n" + removalInfo : "") : "") + " " + (voInt.getStopByIsNotNull() ? voInt.getStopBy().getName().toString() + (removalInfo.length() > 0 ? "\n" + removalInfo : "") : "") : "" + (removalInfo.length() > 0 ? "\n" + removalInfo : ""));
			cellCompInfo.setReadOnly(Boolean.TRUE);
			
			row.setValue(voCarePlans.get(i));
			row.setIdentifier(voInt);
		}
	}
}
 
Example 58
Project: AvoinApotti   File: Logic.java   Source Code and License 4 votes vote down vote up
private void createCellByType(RulesEngineField identifier, DynamicGridCell cell, RulesEngineFieldType type, DynamicGridColumn coll, DynamicGridCell cellValue)
{
	if (type.equals(RulesEngineFieldType.STRING))
	{
		cellValue = cell.getRow().getCells().newCell(coll, DynamicCellType.STRING, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	}
	else if (type.equals(RulesEngineFieldType.INTEGER))
	{
		cellValue = cell.getRow().getCells().newCell(coll, DynamicCellType.INT, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	}
	else if (type.equals(RulesEngineFieldType.ENTITY_CODE))
	{
		cellValue = cell.getRow().getCells().newCell(coll, DynamicCellType.INT, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	}
	else if (type.equals(RulesEngineFieldType.DECIMAL))
	{
		cellValue = cell.getRow().getCells().newCell(coll, DynamicCellType.DECIMAL, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	}
	else if (type.equals(RulesEngineFieldType.DATE))
	{
		cellValue = cell.getRow().getCells().newCell(coll, DynamicCellType.DATE, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	}
	else if (type.equals(RulesEngineFieldType.DATETIME))
	{
		cellValue = cell.getRow().getCells().newCell(coll, DynamicCellType.DATETIME, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	}
	else if (type.equals(RulesEngineFieldType.PARTIALDATE))
	{
		cellValue = cell.getRow().getCells().newCell(coll, DynamicCellType.PARTIALDATE, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	}
	else if (type.equals(RulesEngineFieldType.BOOLEAN))
	{
		cellValue = cell.getRow().getCells().newCell(coll, DynamicCellType.ENUMERATION, DynamicGridCellOptions.EDITABLE_DATA_CELL);

		cellValue.getItems().newItem("True");
		cellValue.getItems().get(0).setIdentifier(Boolean.TRUE);
		cellValue.getItems().newItem("False");
		cellValue.getItems().get(1).setIdentifier(Boolean.FALSE);

		cellValue.setWidth(160);
		cellValue.setReadOnly(false);

	}
	else if (type.equals(RulesEngineFieldType.TIME))
	{
		cellValue = cell.getRow().getCells().newCell(coll, DynamicCellType.TIME, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	}
	else if (type.equals(RulesEngineFieldType.ENTITY_CODE))
	{
		cellValue = cell.getRow().getCells().newCell(coll, DynamicCellType.INT, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	}
	else if (type.equals(RulesEngineFieldType.LOOKUP))
	{
		cellValue = cell.getRow().getCells().newCell(coll, DynamicCellType.ENUMERATION, DynamicGridCellOptions.EDITABLE_DATA_CELL);
		int lookupId = identifier.getTypeLookupId();
		LookupInstanceCollection collection = domain.getLookupTypeInstance(lookupId);
		for (int j = 0; j < collection.size(); j++)
		{
			cellValue.getItems().newItem(collection.getIndex(j).getText());
			cellValue.getItems().get(j).setIdentifier(collection.getIndex(j));
		}
	}
	else
	{
		throw new CodingRuntimeException("Unknow cell type");
	}

	cellValue.setWidth(160);
	cellValue.setReadOnly(false);
}
 
Example 59
Project: AvoinApotti   File: Logic.java   Source Code and License 4 votes vote down vote up
/**
 * @param item
 * @param row
 */
private void displayCommonCells(SpecimenWorkListItemListVo item, DynamicGridRow row)
{
	if(item == null || row == null)
		return;
	
	DynamicGridCell statusCell = row.getCells().get(getColumn(COLLECTED_COL));
	if(statusCell != null)
		row.getCells().remove(statusCell);
	statusCell = row.getCells().newCell(getColumn(COLLECTED_COL), DynamicCellType.IMAGE);
	if(item.getCollectionStatusIsNotNull())
	{
		statusCell.setValue(item.getCollectionStatus().getImage());
		statusCell.setTooltip(item.getCollectionStatus().toString());
	}
	
	if(item.getCollectionStatusIsNotNull() && (item.getCollectionStatus().equals(SpecimenCollectionStatus.CANCELLED) ||item.getCollectionStatus().equals(SpecimenCollectionStatus.COULDNOTCOLLECT)))
	{
		createControlsForNotCollection(row, item);
	}
	else
	{
		Date date = null;
		Time time = null;
		if(item.getSpecimenIsNotNull() && item.getSpecimen().getCollDateTimePlacerIsNotNull())
		{
			date = item.getSpecimen().getCollDateTimePlacer().getDate();
			time = item.getSpecimen().getCollDateTimePlacer().getTime();
		}
		
		DynamicGridCell cellDate = row.getCells().get(getColumn(DATE_COL));
		if(cellDate != null)
			row.getCells().remove(cellDate);
		cellDate = row.getCells().newCell(getColumn(DATE_COL), DynamicCellType.STRING, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
		cellDate.setValue(date != null?date.toString():"");
		cellDate.setReadOnly(true);
		
		DynamicGridCell cellTime = row.getCells().get(getColumn(TIME_COL));
		if(cellTime != null)
			row.getCells().remove(cellTime);
		cellTime = row.getCells().newCell(getColumn(TIME_COL), DynamicCellType.STRING, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
		cellTime.setValue(time != null?time.toString():"");
		cellTime.setReadOnly(true);
		
		DynamicGridCell cellQuery = row.getCells().get(getColumn(QUERY_COL));
		if(cellQuery != null)
			row.getCells().remove(cellQuery);
		cellQuery = row.getCells().newCell(getColumn(QUERY_COL), DynamicCellType.STRING, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
		cellQuery.setValue(item.getSpecimen().getCollectingMosIsNotNull() && item.getSpecimen().getCollectingMos().getNameIsNotNull()?item.getSpecimen().getCollectingMos().getName().toString():"");
		cellQuery.setReadOnly(true);
		
		DynamicGridCell cellText = row.getCells().get(getColumn(TEXT_COL));
		if(cellText != null)
			row.getCells().remove(cellText);
		cellText = row.getCells().newCell(getColumn(TEXT_COL), DynamicCellType.STRING, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
		cellText.setValue(item.getSpecimen().getCollectorComment());
		cellText.setTooltip(item.getSpecimen().getCollectorComment());
		cellText.setReadOnly(true);
		setCellMaxLength(item, cellText);
	}
	
	//row.setReadOnly(true);
	row.setBackColor(Color.LightGray);
}
 
Example 60
Project: AvoinApotti   File: Logic.java   Source Code and License 4 votes vote down vote up
/**
 * @param item
 * @param disciplineRow
 */
private void displayCommonCells(SpecimenWorkListItemListVo item, DynamicGridRow disciplineRow)
{
	if(item == null || disciplineRow == null)
		return;
	
	removeCellByColumn(disciplineRow, COLLECTED_COL);
	DynamicGridCell collectedCell = disciplineRow.getCells().newCell(getColumn(COLLECTED_COL), DynamicCellType.IMAGE, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	if(item.getCollectionStatusIsNotNull())
	{
		collectedCell.setValue(item.getCollectionStatus().getImage());
		collectedCell.setTooltip(item.getCollectionStatus().toString());
	}
	
	Date date = null;
	Time time = null;
	if(item.getSpecimenIsNotNull() && item.getSpecimen().getCollDateTimePlacerIsNotNull())
	{
		date = item.getSpecimen().getCollDateTimePlacer().getDate();
		time = item.getSpecimen().getCollDateTimePlacer().getTime();
	}
	
	if(item.getCollectionStatusIsNotNull() && (item.getCollectionStatus().equals(SpecimenCollectionStatus.CANCELLED) ||item.getCollectionStatus().equals(SpecimenCollectionStatus.COULDNOTCOLLECT)))
	{
		createControlsForNotCollection(disciplineRow, item);
	}
	else
	{
		removeCellByColumn(disciplineRow, DATE_COL);
		DynamicGridCell dateCell = disciplineRow.getCells().newCell(getColumn(DATE_COL), DynamicCellType.STRING, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
		dateCell.setValue(date != null?date.toString():"");
		dateCell.setReadOnly(true);
		
		removeCellByColumn(disciplineRow, TIME_COL);
		DynamicGridCell timeCell = disciplineRow.getCells().newCell(getColumn(TIME_COL), DynamicCellType.STRING, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
		timeCell.setValue(time != null?time.toString():"");
		timeCell.setReadOnly(true);
		
		removeCellByColumn(disciplineRow, QUERY_COL);
		DynamicGridCell cellQuery = disciplineRow.getCells().newCell(getColumn(QUERY_COL), DynamicCellType.STRING, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
		cellQuery.setValue(item.getSpecimen().getCollectingMosIsNotNull() && item.getSpecimen().getCollectingMos().getNameIsNotNull()?item.getSpecimen().getCollectingMos().getName().toString():"");
		cellQuery.setReadOnly(true);
		
		removeCellByColumn(disciplineRow, TEXT_COL);
		DynamicGridCell cellText = disciplineRow.getCells().newCell(getColumn(TEXT_COL), DynamicCellType.STRING, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
		cellText.setValue(item.getSpecimen().getCollectorComment());
		cellText.setTooltip(item.getSpecimen().getCollectorComment());
		cellText.setReadOnly(true);
		setCellMaxLength(item, cellText);
	}
	
	disciplineRow.setReadOnly(true);
	disciplineRow.setBackColor(Color.LightGray);
}