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

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


    if (box.getComputedStyle().getBooleanStyleProperty(ElementStyleKeys.VISIBLE) == false)
    {
      return;
    }

    final StyleSheet styleSheet = box.getComputedStyle();
    final String target = (String) styleSheet.getStyleProperty(ElementStyleKeys.HREF_TARGET);
    if (target != null)
    {
      textExtractorHelper.handleLinkOnElement(styleSheet, target);
      processStack = new HtmlTextExtractorState(processStack, true);
    }
View Full Code Here


  }


  private RenderBox processTextEllipse(final RenderBox box, final long x2)
  {
    final StyleSheet style = box.getStyleSheet();
    final String reslit = (String) style.getStyleProperty(TextStyleKeys.RESERVED_LITERAL, ellipseOverride);
    if (reslit == null || "".equals(reslit))
    {
      // oh, no ellipse. Thats nice.
      return null;
    }
View Full Code Here

//    return processTextEllipseNormal(box, x2, reslit);
  }

  private RenderBox processTextEllipseNormal(final RenderBox box, final long x2, String reslit)
  {
    final StyleSheet style = box.getStyleSheet();

    final RenderBox textEllipse = (RenderBox) box.derive(false);
    final ReportAttributeMap map = box.getAttributes();
    final TextCache.Result result = textCache.get
        (style.getId(), style.getChangeTracker(), map.getChangeTracker(), reslit);
    if (result != null)
    {
      textEllipse.addGeneratedChilds(result.getText());
      textEllipse.addGeneratedChilds(result.getFinish());
      performTextEllipseLayout(textEllipse, x2);
      return textEllipse;
    }
    if (buffer != null)
    {
      buffer.setCursor(0);
    }

    buffer = Utf16LE.getInstance().decodeString(reslit, buffer);
    bufferArray = buffer.getBuffer(bufferArray);

    textFactory.startText();
    final RenderNode[] renderNodes = textFactory.createText
        (bufferArray, 0, buffer.getLength(), style, box.getElementType(), box.getInstanceId(), map);
    final RenderNode[] finishNodes = textFactory.finishText();

    textEllipse.addGeneratedChilds(renderNodes);
    textEllipse.addGeneratedChilds(finishNodes);
    textCache.store(style.getId(), style.getChangeTracker(),
        map.getChangeTracker(), reslit, style, map, renderNodes, finishNodes);
    performTextEllipseLayout(textEllipse, x2);
    return textEllipse;
  }
View Full Code Here

      return backend.produceSubReportPlaceholder(element, style, stateKey);
    }

    public RenderBox produceSectionBox(final String layoutType, final ReportStateKey stateKey)
    {
      final StyleSheet styleSheet = new SectionKeepTogetherStyleSheet(false);
      return new SectionRenderBox(styleSheet, new InstanceID(), watermarkBoxDefinition, AutoLayoutBoxType.INSTANCE,
          ReportAttributeMap.emptyMap(), stateKey);
    }
View Full Code Here

  private boolean handleImageValues(final ReportElement content,
                                    final TableRectangle rectangle,
                                    final Object value)
  {
    final StyleSheet rawSource = content.getComputedStyle();

    if (value instanceof Image)
    {
      try
      {
View Full Code Here

  {
    builder.startBox(band);
    final boolean invConsSpace = builder.isEmptyElementsHaveSignificance();
    for (final ReportElement element : band)
    {
      final StyleSheet styleSheet = element.getComputedStyle();
      if (invConsSpace == false)
      {
        // pre-prune the layout model ...
        if (isElementProcessable(element, styleSheet) == false)
        {
          continue;
        }
      }

      if (element instanceof SubReport)
      {
        processSubReport((SubReport) element, builder);
        continue;
      }

      if (element instanceof Section)
      {
        addBandInternal((Section) element, builder, false);
      }
      else
      {
        processContent(element, builder);
      }
    }


    if (root == false && builder.isEmpty())
    {
      final OutputProcessorMetaData metaData = runtime.getProcessingContext().getOutputProcessorMetaData();
      if (metaData.isFeatureSupported(OutputProcessorFeature.STRICT_COMPATIBILITY))
      {
        // this is the behaviour of the old 3.9 code. It is hard to explain in sane words, just look at
        // the old LayoutBuilder class for an example.
        final StyleSheet computedStyle = band.getComputedStyle();
        if (invConsSpace == false && DefaultLayoutModelBuilder.isControlBand(computedStyle) == false)
        {
          // creates either a block or a inline element
          if (band.getElementCount() > 0)
          {
View Full Code Here

  protected void traverseSection(final Section section) throws ContentProcessingException
  {
    boolean inlineSection;
    if (inlineLayout == 0)
    {
      StyleSheet styleSheet = section.getComputedStyle();
      if (BandStyleKeys.LAYOUT_INLINE.equals(styleSheet.getStyleProperty(BandStyleKeys.LAYOUT)))
      {
        inlineLayout += 1;
        inlineSection = true;
      }
      else
View Full Code Here

TOP

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

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.