Java Code Examples for ims.framework.controls.DynamicGridColumn.getIdentifier()

The following are Jave code examples for showing how to use getIdentifier() of the ims.framework.controls.DynamicGridColumn 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
private void setColumnSortOrder(DynamicGridColumn column)
{
	if (column != null && column.getIdentifier() == null)
		throw new CodingRuntimeException("Logical Error - All grid columns must have an identifier. Check grid initialization");
	
	// Toggle between ASCENDING and DESCENDING sort mode
	// In the case where sort mode has not been set then default to ASCENDING sort mode
	// Each line will toggle if the column matches, else the sort mode will be cleared (null)
	form.getLocalContext().setSortOrder_T(column != null && column.getIdentifier().equals(COL_T_VALUE) ? (SortOrder.ASCENDING.equals(form.getLocalContext().getSortOrder_T()) ? SortOrder.DESCENDING : SortOrder.ASCENDING) : null);
	form.getLocalContext().setSortOrder_N(column != null && column.getIdentifier().equals(COL_N_VALUE) ? (SortOrder.ASCENDING.equals(form.getLocalContext().getSortOrder_N()) ? SortOrder.DESCENDING : SortOrder.ASCENDING) : null);
	form.getLocalContext().setSortOrder_M(column != null && column.getIdentifier().equals(COL_M_VALUE) ? (SortOrder.ASCENDING.equals(form.getLocalContext().getSortOrder_M()) ? SortOrder.DESCENDING : SortOrder.ASCENDING) : null);
	form.getLocalContext().setSortOrder_HisType(column != null && column.getIdentifier().equals(COL_HIST_TYPE) ? (SortOrder.ASCENDING.equals(form.getLocalContext().getSortOrder_HisType()) ? SortOrder.DESCENDING : SortOrder.ASCENDING) : null);
	form.getLocalContext().setSortOrder_HisGrade(column != null && column.getIdentifier().equals(COL_HIST_GRADE) ? (SortOrder.ASCENDING.equals(form.getLocalContext().getSortOrder_HisGrade()) ? SortOrder.DESCENDING : SortOrder.ASCENDING) : null);
	
	form.getLocalContext().setSortOrder_Loc(column != null && column.getIdentifier().equals(COL_PROG_LOCATION) ? (SortOrder.ASCENDING.equals(form.getLocalContext().getSortOrder_Loc()) ? SortOrder.DESCENDING : SortOrder.ASCENDING) : null);
	form.getLocalContext().setSortOrder_Risk(column != null && column.getIdentifier().equals(COL_PROG_RISK) ? (SortOrder.ASCENDING.equals(form.getLocalContext().getSortOrder_Risk()) ? SortOrder.DESCENDING : SortOrder.ASCENDING) : null);
	form.getLocalContext().setSortOrder_PSA(column != null && column.getIdentifier().equals(COL_PROG_PSA) ? (SortOrder.ASCENDING.equals(form.getLocalContext().getSortOrder_PSA()) ? SortOrder.DESCENDING : SortOrder.ASCENDING) : null);
	form.getLocalContext().setSortOrder_Gleason(column != null && column.getIdentifier().equals(COL_PROG_GLEASON) ? (SortOrder.ASCENDING.equals(form.getLocalContext().getSortOrder_Gleason()) ? SortOrder.DESCENDING : SortOrder.ASCENDING) : null);
	
	form.getLocalContext().setSortOrder_Overall(column != null && column.getIdentifier().equals(COL_OVERALL) ? (SortOrder.ASCENDING.equals(form.getLocalContext().getSortOrder_Overall()) ? SortOrder.DESCENDING : SortOrder.ASCENDING) : null);
}
 
Example 2
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 6 votes
/**
 * WDEV-12569
 * 
 * Function used to set the sort order for appropriate column
 * @param column
 */
private void setColumnSortOrder(DynamicGridColumn column)
{
	if (column != null && column.getIdentifier() == null)
		throw new CodingRuntimeException("Logical Error - All grid columns must have an identifier. Check grid initialization");
	
	// Toggle between ASCENDING and DESCENDING sort mode
	// In the case where sort mode has not been set then default to ASCENDING sort mode
	// Each line will toggle if the column matches, else the sort mode will be cleared (null)
	form.getLocalContext().setSortOrder_T(column != null && column.getIdentifier().equals(COL_T_VALUE) ? (SortOrder.ASCENDING.equals(form.getLocalContext().getSortOrder_T()) ? SortOrder.DESCENDING : SortOrder.ASCENDING) : null);
	form.getLocalContext().setSortOrder_N(column != null && column.getIdentifier().equals(COL_N_VALUE) ? (SortOrder.ASCENDING.equals(form.getLocalContext().getSortOrder_N()) ? SortOrder.DESCENDING : SortOrder.ASCENDING) : null);
	form.getLocalContext().setSortOrder_M(column != null && column.getIdentifier().equals(COL_M_VALUE) ? (SortOrder.ASCENDING.equals(form.getLocalContext().getSortOrder_M()) ? SortOrder.DESCENDING : SortOrder.ASCENDING) : null);
	form.getLocalContext().setSortOrder_HisType(column != null && column.getIdentifier().equals(COL_HIST_TYPE) ? (SortOrder.ASCENDING.equals(form.getLocalContext().getSortOrder_HisType()) ? SortOrder.DESCENDING : SortOrder.ASCENDING) : null);
	form.getLocalContext().setSortOrder_HisGrade(column != null && column.getIdentifier().equals(COL_HIST_GRADE) ? (SortOrder.ASCENDING.equals(form.getLocalContext().getSortOrder_HisGrade()) ? SortOrder.DESCENDING : SortOrder.ASCENDING) : null);
	form.getLocalContext().setSortOrder_Serum(column != null && column.getIdentifier().equals(COL_SERUM) ? (SortOrder.ASCENDING.equals(form.getLocalContext().getSortOrder_Serum()) ? SortOrder.DESCENDING : SortOrder.ASCENDING) : null);
	form.getLocalContext().setSortOrder_O45(column != null && column.getIdentifier().equals(COL_OVER_45) ? (SortOrder.ASCENDING.equals(form.getLocalContext().getSortOrder_O45()) ? SortOrder.DESCENDING : SortOrder.ASCENDING) : null);
	form.getLocalContext().setSortOrder_Overall(column != null && column.getIdentifier().equals(COL_OVERALL) ? (SortOrder.ASCENDING.equals(form.getLocalContext().getSortOrder_Overall()) ? SortOrder.DESCENDING : SortOrder.ASCENDING) : null);
}
 
Example 3
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
private DynamicGridColumn getValueColumn(DateTime valueDateTime, int groupIndex, LookupInstVo labSpecimenType, SpecimenType orderSpecimenType) 
{
	for(int i = 0; i < form.dyngrd().getColumns().size(); i++)
	{
		DynamicGridColumn column = form.dyngrd().getColumns().get(i);
		
		if(column.getIdentifier() instanceof ColumnIdentifierValue)
		{
			ColumnIdentifierValue columnIndentifier = (ColumnIdentifierValue) column.getIdentifier();
			
			boolean labSpecimenMatch = columnIndentifier.getLabSpecimen() != null && labSpecimenType != null && columnIndentifier.getLabSpecimen().equals(labSpecimenType);
			boolean orderSpecimenMatch = columnIndentifier.getLabSpecimen() == null && labSpecimenType == null && columnIndentifier.getOrderSpecimen() != null && orderSpecimenType != null && columnIndentifier.getOrderSpecimen().equals(orderSpecimenType);
			boolean noOrderOrLabSpecimen = columnIndentifier.getLabSpecimen() == null && columnIndentifier.getOrderSpecimen() == null && labSpecimenType == null && orderSpecimenType == null;
			
			if (columnIndentifier.getDate().equals(valueDateTime) && (labSpecimenMatch || orderSpecimenMatch || noOrderOrLabSpecimen))
			{
				DynamicGridRow row = form.dyngrd().getRows().get(groupIndex);
				DynamicGridCell cell = row.getCells().get(column);
				
				if(cell == null || cell.getValue() == null)
					return column;
			}
		}
	}
	
	return null;
}
 
Example 4
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
public OverallStagingComapartor(DynamicGridColumn column, SortOrder order)
{
	if (column != null && column.getIdentifier() == null)
		throw new CodingRuntimeException("Logical error - All columns in the grid must have an identifier. Check grid initialization");

  		this.column = column != null ? (Integer) column.getIdentifier() : null;
  		
  		this.direction = SortOrder.DESCENDING.equals(order) ? -1 : 1;
}
 
Example 5
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
@Override
protected void onDyngrdOverallColumnHeaderClicked(DynamicGridColumn column)
{
	if (column.getIdentifier() == null)
		throw new CodingRuntimeException("Logical Error - All columns must have an identifier.");
	
	// Set sorting order for appropriate column
	setColumnSortOrder(column);
	
	// Sort dynamic grid values
	sortOverallRecords(column);
}
 
Example 6
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
public OverallStagingComapartor(DynamicGridColumn column, SortOrder order)
{
	if (column != null && column.getIdentifier() == null)
		throw new CodingRuntimeException("Logical error - All columns in the grid must have an identifier. Check grid initialization");

  		this.column = column != null ? (Integer) column.getIdentifier() : null;
  		
  		this.direction = SortOrder.DESCENDING.equals(order) ? -1 : 1;
}
 
Example 7
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
@Override
protected void onDyngrdOverallColumnHeaderClicked(DynamicGridColumn column)
{
	if (column.getIdentifier() == null)
		throw new CodingRuntimeException("Logical Error - All columns must have an identifier.");
	
	// Set sorting order for appropriate column
	setColumnSortOrder(column);
	
	// Sort dynamic grid values
	sortOverallRecords(column);
}
 
Example 8
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
private void sortOverallRecords(DynamicGridColumn column)
{
	// Get grid values
	TumourGroupSiteOverallStagingVoCollection gridValues = populateOverallStagingFromScreen(false);
	
	if (column != null && column.getIdentifier() == null)
		throw new CodingRuntimeException("Logical error - All grid columns must have identifiers! Check grid initialization!");
	
	if (column != null)
	{
		switch ((Integer) column.getIdentifier())
		{
			case COL_T_VALUE:
				gridValues.sort(new OverallStagingComapartor(column, form.getLocalContext().getSortOrder_T()));
				break;

			case COL_N_VALUE:
				gridValues.sort(new OverallStagingComapartor(column, form.getLocalContext().getSortOrder_N()));
				break;

			case COL_M_VALUE:
				gridValues.sort(new OverallStagingComapartor(column, form.getLocalContext().getSortOrder_M()));
				break;

			case COL_OVERALL:
				gridValues.sort(new OverallStagingComapartor(column, form.getLocalContext().getSortOrder_Overall()));
				break;				
		}
	}
	
	populateOverallStagingToScreen(gridValues, false);
}
 
Example 9
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
private void setColumnSortOrder(DynamicGridColumn column)
{
	if (column != null && column.getIdentifier() == null)
		throw new CodingRuntimeException("Logical Error - All grid columns must have an identifier. Check grid initialization");
	
	// Toggle between ASCENDING and DESCENDING sort mode
	// In the case where sort mode has not been set then default to ASCENDING sort mode
	// Each line will toggle if the column matches, else the sort mode will be cleared (null)
	form.getLocalContext().setSortOrder_T(column != null && column.getIdentifier().equals(COL_T_VALUE) ? (SortOrder.ASCENDING.equals(form.getLocalContext().getSortOrder_T()) ? SortOrder.DESCENDING : SortOrder.ASCENDING) : null);
	form.getLocalContext().setSortOrder_N(column != null && column.getIdentifier().equals(COL_N_VALUE) ? (SortOrder.ASCENDING.equals(form.getLocalContext().getSortOrder_N()) ? SortOrder.DESCENDING : SortOrder.ASCENDING) : null);
	form.getLocalContext().setSortOrder_M(column != null && column.getIdentifier().equals(COL_M_VALUE) ? (SortOrder.ASCENDING.equals(form.getLocalContext().getSortOrder_M()) ? SortOrder.DESCENDING : SortOrder.ASCENDING) : null);
	form.getLocalContext().setSortOrder_Overall(column != null && column.getIdentifier().equals(COL_OVERALL) ? (SortOrder.ASCENDING.equals(form.getLocalContext().getSortOrder_Overall()) ? SortOrder.DESCENDING : SortOrder.ASCENDING) : null);
}
 
Example 10
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
public OverallStagingComapartor(DynamicGridColumn column, SortOrder order)
{
	if (column != null && column.getIdentifier() == null)
		throw new CodingRuntimeException("Logical error - All columns in the grid must have an identifier. Check grid initialization");

  		this.column = column != null ? (Integer) column.getIdentifier() : null;
  		
  		this.direction = SortOrder.DESCENDING.equals(order) ? -1 : 1;
}
 
Example 11
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
@Override
protected void onDyngrdOverallColumnHeaderClicked(DynamicGridColumn column)
{
	if (column.getIdentifier() == null)
		throw new CodingRuntimeException("Logical Error - All columns must have an identifier.");
	
	// Set sorting order for appropriate column
	setColumnSortOrder(column);
	
	// Sort dynamic grid values
	sortOverallRecords(column);
}
 
Example 12
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 4 votes
private void sortOverallRecords(DynamicGridColumn column)
{
	// Get grid values
	OverallPrognosticGroupingVoCollection gridValues = populateOverallPrognosticFromScreen(false);
	
	if (column != null && column.getIdentifier() == null)
		throw new CodingRuntimeException("Logical error - All grid columns must have identifiers! Check grid initialization!");
	
	if (column != null)
	{
		switch ((Integer) column.getIdentifier())
		{
			case COL_T_VALUE:
				gridValues.sort(new OverallStagingComapartor(column, form.getLocalContext().getSortOrder_T()));
				break;

			case COL_N_VALUE:
				gridValues.sort(new OverallStagingComapartor(column, form.getLocalContext().getSortOrder_N()));
				break;

			case COL_M_VALUE:
				gridValues.sort(new OverallStagingComapartor(column, form.getLocalContext().getSortOrder_M()));
				break;

			case COL_HIST_TYPE:
				gridValues.sort(new OverallStagingComapartor(column, form.getLocalContext().getSortOrder_HisType()));
				break;

			case COL_HIST_GRADE:
				gridValues.sort(new OverallStagingComapartor(column, form.getLocalContext().getSortOrder_HisGrade()));
				break;

			case COL_PROG_LOCATION:
				gridValues.sort(new OverallStagingComapartor(column, form.getLocalContext().getSortOrder_Loc()));
				break;
				
			case COL_PROG_RISK:
				gridValues.sort(new OverallStagingComapartor(column, form.getLocalContext().getSortOrder_Risk()));
				break;
				
			case COL_PROG_PSA:
				gridValues.sort(new OverallStagingComapartor(column, form.getLocalContext().getSortOrder_PSA()));
				break;
				
			case COL_PROG_GLEASON:
				gridValues.sort(new OverallStagingComapartor(column, form.getLocalContext().getSortOrder_Gleason()));
				break;

			case COL_OVERALL:
				gridValues.sort(new OverallStagingComapartor(column, form.getLocalContext().getSortOrder_Overall()));
				break;				
		}
	}
	
	populateOverallStagingToScreen(gridValues, false);
}
 
Example 13
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 4 votes
/**
 * WDEV-12569
 * 
 * Function used to sort the records in grid
 * @param column
 */
private void sortOverallRecords(DynamicGridColumn column)
{
	// Get grid values
	TumourGroupSiteOverallStagingVoCollection gridValues = populateOverallStagingFromScreen(false);
	
	if (column != null && column.getIdentifier() == null)
		throw new CodingRuntimeException("Logical error - All grid columns must have identifiers! Check grid initialization!");
	
	if (column != null)
	{
		switch ((Integer) column.getIdentifier())
		{
			case COL_T_VALUE:
				gridValues.sort(new OverallStagingComapartor(column, form.getLocalContext().getSortOrder_T()));
				break;

			case COL_N_VALUE:
				gridValues.sort(new OverallStagingComapartor(column, form.getLocalContext().getSortOrder_N()));
				break;

			case COL_M_VALUE:
				gridValues.sort(new OverallStagingComapartor(column, form.getLocalContext().getSortOrder_M()));
				break;

			case COL_HIST_TYPE:
				gridValues.sort(new OverallStagingComapartor(column, form.getLocalContext().getSortOrder_HisType()));
				break;

			case COL_HIST_GRADE:
				gridValues.sort(new OverallStagingComapartor(column, form.getLocalContext().getSortOrder_HisGrade()));
				break;

			case COL_SERUM:
				gridValues.sort(new OverallStagingComapartor(column, form.getLocalContext().getSortOrder_Serum()));
				break;

			case COL_OVER_45:
				gridValues.sort(new OverallStagingComapartor(column, form.getLocalContext().getSortOrder_O45()));
				break;

			case COL_OVERALL:
				gridValues.sort(new OverallStagingComapartor(column, form.getLocalContext().getSortOrder_Overall()));
				break;				
		}
	}
	
	populateOverallStagingToScreen(gridValues, false);
}
 
Example 14
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 4 votes
@Override
protected void onDyngrdPatientsColumnHeaderClicked(DynamicGridColumn column)
{
	DementialManualClassAssemblyVoCollection values = new DementialManualClassAssemblyVoCollection();
	for (int i=0;i<form.dyngrdPatients().getRows().size();i++)
	{
		values.add((DementialManualClassAssemblyVo) form.dyngrdPatients().getRows().get(i).getValue());
	}
	
	if (values==null || values.size()<=1)
		return;
	
	switch((Integer)column.getIdentifier())
	{
		case COL_CONSULTANT:
			form.getLocalContext().setConsultantSortOrder(SortOrder.ASCENDING.equals(form.getLocalContext().getConsultantSortOrder())? SortOrder.DESCENDING : SortOrder.ASCENDING);
			values.sort(new ConsultantComparator(form.getLocalContext().getConsultantSortOrder()));
		break;
			
		case COL_DOB:
			form.getLocalContext().setDOBSortOrder(SortOrder.ASCENDING.equals(form.getLocalContext().getDOBSortOrder())? SortOrder.DESCENDING : SortOrder.ASCENDING);
			values.sort(new DobComparator(form.getLocalContext().getDOBSortOrder()));
		break;
		
		case COL_HOURSTOBREACH:
			form.getLocalContext().setHoursToBreachSortOrder(SortOrder.ASCENDING.equals(form.getLocalContext().getHoursToBreachSortOrder())? SortOrder.DESCENDING : SortOrder.ASCENDING);
			values.sort(new HoursToBreachComparator(form.getLocalContext().getHoursToBreachSortOrder()));
		break;
		case COL_ICON:
			form.getLocalContext().setIconSortOrder(SortOrder.ASCENDING.equals(form.getLocalContext().getIconSortOrder())? SortOrder.DESCENDING : SortOrder.ASCENDING);
			values.sort(new IconComparator(form.getLocalContext().getIconSortOrder()));
		break;
		case COL_DISCHARGEDATE:
			form.getLocalContext().setDDSortOrder(SortOrder.ASCENDING.equals(form.getLocalContext().getDDSortOrder())? SortOrder.DESCENDING : SortOrder.ASCENDING);
			values.sort(new DischargeDateComparator(form.getLocalContext().getDDSortOrder()));
		break;
		
			
	}
		
	populateScreenFromData(values);
	
}