Package net.sf.jasperreports.engine

Examples of net.sf.jasperreports.engine.JRStyle


    JRStyle[] styles = template.getStyles();
    if (styles != null)
    {
      for (int i = 0; i < styles.length; i++)
      {
        JRStyle style = styles[i];
        writeStyle(style);
      }
    }
  }
View Full Code Here


    JasperDesign jasperDesign = (JasperDesign) digester.peek(digester.getCount() - 2);
    Map stylesMap = jasperDesign.getStylesMap();

    if (stylesMap.containsKey(parentStyleName))
    {
      JRStyle parent = (JRStyle) stylesMap.get(parentStyleName);
      currentStyle.setParentStyle(parent);
    }
    else
    {
      currentStyle.setParentStyleNameReference(parentStyleName);
View Full Code Here

    if (!stylesMap.containsKey(parentStyleName))
    {
      printXmlLoader.addError(new JRRuntimeException("Unknown report style : " + parentStyleName));
    }
   
    JRStyle parent = (JRStyle) stylesMap.get(parentStyleName);
    currentStyle.setParentStyle(parent);
  }
View Full Code Here

   */
  protected abstract JRPrintElement fill() throws JRException;

  protected JRTemplateElement getElementTemplate()
  {
    JRStyle style = getStyle();
    JRTemplateElement template = getTemplate(style);
    if (template == null)
    {
      template = createElementTemplate();
      transferProperties(template);
View Full Code Here

  protected void performDelayedEvaluation(JRPrintElement element, byte evaluation)
      throws JRException
  {
    if (isDelayedStyleEvaluation())
    {
      JRStyle elementStyle = initStyle;
      if (elementStyle == null)
      {
        elementStyle = filler.getDefaultStyle();
      }
     
      if (elementStyle != null)
      {
        JRStyle evaluatedStyle = conditionalStylesContainer.evaluateConditionalStyle(
            elementStyle, evaluation);
        // if the evaluated style differs from the existing style
        if (evaluatedStyle != element.getStyle())
        {
          // set the evaluated style as current style
View Full Code Here

    }
  }

  protected void collectStyleDelayedEvaluations()
  {
    JRStyle elementStyle = initStyle;
    if (elementStyle == null)
    {
      elementStyle = filler.getDefaultStyle();
    }
   
    if (elementStyle != null)
    {
      JRStyle style = elementStyle;
      while (style != null)
      {
        collectDelayedEvaluations(style);
       
        // proceed to the parent style
        style = style.getStyle();
      }
    }
  }
View Full Code Here

    if (currentStyle != null)
    {
      return currentStyle;
    }
   
    JRStyle crtStyle = initStyle;
   
    boolean isUsingDefaultStyle = false;

    if (crtStyle == null)
    {
      crtStyle = filler.getDefaultStyle();
      isUsingDefaultStyle = true;
    }

    JRStyle evalStyle = crtStyle;

    if (conditionalStylesContainer != null)
    {
      evalStyle = conditionalStylesContainer.getEvaluatedConditionalStyle(crtStyle);
    }
View Full Code Here

   */
  public static class Style extends JRPenFactory
  {
    public Object createObject(Attributes atts)
    {
      JRStyle style = (JRStyle) digester.peek();
      setPenAttributes(atts, style.getLinePen());
      return style;
    }
View Full Code Here

  }

  protected void loadStyles() throws JRException
  {
    List styleList = collectStyles();
    JRStyle reportDefaultStyle = jasperReport.getDefaultStyle();
    if (reportDefaultStyle == null)
    {
      lookupExternalDefaultStyle(styleList);
    }
View Full Code Here

    {
      styles = new JRStyle[reportStyles.length];

      for (int i = 0; i < reportStyles.length; i++)
      {
        JRStyle style = reportStyles[i];
        styleList.add(style);

        //add dummy style requester so that report styles are always included
        //in the final list
        factory.registerDelayedStyleSetter(DUMMY_STYLE_SETTER, style.getName());
      }
    }

    return styleList;
  }
View Full Code Here

TOP

Related Classes of net.sf.jasperreports.engine.JRStyle

Copyright © 2018 www.massapicom. 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.