Examples of PrintTemplate


Examples of com.centraview.printtemplate.PrintTemplate

      }

      PrintTemplateHome PTHome = (PrintTemplateHome) CVUtility.getHomeObject(
          "com.centraview.printtemplate.PrintTemplateHome", "Printtemplate");
      PrintTemplate PTRemote = PTHome.create();
      PTRemote.setDataSource(dataSource);

      PrintTemplateVO ptVO = PTRemote.getPrintTemplate(3);

      String ticketTemplate = ptVO.getPtData();

      Set listkey = Values.keySet();
      Iterator it1 = listkey.iterator();
View Full Code Here

Examples of com.centraview.printtemplate.PrintTemplate

      OpportunityVO opportunityVO  = remote.getOpportunity(individualID, iOpportunityId);
      OpportunityForm opportunityForm = new OpportunityForm();

      PrintTemplateHome PTHome = (PrintTemplateHome)CVUtility.getHomeObject("com.centraview.printtemplate.PrintTemplateHome", "Printtemplate");
      PrintTemplate PTRemote = PTHome.create();
      PTRemote.setDataSource(dataSource);
     
      PrintTemplateVO ptVO = (PrintTemplateVO)PTRemote.getPrintTemplate(2);

      String proposalCompose = ptVO.getPtData();

      //Setting the Proposal Name
      String title = proposallistform.getProposal();
View Full Code Here

Examples of com.centraview.printtemplate.PrintTemplate

    String dataSource = Settings.getInstance().getSiteInfo(CVUtility.getHostName(super.getServlet().getServletContext())).getDataSource();
    String rowId[] = request.getParameterValues("rowId");
    int templateId = 0;
    try
    {
      PrintTemplate ejb = (PrintTemplate)CVUtility.setupEJB("Printtemplate", "com.centraview.printtemplate.PrintTemplateHome", dataSource);
      for (int i = 0; i < rowId.length; i++)
      {
        templateId = Integer.valueOf(rowId[i]).intValue();
        ejb.deletePT(templateId);
      }
    } catch (RemoteException re) {
      logger.error("[execute] Exception thrown deleting template: " + templateId, re);
    } catch (Exception e) {
      logger.error("[execute] Exception thrown setting up the EJB.");
View Full Code Here

Examples of com.centraview.printtemplate.PrintTemplate

    int templateId = Integer.parseInt(request.getParameter("templateId"));
    // Get the detail from the EJB world ...
    PrintTemplateVO templateVO = null;
    Collection templateCategories = null;
    try {
      PrintTemplate remoteEJB = (PrintTemplate)CVUtility.setupEJB("Printtemplate", "com.centraview.printtemplate.PrintTemplateHome", dataSource);
      templateVO = remoteEJB.getPrintTemplate(templateId);
      templateCategories = remoteEJB.getCategories();
    } catch (Exception e) {
      throw new ServletException(e);
    }
    // ... and populate the DynaActionForm
    DynaActionForm templateForm = (DynaActionForm)form;
View Full Code Here

Examples of org.geomajas.plugin.printing.configuration.PrintTemplate

  private final Logger log = LoggerFactory.getLogger(PrintServiceImplTest.class);

  @Before
  public void loadTemplates() throws Exception {
    PrintTemplate template = printService.createDefaultTemplate("A4", true);
    template.setName("test");
    printService.saveOrUpdateTemplate(template);
    log.info(template.getPageXml());

  }
View Full Code Here

Examples of org.geomajas.plugin.printing.configuration.PrintTemplate

    }
    LegendComponent comp = (LegendComponent) printDtoService.toInternal(legend);
    PageComponentImpl page = new PageComponentImpl();
    page.setSize("0 0", false);
    page.addComponent(comp);
    PrintTemplate template = new PrintTemplate();
    template.setPage(page);
    SinglePageDocument pdfDoc = new SinglePageDocument(page, null);
    FileOutputStream fo = new FileOutputStream("target/legend.png");
    pdfDoc.render(fo, Format.PNG);
    fo.flush();
    fo.close();
View Full Code Here

Examples of org.geomajas.plugin.printing.configuration.PrintTemplate

    });
    return allTemplates;
  }

  public PrintTemplate createDefaultTemplate(String pagesize, boolean landscape) throws PrintingException {
    PrintTemplate template = createTemplate(pagesize, landscape);
    // calculate the sizes (if not already calculated !)
    SinglePageDocument document = new SinglePageDocument(template.getPage(), null);
    try {
      document.layout(Format.PDF);
    } catch (PrintingException e) {
      // should not happen !
      log.warn("Unexpected problem while laying out default print template", e);
View Full Code Here

Examples of org.geomajas.plugin.printing.configuration.PrintTemplate

    map.addComponent(bar);
    map.addComponent(legend);
    map.addComponent(northarrow);
    page.addComponent(map);
    page.addComponent(title);
    PrintTemplate template = new PrintTemplate(true);
    template.setName("Default" + "-" + pageSize + "-" + (landscape ? "landscape" : "portrait"));
    template.setPage(page);
    return template;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.