Java Code Examples for ims.framework.controls.DynamicGridCell.setDecoratorType()

The following are Jave code examples for showing how to use setDecoratorType() of the ims.framework.controls.DynamicGridCell class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: AvoinApotti   File: UserAssessmentInstHelper.java   View Source Code Vote up 6 votes
private DynamicGridCell addAnswerCell(DynamicGridRow row, DynamicGridColumn column, QuestionAnswerTypeVo configAnswer, AnswerDetailsVo instAnswer, boolean readOnly) throws PresentationLogicException 
{
	checkDataIntegrity(configAnswer);

	DynamicCellType cellAnswerType = getCellAnswerType(configAnswer.getAnswerType());
	DynamicGridCell cell = row.getCells().newCell(column, cellAnswerType);
	
	cell.setWidth(getCellAnswerWidth(configAnswer, instAnswer));
	cell.setDecoratorType(DynamicCellDecoratorMode.ALWAYS);
	cell.setIdentifier(configAnswer);
	cell.setReadOnly(readOnly);
	setAnswerCellValue(cell, configAnswer, instAnswer);				
	setCellTooltip(cell, configAnswer);
	if(isDPP && cellAnswerType != null && cellAnswerType.equals(DynamicCellType.MULTISELECT))
	{
		cell.setAutoPostBack(true);
	}
	
	return cell;
}
 
Example 2
Project: AvoinApotti   File: UserAssessmentInstHelper.java   View Source Code Vote up 6 votes
private DynamicGridCell addAnswerCell(DynamicGridRow row, DynamicGridColumn column, Question_AnswerTypeVo configAnswer, Answer_DetailsVo instAnswer, boolean readOnly) throws PresentationLogicException 
{
	checkDataIntegrity(configAnswer);

	DynamicCellType cellAnswerType = getCellAnswerType(configAnswer.getAnswerType());
	DynamicGridCell cell = row.getCells().newCell(column, cellAnswerType);
	
	cell.setWidth(getCellAnswerWidth(configAnswer, instAnswer));
	cell.setDecoratorType(DynamicCellDecoratorMode.ALWAYS);
	cell.setIdentifier(configAnswer);
	cell.setReadOnly(readOnly);
	setAnswerCellValue(cell, configAnswer, instAnswer);				
	setCellTooltip(cell, configAnswer);
	if(isDPP && cellAnswerType != null && cellAnswerType.equals(DynamicCellType.MULTISELECT))
	{
		cell.setAutoPostBack(true);
	}
	
	return cell;
}
 
Example 3
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 6 votes
private void addMessage()
{
	DynamicGridRow messageRow = form.lyrRules().tabActions().dyngrdActions().getSelectedRow();
	if (messageRow != null)
	{
		DynamicGridRow messageInstanceRow = messageRow.getRows().newRow();
		DynamicGridColumn messageInstanceColl = getColByIndexForActionGrid(0);
		if (messageInstanceColl == null)
		{
			messageInstanceColl = createColumnForActionGrid("", 0);
		}
		DynamicGridCell messageInstancCell = messageInstanceRow.getCells().newCell(messageInstanceColl, DynamicCellType.WRAPTEXT);
		messageInstancCell.setAutoPostBack(true);
		messageInstancCell.setWidth(450);
		messageInstancCell.setDecoratorType(DynamicCellDecoratorMode.ALWAYS);
		messageInstanceRow.setIdentifier(NOTIFICATION_MESSAGE_INSTANCE);
	}
}
 
Example 4
Project: AvoinApotti   File: MyOrderQuestionsPopulation.java   View Source Code Vote up 6 votes
private DynamicGridCell addAnswerCell(DynamicGridRow row, DynamicGridColumn column, QuestionAnswerTypeVo configAnswer, AnswerDetailsVo instAnswer, boolean readOnly)  throws PresentationLogicException
{
	checkDataIntegrity(configAnswer);

	DynamicCellType cellAnswerType = getCellAnswerType(configAnswer.getAnswerType());
	DynamicGridCell cell = row.getCells().newCell(column, cellAnswerType);
	
	cell.setWidth(getCellAnswerWidth(configAnswer, instAnswer));
	cell.setDecoratorType(DynamicCellDecoratorMode.ALWAYS);
	cell.setIdentifier(configAnswer);
	cell.setReadOnly(readOnly);
	setAnswerCellValue(cell, configAnswer, instAnswer);
	setCellAnswer(cell, instAnswer);
	
	if (instAnswer == null)
	{
		setCellTooltip(cell, configAnswer);
	}
	else //WDEV-16927
	{
		setCellAnswerTooltip(cell, instAnswer);
	}
	
	return cell;
}
 
Example 5
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
private DynamicGridCell addAnswerCell(DynamicGridRow row, DynamicGridColumn column, QuestionAnswerTypeVo configAnswer, AnswerDetailsVo instAnswer, boolean readOnly, boolean readOnlyBecauseUserHasNoRoles) throws PresentationLogicException
{
	checkDataIntegrity(configAnswer);

	DynamicGridCell cell = row.getCells().newCell(column, getCellAnswerType(configAnswer.getAnswerType()));

	cell.setWidth(getCellAnswerWidth(configAnswer, instAnswer));
	cell.setDecoratorType(DynamicCellDecoratorMode.ALWAYS);
	cell.setIdentifier(configAnswer);
	cell.setReadOnly(readOnly);
	setAnswerCellValue(cell, configAnswer, instAnswer);
	setCellTooltip(cell, configAnswer, readOnlyBecauseUserHasNoRoles);//wdev-3709

	return cell;
}
 
Example 6
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
private DynamicGridCell addAnswerCell(DynamicGridRow row, DynamicGridColumn column, Question_AnswerTypeVo configAnswer, Answer_DetailsVo instAnswer, boolean readOnly, boolean readOnlyBecauseUserHasNoRoles) throws PresentationLogicException
{
	checkDataIntegrity(configAnswer);

	DynamicGridCell cell = row.getCells().newCell(column, getCellAnswerType(configAnswer.getAnswerType()));

	cell.setWidth(getCellAnswerWidth(configAnswer, instAnswer));
	cell.setDecoratorType(DynamicCellDecoratorMode.ALWAYS);
	cell.setIdentifier(configAnswer);
	cell.setReadOnly(readOnly);
	setAnswerCellValue(cell, configAnswer, instAnswer);
	setCellTooltip(cell, configAnswer, readOnlyBecauseUserHasNoRoles);//wdev-3709

	return cell;
}
 
Example 7
Project: AvoinApotti   File: MyOrderQuestionsPopulation.java   View Source Code Vote up 5 votes
private boolean addAnswers(DynamicGridRow row, DynamicGridColumn[] columns, GeneralQuestionAnswerVo question)
{
	if(row == null || question == null || question.getIQuestionTypeQuestion() == null ||  question.getIQuestionTypeQuestion().getAnswerTypes() == null  || question.getIQuestionTypeQuestion().getAnswerTypes().size() == 0)
		return false;
		
	for(int x = 0; x < question.getIQuestionTypeQuestion().getAnswerTypes().size(); x++)
	{
		QuestionAnswerTypeVo answer = question.getIQuestionTypeQuestion().getAnswerTypes().get(x);
		if(answer != null)
		{
			QuestionAnswerType type = answer.getAnswerType();
			DynamicCellType cellType = getQuestionAnswerType(type);
			DynamicGridCell answerCell = row.getCells().newCell(columns[x], getQuestionAnswerType(type));
			answerCell.setWidth(getAnswerCellWidth(cellType));
			answerCell.setReadOnly(false);
			
			setAnswerCellValue(answerCell, answer);
			
			if(cellType == DynamicCellType.DYNAMICLABEL || cellType == DynamicCellType.BOOL)
				answerCell.setDecoratorType(DynamicCellDecoratorMode.NEVER);
			else
				answerCell.setDecoratorType(DynamicCellDecoratorMode.ALWAYS);
			
			answerCell.setTooltip(getAnswerCellTooltip(cellType));
			answerCell.setIdentifier(answer);
			
			addAnswerData(row, question);
		}
	}
	
	return true;		
}
 
Example 8
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
private void newNote(DynamicGridRow row, TltSummaryNoteVo note, boolean isEditMode) 
{			
	if (row == null) {
		throw new CodingRuntimeException("DynamicGridRow is null");
	}
	
	if (note == null) {
		row.setIdentifier(NEW_ROW_IDENTIFIER);
	}
	
	DynamicGridColumn 	coll;
	DynamicGridCell 	cell;
			
	coll = form.dyngrdNotes().getColumns().getByIdentifier(COL_DATE);
	cell = row.getCells().newCell(coll, DynamicCellType.DATETIME);		
	cell.setValue(note != null ? (note.getAuthoringInformationIsNotNull() ? note.getAuthoringInformation().getAuthoringDateTime() : new DateTime())  : new DateTime());				
	cell.setBackColor(Color.fromRGB(224, 224, 224));		
	cell.setReadOnly(true);
	
	coll = form.dyngrdNotes().getColumns().getByIdentifier(COL_USER);
	cell = row.getCells().newCell(coll, DynamicCellType.STRING);		
	cell.setValue(note != null ? (note.getAuthoringInformationIsNotNull() ? (note.getAuthoringInformation().getAuthoringHcpIsNotNull() ? (note.getAuthoringInformation().getAuthoringHcp().getName() != null ? note.getAuthoringInformation().getAuthoringHcp().getName().toString() : null) : null ) : null)  : domain.getHcpLiteUser() != null ? ((HcpLiteVo)domain.getHcpLiteUser()).getName() != null ? ((HcpLiteVo)domain.getHcpLiteUser()).getName().toString() : null : null);		
	cell.setBackColor(Color.fromRGB(224, 224, 224));
	cell.setReadOnly(true);
			
	coll = form.dyngrdNotes().getColumns().getByIdentifier(COL_NOTES);		
	cell = row.getCells().newCell(coll, DynamicCellType.WRAPTEXT);						
	cell.setValue(note != null ? note.getSummaryNote() : null);
	cell.setDecoratorType(DynamicCellDecoratorMode.NEVER);	
	cell.setReadOnly(isEditMode ? false : true);
	cell.setBackColor(isEditMode ? Color.White : Color.fromRGB(224, 224, 224));
	cell.setReadOnly(!isEditMode);		
	cell.setStringMaxLength(3000);
	
	row.setValue(note);		
	
	if (isEditMode) {
		form.getLocalContext().setEditedNote(note);
	}			
}
 
Example 9
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 4 votes
private void createActionsCells(RulesEngineEntityMethodArgument argument, String argumentValue, DynamicGridRow row, int j)
{
	RulesEngineMethodArgumentType typeOfArgument = argument.getType();
	String nameOfArgument = argument.getName();
	String descOfArgument = argument.getDescription();

	DynamicGridRow childRow = row.getRows().newRow();
	childRow.setSelectable(false);
	row.setExpanded(true);
	row.setSelectable(true);

	DynamicGridColumn argNameColl = getColByIndexForActionGrid(0);
	if (argNameColl == null)
	{
		argNameColl = createColumnForActionGrid("", 0);
	}
	DynamicGridCell argNameCell = childRow.getCells().newCell(argNameColl, DynamicCellType.STRING);
	argNameCell.setValue(nameOfArgument);
	argNameCell.setIdentifier(argument);
	argNameCell.setTooltip(descOfArgument);

	DynamicGridColumn argTypeColl = getColByIndexForActionGrid(1);
	DynamicGridCell argTypeCell = null;
	if (argTypeColl == null)
	{
		argTypeColl = createColumnForActionGrid("", 1);
	}
	if (typeOfArgument.equals(RulesEngineMethodArgumentType.STRING))
	{
		argTypeCell = childRow.getCells().newCell(argTypeColl, DynamicCellType.STRING);
		argTypeCell.setIdentifier(typeOfArgument);
		argTypeCell.setDecoratorType(DynamicCellDecoratorMode.ALWAYS);
		argTypeCell.setValue(argumentValue);
	}
	else if (typeOfArgument.equals(RulesEngineMethodArgumentType.INTEGER))
	{
		argTypeCell = childRow.getCells().newCell(argTypeColl, DynamicCellType.INT);
		argTypeCell.setValue(argumentValue != null ? new Integer(argumentValue) : null);
	}
	else if (typeOfArgument.equals(RulesEngineMethodArgumentType.BOOLEAN))
	{
		argTypeCell = childRow.getCells().newCell(argTypeColl, DynamicCellType.BOOL);
	}
	argTypeCell.setWidth(160);
	argTypeCell.setReadOnly(false);
}
 
Example 10
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 4 votes
private void newNote(DynamicGridRow row, AppointmentClinicalNotesVo note, boolean isEditMode) 
{	
	if (row == null) 
		throw new CodingRuntimeException("DynamicGridRow is null");
	
	if (note == null)
		row.setIdentifier(NEW_ROW_IDENTIFIER);
	
	DynamicGridColumn 	coll;
	DynamicGridCell 	cell;
	
	coll = form.dyngrdNotes().getColumns().getByIdentifier(COL_TYPE);
	cell = row.getCells().newCell(coll, DynamicCellType.HTMLVIEW);
	cell.setValue(note != null ? (note.getNoteTypeIsNotNull() ? note.getNoteType().getText() : null)  : null);		
	cell.setReadOnly(false);		
	
	coll = form.dyngrdNotes().getColumns().getByIdentifier(COL_USER);
	cell = row.getCells().newCell(coll, DynamicCellType.HTMLVIEW);		
	cell.setValue(note != null ? (note.getAuthoringInformationIsNotNull() ? (note.getAuthoringInformation().getAuthoringHcpIsNotNull() ? (note.getAuthoringInformation().getAuthoringHcp().getName() != null ? note.getAuthoringInformation().getAuthoringHcp().getName().toString() : null) : null ) : null)  : domain.getHcpLiteUser() != null ? ((HcpLiteVo)domain.getHcpLiteUser()).getName() != null ? ((HcpLiteVo)domain.getHcpLiteUser()).getName().toString() : null : null);
	cell.setReadOnly(true);			
	
	coll = form.dyngrdNotes().getColumns().getByIdentifier(COL_DATETIME);
	cell = row.getCells().newCell(coll, DynamicCellType.HTMLVIEW);		
	cell.setValue(note != null ? (note.getAuthoringInformationIsNotNull() ? note.getAuthoringInformation().getAuthoringDateTime().toString() : (new DateTime()).toString())  : (new DateTime()).toString());		
	cell.setReadOnly(true);			
	
	coll = form.dyngrdNotes().getColumns().getByIdentifier(COL_NOTE);
	cell = row.getCells().newCell(coll, DynamicCellType.HTMLVIEW);						
	cell.setValue(note != null ? note.getClinicalNote().replaceAll("\n", "<br>") : null);
	cell.setDecoratorType(DynamicCellDecoratorMode.NEVER);	
	cell.setReadOnly(true);
	cell.setStringMaxLength(3000);
	
	coll = form.dyngrdNotes().getColumns().getByIdentifier(COL_STATUS);
	cell = row.getCells().newCell(coll, DynamicCellType.HTMLVIEW);
	cell.setValue(note != null ? (note.getNoteStatusIsNotNull() ? note.getNoteStatus().getText() : null)  : null);		
	cell.setReadOnly(true);
						
	coll = form.dyngrdNotes().getColumns().getByIdentifier(COL_SELECT);
	cell = row.getCells().newCell(coll, DynamicCellType.BOOL);
	cell.setReadOnly(false);
						
	row.setValue(note);		
}
 
Example 11
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 4 votes
private void newNote(DynamicGridRow row, FollowUpNoteVo note, boolean isEditMode) 
{			
	if (row == null) {
		throw new CodingRuntimeException("DynamicGridRow is null");
	}
	
	if (note == null) {
		row.setIdentifier(NEW_ROW_IDENTIFIER);
	}
	
	DynamicGridColumn 	coll;
	DynamicGridCell 	cell;
			
	coll = form.dyngrdNotes().getColumns().getByIdentifier(COL_DATE);
	cell = row.getCells().newCell(coll, DynamicCellType.DATETIME);
	
	cell.setValue(note != null ? (note.getAuthoringInformationIsNotNull() ? note.getAuthoringInformation().getAuthoringDateTime() : null)  : null);		
	cell.setReadOnly(false);
	
	coll = form.dyngrdNotes().getColumns().getByIdentifier(COL_USER);
	cell = row.getCells().newCell(coll, DynamicCellType.STRING);
	
	cell.setValue(note != null ? (note.getAuthoringInformationIsNotNull() ? (note.getAuthoringInformation().getAuthoringHcpIsNotNull() ? (note.getAuthoringInformation().getAuthoringHcp().getName() != null ? note.getAuthoringInformation().getAuthoringHcp().getName().toString() : null) : null ) : null)  : domain.getHcpLiteUser() != null ? ((HcpLiteVo)domain.getHcpLiteUser()).getName() != null ? ((HcpLiteVo)domain.getHcpLiteUser()).getName().toString() : null : null);
	cell.setReadOnly(true);
			
	coll = form.dyngrdNotes().getColumns().getByIdentifier(COL_NOTES_TYPE);
	cell = row.getCells().newCell(coll, DynamicCellType.ENUMERATION);
	cell.getItems().clear();		
	FollowUpTypeCollection voColl = ims.core.vo.lookups.LookupHelper.getFollowUpType(domain.getLookupService());
	for(int i = 0; voColl != null && i < voColl.size(); i++)
	{
		if(voColl.get(i).getParent() == null)
			cell.getItems().newItem(voColl.get(i));
	}		
	
	cell.setValue(note != null ? (note.getFollowUpTypeIsNotNull() ? note.getFollowUpType() : null)  : null);		
	cell.setReadOnly(false);				
	
	coll = form.dyngrdNotes().getColumns().getByIdentifier(COL_NOTES);
	cell = row.getCells().newCell(coll, DynamicCellType.WRAPTEXT);				
	
	cell.setValue(note != null ? note.getFollowUpNote() : null);
	cell.setDecoratorType(DynamicCellDecoratorMode.NEVER);	
	cell.setReadOnly(isEditMode ? false : true);		
	cell.setStringMaxLength(3000);
	
	row.setValue(note);			
	row.setReadOnly(!isEditMode);
	
	if (isEditMode) {
		form.getLocalContext().setEditedNote(note);
	}			
}
 
Example 12
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 4 votes
private void newNote(DynamicGridRow row, CorrespondenceNoteVo note, boolean isEditMode) 
{	
	if (row == null) {
		throw new CodingRuntimeException("DynamicGridRow is null");
	}
	
	if (note == null) {
		row.setIdentifier(NEW_ROW_IDENTIFIER);
	}
	
	DynamicGridColumn 	coll;
	DynamicGridCell 	cell;
	
	coll = form.dyngrdNotes().getColumns().getByIdentifier(COL_TYPE);
	cell = row.getCells().newCell(coll, DynamicCellType.HTMLVIEW);
	cell.setValue(note != null ? (note.getNoteTypeIsNotNull() ? note.getNoteType().getText() : null)  : null);		
	cell.setReadOnly(false);		
	
	coll = form.dyngrdNotes().getColumns().getByIdentifier(COL_USER);
	cell = row.getCells().newCell(coll, DynamicCellType.HTMLVIEW);		
	cell.setValue(note != null ? (note.getAuthoringInformationIsNotNull() ? (note.getAuthoringInformation().getAuthoringHcpIsNotNull() ? (note.getAuthoringInformation().getAuthoringHcp().getName() != null ? note.getAuthoringInformation().getAuthoringHcp().getName().toString() : null) : null ) : null)  : domain.getHcpLiteUser() != null ? ((HcpLiteVo)domain.getHcpLiteUser()).getName() != null ? ((HcpLiteVo)domain.getHcpLiteUser()).getName().toString() : null : null);
	cell.setReadOnly(true);			
	
	coll = form.dyngrdNotes().getColumns().getByIdentifier(COL_DATETIME);
	cell = row.getCells().newCell(coll, DynamicCellType.HTMLVIEW);		
	cell.setValue(note != null ? (note.getAuthoringInformationIsNotNull() ? note.getAuthoringInformation().getAuthoringDateTime().toString() : (new DateTime()).toString())  : (new DateTime()).toString());		
	cell.setReadOnly(false);			
	
	coll = form.dyngrdNotes().getColumns().getByIdentifier(COL_NOTE);
	cell = row.getCells().newCell(coll, DynamicCellType.HTMLVIEW);						
	cell.setValue(note != null ? note.getReportNote().replaceAll("\n", "<br>") : null);
	cell.setDecoratorType(DynamicCellDecoratorMode.NEVER);	
	cell.setReadOnly(isEditMode ? false : true);
	cell.setStringMaxLength(3000);
	
	coll = form.dyngrdNotes().getColumns().getByIdentifier(COL_STATUS);
	cell = row.getCells().newCell(coll, DynamicCellType.HTMLVIEW);
	cell.setValue(note != null ? (note.getNoteStatusIsNotNull() ? note.getNoteStatus().getText() : null)  : null);		
	cell.setReadOnly(false);
		
	row.setValue(note);		
	row.setReadOnly(!isEditMode);
	
	if (isEditMode) {
		form.getLocalContext().setEditedNote(note);
	}			
}