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

The following are Jave code examples for showing how to use equals() 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: Logic.java   View Source Code Vote up 6 votes
protected void onDyngrdAnswerTypesCellValueChanged(DynamicGridCell cell)
{
	if (cell.getType().equals(DynamicCellType.BOOL))
	{
		Object cellVal = cell.getValue();
		if (cellVal instanceof Boolean)
		{
			if (((Boolean) cellVal).booleanValue())
			{
				// Clear the checkboxes except the selected one
				for (int i = 0; i < form.lyrTabs().tabNewQuestion().dyngrdAnswerTypes().getRows().size(); i++)
				{
					DynamicGridRow row = form.lyrTabs().tabNewQuestion().dyngrdAnswerTypes().getRows().get(i);
					for (int j = 0; j < form.lyrTabs().tabNewQuestion().dyngrdAnswerTypes().getColumns().size(); j++)
					{
						DynamicGridCell cellParent = row.getCells().get(form.lyrTabs().tabNewQuestion().dyngrdAnswerTypes().getColumns().get(j));
						if (cellParent != null && cellParent.getType() == DynamicCellType.BOOL && cellParent.equals(cell) == false)
						{
							cellParent.setValue(new Boolean(false));
						}
					}
				}
			}
		}
	}
}
 
Example 2
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
/**
 * @param cellToSkip
 */
private void deselectCells(DynamicGridCell cellToSkip)
{
	//Deselect the other rows
	for (int i = 0; i < form.lyrFindings().tabSearch().lyrFindingSearch().tabPageSelect().dyngrdSelect().getRows().size(); i++)
	{
		DynamicGridCell dynamicGridCell = form.lyrFindings().tabSearch().lyrFindingSearch().tabPageSelect().dyngrdSelect().getRows().get(i).getCells().get(getDynamicColumn(COLSELECT));
		if (dynamicGridCell != null && dynamicGridCell.equals(cellToSkip) == false)
			dynamicGridCell.setValue(new Boolean(false));
	}
}