Examples of ElementAlignment


Examples of org.pentaho.reporting.engine.classic.core.ElementAlignment

      final long rprefH = preferredHeight.resolve(resolveSize, usedHeight);
      computedContentHeight = ProcessUtility.computeLength(rminH, rmaxH, rprefH);
    }

    child = box.getFirstChild();
    final ElementAlignment valign = box.getNodeLayoutProperties().getVerticalAlignment();
    final long boxY1 = box.getCachedY() + insetTop;
    final long boxY2 = boxY1 + computedContentHeight;
    while (child != null)
    {
      final long childY1 = child.getCachedY();
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.ElementAlignment

    }
  }

  private void computeCellStyle(final RenderBox content, final Cell cell)
  {
    final ElementAlignment verticalAlign = content.getNodeLayoutProperties().getVerticalAlignment();
    if (ElementAlignment.BOTTOM.equals(verticalAlign))
    {
      cell.setVerticalAlignment(Element.ALIGN_BOTTOM);
    }
    else if (ElementAlignment.MIDDLE.equals(verticalAlign))
    {
      cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
    }
    else
    {
      cell.setVerticalAlignment(Element.ALIGN_TOP);
    }

    final ElementAlignment textAlign = (ElementAlignment)
        content.getStyleSheet().getStyleProperty(ElementStyleKeys.ALIGNMENT);
    if (ElementAlignment.RIGHT.equals(textAlign))
    {
      cell.setHorizontalAlignment(Element.ALIGN_RIGHT);
    }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.ElementAlignment

    final long computedHeight = box.getCachedHeight();
    if (computedHeight > usedHeight)
    {
      // we have extra space to distribute. So lets shift some boxes.
      final ElementAlignment valign = box.getNodeLayoutProperties().getVerticalAlignment();
      if (ElementAlignment.BOTTOM.equals(valign))
      {
        final long boxBottom = (box.getCachedY() + box.getCachedHeight() - insetBottom);
        final long delta = boxBottom - childY2;
        CacheBoxShifter.shiftBoxChilds(box, delta);
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.ElementAlignment

      if (mergedLine == null)
      {
        return;
      }

      final ElementAlignment textAlignment = paragraph.getLastLineAlignment();
      final LastLineTextAlignmentProcessor proc = create(textAlignment);

      // Now Build the sequence list that holds all nodes for the horizontal alignment computation.
      // The last line will get a special "last-line" horizontal alignment. This is quite usefull if
      // we are working with justified text and want the last line to be left-aligned.
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.ElementAlignment

        final HSSFFontWrapper wrapper = new HSSFFontWrapper
            (fontName, fontSize, bold, italic, underline, strikethrough, fontColorProducer.getNearestColor(textColor));
        final Font excelFont = fontFactory.getExcelFont(wrapper);
        this.font = excelFont.getIndex();

        final ElementAlignment horizontal =
            (ElementAlignment) styleSheet.getStyleProperty(ElementStyleKeys.ALIGNMENT);
        this.horizontalAlignment = HSSFCellStyleProducer.convertAlignment(horizontal);
        final ElementAlignment vertical =
            (ElementAlignment) styleSheet.getStyleProperty(ElementStyleKeys.VALIGNMENT);
        this.verticalAlignment = HSSFCellStyleProducer.convertAlignment(vertical);
        final String dataStyle =
            (String) styleSheet.getStyleProperty(ElementStyleKeys.EXCEL_DATA_FORMAT_STRING);
        if (dataStyle != null)
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.ElementAlignment

      if (fontSize != null)
      {
        attList.setAttribute(WizardCoreModule.NAMESPACE, "font-size", String.valueOf(fontSize));
      }
      final ElementAlignmentValueConverter elementAlignmentValueConverter = new ElementAlignmentValueConverter();
      final ElementAlignment horizontalAlignment = rootBandDefinition.getHorizontalAlignment();
      if (horizontalAlignment != null)
      {
        attList.setAttribute(WizardCoreModule.NAMESPACE, "horizontal-align",
            elementAlignmentValueConverter.toAttributeValue(horizontalAlignment));
      }
      final ElementAlignment verticalAlignment = rootBandDefinition.getVerticalAlignment();
      if (verticalAlignment != null)
      {
        attList.setAttribute(WizardCoreModule.NAMESPACE, "vertical-align",
            elementAlignmentValueConverter.toAttributeValue(verticalAlignment));
      }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.ElementAlignment

    try
    {
      final AttributeList attList = new AttributeList();

      final ElementAlignmentValueConverter elementAlignmentValueConverter = new ElementAlignmentValueConverter();
      final ElementAlignment totalsHorizontalAlignment = definition.getTotalsHorizontalAlignment();
      if (totalsHorizontalAlignment != null)
      {
        attList.setAttribute(WizardCoreModule.NAMESPACE, "totals-alignment",
            elementAlignmentValueConverter.toAttributeValue(totalsHorizontalAlignment));
      }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.ElementAlignment

      if (fontSize != null)
      {
        attList.setAttribute(WizardCoreModule.NAMESPACE, "font-size", String.valueOf(fontSize));
      }
      final ElementAlignmentValueConverter elementAlignmentValueConverter = new ElementAlignmentValueConverter();
      final ElementAlignment horizontalAlignment = definition.getHorizontalAlignment();
      if (horizontalAlignment != null)
      {
        attList.setAttribute(WizardCoreModule.NAMESPACE, "horizontal-align",
            elementAlignmentValueConverter.toAttributeValue(horizontalAlignment));
      }
      final ElementAlignment verticalAlignment = definition.getVerticalAlignment();
      if (verticalAlignment != null)
      {
        attList.setAttribute(WizardCoreModule.NAMESPACE, "vertical-align",
            elementAlignmentValueConverter.toAttributeValue(verticalAlignment));
      }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.ElementAlignment

          (MetaAttributeNames.Style.NAMESPACE, MetaAttributeNames.Style.FONTFAMILY, String.class, context);
      final Color textColor = (Color) attributes.getMetaAttribute
          (MetaAttributeNames.Style.NAMESPACE, MetaAttributeNames.Style.COLOR, Color.class, context);
      final Color bgColor = (Color) attributes.getMetaAttribute
          (MetaAttributeNames.Style.NAMESPACE, MetaAttributeNames.Style.BACKGROUND_COLOR, Color.class, context);
      final ElementAlignment hAlign = (ElementAlignment) attributes.getMetaAttribute
          (MetaAttributeNames.Style.NAMESPACE, MetaAttributeNames.Style.HORIZONTAL_ALIGNMENT,
              ElementAlignment.class, context);
      final ElementAlignment vAlign = (ElementAlignment) attributes.getMetaAttribute
          (MetaAttributeNames.Style.NAMESPACE, MetaAttributeNames.Style.VERTICAL_ALIGNMENT, ElementAlignment.class,
              context);

      final ElementStyleSheet styleSheet = e.getStyle();
      styleSheet.setStyleProperty(ElementStyleKeys.VALIGNMENT, vAlign);
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.ElementAlignment

    return model;
  }

  public void initializeFromStyle(final ElementStyleSheet styleSheet)
  {
    final ElementAlignment halign = (ElementAlignment) styleSheet.getStyleProperty(ElementStyleKeys.ALIGNMENT);
    if (ElementAlignment.LEFT.equals(halign))
    {
      leftAlignButton.setSelected(true);
    }
    else if (ElementAlignment.CENTER.equals(halign))
    {
      centerAlignButton.setSelected(true);
    }
    else
    {
      rightAlignButton.setSelected(true);
    }

    final ElementAlignment valign = (ElementAlignment) styleSheet.getStyleProperty(ElementStyleKeys.VALIGNMENT);
    if (ElementAlignment.BOTTOM.equals(valign))
    {
      bottomAlignButton.setSelected(true);
    }
    else if (ElementAlignment.MIDDLE.equals(valign))
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.