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

项目:AvoinApotti    文件:Logic.java   
private void processCellPostback(DynamicGridCell cell)
{
    if(cell.getColumn().equals(form.dyngrdLinkedDataSets().getColumns().getByIdentifier(COL_ANSWERBOX)))
    {
        if(cell.getValue() == null)
            cell.setValue(LineTypeStatus.DEFAULT);

        if(cell.getValue().equals(LineTypeStatus.CUSTOM))
        {
            createVariableCells(cell.getRow(), false);
        }
        else if(cell.getValue().equals(LineTypeStatus.DEFAULT))
        {
            createVariableCells(cell.getRow(), true);
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void processCellPostback(DynamicGridCell cell)
{
    if(cell.getColumn().equals(form.dyngrdLinkedDataSets().getColumns().getByIdentifier(COL_ANSWERBOX)))
    {
        if(cell.getValue() == null)
            cell.setValue(LineTypeStatus.DEFAULT);

        if(cell.getValue().equals(LineTypeStatus.CUSTOM))
        {
            createVariableCells(cell.getRow(), false);
        }
        else if(cell.getValue().equals(LineTypeStatus.DEFAULT))
        {
            createVariableCells(cell.getRow(), true);
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void processCellPostback(DynamicGridCell cell)
{
    if(cell.getColumn().equals(form.dyngrdLinkedDataSets().getColumns().getByIdentifier(COL_ANSWERBOX)))
    {
        if(cell.getValue() == null)
            cell.setValue(LineTypeStatus.DEFAULT);

        if(cell.getValue().equals(LineTypeStatus.CUSTOM))
        {
            createVariableCells(cell.getRow(), false);
        }
        else if(cell.getValue().equals(LineTypeStatus.DEFAULT))
        {
            createVariableCells(cell.getRow(), true);
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void processCellPostback(DynamicGridCell cell)
{
    if(cell.getColumn().equals(form.dyngrdLinkedDataSets().getColumns().getByIdentifier(COL_ANSWERBOX)))
    {
        if(cell.getValue() == null)
            cell.setValue(LineTypeStatus.DEFAULT);

        if(cell.getValue().equals(LineTypeStatus.CUSTOM))
        {
            createVariableCells(cell.getRow(), false);
        }
        else if(cell.getValue().equals(LineTypeStatus.DEFAULT))
        {
            createVariableCells(cell.getRow(), true);
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private boolean checkDatasets()
{
    if(form.dyngrdLinkedDataSets().getRows().size() == 0)
    {
        engine.showMessage("Please add at least a dataset !");
        return false;
    }

    for (int i = 0; i < form.dyngrdLinkedDataSets().getRows().size(); i++)
    {
        DynamicGridRow row = form.dyngrdLinkedDataSets().getRows().get(i);

        if(row.getCells().get(form.dyngrdLinkedDataSets().getColumns().getByIdentifier(COL_ANSWERBOX)).getValue().equals(LineTypeStatus.CUSTOM))
        {
            if(row.getCells().get(form.dyngrdLinkedDataSets().getColumns().getByIdentifier(COL_LINETYPE)).getValue() == null)
            {
                engine.showMessage("Please set a line type for dataset " + ((DataSetTypeVo)row.getValue()).getName() + " !");
                return false;
            }
            if(row.getCells().get(form.dyngrdLinkedDataSets().getColumns().getByIdentifier(COL_COLOR_ICON)).getValue() == null)
            {
                engine.showMessage("Please set a Colour / Icon for dataset " + ((DataSetTypeVo)row.getValue()).getName() + " !");
                return false;
            }
        }
    }

    return true;
}
项目:AvoinApotti    文件:Logic.java   
private ChartTypeVo populateDataFromScreenLocal()
{
    ChartTypeVo record = populateDataFromScreen(form.getLocalContext().getCurrentRecord());

    record.setNormalBandColour(form.cmbNormalColour().getValue());

    if(record.getDatasetTypes() == null)
        record.setDatasetTypes(new ChartTypeDatasetVoCollection());
    else
        record.getDatasetTypes().clear();

    int order = 1;  //WDEV-12548

    for (int i = 0; i < form.dyngrdLinkedDataSets().getRows().size(); i++)
    {
        DynamicGridRow row = form.dyngrdLinkedDataSets().getRows().get(i);

        ChartTypeDatasetVo item = new ChartTypeDatasetVo();
        item.setDatasetType((DataSetTypeVo)row.getValue());

        if(row.getCells().get(form.dyngrdLinkedDataSets().getColumns().getByIdentifier(COL_ANSWERBOX)).getValue().equals(LineTypeStatus.CUSTOM))
        {
            item.setLineType((LineType) row.getCells().get(form.dyngrdLinkedDataSets().getColumns().getByIdentifier(COL_LINETYPE)).getValue());
            item.setLineColourPointIcon((LineColourPointIcon) row.getCells().get(form.dyngrdLinkedDataSets().getColumns().getByIdentifier(COL_COLOR_ICON)).getValue());
        }

        item.setSortOrder(Integer.valueOf(order++)); //WDEV-12548

        record.getDatasetTypes().add(item);
    }

    return record;
}
项目:AvoinApotti    文件:Logic.java   
private void addDataSetTypesToGrid(DataSetTypeVoCollection dataSetTypeItems)
{
    for (int i = 0; i < dataSetTypeItems.size(); i++)
    {
        DataSetTypeVo item = dataSetTypeItems.get(i);

        if(recordAlreadySelected(item) == false)
        {
            DynamicGridRow row = form.dyngrdLinkedDataSets().getRows().newRow();

            DynamicGridCell cell = row.getCells().newCell(form.dyngrdLinkedDataSets().getColumns().getByIdentifier(COL_DATASET_TYPE), DynamicCellType.STRING);
            cell.setValue(item.getName());
            // WDEV-16684 
            cell.setReadOnly(Boolean.TRUE);

            cell = row.getCells().newCell(form.dyngrdLinkedDataSets().getColumns().getByIdentifier(COL_ANSWERBOX), DynamicCellType.ANSWER);
            cell.getItems().newItem(LineTypeStatus.DEFAULT, LineTypeStatus.DEFAULT.getImage());
            cell.getItems().newItem(LineTypeStatus.CUSTOM, LineTypeStatus.CUSTOM.getImage());
            cell.setValue(LineTypeStatus.DEFAULT);
            cell.setAutoPostBack(true);

            row.setValue(item);

            createVariableCells(row, true);
        }
    }

}
项目:openMAXIMS    文件:Logic.java   
private boolean checkDatasets()
{
    if(form.dyngrdLinkedDataSets().getRows().size() == 0)
    {
        engine.showMessage("Please add at least a dataset !");
        return false;
    }

    for (int i = 0; i < form.dyngrdLinkedDataSets().getRows().size(); i++)
    {
        DynamicGridRow row = form.dyngrdLinkedDataSets().getRows().get(i);

        if(row.getCells().get(form.dyngrdLinkedDataSets().getColumns().getByIdentifier(COL_ANSWERBOX)).getValue().equals(LineTypeStatus.CUSTOM))
        {
            if(row.getCells().get(form.dyngrdLinkedDataSets().getColumns().getByIdentifier(COL_LINETYPE)).getValue() == null)
            {
                engine.showMessage("Please set a line type for dataset " + ((DataSetTypeVo)row.getValue()).getName() + " !");
                return false;
            }
            if(row.getCells().get(form.dyngrdLinkedDataSets().getColumns().getByIdentifier(COL_COLOR_ICON)).getValue() == null)
            {
                engine.showMessage("Please set a Colour / Icon for dataset " + ((DataSetTypeVo)row.getValue()).getName() + " !");
                return false;
            }
        }
    }

    return true;
}
项目:openMAXIMS    文件:Logic.java   
private ChartTypeVo populateDataFromScreenLocal()
{
    ChartTypeVo record = populateDataFromScreen(form.getLocalContext().getCurrentRecord());

    record.setNormalBandColour(form.cmbNormalColour().getValue());

    if(record.getDatasetTypes() == null)
        record.setDatasetTypes(new ChartTypeDatasetVoCollection());
    else
        record.getDatasetTypes().clear();

    int order = 1;  //WDEV-12548

    for (int i = 0; i < form.dyngrdLinkedDataSets().getRows().size(); i++)
    {
        DynamicGridRow row = form.dyngrdLinkedDataSets().getRows().get(i);

        ChartTypeDatasetVo item = new ChartTypeDatasetVo();
        item.setDatasetType((DataSetTypeVo)row.getValue());

        if(row.getCells().get(form.dyngrdLinkedDataSets().getColumns().getByIdentifier(COL_ANSWERBOX)).getValue().equals(LineTypeStatus.CUSTOM))
        {
            item.setLineType((LineType) row.getCells().get(form.dyngrdLinkedDataSets().getColumns().getByIdentifier(COL_LINETYPE)).getValue());
            item.setLineColourPointIcon((LineColourPointIcon) row.getCells().get(form.dyngrdLinkedDataSets().getColumns().getByIdentifier(COL_COLOR_ICON)).getValue());
        }

        item.setSortOrder(Integer.valueOf(order++)); //WDEV-12548

        record.getDatasetTypes().add(item);
    }

    return record;
}
项目:openMAXIMS    文件:Logic.java   
private void addDataSetTypesToGrid(DataSetTypeVoCollection dataSetTypeItems)
{
    for (int i = 0; i < dataSetTypeItems.size(); i++)
    {
        DataSetTypeVo item = dataSetTypeItems.get(i);

        if(recordAlreadySelected(item) == false)
        {
            DynamicGridRow row = form.dyngrdLinkedDataSets().getRows().newRow();

            DynamicGridCell cell = row.getCells().newCell(form.dyngrdLinkedDataSets().getColumns().getByIdentifier(COL_DATASET_TYPE), DynamicCellType.STRING);
            cell.setValue(item.getName());
            // WDEV-16684 
            cell.setReadOnly(Boolean.TRUE);

            cell = row.getCells().newCell(form.dyngrdLinkedDataSets().getColumns().getByIdentifier(COL_ANSWERBOX), DynamicCellType.ANSWER);
            cell.getItems().newItem(LineTypeStatus.DEFAULT, LineTypeStatus.DEFAULT.getImage());
            cell.getItems().newItem(LineTypeStatus.CUSTOM, LineTypeStatus.CUSTOM.getImage());
            cell.setValue(LineTypeStatus.DEFAULT);
            cell.setAutoPostBack(true);

            row.setValue(item);

            createVariableCells(row, true);
        }
    }

}
项目:openMAXIMS    文件:Logic.java   
private boolean checkDatasets()
{
    if(form.dyngrdLinkedDataSets().getRows().size() == 0)
    {
        engine.showMessage("Please add at least a dataset !");
        return false;
    }

    for (int i = 0; i < form.dyngrdLinkedDataSets().getRows().size(); i++)
    {
        DynamicGridRow row = form.dyngrdLinkedDataSets().getRows().get(i);

        if(row.getCells().get(form.dyngrdLinkedDataSets().getColumns().getByIdentifier(COL_ANSWERBOX)).getValue().equals(LineTypeStatus.CUSTOM))
        {
            if(row.getCells().get(form.dyngrdLinkedDataSets().getColumns().getByIdentifier(COL_LINETYPE)).getValue() == null)
            {
                engine.showMessage("Please set a line type for dataset " + ((DataSetTypeVo)row.getValue()).getName() + " !");
                return false;
            }
            if(row.getCells().get(form.dyngrdLinkedDataSets().getColumns().getByIdentifier(COL_COLOR_ICON)).getValue() == null)
            {
                engine.showMessage("Please set a Colour / Icon for dataset " + ((DataSetTypeVo)row.getValue()).getName() + " !");
                return false;
            }
        }
    }

    return true;
}
项目:openMAXIMS    文件:Logic.java   
private ChartTypeVo populateDataFromScreenLocal()
{
    ChartTypeVo record = populateDataFromScreen(form.getLocalContext().getCurrentRecord());

    record.setNormalBandColour(form.cmbNormalColour().getValue());

    if(record.getDatasetTypes() == null)
        record.setDatasetTypes(new ChartTypeDatasetVoCollection());
    else
        record.getDatasetTypes().clear();

    int order = 1;  //WDEV-12548

    for (int i = 0; i < form.dyngrdLinkedDataSets().getRows().size(); i++)
    {
        DynamicGridRow row = form.dyngrdLinkedDataSets().getRows().get(i);

        ChartTypeDatasetVo item = new ChartTypeDatasetVo();
        item.setDatasetType((DataSetTypeVo)row.getValue());

        if(row.getCells().get(form.dyngrdLinkedDataSets().getColumns().getByIdentifier(COL_ANSWERBOX)).getValue().equals(LineTypeStatus.CUSTOM))
        {
            item.setLineType((LineType) row.getCells().get(form.dyngrdLinkedDataSets().getColumns().getByIdentifier(COL_LINETYPE)).getValue());
            item.setLineColourPointIcon((LineColourPointIcon) row.getCells().get(form.dyngrdLinkedDataSets().getColumns().getByIdentifier(COL_COLOR_ICON)).getValue());
        }

        item.setSortOrder(Integer.valueOf(order++)); //WDEV-12548

        record.getDatasetTypes().add(item);
    }

    return record;
}
项目:openMAXIMS    文件:Logic.java   
private void addDataSetTypesToGrid(DataSetTypeVoCollection dataSetTypeItems)
{
    for (int i = 0; i < dataSetTypeItems.size(); i++)
    {
        DataSetTypeVo item = dataSetTypeItems.get(i);

        if(recordAlreadySelected(item) == false)
        {
            DynamicGridRow row = form.dyngrdLinkedDataSets().getRows().newRow();

            DynamicGridCell cell = row.getCells().newCell(form.dyngrdLinkedDataSets().getColumns().getByIdentifier(COL_DATASET_TYPE), DynamicCellType.STRING);
            cell.setValue(item.getName());
            // WDEV-16684 
            cell.setReadOnly(Boolean.TRUE);

            cell = row.getCells().newCell(form.dyngrdLinkedDataSets().getColumns().getByIdentifier(COL_ANSWERBOX), DynamicCellType.ANSWER);
            cell.getItems().newItem(LineTypeStatus.DEFAULT, LineTypeStatus.DEFAULT.getImage());
            cell.getItems().newItem(LineTypeStatus.CUSTOM, LineTypeStatus.CUSTOM.getImage());
            cell.setValue(LineTypeStatus.DEFAULT);
            cell.setAutoPostBack(true);

            row.setValue(item);

            createVariableCells(row, true);
        }
    }

}
项目:openmaxims-linux    文件:Logic.java   
private boolean checkDatasets()
{
    if(form.dyngrdLinkedDataSets().getRows().size() == 0)
    {
        engine.showMessage("Please add at least a dataset !");
        return false;
    }

    for (int i = 0; i < form.dyngrdLinkedDataSets().getRows().size(); i++)
    {
        DynamicGridRow row = form.dyngrdLinkedDataSets().getRows().get(i);

        if(row.getCells().get(form.dyngrdLinkedDataSets().getColumns().getByIdentifier(COL_ANSWERBOX)).getValue().equals(LineTypeStatus.CUSTOM))
        {
            if(row.getCells().get(form.dyngrdLinkedDataSets().getColumns().getByIdentifier(COL_LINETYPE)).getValue() == null)
            {
                engine.showMessage("Please set a line type for dataset " + ((DataSetTypeVo)row.getValue()).getName() + " !");
                return false;
            }
            if(row.getCells().get(form.dyngrdLinkedDataSets().getColumns().getByIdentifier(COL_COLOR_ICON)).getValue() == null)
            {
                engine.showMessage("Please set a Colour / Icon for dataset " + ((DataSetTypeVo)row.getValue()).getName() + " !");
                return false;
            }
        }
    }

    return true;
}
项目:openmaxims-linux    文件:Logic.java   
private ChartTypeVo populateDataFromScreenLocal()
{
    ChartTypeVo record = populateDataFromScreen(form.getLocalContext().getCurrentRecord());

    record.setNormalBandColour(form.cmbNormalColour().getValue());

    if(record.getDatasetTypes() == null)
        record.setDatasetTypes(new ChartTypeDatasetVoCollection());
    else
        record.getDatasetTypes().clear();

    int order = 1;  //WDEV-12548

    for (int i = 0; i < form.dyngrdLinkedDataSets().getRows().size(); i++)
    {
        DynamicGridRow row = form.dyngrdLinkedDataSets().getRows().get(i);

        ChartTypeDatasetVo item = new ChartTypeDatasetVo();
        item.setDatasetType((DataSetTypeVo)row.getValue());

        if(row.getCells().get(form.dyngrdLinkedDataSets().getColumns().getByIdentifier(COL_ANSWERBOX)).getValue().equals(LineTypeStatus.CUSTOM))
        {
            item.setLineType((LineType) row.getCells().get(form.dyngrdLinkedDataSets().getColumns().getByIdentifier(COL_LINETYPE)).getValue());
            item.setLineColourPointIcon((LineColourPointIcon) row.getCells().get(form.dyngrdLinkedDataSets().getColumns().getByIdentifier(COL_COLOR_ICON)).getValue());
        }

        item.setSortOrder(Integer.valueOf(order++)); //WDEV-12548

        record.getDatasetTypes().add(item);
    }

    return record;
}
项目:openmaxims-linux    文件:Logic.java   
private void addDataSetTypesToGrid(DataSetTypeVoCollection dataSetTypeItems)
{
    for (int i = 0; i < dataSetTypeItems.size(); i++)
    {
        DataSetTypeVo item = dataSetTypeItems.get(i);

        if(recordAlreadySelected(item) == false)
        {
            DynamicGridRow row = form.dyngrdLinkedDataSets().getRows().newRow();

            DynamicGridCell cell = row.getCells().newCell(form.dyngrdLinkedDataSets().getColumns().getByIdentifier(COL_DATASET_TYPE), DynamicCellType.STRING);
            cell.setValue(item.getName());
            // WDEV-16684 
            cell.setReadOnly(Boolean.TRUE);

            cell = row.getCells().newCell(form.dyngrdLinkedDataSets().getColumns().getByIdentifier(COL_ANSWERBOX), DynamicCellType.ANSWER);
            cell.getItems().newItem(LineTypeStatus.DEFAULT, LineTypeStatus.DEFAULT.getImage());
            cell.getItems().newItem(LineTypeStatus.CUSTOM, LineTypeStatus.CUSTOM.getImage());
            cell.setValue(LineTypeStatus.DEFAULT);
            cell.setAutoPostBack(true);

            row.setValue(item);

            createVariableCells(row, true);
        }
    }

}