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

Examples of org.pentaho.reporting.engine.classic.core.layout.style.SimpleStyleSheet


  public RenderBox createAutoParagraph(final ReportElement band,
                                       final StyleSheet bandStyle,
                                       final ReportStateKey stateKey)
  {
    final SimpleStyleSheet styleSheet = bandCache.getStyleSheet(bandStyle);
    final BoxDefinition boxDefinition = boxDefinitionFactory.getBoxDefinition(styleSheet);

    final ParagraphRenderBox paragraphBox = new ParagraphRenderBox
        (styleSheet, band.getObjectID(), boxDefinition, band.getElementType(), band.getAttributes(), stateKey);
    paragraphBox.setName(band.getName());
View Full Code Here


                                               final long range)
  {
    if (this.manualBreakBoxStyle == null)
    {
      final ManualBreakIndicatorStyleSheet mbis = new ManualBreakIndicatorStyleSheet();
      this.manualBreakBoxStyle = new SimpleStyleSheet(mbis);
    }

    final RenderBox sectionBox = new BreakMarkerRenderBox
        (manualBreakBoxStyle, new InstanceID(), BoxDefinition.EMPTY, AutoLayoutBoxType.INSTANCE,
            ReportAttributeMap.EMPTY_MAP, stateKey, range);
View Full Code Here

    else
    {
      rawKey = null;
    }

    final SimpleStyleSheet elementStyle = bandCache.getStyleSheet(style);
    final RenderableReplacedContent content = new RenderableReplacedContent(elementStyle, value, rawKey, metaData);
    final BoxDefinition boxDefinition = getBoxDefinition(elementStyle);
    final RenderableReplacedContentBox child =
        new RenderableReplacedContentBox(elementStyle, element.getObjectID(), boxDefinition,
            element.getElementType(), element.getAttributes(), stateKey, content);
View Full Code Here

      Object value = element.getElementType().getValue(runtime, element);
      boolean empty = isEmpty(value);

      StyleInfoCollection lastCollection = (StyleInfoCollection)
          element.getAttribute(AttributeNames.Internal.NAMESPACE, AttributeNames.Internal.FAST_EXPORT_ELEMENT_STASH);
      SimpleStyleSheet computedStyle = element.getComputedStyle();
      if (lastCollection != null &&
          lastCollection.getStyleChangeTracker() == computedStyle.getChangeTrackerHash() &&
          lastCollection.nullValue == empty)
      {
        // no changes
        styleInfo.put(element.getObjectID(), lastCollection);
        return;
      }

      StyleInfoCollection collection = new StyleInfoCollection(styleIndex.length, empty);
      collection.setStyleChangeTracker(computedStyle.getChangeTrackerHash());
      for (StyleKey styleKey : styleIndex)
      {
        collection.add(styleKey, computedStyle.getStyleProperty(styleKey));
      }
      styleInfo.put(element.getObjectID(), collection);
    }
View Full Code Here

  public void compute(final Band band,
                      final ExpressionRuntime runtime,
                      final OutputStream out)
      throws ReportProcessingException, ContentProcessingException, IOException
  {
    SimpleStyleSheet computedStyle = band.getComputedStyle();
    if (computedStyle.getBooleanStyleProperty(ElementStyleKeys.VISIBLE) == false)
    {
      return;
    }

    this.excelPrinter.startSection(band, cellHeights);
View Full Code Here

  }

  public void testStylesToArray()
  {
    final ManualBreakIndicatorStyleSheet mbis = new ManualBreakIndicatorStyleSheet();
    final StyleSheet manualBreakBoxStyle = new SimpleStyleSheet(mbis);

    final int styleCount = (StyleKey.getDefinedStyleKeyCount());
    assertTrue(styleCount > 0);
    final Object[] objects = manualBreakBoxStyle.toArray();
    assertNotNull(objects);
    assertEquals(styleCount, objects.length);
  }
View Full Code Here

      this.runtime = runtime;
      final OutputProcessorMetaData outputProcessorMetaData = runtime.getProcessingContext().getOutputProcessorMetaData();
      this.designtime = outputProcessorMetaData.isFeatureSupported(OutputProcessorFeature.DESIGNTIME);
      collectedReports.clear();

      final SimpleStyleSheet styleSheet = band.getComputedStyle();
      final boolean invConsSpace = builder.isEmptyElementsHaveSignificance();
      if (invConsSpace || isElementProcessable(band, styleSheet))
      {
        if (addBandInternal(band, builder, true))
        {
View Full Code Here

    return ExcelTextExtractor.computeRichText(fontFactory, creationHelper, text, formatBuffer);
  }

  protected boolean inspectStartSection(final ReportElement box, final boolean inlineSection)
  {
    SimpleStyleSheet styleSheet = box.getComputedStyle();
    if (styleSheet.getBooleanStyleProperty(ElementStyleKeys.VISIBLE) == false)
    {
      return false;
    }

    final Color textColor = (Color) styleSheet.getStyleProperty(ElementStyleKeys.PAINT);
    final HSSFFontWrapper wrapper = new HSSFFontWrapper
        (styleSheet, colorProducer.getNearestColor(textColor));
    final RichTextFormat rtf = new RichTextFormat(getTextLength(), wrapper);

    // Check the style.
View Full Code Here

    }

    protected void inspectElement(final ReportElement element)
    {
      simpleStyleResolver.resolve(element, resolveStyleSheet);
      element.setComputedStyle(new SimpleStyleSheet(resolveStyleSheet));
    }
View Full Code Here

      {
        return;
      }

      ReportAttributeMap<Object> attributes = element.getAttributes();
      SimpleStyleSheet computedStyle = element.getComputedStyle();
      long width = cb.getWidth();
      long height = cb.getHeight();
      if (textExtractorHelper.processRenderableReplacedContent
          (attributes, computedStyle, width, height, cb.getContentWidth(), cb.getContentHeight(), rawObject))
      {
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.layout.style.SimpleStyleSheet

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.