Package org.pentaho.reporting.engine.classic.core.layout.model.context

Examples of org.pentaho.reporting.engine.classic.core.layout.model.context.BoxDefinition


      return new AutoRenderBox(objectID, stateKey, styleSheet, attributes, elementType);
    }
    if (BandStyleKeys.LAYOUT_BLOCK.equals(layoutType))
    {
      final SimpleStyleSheet styleSheet = bandCache.getStyleSheet(elementStyleSheet);
      final BoxDefinition boxDefinition = boxDefinitionFactory.getBoxDefinition(styleSheet);
      return new BlockRenderBox(styleSheet, objectID, boxDefinition, elementType, attributes, stateKey);
    }
    if (LAYOUT_PARAGRAPH_LINEBOX.equals(layoutType))
    {
      // The non-inheritable styles will be applied to the auto-generated paragraph box. The inlinebox itself
      // only receives the inheritable styles so that it can inherit it to its next child ..
      final SimpleStyleSheet styleSheet = bandCache.getStyleSheet(new ParagraphPoolboxStyleSheet(elementStyleSheet));
      final BoxDefinition boxDefinition = boxDefinitionFactory.getBoxDefinition(styleSheet);
      return new InlineRenderBox(styleSheet, objectID, boxDefinition, elementType, attributes, stateKey);
    }
    else if (BandStyleKeys.LAYOUT_INLINE.equals(layoutType))
    {
      final SimpleStyleSheet styleSheet = bandCache.getStyleSheet(elementStyleSheet);
      final BoxDefinition boxDefinition = boxDefinitionFactory.getBoxDefinition(styleSheet);
      return new InlineRenderBox(styleSheet, objectID, boxDefinition, elementType, attributes, stateKey);
    }
    if (BandStyleKeys.LAYOUT_ROW.equals(layoutType))
    {
      final SimpleStyleSheet styleSheet = bandCache.getStyleSheet(elementStyleSheet);
      final BoxDefinition boxDefinition = boxDefinitionFactory.getBoxDefinition(styleSheet);
      return new RowRenderBox(styleSheet, objectID, boxDefinition, elementType, attributes, stateKey);
    }
    if (BandStyleKeys.LAYOUT_TABLE.equals(layoutType))
    {
      if (strictCompatibilityMode)
      {
        throw new IncompatibleFeatureException("A report with a legacy mode of pre-4.0 cannot handle table layouts. " +
            "Migrate your report to version 4.0 or higher.",
            ClassicEngineBoot.computeVersionId(4, 0, 0));
      }
      final SimpleStyleSheet styleSheet = bandCache.getStyleSheet(elementStyleSheet);
      final BoxDefinition boxDefinition = boxDefinitionFactory.getBoxDefinition(styleSheet);
      return new TableRenderBox(styleSheet, objectID, boxDefinition, elementType, attributes, stateKey);
    }
    if (BandStyleKeys.LAYOUT_TABLE_BODY.equals(layoutType) ||
        BandStyleKeys.LAYOUT_TABLE_HEADER.equals(layoutType) ||
        BandStyleKeys.LAYOUT_TABLE_FOOTER.equals(layoutType))
    {
      final SimpleStyleSheet styleSheet = bandCache.getStyleSheet(elementStyleSheet);
      final BoxDefinition boxDefinition = boxDefinitionFactory.getBoxDefinition(styleSheet);
      return new TableSectionRenderBox(styleSheet, objectID, boxDefinition, elementType, attributes, stateKey);
    }
    if (BandStyleKeys.LAYOUT_TABLE_ROW.equals(layoutType))
    {
      final SimpleStyleSheet styleSheet = bandCache.getStyleSheet(elementStyleSheet);
      final BoxDefinition boxDefinition = boxDefinitionFactory.getBoxDefinition(styleSheet);
      return new TableRowRenderBox(styleSheet, objectID, boxDefinition, elementType, attributes, stateKey);
    }
    if (BandStyleKeys.LAYOUT_TABLE_CELL.equals(layoutType))
    {
      final SimpleStyleSheet styleSheet = bandCache.getStyleSheet(elementStyleSheet);
      final BoxDefinition boxDefinition = boxDefinitionFactory.getBoxDefinition(styleSheet);
      return new TableCellRenderBox(styleSheet, objectID, boxDefinition, elementType, attributes, stateKey);
    }
    if (BandStyleKeys.LAYOUT_TABLE_COL.equals(layoutType))
    {
      final SimpleStyleSheet styleSheet = bandCache.getStyleSheet(elementStyleSheet);
      final BoxDefinition boxDefinition = boxDefinitionFactory.getBoxDefinition(styleSheet);
      return new TableColumnNode(styleSheet, objectID, boxDefinition, elementType, attributes, stateKey);
    }
    if (BandStyleKeys.LAYOUT_TABLE_COL_GROUP.equals(layoutType))
    {
      final SimpleStyleSheet styleSheet = bandCache.getStyleSheet(elementStyleSheet);
      return new TableColumnGroupNode(styleSheet, attributes);
    }

    // assume 'Canvas' by default ..
    final SimpleStyleSheet styleSheet = bandCache.getStyleSheet(elementStyleSheet);
    final BoxDefinition boxDefinition = boxDefinitionFactory.getBoxDefinition(styleSheet);
    return new CanvasRenderBox(styleSheet, objectID, boxDefinition, elementType,
        attributes, stateKey);
  }
View Full Code Here


  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());
    return paragraphBox;
View Full Code Here

      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);
    child.setName(element.getName());
    return child;
View Full Code Here

    processStack = processStack.getParent();
  }

  protected boolean inspectStartSection(final ReportElement box, final boolean inlineSection)
  {
    BoxDefinition boxDefinition = boxDefinitionFactory.getBoxDefinition(box.getComputedStyle());
    if (inlineSection == false)
    {
      return textExtractorHelper.startBox
          (box.getObjectID(), box.getAttributes(), box.getComputedStyle(), boxDefinition, true);
    }
View Full Code Here

    reportDrawable.setStyleSheet(elementStyle);
    final DrawableWrapper wrapper = new DrawableWrapper(reportDrawable);

    final RenderableReplacedContent content = new RenderableReplacedContent(elementStyle, wrapper, null, getMetaData());
    final BoxDefinition boxDefinition = getBoxDefinitionFactory().getBoxDefinition(elementStyle);
    final RenderableReplacedContentBox child =
        new RenderableReplacedContentBox(elementStyle, element.getObjectID(), boxDefinition,
            element.getElementType(), element.getAttributes(), stateKey, content);
    child.setName(element.getName());
    box.addChild(child);
View Full Code Here

    data.setX(box.getX());
    data.setY(box.getY());
    data.setWidth(box.getWidth());
    data.setHeight(box.getHeight());
    final BoxDefinition boxDefinition = box.getBoxDefinition();
    data.setPaddingX(boxDefinition.getPaddingLeft() + boxDefinition.getBorder().getLeft().getWidth());
    data.setPaddingY(boxDefinition.getPaddingTop() + boxDefinition.getBorder().getTop().getWidth());
    data.setLayoutAge(age);
    data.setElementType(box.getNodeType());
    data.setConflictsInTableMode(conflicts.containsKey(id));

    horizontalEdgePositions.add(box.getX(), box.getInstanceId());
View Full Code Here

    data.setX(box.getX());
    data.setY(box.getY());
    data.setWidth(box.getWidth());
    data.setHeight(box.getHeight());
    final BoxDefinition boxDefinition = box.getBoxDefinition();
    data.setPaddingX(boxDefinition.getPaddingLeft() + boxDefinition.getBorder().getLeft().getWidth());
    data.setPaddingY(boxDefinition.getPaddingTop() + boxDefinition.getBorder().getTop().getWidth());
    data.clearAdditionalBounds();
    data.setLayoutAge(age);
    data.setElementType(box.getNodeType());
    return true;
  }
View Full Code Here

      g2.fillRect(rightSelectorEdge, bottomSelectorEdge, 20, 20);
    }

    final StaticBoxLayoutProperties sblp = new StaticBoxLayoutProperties();

    final BoxDefinition definition = boxDefinitionFactory.getBoxDefinition(elementStyleSheet);
    final Border border = definition.getBorder();
    sblp.setBorderTop(border.getTop().getWidth());
    sblp.setBorderLeft(border.getLeft().getWidth());
    sblp.setBorderBottom(border.getBottom().getWidth());
    sblp.setBorderRight(border.getRight().getWidth());
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.layout.model.context.BoxDefinition

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.