Java 类ims.emergency.vo.ProtocolDiscriminatorVoCollection 实例源码

项目:AvoinApotti    文件:Logic.java   
private void setGlobalContextValues()
{
    grdSelectedDiscriminatorsRowCollection colDiscriminators = form.grdSelectedDiscriminators().getRows();
    ProtocolDiscriminatorVoCollection discriminatorsList = new ProtocolDiscriminatorVoCollection();

    for (int i = 0; i < colDiscriminators.size(); i++)
    {
        if (colDiscriminators.get(i).getcolSelected() == true)
        {
            ProtocolDiscriminatorVo protocolDiscriminator = new ProtocolDiscriminatorVo();
            protocolDiscriminator.setDiscriminator(colDiscriminators.get(i).getValue());
            protocolDiscriminator.setPriority(form.cmbDefaultPriority().getValue());
            discriminatorsList.add(protocolDiscriminator);
        }
    }

    String[] errors = discriminatorsList.validate();
    if (errors != null && errors.length > 0)
    {
        engine.showErrors(errors);
        return;
    }

    form.getGlobalContext().Emergency.setManchesterTriageProtocol(discriminatorsList);
    engine.close(DialogResult.OK);

}
项目:AvoinApotti    文件:Logic.java   
private ProtocolDiscriminatorVoCollection getDiscriminators()
{
    grdDiscriminatorsRowCollection discriminators = form.grdDiscriminators().getRows();

    ProtocolDiscriminatorVoCollection discriminatorCollection = new ProtocolDiscriminatorVoCollection();

    for (int i = 0; i < discriminators.size(); i++)
    {
        discriminatorCollection.add(discriminators.get(i).getValue());
    }

    return discriminatorCollection;
}
项目:AvoinApotti    文件:Logic.java   
private void populateDiscriminatorsGrid(ProtocolDiscriminatorVoCollection newdiscriminatorCollection)
{
    grdDiscriminatorsRowCollection addedDiscriminatorCollection = form.grdDiscriminators().getRows();

    if (addedDiscriminatorCollection.size() == 0)
    {
        addNewRow(newdiscriminatorCollection);
    }
    else
    {
        ProtocolDiscriminatorVoCollection remainingDiscriminatorCollection = new ProtocolDiscriminatorVoCollection();

        for (int x = 0; x < newdiscriminatorCollection.size(); x++)
        {
            remainingDiscriminatorCollection.add(newdiscriminatorCollection.get(x));
        }

        for (int a = newdiscriminatorCollection.size() - 1; a >= 0; a--)
        {
            for (int n = addedDiscriminatorCollection.size() - 1; n >= 0; n--)
            {
                if (addedDiscriminatorCollection.get(n).getcolDiscriminator().equals(newdiscriminatorCollection.get(a).getDiscriminator().getDiscriminatorName()))
                {
                    addedDiscriminatorCollection.get(n).setcolPriority(newdiscriminatorCollection.get(a).getPriority().toString());
                    addedDiscriminatorCollection.get(n).setValue(newdiscriminatorCollection.get(a));
                    remainingDiscriminatorCollection.remove(a);
                }
            }
        }

        addNewRow(remainingDiscriminatorCollection);
    }

}
项目:AvoinApotti    文件:Logic.java   
private void addNewRow(ProtocolDiscriminatorVoCollection newdiscriminatorCollection)
{
    for (int i = 0; i < newdiscriminatorCollection.size(); i++)
    {
        grdDiscriminatorsRow newRow = form.grdDiscriminators().getRows().newRow();

        newRow.setcolPriority(newdiscriminatorCollection.get(i).getPriority().getText());
        newRow.setcolDiscriminator(newdiscriminatorCollection.get(i).getDiscriminator().getDiscriminatorName());
        newRow.setValue(newdiscriminatorCollection.get(i));
    }
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onContextMenuItemClick(int menuItemID, Control sender) throws PresentationLogicException
{
    switch (menuItemID)
    {
        case GenForm.ContextMenus.EmergencyNamespace.ManchesterTriageProtocol.Add:
            engine.open(form.getForms().Emergency.DiscriminatorSelectDialog);
            break;

        case GenForm.ContextMenus.EmergencyNamespace.ManchesterTriageProtocol.Remove:
            form.grdDiscriminators().removeSelectedRow();
            updateControlsState();
            break;

        case GenForm.ContextMenus.EmergencyNamespace.ManchesterTriageProtocol.MoveUp:
            form.grdDiscriminators().moveUp();
            updateControlsState();
            break;

        case GenForm.ContextMenus.EmergencyNamespace.ManchesterTriageProtocol.MoveDowm:
            form.grdDiscriminators().moveDown();
            updateControlsState();
            break;

        case GenForm.ContextMenus.EmergencyNamespace.ManchesterTriageProtocol.Sort:

            ProtocolDiscriminatorVoCollection discriminatorCollection = getDiscriminators();

            if (discriminatorCollection != null)
            {
                discriminatorCollection.sort(new StringComparator(SortOrder.ASCENDING));
                form.grdDiscriminators().getRows().clear();
                populateDiscriminatorsGrid(discriminatorCollection);
                updateControlsState();
            }

            break;
    }
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onImbSortClick() throws PresentationLogicException
{

    ProtocolDiscriminatorVoCollection discriminatorCollection = getDiscriminators();

    if (discriminatorCollection != null)
    {
        discriminatorCollection.sort(new StringComparator(SortOrder.ASCENDING));
        form.grdDiscriminators().getRows().clear();
        populateDiscriminatorsGrid(discriminatorCollection);
        updateControlsState();
    }
}
项目:openMAXIMS    文件:Logic.java   
private void setGlobalContextValues()
{
    grdSelectedDiscriminatorsRowCollection colDiscriminators = form.grdSelectedDiscriminators().getRows();
    ProtocolDiscriminatorVoCollection discriminatorsList = new ProtocolDiscriminatorVoCollection();

    for (int i = 0; i < colDiscriminators.size(); i++)
    {
        if (colDiscriminators.get(i).getcolSelected() == true)
        {
            ProtocolDiscriminatorVo protocolDiscriminator = new ProtocolDiscriminatorVo();
            protocolDiscriminator.setDiscriminator(colDiscriminators.get(i).getValue());
            protocolDiscriminator.setPriority(form.cmbDefaultPriority().getValue());
            discriminatorsList.add(protocolDiscriminator);
        }
    }

    String[] errors = discriminatorsList.validate();
    if (errors != null && errors.length > 0)
    {
        engine.showErrors(errors);
        return;
    }

    form.getGlobalContext().Emergency.setManchesterTriageProtocol(discriminatorsList);
    engine.close(DialogResult.OK);

}
项目:openMAXIMS    文件:Logic.java   
private ProtocolDiscriminatorVoCollection getDiscriminators()
{
    grdDiscriminatorsRowCollection discriminators = form.grdDiscriminators().getRows();

    ProtocolDiscriminatorVoCollection discriminatorCollection = new ProtocolDiscriminatorVoCollection();

    for (int i = 0; i < discriminators.size(); i++)
    {
        discriminatorCollection.add(discriminators.get(i).getValue());
    }

    return discriminatorCollection;
}
项目:openMAXIMS    文件:Logic.java   
private void populateDiscriminatorsGrid(ProtocolDiscriminatorVoCollection newdiscriminatorCollection)
{
    grdDiscriminatorsRowCollection addedDiscriminatorCollection = form.grdDiscriminators().getRows();

    if (addedDiscriminatorCollection.size() == 0)
    {
        addNewRow(newdiscriminatorCollection);
    }
    else
    {
        ProtocolDiscriminatorVoCollection remainingDiscriminatorCollection = new ProtocolDiscriminatorVoCollection();

        for (int x = 0; x < newdiscriminatorCollection.size(); x++)
        {
            remainingDiscriminatorCollection.add(newdiscriminatorCollection.get(x));
        }

        for (int a = newdiscriminatorCollection.size() - 1; a >= 0; a--)
        {
            for (int n = addedDiscriminatorCollection.size() - 1; n >= 0; n--)
            {
                if (addedDiscriminatorCollection.get(n).getcolDiscriminator().equals(newdiscriminatorCollection.get(a).getDiscriminator().getDiscriminatorName()))
                {
                    addedDiscriminatorCollection.get(n).setcolPriority(newdiscriminatorCollection.get(a).getPriority().toString());
                    addedDiscriminatorCollection.get(n).setValue(newdiscriminatorCollection.get(a));
                    remainingDiscriminatorCollection.remove(a);
                }
            }
        }

        addNewRow(remainingDiscriminatorCollection);
    }

}
项目:openMAXIMS    文件:Logic.java   
private void addNewRow(ProtocolDiscriminatorVoCollection newdiscriminatorCollection)
{
    for (int i = 0; i < newdiscriminatorCollection.size(); i++)
    {
        grdDiscriminatorsRow newRow = form.grdDiscriminators().getRows().newRow();

        newRow.setcolPriority(newdiscriminatorCollection.get(i).getPriority().getText());
        newRow.setcolDiscriminator(newdiscriminatorCollection.get(i).getDiscriminator().getDiscriminatorName());
        newRow.setValue(newdiscriminatorCollection.get(i));
    }
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onContextMenuItemClick(int menuItemID, Control sender) throws PresentationLogicException
{
    switch (menuItemID)
    {
        case GenForm.ContextMenus.EmergencyNamespace.ManchesterTriageProtocol.Add:
            engine.open(form.getForms().Emergency.DiscriminatorSelectDialog);
            break;

        case GenForm.ContextMenus.EmergencyNamespace.ManchesterTriageProtocol.Remove:
            form.grdDiscriminators().removeSelectedRow();
            updateControlsState();
            break;

        case GenForm.ContextMenus.EmergencyNamespace.ManchesterTriageProtocol.MoveUp:
            form.grdDiscriminators().moveUp();
            updateControlsState();
            break;

        case GenForm.ContextMenus.EmergencyNamespace.ManchesterTriageProtocol.MoveDowm:
            form.grdDiscriminators().moveDown();
            updateControlsState();
            break;

        case GenForm.ContextMenus.EmergencyNamespace.ManchesterTriageProtocol.Sort:

            ProtocolDiscriminatorVoCollection discriminatorCollection = getDiscriminators();

            if (discriminatorCollection != null)
            {
                discriminatorCollection.sort(new StringComparator(SortOrder.ASCENDING));
                form.grdDiscriminators().getRows().clear();
                populateDiscriminatorsGrid(discriminatorCollection);
                updateControlsState();
            }

            break;
    }
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onImbSortClick() throws PresentationLogicException
{

    ProtocolDiscriminatorVoCollection discriminatorCollection = getDiscriminators();

    if (discriminatorCollection != null)
    {
        discriminatorCollection.sort(new StringComparator(SortOrder.ASCENDING));
        form.grdDiscriminators().getRows().clear();
        populateDiscriminatorsGrid(discriminatorCollection);
        updateControlsState();
    }
}
项目:openMAXIMS    文件:Logic.java   
private void setGlobalContextValues()
{
    grdSelectedDiscriminatorsRowCollection colDiscriminators = form.grdSelectedDiscriminators().getRows();
    ProtocolDiscriminatorVoCollection discriminatorsList = new ProtocolDiscriminatorVoCollection();

    for (int i = 0; i < colDiscriminators.size(); i++)
    {
        if (colDiscriminators.get(i).getcolSelected() == true)
        {
            ProtocolDiscriminatorVo protocolDiscriminator = new ProtocolDiscriminatorVo();
            protocolDiscriminator.setDiscriminator(colDiscriminators.get(i).getValue());
            protocolDiscriminator.setPriority(form.cmbDefaultPriority().getValue());
            discriminatorsList.add(protocolDiscriminator);
        }
    }

    String[] errors = discriminatorsList.validate();
    if (errors != null && errors.length > 0)
    {
        engine.showErrors(errors);
        return;
    }

    form.getGlobalContext().Emergency.setManchesterTriageProtocol(discriminatorsList);
    engine.close(DialogResult.OK);

}
项目:openMAXIMS    文件:Logic.java   
private ProtocolDiscriminatorVoCollection getDiscriminators()
{
    grdDiscriminatorsRowCollection discriminators = form.grdDiscriminators().getRows();

    ProtocolDiscriminatorVoCollection discriminatorCollection = new ProtocolDiscriminatorVoCollection();

    for (int i = 0; i < discriminators.size(); i++)
    {
        discriminatorCollection.add(discriminators.get(i).getValue());
    }

    return discriminatorCollection;
}
项目:openMAXIMS    文件:Logic.java   
private void populateDiscriminatorsGrid(ProtocolDiscriminatorVoCollection newdiscriminatorCollection)
{
    grdDiscriminatorsRowCollection addedDiscriminatorCollection = form.grdDiscriminators().getRows();

    if (addedDiscriminatorCollection.size() == 0)
    {
        addNewRow(newdiscriminatorCollection);
    }
    else
    {
        ProtocolDiscriminatorVoCollection remainingDiscriminatorCollection = new ProtocolDiscriminatorVoCollection();

        for (int x = 0; x < newdiscriminatorCollection.size(); x++)
        {
            remainingDiscriminatorCollection.add(newdiscriminatorCollection.get(x));
        }

        for (int a = newdiscriminatorCollection.size() - 1; a >= 0; a--)
        {
            for (int n = addedDiscriminatorCollection.size() - 1; n >= 0; n--)
            {
                if (addedDiscriminatorCollection.get(n).getcolDiscriminator().equals(newdiscriminatorCollection.get(a).getDiscriminator().getDiscriminatorName()))
                {
                    addedDiscriminatorCollection.get(n).setcolPriority(newdiscriminatorCollection.get(a).getPriority().toString());
                    addedDiscriminatorCollection.get(n).setValue(newdiscriminatorCollection.get(a));
                    remainingDiscriminatorCollection.remove(a);
                }
            }
        }

        addNewRow(remainingDiscriminatorCollection);
    }

}
项目:openMAXIMS    文件:Logic.java   
private void addNewRow(ProtocolDiscriminatorVoCollection newdiscriminatorCollection)
{
    for (int i = 0; i < newdiscriminatorCollection.size(); i++)
    {
        grdDiscriminatorsRow newRow = form.grdDiscriminators().getRows().newRow();

        newRow.setcolPriority(newdiscriminatorCollection.get(i).getPriority().getText());
        newRow.setcolDiscriminator(newdiscriminatorCollection.get(i).getDiscriminator().getDiscriminatorName());
        newRow.setValue(newdiscriminatorCollection.get(i));
    }
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onContextMenuItemClick(int menuItemID, Control sender) throws PresentationLogicException
{
    switch (menuItemID)
    {
        case GenForm.ContextMenus.EmergencyNamespace.ManchesterTriageProtocol.Add:
            engine.open(form.getForms().Emergency.DiscriminatorSelectDialog);
            break;

        case GenForm.ContextMenus.EmergencyNamespace.ManchesterTriageProtocol.Remove:
            form.grdDiscriminators().removeSelectedRow();
            updateControlsState();
            break;

        case GenForm.ContextMenus.EmergencyNamespace.ManchesterTriageProtocol.MoveUp:
            form.grdDiscriminators().moveUp();
            updateControlsState();
            break;

        case GenForm.ContextMenus.EmergencyNamespace.ManchesterTriageProtocol.MoveDowm:
            form.grdDiscriminators().moveDown();
            updateControlsState();
            break;

        case GenForm.ContextMenus.EmergencyNamespace.ManchesterTriageProtocol.Sort:

            ProtocolDiscriminatorVoCollection discriminatorCollection = getDiscriminators();

            if (discriminatorCollection != null)
            {
                discriminatorCollection.sort(new StringComparator(SortOrder.ASCENDING));
                form.grdDiscriminators().getRows().clear();
                populateDiscriminatorsGrid(discriminatorCollection);
                updateControlsState();
            }

            break;
    }
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onImbSortClick() throws PresentationLogicException
{

    ProtocolDiscriminatorVoCollection discriminatorCollection = getDiscriminators();

    if (discriminatorCollection != null)
    {
        discriminatorCollection.sort(new StringComparator(SortOrder.ASCENDING));
        form.grdDiscriminators().getRows().clear();
        populateDiscriminatorsGrid(discriminatorCollection);
        updateControlsState();
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void setGlobalContextValues()
{
    grdSelectedDiscriminatorsRowCollection colDiscriminators = form.grdSelectedDiscriminators().getRows();
    ProtocolDiscriminatorVoCollection discriminatorsList = new ProtocolDiscriminatorVoCollection();

    for (int i = 0; i < colDiscriminators.size(); i++)
    {
        if (colDiscriminators.get(i).getcolSelected() == true)
        {
            ProtocolDiscriminatorVo protocolDiscriminator = new ProtocolDiscriminatorVo();
            protocolDiscriminator.setDiscriminator(colDiscriminators.get(i).getValue());
            protocolDiscriminator.setPriority(form.cmbDefaultPriority().getValue());
            discriminatorsList.add(protocolDiscriminator);
        }
    }

    String[] errors = discriminatorsList.validate();
    if (errors != null && errors.length > 0)
    {
        engine.showErrors(errors);
        return;
    }

    form.getGlobalContext().Emergency.setManchesterTriageProtocol(discriminatorsList);
    engine.close(DialogResult.OK);

}
项目:openmaxims-linux    文件:Logic.java   
private ProtocolDiscriminatorVoCollection getDiscriminators()
{
    grdDiscriminatorsRowCollection discriminators = form.grdDiscriminators().getRows();

    ProtocolDiscriminatorVoCollection discriminatorCollection = new ProtocolDiscriminatorVoCollection();

    for (int i = 0; i < discriminators.size(); i++)
    {
        discriminatorCollection.add(discriminators.get(i).getValue());
    }

    return discriminatorCollection;
}
项目:openmaxims-linux    文件:Logic.java   
private void populateDiscriminatorsGrid(ProtocolDiscriminatorVoCollection newdiscriminatorCollection)
{
    grdDiscriminatorsRowCollection addedDiscriminatorCollection = form.grdDiscriminators().getRows();

    if (addedDiscriminatorCollection.size() == 0)
    {
        addNewRow(newdiscriminatorCollection);
    }
    else
    {
        ProtocolDiscriminatorVoCollection remainingDiscriminatorCollection = new ProtocolDiscriminatorVoCollection();

        for (int x = 0; x < newdiscriminatorCollection.size(); x++)
        {
            remainingDiscriminatorCollection.add(newdiscriminatorCollection.get(x));
        }

        for (int a = newdiscriminatorCollection.size() - 1; a >= 0; a--)
        {
            for (int n = addedDiscriminatorCollection.size() - 1; n >= 0; n--)
            {
                if (addedDiscriminatorCollection.get(n).getcolDiscriminator().equals(newdiscriminatorCollection.get(a).getDiscriminator().getDiscriminatorName()))
                {
                    addedDiscriminatorCollection.get(n).setcolPriority(newdiscriminatorCollection.get(a).getPriority().toString());
                    addedDiscriminatorCollection.get(n).setValue(newdiscriminatorCollection.get(a));
                    remainingDiscriminatorCollection.remove(a);
                }
            }
        }

        addNewRow(remainingDiscriminatorCollection);
    }

}
项目:openmaxims-linux    文件:Logic.java   
private void addNewRow(ProtocolDiscriminatorVoCollection newdiscriminatorCollection)
{
    for (int i = 0; i < newdiscriminatorCollection.size(); i++)
    {
        grdDiscriminatorsRow newRow = form.grdDiscriminators().getRows().newRow();

        newRow.setcolPriority(newdiscriminatorCollection.get(i).getPriority().getText());
        newRow.setcolDiscriminator(newdiscriminatorCollection.get(i).getDiscriminator().getDiscriminatorName());
        newRow.setValue(newdiscriminatorCollection.get(i));
    }
}
项目:openmaxims-linux    文件:Logic.java   
@Override
protected void onContextMenuItemClick(int menuItemID, Control sender) throws PresentationLogicException
{
    switch (menuItemID)
    {
        case GenForm.ContextMenus.EmergencyNamespace.ManchesterTriageProtocol.Add:
            engine.open(form.getForms().Emergency.DiscriminatorSelectDialog);
            break;

        case GenForm.ContextMenus.EmergencyNamespace.ManchesterTriageProtocol.Remove:
            form.grdDiscriminators().removeSelectedRow();
            updateControlsState();
            break;

        case GenForm.ContextMenus.EmergencyNamespace.ManchesterTriageProtocol.MoveUp:
            form.grdDiscriminators().moveUp();
            updateControlsState();
            break;

        case GenForm.ContextMenus.EmergencyNamespace.ManchesterTriageProtocol.MoveDowm:
            form.grdDiscriminators().moveDown();
            updateControlsState();
            break;

        case GenForm.ContextMenus.EmergencyNamespace.ManchesterTriageProtocol.Sort:

            ProtocolDiscriminatorVoCollection discriminatorCollection = getDiscriminators();

            if (discriminatorCollection != null)
            {
                discriminatorCollection.sort(new StringComparator(SortOrder.ASCENDING));
                form.grdDiscriminators().getRows().clear();
                populateDiscriminatorsGrid(discriminatorCollection);
                updateControlsState();
            }

            break;
    }
}
项目:openmaxims-linux    文件:Logic.java   
@Override
protected void onImbSortClick() throws PresentationLogicException
{

    ProtocolDiscriminatorVoCollection discriminatorCollection = getDiscriminators();

    if (discriminatorCollection != null)
    {
        discriminatorCollection.sort(new StringComparator(SortOrder.ASCENDING));
        form.grdDiscriminators().getRows().clear();
        populateDiscriminatorsGrid(discriminatorCollection);
        updateControlsState();
    }
}