Java 类ims.admin.vo.TemplatePrinterVo 实例源码

项目:AvoinApotti    文件:Logic.java   
protected void onBtnRemoveReportClick() throws ims.framework.exceptions.PresentationLogicException
{
    if (form.grdReportsToPrint().getValue() == null || !(form.grdReportsToPrint().getValue() instanceof TemplatePrinterVo))
    {
        engine.showMessage("Please select a template !");
        return;
    }

    PrintAgentVo agent = form.getLocalContext().getJobSettings();

    TemplatePrinterVo repTemplate = (TemplatePrinterVo) form.grdReportsToPrint().getValue();

    for (int i = 0; i < agent.getTemplatesToPrint().size(); i++)
    {
        TemplatePrinterVo tp = agent.getTemplatesToPrint().get(i);

        if (tp.getTemplate().getID_TemplateBo().equals(repTemplate.getTemplate().getID_TemplateBo()))
        {
            agent.getTemplatesToPrint().remove(tp);
            form.getLocalContext().setJobSettings(agent);
            break;
        }
    }

    displayAvailableReports(form.getLocalContext().getReportsAvailable(), agent);
    displaySelectedTemplates(agent);
}
项目:AvoinApotti    文件:Logic.java   
private void displaySelectedTemplates(PrintAgentVo agent)
{
    form.grdReportsToPrint().getRows().clear();

    if (agent == null || agent.getTemplatesToPrintIsNotNull() == false)
        return;

    for (int i = 0; i < agent.getTemplatesToPrint().size(); i++)
    {
        TemplatePrinterVo tp = agent.getTemplatesToPrint().get(i);

        grdReportsToPrintRow parentRow = getParentRowById(tp.getTemplate().getReport());

        if (parentRow == null)
        {
            ReportVo rep = tp.getTemplate().getReport();
            parentRow = form.grdReportsToPrint().getRows().newRow();

            parentRow.setColumnReport(rep.getReportName());
            parentRow.setTooltip(rep.getReportDescription());
            parentRow.setBold(true);
            parentRow.setBackColor(Color.Beige);
            parentRow.setValue(rep);
            parentRow.setExpanded(true);
        }

        grdReportsToPrintRow child = parentRow.getRows().newRow();

        child.setColumnReport(tp.getTemplate().getName());
        child.setColumnPrintTo(tp.getPrinterName());
        child.setColumnPrintToReadOnly(false);
        child.setTooltip(tp.getTemplate().getDescription());
        child.setValue(tp);
    }
}
项目:openMAXIMS    文件:Logic.java   
protected void onBtnRemoveReportClick() throws ims.framework.exceptions.PresentationLogicException
{
    if (form.grdReportsToPrint().getValue() == null || !(form.grdReportsToPrint().getValue() instanceof TemplatePrinterVo))
    {
        engine.showMessage("Please select a template !");
        return;
    }

    PrintAgentVo agent = form.getLocalContext().getJobSettings();

    TemplatePrinterVo repTemplate = (TemplatePrinterVo) form.grdReportsToPrint().getValue();

    for (int i = 0; i < agent.getTemplatesToPrint().size(); i++)
    {
        TemplatePrinterVo tp = agent.getTemplatesToPrint().get(i);

        if (tp.getTemplate().getID_TemplateBo().equals(repTemplate.getTemplate().getID_TemplateBo()))
        {
            agent.getTemplatesToPrint().remove(tp);
            form.getLocalContext().setJobSettings(agent);
            break;
        }
    }

    displayAvailableReports(form.getLocalContext().getReportsAvailable(), agent);
    displaySelectedTemplates(agent);
}
项目:openMAXIMS    文件:Logic.java   
private void displaySelectedTemplates(PrintAgentVo agent)
{
    form.grdReportsToPrint().getRows().clear();

    if (agent == null || agent.getTemplatesToPrintIsNotNull() == false)
        return;

    for (int i = 0; i < agent.getTemplatesToPrint().size(); i++)
    {
        TemplatePrinterVo tp = agent.getTemplatesToPrint().get(i);

        grdReportsToPrintRow parentRow = getParentRowById(tp.getTemplate().getReport());

        if (parentRow == null)
        {
            ReportVo rep = tp.getTemplate().getReport();
            parentRow = form.grdReportsToPrint().getRows().newRow();

            parentRow.setColumnReport(rep.getReportName());
            parentRow.setTooltip(rep.getReportDescription());
            parentRow.setBold(true);
            parentRow.setBackColor(Color.Beige);
            parentRow.setValue(rep);
            parentRow.setExpanded(true);
        }

        grdReportsToPrintRow child = parentRow.getRows().newRow();

        child.setColumnReport(tp.getTemplate().getName());
        child.setColumnPrintTo(tp.getPrinterName());
        child.setColumnPrintToReadOnly(false);
        child.setTooltip(tp.getTemplate().getDescription());
        child.setValue(tp);
    }
}
项目:openMAXIMS    文件:Logic.java   
protected void onBtnRemoveReportClick() throws ims.framework.exceptions.PresentationLogicException
{
    if (form.grdReportsToPrint().getValue() == null || !(form.grdReportsToPrint().getValue() instanceof TemplatePrinterVo))
    {
        engine.showMessage("Please select a template !");
        return;
    }

    PrintAgentVo agent = form.getLocalContext().getJobSettings();

    TemplatePrinterVo repTemplate = (TemplatePrinterVo) form.grdReportsToPrint().getValue();

    for (int i = 0; i < agent.getTemplatesToPrint().size(); i++)
    {
        TemplatePrinterVo tp = agent.getTemplatesToPrint().get(i);

        if (tp.getTemplate().getID_TemplateBo().equals(repTemplate.getTemplate().getID_TemplateBo()))
        {
            agent.getTemplatesToPrint().remove(tp);
            form.getLocalContext().setJobSettings(agent);
            break;
        }
    }

    displayAvailableReports(form.getLocalContext().getReportsAvailable(), agent);
    displaySelectedTemplates(agent);
}
项目:openMAXIMS    文件:Logic.java   
private void displaySelectedTemplates(PrintAgentVo agent)
{
    form.grdReportsToPrint().getRows().clear();

    if (agent == null || agent.getTemplatesToPrintIsNotNull() == false)
        return;

    for (int i = 0; i < agent.getTemplatesToPrint().size(); i++)
    {
        TemplatePrinterVo tp = agent.getTemplatesToPrint().get(i);

        grdReportsToPrintRow parentRow = getParentRowById(tp.getTemplate().getReport());

        if (parentRow == null)
        {
            ReportVo rep = tp.getTemplate().getReport();
            parentRow = form.grdReportsToPrint().getRows().newRow();

            parentRow.setColumnReport(rep.getReportName());
            parentRow.setTooltip(rep.getReportDescription());
            parentRow.setBold(true);
            parentRow.setBackColor(Color.Beige);
            parentRow.setValue(rep);
            parentRow.setExpanded(true);
        }

        grdReportsToPrintRow child = parentRow.getRows().newRow();

        child.setColumnReport(tp.getTemplate().getName());
        child.setColumnPrintTo(tp.getPrinterName());
        child.setColumnPrintToReadOnly(false);
        child.setTooltip(tp.getTemplate().getDescription());
        child.setValue(tp);
    }
}
项目:openmaxims-linux    文件:Logic.java   
protected void onBtnRemoveReportClick() throws ims.framework.exceptions.PresentationLogicException
{
    if (form.grdReportsToPrint().getValue() == null || !(form.grdReportsToPrint().getValue() instanceof TemplatePrinterVo))
    {
        engine.showMessage("Please select a template !");
        return;
    }

    PrintAgentVo agent = form.getLocalContext().getJobSettings();

    TemplatePrinterVo repTemplate = (TemplatePrinterVo) form.grdReportsToPrint().getValue();

    for (int i = 0; i < agent.getTemplatesToPrint().size(); i++)
    {
        TemplatePrinterVo tp = agent.getTemplatesToPrint().get(i);

        if (tp.getTemplate().getID_TemplateBo().equals(repTemplate.getTemplate().getID_TemplateBo()))
        {
            agent.getTemplatesToPrint().remove(tp);
            form.getLocalContext().setJobSettings(agent);
            break;
        }
    }

    displayAvailableReports(form.getLocalContext().getReportsAvailable(), agent);
    displaySelectedTemplates(agent);
}
项目:openmaxims-linux    文件:Logic.java   
private void displaySelectedTemplates(PrintAgentVo agent)
{
    form.grdReportsToPrint().getRows().clear();

    if (agent == null || agent.getTemplatesToPrintIsNotNull() == false)
        return;

    for (int i = 0; i < agent.getTemplatesToPrint().size(); i++)
    {
        TemplatePrinterVo tp = agent.getTemplatesToPrint().get(i);

        grdReportsToPrintRow parentRow = getParentRowById(tp.getTemplate().getReport());

        if (parentRow == null)
        {
            ReportVo rep = tp.getTemplate().getReport();
            parentRow = form.grdReportsToPrint().getRows().newRow();

            parentRow.setColumnReport(rep.getReportName());
            parentRow.setTooltip(rep.getReportDescription());
            parentRow.setBold(true);
            parentRow.setBackColor(Color.Beige);
            parentRow.setValue(rep);
            parentRow.setExpanded(true);
        }

        grdReportsToPrintRow child = parentRow.getRows().newRow();

        child.setColumnReport(tp.getTemplate().getName());
        child.setColumnPrintTo(tp.getPrinterName());
        child.setColumnPrintToReadOnly(false);
        child.setTooltip(tp.getTemplate().getDescription());
        child.setValue(tp);
    }
}
项目:AvoinApotti    文件:Logic.java   
protected void onGrdReportsToPrintGridComboBoxSelectionChanged(int column, grdReportsToPrintRow row, Object value) throws PresentationLogicException
{
    TemplatePrinterVo tp = (TemplatePrinterVo) row.getValue();

    tp.setPrinterName((String) value);
}
项目:openMAXIMS    文件:Logic.java   
protected void onGrdReportsToPrintGridComboBoxSelectionChanged(int column, grdReportsToPrintRow row, Object value) throws PresentationLogicException
{
    TemplatePrinterVo tp = (TemplatePrinterVo) row.getValue();

    tp.setPrinterName((String) value);
}
项目:openMAXIMS    文件:Logic.java   
protected void onGrdReportsToPrintGridComboBoxSelectionChanged(int column, grdReportsToPrintRow row, Object value) throws PresentationLogicException
{
    TemplatePrinterVo tp = (TemplatePrinterVo) row.getValue();

    tp.setPrinterName((String) value);
}
项目:openmaxims-linux    文件:Logic.java   
protected void onGrdReportsToPrintGridComboBoxSelectionChanged(int column, grdReportsToPrintRow row, Object value) throws PresentationLogicException
{
    TemplatePrinterVo tp = (TemplatePrinterVo) row.getValue();

    tp.setPrinterName((String) value);
}