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

The following are Jave code examples for showing how to use setMaxCheckedItemsForMultiSelect() 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: MyOrderQuestionsPopulation.java   View Source Code Vote up 6 votes
private void setAnswerCellValue(DynamicGridCell cell, QuestionAnswerTypeVo configAnswer) 
{
	if(configAnswer.getAnswerType().equals(ims.core.vo.lookups.QuestionAnswerType.SEPARATOR))
	{
		cell.setTextColor(DEFAULT_SEPARATOR_CELL_TEXT_COLOR);
		cell.setValue(" " + (configAnswer.getSeparatorTextIsNotNull() ? configAnswer.getSeparatorText() : "") + " ");
	}
	else if(configAnswer.getAnswerType().equals(ims.core.vo.lookups.QuestionAnswerType.YESNO))
	{
		cell.getItems().clear();
		cell.getItems().newItem(this.optionYes);
		cell.getItems().newItem(this.optionNo);
	}
	else if(configAnswer.getAnswerType().equals(ims.core.vo.lookups.QuestionAnswerType.PICKLIST))
	{
		setAnswerCellOptions(configAnswer, cell);
	}
	else if(configAnswer.getAnswerType().equals(ims.core.vo.lookups.QuestionAnswerType.MULTISELECT))				
	{
		setAnswerCellOptions(configAnswer, cell);
		if(configAnswer.getMaxMultiselectAllowedIsNotNull())
		{
			cell.setMaxCheckedItemsForMultiSelect(configAnswer.getMaxMultiselectAllowed());
		}								
	}
}
 
Example 2
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
private void setAnswerCellValue(DynamicGridCell cell, QuestionAnswerTypeVo configAnswer, AnswerDetailsVo instAnswer)
{
	if (configAnswer.getAnswerType().equals(ims.core.vo.lookups.QuestionAnswerType.SEPARATOR))
	{
		cell.setTextColor(DEFAULT_SEPARATOR_CELL_TEXT_COLOR);
		cell.setValue(" " + (configAnswer.getSeparatorTextIsNotNull() ? configAnswer.getSeparatorText() : "") + " ");
	}
	else if (configAnswer.getAnswerType().equals(ims.core.vo.lookups.QuestionAnswerType.YESNO))
	{
		cell.getItems().clear();
		cell.getItems().newItem(this.optionYes, this.optionYes.getIItemImage());
		cell.getItems().newItem(this.optionNo, this.optionNo.getIItemImage());
	}
	else if (configAnswer.getAnswerType().equals(ims.core.vo.lookups.QuestionAnswerType.PICKLIST))
	{
		setAnswerCellOptions(configAnswer, cell);
	}
	else if (configAnswer.getAnswerType().equals(ims.core.vo.lookups.QuestionAnswerType.MULTISELECT))
	{
		setAnswerCellOptions(configAnswer, cell, instAnswer);

		if (instAnswer != null)
		{
			if (instAnswer.getMaxMultiselectAllowedIsNotNull())
			{
				cell.setMaxCheckedItemsForMultiSelect(instAnswer.getMaxMultiselectAllowed());
			}
		}
		else
		{
			if (configAnswer.getMaxMultiselectAllowedIsNotNull())
			{
				cell.setMaxCheckedItemsForMultiSelect(configAnswer.getMaxMultiselectAllowed());
			}
		}
	}
}
 
Example 3
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
private void setAnswerCellValue(DynamicGridCell cell, Question_AnswerTypeVo configAnswer, Answer_DetailsVo instAnswer)
{
	if (configAnswer.getAnswerType().equals(ims.core.vo.lookups.QuestionAnswerType.SEPARATOR))
	{
		cell.setTextColor(DEFAULT_SEPARATOR_CELL_TEXT_COLOR);
		cell.setValue(" " + (configAnswer.getSeparatorTextIsNotNull() ? configAnswer.getSeparatorText() : "") + " ");
	}
	else if (configAnswer.getAnswerType().equals(ims.core.vo.lookups.QuestionAnswerType.YESNO))
	{
		cell.getItems().clear();
		cell.getItems().newItem(this.optionYes, this.optionYes.getIItemImage());
		cell.getItems().newItem(this.optionNo, this.optionNo.getIItemImage());
	}
	else if (configAnswer.getAnswerType().equals(ims.core.vo.lookups.QuestionAnswerType.PICKLIST))
	{
		setAnswerCellOptions(configAnswer, cell);
	}
	else if (configAnswer.getAnswerType().equals(ims.core.vo.lookups.QuestionAnswerType.MULTISELECT))
	{
		setAnswerCellOptions(configAnswer, cell, instAnswer);

		if (instAnswer != null)
		{
			if (instAnswer.getMaxMultiselectAllowedIsNotNull())
			{
				cell.setMaxCheckedItemsForMultiSelect(instAnswer.getMaxMultiselectAllowed());
			}
		}
		else
		{
			if (configAnswer.getMaxMultiselectAllowedIsNotNull())
			{
				cell.setMaxCheckedItemsForMultiSelect(configAnswer.getMaxMultiselectAllowed());
			}
		}
	}
}
 
Example 4
Project: AvoinApotti   File: UserAssessmentInstHelper.java   View Source Code Vote up 5 votes
private void setAnswerCellValue(DynamicGridCell cell, QuestionAnswerTypeVo configAnswer, AnswerDetailsVo instAnswer) 
{
	if(configAnswer.getAnswerType().equals(ims.core.vo.lookups.QuestionAnswerType.SEPARATOR))
	{
		cell.setTextColor(DEFAULT_SEPARATOR_CELL_TEXT_COLOR);
		cell.setValue(" " + (configAnswer.getSeparatorTextIsNotNull() ? configAnswer.getSeparatorText() : "") + " ");
	}
	else if(configAnswer.getAnswerType().equals(ims.core.vo.lookups.QuestionAnswerType.YESNO))
	{
		cell.getItems().clear();
		cell.getItems().newItem(this.optionYes, this.optionYes.getIItemImage());
		cell.getItems().newItem(this.optionNo, this.optionNo.getIItemImage());
	}
	else if(configAnswer.getAnswerType().equals(ims.core.vo.lookups.QuestionAnswerType.PICKLIST))
	{
		setAnswerCellOptions(configAnswer, cell);
	}
	else if(configAnswer.getAnswerType().equals(ims.core.vo.lookups.QuestionAnswerType.MULTISELECT))				
	{
		setAnswerCellOptions(configAnswer, cell, instAnswer);
		
		if(instAnswer != null)
		{
			if(instAnswer.getMaxMultiselectAllowedIsNotNull())
			{
				cell.setMaxCheckedItemsForMultiSelect(instAnswer.getMaxMultiselectAllowed());						
			}
		}
		else
		{
			if(configAnswer.getMaxMultiselectAllowedIsNotNull())
			{
				cell.setMaxCheckedItemsForMultiSelect(configAnswer.getMaxMultiselectAllowed());
			}
		}							
	}
}
 
Example 5
Project: AvoinApotti   File: UserAssessmentInstHelper.java   View Source Code Vote up 5 votes
private void setAnswerCellValue(DynamicGridCell cell, Question_AnswerTypeVo configAnswer, Answer_DetailsVo instAnswer) 
{
	if(configAnswer.getAnswerType().equals(ims.core.vo.lookups.QuestionAnswerType.SEPARATOR))
	{
		cell.setTextColor(DEFAULT_SEPARATOR_CELL_TEXT_COLOR);
		cell.setValue(" " + (configAnswer.getSeparatorTextIsNotNull() ? configAnswer.getSeparatorText() : "") + " ");
	}
	else if(configAnswer.getAnswerType().equals(ims.core.vo.lookups.QuestionAnswerType.YESNO))
	{
		cell.getItems().clear();
		cell.getItems().newItem(this.optionYes, this.optionYes.getIItemImage());
		cell.getItems().newItem(this.optionNo, this.optionNo.getIItemImage());
	}
	else if(configAnswer.getAnswerType().equals(ims.core.vo.lookups.QuestionAnswerType.PICKLIST))
	{
		setAnswerCellOptions(configAnswer, cell);
	}
	else if(configAnswer.getAnswerType().equals(ims.core.vo.lookups.QuestionAnswerType.MULTISELECT))				
	{
		setAnswerCellOptions(configAnswer, cell, instAnswer);
		
		if(instAnswer != null)
		{
			if(instAnswer.getMaxMultiselectAllowedIsNotNull())
			{
				cell.setMaxCheckedItemsForMultiSelect(instAnswer.getMaxMultiselectAllowed());						
			}
		}
		else
		{
			if(configAnswer.getMaxMultiselectAllowedIsNotNull())
			{
				cell.setMaxCheckedItemsForMultiSelect(configAnswer.getMaxMultiselectAllowed());
			}
		}							
	}
}
 
Example 6
Project: AvoinApotti   File: MyOrderQuestionsPopulation.java   View Source Code Vote up 5 votes
private void setAnswerCellValue(DynamicGridCell cell, QuestionAnswerTypeVo configAnswer, AnswerDetailsVo instAnswer) 
{
	if(configAnswer.getAnswerType().equals(ims.core.vo.lookups.QuestionAnswerType.SEPARATOR))
	{
		cell.setTextColor(DEFAULT_SEPARATOR_CELL_TEXT_COLOR);
		cell.setValue(" " + (configAnswer.getSeparatorTextIsNotNull() ? configAnswer.getSeparatorText() : "") + " ");
	}
	else if(configAnswer.getAnswerType().equals(ims.core.vo.lookups.QuestionAnswerType.YESNO))
	{
		cell.getItems().clear();
		cell.getItems().newItem(this.optionYes, this.optionYes.getIItemImage());
		cell.getItems().newItem(this.optionNo, this.optionNo.getIItemImage());
	}
	else if(configAnswer.getAnswerType().equals(ims.core.vo.lookups.QuestionAnswerType.PICKLIST))
	{
		setAnswerCellOptions(configAnswer, cell);
	}
	else if(configAnswer.getAnswerType().equals(ims.core.vo.lookups.QuestionAnswerType.MULTISELECT))				
	{
		setAnswerCellOptions(configAnswer, cell);
		
		if(instAnswer != null)
		{
			if(instAnswer.getMaxMultiselectAllowedIsNotNull())
			{
				cell.setMaxCheckedItemsForMultiSelect(instAnswer.getMaxMultiselectAllowed());						
			}
		}
		else
		{
			if(configAnswer.getMaxMultiselectAllowedIsNotNull())
			{
				cell.setMaxCheckedItemsForMultiSelect(configAnswer.getMaxMultiselectAllowed());
			}
		}							
	}
}
 
Example 7
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
private void populateAnaesthetistTab() 
{
	form.lyr1().tabAnaesthetist().dyngrdAnaesthetist().clear();
	initializeAnaestheticDynamicGrid();

	DynamicGridRow action1Row = form.lyr1().tabAnaesthetist().dyngrdAnaesthetist().getRows().newRow();
	action1Row.setExpanded(true);
	action1Row.setSelectable(false);
	DynamicGridCell phaseRow1Cell = action1Row.getCells().newCell(getAnaestheticCol("ACTIONS_A"), DynamicCellType.HTMLVIEW);
	phaseRow1Cell.setValue("<img src='" +form.getImages().Clinical.Action_selected.getImagePath() + "'>" + "<font face='Verdana' color=AA5088><b> Anaesthetic Consultation</b></font>");
	
	DynamicGridRow value1Row = action1Row.getRows().newRow();
	value1Row.setSelectable(false);
	DynamicGridCell action1Cell = value1Row.getCells().newCell(getAnaestheticCol("ACTIONS_A"), DynamicCellType.HTMLVIEW);
	action1Cell.setValue("<i>Yes/No : </i>");
	
	DynamicGridCell value1Cell = value1Row.getCells().newCell(getAnaestheticCol("VALUES"), DynamicCellType.MULTISELECT);
	value1Cell.getItems().newItem("Yes");
	value1Cell.getItems().newItem("No");
	value1Cell.setMaxCheckedItemsForMultiSelect(new Integer(1));
	
	DynamicGridRow value2Row = action1Row.getRows().newRow();
	value2Row.setSelectable(false);
	DynamicGridCell action2Cell = value2Row.getCells().newCell(getAnaestheticCol("ACTIONS_A"), DynamicCellType.HTMLVIEW);
	action2Cell.setValue("<i>Outcome :</i>");
	
	DynamicGridCell value2Cell = value2Row.getCells().newCell(getAnaestheticCol("VALUES"), DynamicCellType.HTMLVIEW);
	value2Cell.setValue("<textarea rows='6' cols='81'>");
	
	DynamicGridRow value3Row = action1Row.getRows().newRow();
	value3Row.setSelectable(false);
	DynamicGridCell action3Cell = value3Row.getCells().newCell(getAnaestheticCol("ACTIONS_A"), DynamicCellType.HTMLVIEW);
	action3Cell.setValue("<i>Fit for Surgery : </i>");
	
	DynamicGridCell value3Cell = value3Row.getCells().newCell(getAnaestheticCol("VALUES"), DynamicCellType.MULTISELECT);
	value3Cell.getItems().newItem("Yes");
	value3Cell.getItems().newItem("No");
	value3Cell.setMaxCheckedItemsForMultiSelect(new Integer(1));
}