Examples of JRBaseGenericPrintElement


Examples of net.sf.jasperreports.engine.base.JRBaseGenericPrintElement

   */
  public static JRGenericPrintElement makeFlashElement(JRPrintElement template,
      String swfUrl, Map flashVars, Map elementParameters)
  {
    // TODO use JRTemplateGenericElement
    JRBaseGenericPrintElement flashEl = new JRBaseGenericPrintElement(
        template.getDefaultStyleProvider());
    // copy all attribute from the template element
    flashEl.setX(template.getX());
    flashEl.setY(template.getY());
    flashEl.setWidth(template.getWidth());
    flashEl.setHeight(template.getHeight());
    flashEl.setStyle(template.getStyle());
    flashEl.setMode(template.getOwnModeValue());
    flashEl.setBackcolor(template.getOwnBackcolor());
    flashEl.setForecolor(template.getOwnForecolor());
    flashEl.setOrigin(template.getOrigin());
    flashEl.setKey(template.getKey());
   
    flashEl.setGenericType(FLASH_ELEMENT_TYPE);
    flashEl.setParameterValue(PARAMETER_SWF_URL, swfUrl);
    for (Iterator it = flashVars.entrySet().iterator(); it.hasNext();)
    {
      Map.Entry entry = (Map.Entry) it.next();
      String name = (String) entry.getKey();
      Object value = entry.getValue();
      String paramName = PARAMETER_FLASH_VAR_PREFIX + name;
      flashEl.setParameterValue(paramName, value);
    }
   
    if (elementParameters != null && !elementParameters.isEmpty())
    {
      for (Iterator it = elementParameters.entrySet().iterator(); it.hasNext();)
      {
        Map.Entry entry = (Map.Entry) it.next();
        String name = (String) entry.getKey();
        Object value = entry.getValue();
        flashEl.setParameterValue(name, value);
      }
    }
   
    return flashEl;
  }
View Full Code Here

Examples of net.sf.jasperreports.engine.base.JRBaseGenericPrintElement

{

  public Object createObject(Attributes arg0) throws Exception
  {
    JasperPrint jasperPrint = (JasperPrint) digester.peek(digester.getCount() - 2);
    JRBaseGenericPrintElement element = new JRBaseGenericPrintElement(
        jasperPrint.getDefaultStyleProvider());
    return element;
  }
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.