Package org.pentaho.reporting.engine.classic.core.style

Examples of org.pentaho.reporting.engine.classic.core.style.ElementStyleSheet


    final XmlWriter xmlWriter = getXmlWriter();
    xmlWriter.writeTag(ExtParserModule.NAMESPACE, AbstractXMLDefinitionWriter.STYLES_TAG, XmlWriterSupport.OPEN);
    for (int i = 0; i < styles.length; i++)
    {
      final ElementStyleSheet style = styles[i];
      xmlWriter.writeTag(ExtParserModule.NAMESPACE, AbstractXMLDefinitionWriter.STYLE_TAG,
          "name", style.getName(), XmlWriterSupport.OPEN);

      final StyleWriter stW = new StyleWriter
          (getReportWriter(), style, xmlWriter);
      stW.write();
View Full Code Here


   *
   * @param element the element.
   */
  private void collectStylesFromElement(final Element element)
  {
    final ElementStyleSheet elementSheet = element.getStyle();

    final ElementStyleSheet[] parents = elementSheet.getParents();
    for (int i = 0; i < parents.length; i++)
    {
      final ElementStyleSheet es = parents[i];
      addCollectableStyleSheet(es);
    }
  }
View Full Code Here

    }

    final ElementStyleSheet[] parents = es.getParents();
    for (int i = 0; i < parents.length; i++)
    {
      final ElementStyleSheet parentsheet = parents[i];
      addCollectableStyleSheet(parentsheet);
    }

    if (reportStyles.contains(es) == false)
    {
View Full Code Here

    {
      throw new ParseException
          ("Required attribute 'name' is missing.",
              getRootHandler().getDocumentLocator());
    }
    final ElementStyleSheet parent = styleSheetCollection.getStyleSheet(name);
    if (parent == null)
    {
      throw new ParseException
          ("Specified parent stylesheet is not defined.",
              getRootHandler().getDocumentLocator());
View Full Code Here

    final String styleClass = attr.getValue(getUri(), AbstractElementReadHandler.STYLE_CLASS_ATT);
    if (styleClass != null)
    {
      final ReportDefinition report = (ReportDefinition) getRootHandler().getHelperObject
          (ReportParserUtil.HELPER_OBJ_REPORT_NAME);
      final ElementStyleSheet existingStyleSheet =
          report.getStyleSheetCollection().getStyleSheet(styleClass);
      if (existingStyleSheet != null)
      {
        getBand().getStyle().addParent(existingStyleSheet);
      }
View Full Code Here

    final ElementStyleSheet[] sheets = styleSheet.getParents();
    final CSVQuoter quoter = new CSVQuoter(' ', '\'');
    StringBuffer parents = null;
    for (int i = 0; i < sheets.length; i++)
    {
      final ElementStyleSheet sheet = sheets[i];
      if (sheet.isGlobalDefault())
      {
        continue;
      }

      if (parents == null)
      {
        parents = new StringBuffer(sheets.length * 30);
      }
      final String quoted = quoter.doQuoting(sheet.getName());
      if (parents.length() > 0)
      {
        parents.append(' ');
      }
      parents.append(quoted);
View Full Code Here

  private void writeStyleInfo(final Element band)
      throws IOException, ReportWriterException
  {
    final XmlWriter writer = getXmlWriter();
    final ElementStyleSheet styleSheet = band.getStyle();
    if (isStyleSheetEmpty(styleSheet) == false)
    {
      writer.writeTag(ExtParserModule.NAMESPACE, AbstractXMLDefinitionWriter.STYLE_TAG, XmlWriterSupport.OPEN);

      final StyleWriter styleWriter =
View Full Code Here

      if (rlb.getSubReportCount() > 0)
      {
        return false;
      }
    }
    final ElementStyleSheet styleSheet = band.getStyle();
    if (isStyleSheetEmpty(styleSheet))
    {
      return true;
    }
    return false;
View Full Code Here

    if (styleClass != null)
    {
      final ReportDefinition report = (ReportDefinition) getRootHandler().getHelperObject
          (ReportParserUtil.HELPER_OBJ_REPORT_NAME);
      final ElementStyleSheet existingStyleSheet =
          report.getStyleSheetCollection().getStyleSheet(styleClass);
      if (existingStyleSheet != null)
      {
        element.getStyle().addParent(existingStyleSheet);
      }
View Full Code Here

    final ElementStyleSheet[] parents = elementStyleSheet.getParents();
    final XmlWriter writer = getXmlWriter();
    // write the parents of the stylesheet ...
    for (int p = 0; p < parents.length; p++)
    {
      final ElementStyleSheet parent = parents[p];
      if (isDefaultStyleSheet(parent) == false)
      {
        writer.writeTag(ExtParserModule.NAMESPACE, AbstractXMLDefinitionWriter.EXTENDS_TAG, "name", parent.getName(),
            XmlWriterSupport.CLOSE);
      }
    }

    // now write all defined properties of the stylesheet ...
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.style.ElementStyleSheet

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.