Java Code Examples for ims.framework.enumerations.DynamicCellType.equals()

The following are Jave code examples for showing how to use equals() of the ims.framework.enumerations.DynamicCellType class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: AvoinApotti   File: UserAssessmentInstHelper.java   Source Code and License 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   Source Code and License 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   Source Code and License Vote up 4 votes
private void addSeed(ReportSeedParsedVo voSeed)
{
	if (voSeed == null)
		return;

	DynamicGridRow row = form.dyngrdParameters().getRows().newRow();

	DynamicGridCell nameCell = row.getCells().newCell(getColumn(NAME_COLUMN), DynamicCellType.WRAPTEXT);
	String seedName = getReportSeed().getCellName(voSeed);
	nameCell.setValue(seedName);
	nameCell.setReadOnly(true);

	DynamicCellType cellType = null;
	
	if(voSeed.getType().equalsIgnoreCase(INTEGER) && (voSeed.getName().equalsIgnoreCase("DOB") || voSeed.getName().equalsIgnoreCase("DOB_START") || voSeed.getName().equalsIgnoreCase("DOB_END") || voSeed.getName().equalsIgnoreCase("DATE_OF_BIRTH_FROM") || voSeed.getName().equalsIgnoreCase("DATE_OF_BIRTH_TO")))
	{
		cellType = DynamicCellType.PARTIALDATE;
	}
	else
		cellType = getReportSeed().getCellType(voSeed);
	
	Object value = getReportSeed().getValue(voSeed);

	DynamicGridCell valueCell = row.getCells().newCell(getColumn(VALUE_COLUMN), cellType);
	if (cellType.equals(DynamicCellType.QUERYCOMBOBOX))
	{
		valueCell.getItems().newItem(value);
		valueCell.setAutoPostBack(true);
	}

	if(cellType.equals(DynamicCellType.PARTIALDATE) && value instanceof java.lang.Integer)
	{
		valueCell.setValue(new PartialDate((Integer)value));
	}
	else
	{	
		valueCell.setValue(value);
	}
	
	valueCell.setIdentifier(getReportSeed().getIdentifier(voSeed));

	boolean canBeNull = voSeed == null ? true : voSeed.getCanBeNull().booleanValue();
	valueCell.setCanBeEmpty(canBeNull);
	
	if(canBeNull == false)
	{
		DynamicGridCell mandatoryCell = row.getCells().newCell(getColumn(MANDATORY_COLUMN), DynamicCellType.HTMLVIEW);
		mandatoryCell.setValue("<font color='#FF0000' size='3'>*</font>");
		mandatoryCell.setTooltip("Required");
		
		valueCell.setValidationMessage(seedName + " is mandatory");
	}
	
	row.setValue(voSeed);
}
 
Example 4
Project: AvoinApotti   File: MyOrderQuestionsPopulation.java   Source Code and License Vote up 4 votes
private int getAnswerCellWidth(DynamicCellType cellType)
{
	if(cellType == null)
		return 0;
	
	if(cellType.equals(DynamicCellType.ANSWER))
		return 30;
	if(cellType.equals(DynamicCellType.BOOL))
		return 30;
	if(cellType.equals(DynamicCellType.BUTTON))
		return 50;
	if(cellType.equals(DynamicCellType.COMMENT))
		return 250;
	if(cellType.equals(DynamicCellType.DATE))
		return 80;
	if(cellType.equals(DynamicCellType.DECIMAL))
		return 60;
	if(cellType.equals(DynamicCellType.EMPTY))
		return 0;
	if(cellType.equals(DynamicCellType.ENUMERATION))
		return 150;
	if(cellType.equals(DynamicCellType.HTMLVIEW))
		return 250;
	if(cellType.equals(DynamicCellType.IMAGE))
		return 25;
	if(cellType.equals(DynamicCellType.INT))
		return 60;
	if(cellType.equals(DynamicCellType.LABEL))
		return 70;
	if(cellType.equals(DynamicCellType.MULTISELECT))
		return 180;
	if(cellType.equals(DynamicCellType.PARTIALDATE))
		return 70;
	if(cellType.equals(DynamicCellType.QUERYCOMBOBOX))
		return 150;
	if(cellType.equals(DynamicCellType.STRING))
		return 250;
	if(cellType.equals(DynamicCellType.TIME))
		return 40;
	if(cellType.equals(DynamicCellType.WRAPTEXT))
		return 250;
	if(cellType.equals(DynamicCellType.DYNAMICLABEL))
		return 50;
	
	return 100;
}
 
Example 5
Project: AvoinApotti   File: MyOrderQuestionsPopulation.java   Source Code and License Vote up 4 votes
private String getAnswerCellTooltip(DynamicCellType cellType)
{
	if(cellType == null)
		return "";
	
	if(cellType.equals(DynamicCellType.ANSWER))
		return "Select an answer";
	if(cellType.equals(DynamicCellType.BOOL))
		return "";
	if(cellType.equals(DynamicCellType.BUTTON))
		return "";
	if(cellType.equals(DynamicCellType.COMMENT))
		return "Enter comment";
	if(cellType.equals(DynamicCellType.DATE))
		return "Select date";
	if(cellType.equals(DynamicCellType.DECIMAL))
		return "Enter decimal value";
	if(cellType.equals(DynamicCellType.EMPTY))
		return "";
	if(cellType.equals(DynamicCellType.ENUMERATION))
		return "Select an item from list";
	if(cellType.equals(DynamicCellType.HTMLVIEW))
		return "";
	if(cellType.equals(DynamicCellType.IMAGE))
		return "";
	if(cellType.equals(DynamicCellType.INT))
		return "Enter integer value";
	if(cellType.equals(DynamicCellType.LABEL))
		return "";
	if(cellType.equals(DynamicCellType.MULTISELECT))
		return "Select one or more items";
	if(cellType.equals(DynamicCellType.PARTIALDATE))
		return "Enter partial date value";
	if(cellType.equals(DynamicCellType.QUERYCOMBOBOX))
		return "Search and select an item";
	if(cellType.equals(DynamicCellType.STRING))
		return "Enter text";
	if(cellType.equals(DynamicCellType.TIME))
		return "Enter time value";
	if(cellType.equals(DynamicCellType.WRAPTEXT))
		return "Enter multiline text";
	if(cellType.equals(DynamicCellType.DYNAMICLABEL))
		return "";
	
	return "";
}