Java 类ims.core.vo.lookups.YesNoCollection 实例源码

项目:AvoinApotti    文件:Logic.java   
/**
 * WDEV-12907
 * Function used to populate Over45 field
 * @param required
 * @param isOver45 - value to be set; if it is <b>null</b> then it will default accordingly to patient age (Yes when age is over 45, No when age is at most 45)
 */
private void populateOver45(Boolean required, Boolean isOver45)
{
    YesNoCollection lookup = ims.core.vo.lookups.LookupHelper.getYesNo(this.domain.getLookupService());

    DynamicGridRow over45Row = form.lyrMain().tabTumourDetails().lyrPrognosticTNM().tabTNM().dynGrdPreTreatment().getRows().newRow();
    DynamicGridCell typeNameCell = over45Row.getCells().newCell(getColumn(COLTYPE_NAME), DynamicCellType.HTMLVIEW);
    typeNameCell.setBackColor(Color.Gray);
    typeNameCell.setOptions(DynamicGridCellOptions.READ_ONLY_DATA_CELL);
    typeNameCell.setValue("<b><p align=center>Over 45</p></b>");

    DynamicGridCell typeValueCell = over45Row.getCells().newCell(getColumn(COLTYPE_VALUE), DynamicCellType.ENUMERATION);
    for (int i = 0; i < lookup.size(); i++)
    {
        typeValueCell.getItems().newItem(lookup.get(i), lookup.get(i).getText());
    }

    if (Boolean.TRUE.equals(required))
    {
        if (isOver45 != null)
        {
            typeValueCell.setValue(Boolean.TRUE.equals(isOver45) ? YesNo.YES : YesNo.NO);
        }
        else
        {
            if (form.getGlobalContext().Core.getPatientShort().getAgeIsNotNull())
            {
                typeValueCell.setValue(form.getGlobalContext().Core.getPatientShort().getAge().intValue() >= 45 ? YesNo.YES : YesNo.NO);
            }
        }
    }

    typeValueCell.setAutoPostBack(true);
    typeValueCell.setIdentifier(OVER45);
}
项目:AvoinApotti    文件:Logic.java   
protected final void bindYesNoLookup(DynamicGridCell typeCell)
{
    YesNoCollection lookupCollection = ims.core.vo.lookups.LookupHelper.getYesNo(domain.getLookupService());
    for (int x = 0; x < lookupCollection.size(); x++)
    {
        typeCell.getItems().newItem(lookupCollection.get(x), lookupCollection.get(x).getText(), lookupCollection.get(x).getImage(), lookupCollection.get(x).getTextColor());
    }
}
项目:openMAXIMS    文件:Logic.java   
/**
 * WDEV-12907
 * Function used to populate Over45 field
 * @param required
 * @param isOver45 - value to be set; if it is <b>null</b> then it will default accordingly to patient age (Yes when age is over 45, No when age is at most 45)
 */
private void populateOver45(Boolean required, Boolean isOver45)
{
    YesNoCollection lookup = ims.core.vo.lookups.LookupHelper.getYesNo(this.domain.getLookupService());

    DynamicGridRow over45Row = form.lyrMain().tabTumourDetails().lyrPrognosticTNM().tabTNM().dynGrdPreTreatment().getRows().newRow();
    DynamicGridCell typeNameCell = over45Row.getCells().newCell(getColumn(COLTYPE_NAME), DynamicCellType.HTMLVIEW);
    typeNameCell.setBackColor(Color.Gray);
    typeNameCell.setOptions(DynamicGridCellOptions.READ_ONLY_DATA_CELL);
    typeNameCell.setValue("<b><p align=center>Over 45</p></b>");

    DynamicGridCell typeValueCell = over45Row.getCells().newCell(getColumn(COLTYPE_VALUE), DynamicCellType.ENUMERATION);
    for (int i = 0; i < lookup.size(); i++)
    {
        typeValueCell.getItems().newItem(lookup.get(i), lookup.get(i).getText());
    }

    if (Boolean.TRUE.equals(required))
    {
        if (isOver45 != null)
        {
            typeValueCell.setValue(Boolean.TRUE.equals(isOver45) ? YesNo.YES : YesNo.NO);
        }
        else
        {
            if (form.getGlobalContext().Core.getPatientShort().getAgeIsNotNull())
            {
                typeValueCell.setValue(form.getGlobalContext().Core.getPatientShort().getAge().intValue() >= 45 ? YesNo.YES : YesNo.NO);
            }
        }
    }

    typeValueCell.setAutoPostBack(true);
    typeValueCell.setIdentifier(OVER45);
}
项目:openMAXIMS    文件:Logic.java   
protected final void bindYesNoLookup(DynamicGridCell typeCell)
{
    YesNoCollection lookupCollection = ims.core.vo.lookups.LookupHelper.getYesNo(domain.getLookupService());
    for (int x = 0; x < lookupCollection.size(); x++)
    {
        typeCell.getItems().newItem(lookupCollection.get(x), lookupCollection.get(x).getText(), lookupCollection.get(x).getImage(), lookupCollection.get(x).getTextColor());
    }
}
项目:openMAXIMS    文件:Logic.java   
protected final void bindYesNoLookup(DynamicGridCell typeCell)
{
    YesNoCollection lookupCollection = ims.core.vo.lookups.LookupHelper.getYesNo(domain.getLookupService());
    for (int x = 0; x < lookupCollection.size(); x++)
    {
        typeCell.getItems().newItem(lookupCollection.get(x), lookupCollection.get(x).getText(), lookupCollection.get(x).getImage(), lookupCollection.get(x).getTextColor());
    }
}
项目:openMAXIMS    文件:Logic.java   
/**
 * WDEV-12907
 * Function used to populate Over45 field
 * @param required
 * @param isOver45 - value to be set; if it is <b>null</b> then it will default accordingly to patient age (Yes when age is over 45, No when age is at most 45)
 */
private void populateOver45(Boolean required, Boolean isOver45)
{
    YesNoCollection lookup = ims.core.vo.lookups.LookupHelper.getYesNo(this.domain.getLookupService());

    DynamicGridRow over45Row = form.lyrMain().tabTumourDetails().lyrPrognosticTNM().tabTNM().dynGrdPreTreatment().getRows().newRow();
    DynamicGridCell typeNameCell = over45Row.getCells().newCell(getColumn(COLTYPE_NAME), DynamicCellType.HTMLVIEW);
    typeNameCell.setBackColor(Color.Gray);
    typeNameCell.setOptions(DynamicGridCellOptions.READ_ONLY_DATA_CELL);
    typeNameCell.setValue("<b><p align=center>Over 45</p></b>");

    DynamicGridCell typeValueCell = over45Row.getCells().newCell(getColumn(COLTYPE_VALUE), DynamicCellType.ENUMERATION);
    for (int i = 0; i < lookup.size(); i++)
    {
        typeValueCell.getItems().newItem(lookup.get(i), lookup.get(i).getText());
    }

    if (Boolean.TRUE.equals(required))
    {
        if (isOver45 != null)
        {
            typeValueCell.setValue(Boolean.TRUE.equals(isOver45) ? YesNo.YES : YesNo.NO);
        }
        else
        {
            if (form.getGlobalContext().Core.getPatientShort().getAgeIsNotNull())
            {
                typeValueCell.setValue(form.getGlobalContext().Core.getPatientShort().getAge().intValue() >= 45 ? YesNo.YES : YesNo.NO);
            }
        }
    }

    typeValueCell.setAutoPostBack(true);
    typeValueCell.setIdentifier(OVER45);
}
项目:openMAXIMS    文件:Logic.java   
protected final void bindYesNoLookup(DynamicGridCell typeCell)
{
    YesNoCollection lookupCollection = ims.core.vo.lookups.LookupHelper.getYesNo(domain.getLookupService());
    for (int x = 0; x < lookupCollection.size(); x++)
    {
        typeCell.getItems().newItem(lookupCollection.get(x), lookupCollection.get(x).getText(), lookupCollection.get(x).getImage(), lookupCollection.get(x).getTextColor());
    }
}
项目:openmaxims-linux    文件:Logic.java   
/**
 * WDEV-12907
 * Function used to populate Over45 field
 * @param required
 * @param isOver45 - value to be set; if it is <b>null</b> then it will default accordingly to patient age (Yes when age is over 45, No when age is at most 45)
 */
private void populateOver45(Boolean required, Boolean isOver45)
{
    YesNoCollection lookup = ims.core.vo.lookups.LookupHelper.getYesNo(this.domain.getLookupService());

    DynamicGridRow over45Row = form.lyrMain().tabTumourDetails().lyrPrognosticTNM().tabTNM().dynGrdPreTreatment().getRows().newRow();
    DynamicGridCell typeNameCell = over45Row.getCells().newCell(getColumn(COLTYPE_NAME), DynamicCellType.HTMLVIEW);
    typeNameCell.setBackColor(Color.Gray);
    typeNameCell.setOptions(DynamicGridCellOptions.READ_ONLY_DATA_CELL);
    typeNameCell.setValue("<b><p align=center>Over 45</p></b>");

    DynamicGridCell typeValueCell = over45Row.getCells().newCell(getColumn(COLTYPE_VALUE), DynamicCellType.ENUMERATION);
    for (int i = 0; i < lookup.size(); i++)
    {
        typeValueCell.getItems().newItem(lookup.get(i), lookup.get(i).getText());
    }

    if (Boolean.TRUE.equals(required))
    {
        if (isOver45 != null)
        {
            typeValueCell.setValue(Boolean.TRUE.equals(isOver45) ? YesNo.YES : YesNo.NO);
        }
        else
        {
            if (form.getGlobalContext().Core.getPatientShort().getAgeIsNotNull())
            {
                typeValueCell.setValue(form.getGlobalContext().Core.getPatientShort().getAge().intValue() >= 45 ? YesNo.YES : YesNo.NO);
            }
        }
    }

    typeValueCell.setAutoPostBack(true);
    typeValueCell.setIdentifier(OVER45);
}
项目:openmaxims-linux    文件:Logic.java   
protected final void bindYesNoLookup(DynamicGridCell typeCell)
{
    YesNoCollection lookupCollection = ims.core.vo.lookups.LookupHelper.getYesNo(domain.getLookupService());
    for (int x = 0; x < lookupCollection.size(); x++)
    {
        typeCell.getItems().newItem(lookupCollection.get(x), lookupCollection.get(x).getText(), lookupCollection.get(x).getImage(), lookupCollection.get(x).getTextColor());
    }
}