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

The following are Jave code examples for showing how to use setDynamicWidthSupported() 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 formatMCategoryGrid() 
{
	form.lyrDetails().tabTNM().dyngrdMCategory().clear();
	form.lyrDetails().tabTNM().dyngrdMCategory().setSelectable(true);
	
	DynamicGridColumn column = form.lyrDetails().tabTNM().dyngrdMCategory().getColumns().newColumn("M Category Extended");
	column.setIdentifier(COL_HISTOLOGY);
	column.setWidth(form.getMode().equals(FormMode.EDIT) ? COL_HIST_WIDTH : -1);
	column.setDynamicWidthSupported(false);

	if (form.getMode().equals(FormMode.EDIT))
	{
		column = form.lyrDetails().tabTNM().dyngrdMCategory().getColumns().newColumn("Select");
		column.setIdentifier(COL_SELECT);
		column.setWidth(-1);
		column.setDynamicWidthSupported(true);
	}
}
 
Example 2
Project: AvoinApotti   File: ResultDisplayHelper.java   View Source Code Vote up 6 votes
private void addCommentsToResult(DynamicGridRow row, ResultComponentCommentsVoCollection resultComments)
{
	if (resultComments == null)
		return;
	for (int i = 0 ; i < resultComments.size() ; i++)
	{
		DynamicGridRow newRow = row.getRows().newRow();
		DynamicGridColumn colTest = grid.getColumns().getByIdentifier(ResultDisplayHelper.COL_TEST);
		DynamicGridCell cell = newRow.getCells().newCell(colTest,DynamicCellType.WRAPTEXT);
		cell.setReadOnly(true);//WDEV-16232
		cell.setValue(resultComments.get(i).getCmtText());
		colTest.setCanGrow(true);
		colTest.setDynamicWidthSupported(true);
		cell.setWidth(700);
	}
	
}
 
Example 3
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 6 votes
private void formatHistologyGrid()
{
	form.lyrDetails().tabTumDetails().dyngrdHistology().clear();
	form.lyrDetails().tabTumDetails().dyngrdHistology().setSelectable(true);
	
	DynamicGridColumn column = form.lyrDetails().tabTumDetails().dyngrdHistology().getColumns().newColumn("Histology");
	column.setIdentifier(COL_HISTOLOGY);
	column.setWidth(form.getMode().equals(FormMode.EDIT) ? COL_HIST_WIDTH : -1);
	column.setDynamicWidthSupported(false);

	if (form.getMode().equals(FormMode.EDIT))
	{
		column = form.lyrDetails().tabTumDetails().dyngrdHistology().getColumns().newColumn("Select");
		column.setIdentifier(COL_SELECT);
		column.setWidth(-1);
		column.setDynamicWidthSupported(true);
	}
}
 
Example 4
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 6 votes
private void initDynGrid()
{
	DynamicGridColumn newColumn = form.dyngrdTTA().getColumns().newColumn("TTA Record/MedicationName", NAME_IDENTIFIER);
	newColumn.setCanGrow(true);
	newColumn.setWidth(NAME_WIDTH);
	newColumn = form.dyngrdTTA().getColumns().newColumn("Form", FORM_IDENTIFIER);
	newColumn.setWidth(FORM_WIDTH);
	newColumn = form.dyngrdTTA().getColumns().newColumn("Route", ROUTE_IDENTIFIER);
	newColumn.setWidth(ROUTE_WIDTH);
	newColumn = form.dyngrdTTA().getColumns().newColumn("Dose", DOSE_IDENTIFIER);
	newColumn.setWidth(DOSE_WIDTH);
	newColumn = form.dyngrdTTA().getColumns().newColumn("Frequency", FREQUENCY_IDENTIFIER);
	newColumn.setWidth(FREQUENCY_WIDTH);
	newColumn = form.dyngrdTTA().getColumns().newColumn("Select", SELECT_IDENTIFIER);
	newColumn.setWidth(SELECT_WIDTH);
	newColumn.setDynamicWidthSupported(true);
}
 
Example 5
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 6 votes
private void addQuestionLegend(AssessmentQuestionVo question, DynamicGridRow groupRow)
{
	DynamicGridColumn questionColumn = this.grid.getColumns().getByIdentifier(QUESTION_COLUMN);
	DynamicGridRow row;

	if (groupRow != null)
		row = groupRow.getRows().newRow();
	else
		row = this.grid.getRows().newRow();

	row.setSelectable(false);

	questionColumn.setDynamicWidthSupported(true);

	DynamicGridCell questionCell = row.getCells().newCell(questionColumn, DynamicCellType.HTMLVIEW);
	questionCell.setValue(question.getLegendText());
	questionCell.setWidth(DEFAULT_LEGEND_CELL_WIDTH);
	questionCell.setReadOnly(true);

}
 
Example 6
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 6 votes
private void addQuestionLegend(Assessment_QuestionVo question, DynamicGridRow groupRow)
{
	DynamicGridColumn questionColumn = this.grid.getColumns().getByIdentifier(QUESTION_COLUMN);
	DynamicGridRow row;

	if (groupRow != null)
		row = groupRow.getRows().newRow();
	else
		row = this.grid.getRows().newRow();

	row.setSelectable(false);

	questionColumn.setDynamicWidthSupported(true);

	DynamicGridCell questionCell = row.getCells().newCell(questionColumn, DynamicCellType.HTMLVIEW);
	questionCell.setValue(question.getLegendText());
	questionCell.setWidth(DEFAULT_LEGEND_CELL_WIDTH);
	questionCell.setReadOnly(true);

}
 
Example 7
Project: AvoinApotti   File: UserAssessmentInstHelper.java   View Source Code Vote up 6 votes
private void addGraphicQuestionLegend(String legendText)
{
	if (legendText == null)
		return;
	//Get the question column
	DynamicGridColumn qColumn = this.grid.getColumns().getByIdentifier(QUESTION_COLUMN);
	qColumn.setDynamicWidthSupported(true);
	//Create the new row
	DynamicGridRow newRow = this.grid.getRows().newRow();
	newRow.setIdentifier(NON_DATA_ROW);
	
	//Create the cell in column Question
	DynamicGridCell newCell = newRow.getCells().newCell(qColumn,DynamicCellType.HTMLVIEW);
	newCell.setWidth(DEFAULT_LEGEND_CELL_WIDTH);
	newCell.setValue(legendText);
	
}
 
Example 8
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 6 votes
private void formatPracticesSurgeryGrid()
{
	form.ctnGPDetails().lyrGPDetails().tabPractices().dyngrdPractices().clear();
	form.ctnGPDetails().lyrGPDetails().tabPractices().dyngrdPractices().setSelectable(true);
	
	DynamicGridColumn column = form.ctnGPDetails().lyrGPDetails().tabPractices().dyngrdPractices().getColumns().newColumn("Name");
	column.setIdentifier(COL_PRACTICENAME);
	column.setWidth(300);
	column.setDynamicWidthSupported(true);

	column = form.ctnGPDetails().lyrGPDetails().tabPractices().dyngrdPractices().getColumns().newColumn("PAS Code");
	column.setIdentifier(COL_PASCODE);
	column.setWidth(60);
	column.setDynamicWidthSupported(true);
	
	column = form.ctnGPDetails().lyrGPDetails().tabPractices().dyngrdPractices().getColumns().newColumn("Primary");
	column.setIdentifier(COL_PRIMARY);
	column.setWidth(60);
	column.setDynamicWidthSupported(true);
	
	column = form.ctnGPDetails().lyrGPDetails().tabPractices().dyngrdPractices().getColumns().newColumn("Address");
	column.setIdentifier(COL_ADDRESS);
	column.setWidth(-1);
	column.setDynamicWidthSupported(true);
}
 
Example 9
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
private void formatMedicationAndDosesGrids() 
{
	form.ctnDetails().dyngrdDoses().clear();
	
	form.ctnDetails().dyngrdDoses().setSelectable(true);
	
	DynamicGridColumn column = form.ctnDetails().dyngrdDoses().getColumns().newColumn("Dose");
	column.setIdentifier(COL_DOSE_DOSE);
	column.setWidth(120);
	column.setDynamicWidthSupported(true);

	column = form.ctnDetails().dyngrdDoses().getColumns().newColumn("Route");
	column.setIdentifier(COL_DOSE_ROUTE);
	column.setWidth(120);
	column.setDynamicWidthSupported(true);

	column = form.ctnDetails().dyngrdDoses().getColumns().newColumn("Times");
	column.setIdentifier(COL_DOSE_TIMES);
	column.setWidth(140);
	column.setDynamicWidthSupported(true);

	column = form.ctnDetails().dyngrdDoses().getColumns().newColumn("Commenced By Type");
	column.setIdentifier(COL_DOSE_COMMENCED_BY_TYPE);
	column.setWidth(140);

	column = form.ctnDetails().dyngrdDoses().getColumns().newColumn("Commenced By (HCP)");
	column.setIdentifier(COL_DOSE_COMMENCED_BY);
	column.setWidth(160);
	column.setDynamicWidthSupported(true);

	column = form.ctnDetails().dyngrdDoses().getColumns().newColumn("Date");
	column.setIdentifier(COL_DOSE_COMMENCED_DATE);
	column.setWidth(-1);
	column.setDynamicWidthSupported(true);
	
}
 
Example 10
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
private void initializeDynamicGrid()
	{
		form.dyngrdDoses().clear();
		
		form.dyngrdDoses().setSelectable(true);
		
		DynamicGridColumn column = form.dyngrdDoses().getColumns().newColumn("Dose");
		column.setIdentifier(COL_DOSE_DOSENAME);
		column.setWidth(120);
		column.setDynamicWidthSupported(true);
		
		column = form.dyngrdDoses().getColumns().newColumn("Route");
		column.setIdentifier(COL_DOSE_ROUTE);
		column.setWidth(120);
		column.setDynamicWidthSupported(true);
		
//		column = form.dyngrdDoses().getColumns().newColumn("Times");
//		column.setIdentifier(COL_DOSE_TIMES);
//		column.setWidth(120);
//		column.setDynamicWidthSupported(true);
		
//		column = form.dyngrdDoses().getColumns().newColumn("Commenced By Type");
//		column.setIdentifier(COL_DOSE_COMMENCED_BY_TYPE);
//		column.setWidth(120);
//		
		column = form.dyngrdDoses().getColumns().newColumn("Commenced By (HCP)");
		column.setIdentifier(COL_DOSE_COMMENCED_BY);
		column.setWidth(200);
		column.setDynamicWidthSupported(true);
		
		column = form.dyngrdDoses().getColumns().newColumn("Date");
		column.setIdentifier(COL_DOSE_COMMENCED_DATE);
		column.setWidth(-1);
		column.setDynamicWidthSupported(true);
	}
 
Example 11
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
private void createDynamicGridColumns()
{
	DynamicGridColumn col = form.dyngrdChart().getColumns().newColumn("Chart type", COL_NAME);
	col.setDynamicWidthSupported(true);
	col = form.dyngrdChart().getColumns().newColumn("  ", COL_ANSWERBOX);
	col.setWidth(25);
	col = form.dyngrdChart().getColumns().newColumn("", COL_LINETYPE);
	col.setWidth(200);
	col = form.dyngrdChart().getColumns().newColumn("", COL_COLOR_ICON);
	col.setWidth(-1);
	
}
 
Example 12
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
private void addGroupLegend(AssessmentQuestionGroupVo group)
{
	DynamicGridColumn questionColumn = this.grid.getColumns().getByIdentifier(QUESTION_COLUMN);
	DynamicGridRow row = this.grid.getRows().newRow();
	row.setSelectable(false);
	questionColumn.setDynamicWidthSupported(true);

	DynamicGridCell questionCell = row.getCells().newCell(questionColumn, DynamicCellType.HTMLVIEW);
	questionCell.setValue(group.getLegendText());
	questionCell.setWidth(DEFAULT_LEGEND_CELL_WIDTH);
	questionCell.setReadOnly(true);

}
 
Example 13
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
private void applyDefaultsToSpecimenAlreadyCollectedGrid(Date date, Time time)
{
	DynamicGrid dynGridSpecimenAlreadyColl = form.lyrDetails().tabPathDetails().lyrPathology().tabSpecAlreadyCollected().dyngrdSpecAlreadyCollected();

	for (int i = 0; i < dynGridSpecimenAlreadyColl.getRows().size(); i++)
	{
		DynamicGridColumn colDate = dynGridSpecimenAlreadyColl.getColumns().getByIdentifier(DYN_COLDATE);
		colDate.setDynamicWidthSupported(true);
		colDate.setWidth(0);

		DynamicGridColumn colTime = dynGridSpecimenAlreadyColl.getColumns().getByIdentifier(DYN_COLTIME);
		colTime.setDynamicWidthSupported(true);
		colTime.setWidth(0);

		for (int childRowIndex = 0; childRowIndex < dynGridSpecimenAlreadyColl.getRows().get(i).getRows().size(); childRowIndex++)
		{
			DynamicGridRow cRow = dynGridSpecimenAlreadyColl.getRows().get(i).getRows().get(childRowIndex);
			DynamicGridCell cellDate = cRow.getCells().get(colDate);
			if (cellDate != null)
				cellDate.setValue(date);

			DynamicGridCell cellTime = cRow.getCells().get(colTime);
			if (cellTime != null)
				cellTime.setValue(time);
		}

		for (int p = 0; p < dynGridSpecimenAlreadyColl.getRows().get(i).getRows().size(); p++)
			dynGridSpecimenAlreadyColl.getRows().get(i).getRows().get(p).getCells().get(dynGridSpecimenAlreadyColl.getColumns().getByIdentifier(QTY_COLUMN)).setWidth(90);
	}
}
 
Example 14
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
private DynamicGridColumn createColumn(String text, Integer identifier)
{
	DynamicGridColumn column = this.grid.getColumns().newColumn(text, identifier);
	column.setDynamicWidthSupported(false);
	column.setCanGrow(false);
	column.setWidth(50);
	column.setAlignment(Alignment.CENTER);
	return column;
}
 
Example 15
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
private void addGroupLegend(Assessment_QuestionGroupVo group)
{
	DynamicGridColumn questionColumn = this.grid.getColumns().getByIdentifier(QUESTION_COLUMN);
	DynamicGridRow row = this.grid.getRows().newRow();
	row.setSelectable(false);
	questionColumn.setDynamicWidthSupported(true);

	DynamicGridCell questionCell = row.getCells().newCell(questionColumn, DynamicCellType.HTMLVIEW);
	questionCell.setValue(group.getLegendText());
	questionCell.setWidth(DEFAULT_LEGEND_CELL_WIDTH);
	questionCell.setReadOnly(true);

}
 
Example 16
Project: AvoinApotti   File: UserAssessmentInstHelper.java   View Source Code Vote up 5 votes
private DynamicGridColumn createAnswerColumn(int answerIndex) 
{
	DynamicGridColumn column = this.grid.getColumns().newColumn("");
	column.setDynamicWidthSupported(isDPP?false:true);
	column.setIdentifier(new Integer(answerIndex));
	column.setWidth(isDPP?DEFAULT_MULTISELECT_ANSWER_CELL_WIDTH + 190 : 100);				
	return column;
}
 
Example 17
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 4 votes
private void formatProceduresGrid()
{
	form.dyngrdProcedure().clear();

	form.dyngrdProcedure().setSelectable(true);

	DynamicGridColumn column = form.dyngrdProcedure().getColumns().newColumn("Procedure Description");
	column.setIdentifier(COL_PROC_DESC);
	column.setWidth(250);
	column.setDynamicWidthSupported(true);

	column = form.dyngrdProcedure().getColumns().newColumn("Complication");
	column.setIdentifier(COL_COMPLICATION_0WIDTH);
	column.setWidth(0);
	column.setDynamicWidthSupported(true);

	column = form.dyngrdProcedure().getColumns().newColumn("Site");
	column.setIdentifier(COL_SITE);
	column.setWidth(70);
	column.setDynamicWidthSupported(true);

	column = form.dyngrdProcedure().getColumns().newColumn("PMH");
	column.setIdentifier(COL_PMH);
	column.setWidth(40);
	column.setDynamicWidthSupported(true);

	column = form.dyngrdProcedure().getColumns().newColumn("Status(Outcome)");
	column.setIdentifier(COL_STATUS);
	column.setWidth(100);

	column = form.dyngrdProcedure().getColumns().newColumn("Associations");
	column.setIdentifier(COL_ASSOCS);
	column.setWidth(75);
	column.setAlignment(Alignment.CENTER);
	// column.setDynamicWidthSupported(true);

	column = form.dyngrdProcedure().getColumns().newColumn("Date Performed");
	column.setIdentifier(COL_DATE_PERF_0WIDTH);
	column.setWidth(0);
	column.setDynamicWidthSupported(true);

	column = form.dyngrdProcedure().getColumns().newColumn("Authoring HCP");
	column.setIdentifier(COL_AUTH_HCP);
	column.setWidth(150);
	column.setDynamicWidthSupported(true);

	column = form.dyngrdProcedure().getColumns().newColumn("Authoring Date");
	column.setIdentifier(COL_AUTH_DATE);
	column.setWidth(95);
	column.setDynamicWidthSupported(true);

	column = form.dyngrdProcedure().getColumns().newColumn("");
	column.setIdentifier(COL_AUDIT);
	column.setWidth(-1);
	column.setAlignment(Alignment.CENTER);
	column.setDynamicWidthSupported(true);
}
 
Example 18
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 4 votes
/**
 * Function used to configure Patient ICP dynamic grid
 */
protected void initializePatientICPDynamicGrid()
{
	// Clear dynamic grid (rows & columns)
	form.dyngrdICP().clear();
	
	// Create columns
	DynamicGridColumn column = form.dyngrdICP().getColumns().newColumn("");
	column.setIdentifier(COL_PRESENTATION);
	column.setWidth(300);
	column.setCanGrow(false);
	column.setDynamicWidthSupported(true);
	
	column = form.dyngrdICP().getColumns().newColumn("");
	column.setIdentifier(COL_CONTER_SIGNATURE);
	column.setWidth(25);
	column.setDynamicWidthSupported(true);
	column.setCanGrow(false);
	column.setHeaderAlignment(Alignment.CENTER);
	column.setAlignment(Alignment.CENTER);
	
	column = form.dyngrdICP().getColumns().newColumn("Status");
	column.setIdentifier(COL_STATUS);
	column.setWidth(40);
	column.setDynamicWidthSupported(true);
	column.setCanGrow(false);
	column.setHeaderAlignment(Alignment.CENTER);
	column.setAlignment(Alignment.CENTER);
	
	column = form.dyngrdICP().getColumns().newColumn("");
	column.setIdentifier(COL_ACTION_DETAILS);
	column.setWidth(25);
	column.setDynamicWidthSupported(true);
	column.setCanGrow(false);
	column.setHeaderAlignment(Alignment.CENTER);
	column.setAlignment(Alignment.CENTER);
	
	column = form.dyngrdICP().getColumns().newColumn("");
	column.setIdentifier(COL_HELP);
	column.setWidth(25);
	column.setDynamicWidthSupported(true);
	column.setCanGrow(false);
	column.setHeaderAlignment(Alignment.CENTER);
	column.setAlignment(Alignment.CENTER);
}
 
Example 19
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 3 votes
private void initialiseDynamicGrids()
{
	form.dyngrdSecs().clear();
	
	DynamicGridColumn col1 = form.dyngrdSecs().getColumns().newColumn("Parameter", DYN_COLPARAMETER);
	col1.setWidth(150);
	col1.setDynamicWidthSupported(true);
	
	DynamicGridColumn col2 = form.dyngrdSecs().getColumns().newColumn("", DYN_COLCONFIGTYPE);
	col2.setWidth(0);
	col2.setDynamicWidthSupported(true);

	DynamicGridColumn col3 = form.dyngrdSecs().getColumns().newColumn("", DYN_COLVALUES);
	col3.setWidth(-1);
	col3.setDynamicWidthSupported(true);
	
	
	form.lyrDetail().tabRange().dyngrdRangeScore().clear();
	
	DynamicGridColumn colRange1 = form.lyrDetail().tabRange().dyngrdRangeScore().getColumns().newColumn("Greater Than", DYN_COLGREATERTHAN);
	colRange1.setWidth(100);
	
	DynamicGridColumn colRange2 = form.lyrDetail().tabRange().dyngrdRangeScore().getColumns().newColumn("Less Than", DYN_COLLESSTHAN);
	colRange2.setWidth(100);
	
	DynamicGridColumn colRange3 = form.lyrDetail().tabRange().dyngrdRangeScore().getColumns().newColumn("Score", DYN_COLSCORE);
	colRange3.setWidth(100);
	
	DynamicGridColumn colRange4 = form.lyrDetail().tabRange().dyngrdRangeScore().getColumns().newColumn("Warning", DYN_COLWARNING);
	colRange4.setWidth(-1);
	

}
 
Example 20
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 3 votes
private void initTree(ims.vo.LookupTypeVo lookup)
{
	if (lookup == null)
		throw new CodingRuntimeException("No lookup type provided");
	
	form.dyngrdLookup().clear();
	
	DynamicGridColumn nCol = null;
	if (!isSingleSelect())
	{
		nCol = form.dyngrdLookup().getColumns().newColumn("",COL_SELECT);
		nCol.setWidth(lookup.isHierarchical()?SELECT_WIDTH_N:SELECT_WIDTH_N);
	}
	
	nCol = form.dyngrdLookup().getColumns().newColumn("",COL_TXT);
	nCol.setWidth(TXT_WIDTH);
	nCol.setDynamicWidthSupported(true);
	
	form.dyngrdLookup().setHeaderHeight(0);
	

	
	LookupInstanceCollection lookupCollection = domain.getLookupService().getLookupCollection(lookup.getId(), ClassHelper.getLookupCollectionClass(lookup.getId()),ClassHelper.getLookupClass(lookup.getId()),true, true);


	if (lookup.isHierarchical())
		populateRecursive(lookupCollection.getRoots(),null,2);
	else
		populateLinear(lookupCollection);
	
}