Examples of Band


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

    configureFunctions();
  }

  private void configureRecordGroup()
  {
    final Band b = new Band();
    b.setName("activitylog");
    b.getStyle().setStyleProperty(TextStyleKeys.BOLD, Boolean.TRUE);
    b.getStyle().setStyleProperty(TextStyleKeys.FONT, "SansSerif");
    b.getStyle().setStyleProperty(TextStyleKeys.FONTSIZE, new Integer(12));

    LabelElementFactory labelFactory = new LabelElementFactory();
    labelFactory.setAbsolutePosition(new Point2D.Float(0, 0));
    labelFactory.setMinimumSize(new FloatDimension(200, 15));
    labelFactory.setText("Time");
    b.addElement(labelFactory.createElement());

    labelFactory = new LabelElementFactory();
    labelFactory.setAbsolutePosition(new Point2D.Float(200, 0));
    labelFactory.setMinimumSize(new FloatDimension(-100, 15));
    labelFactory.setText("Task");
    b.addElement(labelFactory.createElement());

    b.addElement(HorizontalLineElementFactory.createHorizontalLine
        (15, null, new BasicStroke(1)));

    final Group group = report.getGroupByName("record-group");
    group.getHeader().addElement(b);
  }
View Full Code Here

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

    group.getHeader().addElement(b);
  }

  private void configureItemBand()
  {
    final Band b = new Band();
    b.setName("activitylog");
    b.getStyle().setStyleProperty(TextStyleKeys.BOLD, Boolean.FALSE);
    b.getStyle().setStyleProperty(TextStyleKeys.FONT, "SansSerif");
    b.getStyle().setStyleProperty(TextStyleKeys.FONTSIZE, new Integer(10));

    TextFieldElementFactory textFieldFactory = new TextFieldElementFactory();
    textFieldFactory.setFieldname("activitylog.Time");
    textFieldFactory.setAbsolutePosition(new Point2D.Float(0, 0));
    textFieldFactory.setMinimumSize(new FloatDimension(200, 12));
    b.addElement(textFieldFactory.createElement());

    textFieldFactory = new TextFieldElementFactory();
    textFieldFactory.setFieldname("activitylog.Task");
    textFieldFactory.setAbsolutePosition(new Point2D.Float(200, 0));
    textFieldFactory.setMinimumSize(new FloatDimension(-100, 12));
    textFieldFactory.setDynamicHeight(Boolean.TRUE);
    b.addElement(textFieldFactory.createElement());

    report.getItemBand().addElement(b);
  }
View Full Code Here

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

    {
      final int groupIdx = groupCount - i - 1;
      final int wizGroupIdx = wizardCount - i - 1;
      final GroupDefinition gd = groupDefinitions[wizGroupIdx];
      final Group g = definition.getGroup(groupIdx);
      final Band groupHeader = g.getHeader();
      final Band groupFooter = g.getFooter();

      iterateSection(groupHeader, new UpdateHeaderTask(gd));
      iterateSection(groupFooter, new UpdateFooterTask(gd));
    }

    final Band itemband = definition.getItemBand();
    final Band detailsHeader = definition.getDetailsHeader();
    final Band detailsFooter = definition.getDetailsFooter();

    final DetailFieldDefinition[] detailFieldDefinitions = wizardSpecification.getDetailFieldDefinitions();
    for (int i = 0; i < detailFieldDefinitions.length; i++)
    {
      final DetailFieldDefinition fieldDefinition = detailFieldDefinitions[i];
View Full Code Here

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

      configureCrosstabColumnGroup(relationalGroup, groupDefinition);
      insertGroup.setBody(new CrosstabColumnGroupBody(relationalGroup));
      insertGroup = relationalGroup;
    }

    final Band itemBand = AutoGeneratorUtility.findGeneratedContent(definition.getItemBand());
    if (itemBand == null)
    {
      return;
    }
    final DetailFieldDefinition[] detailFieldDefinitions = wizardSpecification.getDetailFieldDefinitions();
    if (detailFieldDefinitions.length == 0)
    {
      return;
    }

    final Float[] widthSpecs = new Float[detailFieldDefinitions.length];
    for (int i = 0; i < detailFieldDefinitions.length; i++)
    {
      final DetailFieldDefinition fieldDefinition = detailFieldDefinitions[i];
      final Length length = fieldDefinition.getWidth();
      if (length == null)
      {
        continue;
      }
      widthSpecs[i] = length.getNormalizedValue();
    }
    final float[] computedWidth =
        AutoGeneratorUtility.computeFieldWidths(widthSpecs, definition.getPageDefinition().getWidth());


    itemBand.getStyle().setStyleProperty(BandStyleKeys.LAYOUT, "row");
    for (int i = 0; i < detailFieldDefinitions.length; i++)
    {
      final DetailFieldDefinition detailFieldDefinition = detailFieldDefinitions[i];
      setupField(null, null, itemBand, detailFieldDefinition, computedWidth[i]);
    }
View Full Code Here

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

    }

    definition.getDetailsHeader().setRepeat(true);
    definition.getDetailsFooter().setRepeat(true);

    final Band detailsHeader = AutoGeneratorUtility.findGeneratedContent(definition.getDetailsHeader());
    final Band detailsFooter = AutoGeneratorUtility.findGeneratedContent(definition.getDetailsFooter());
    final Band itemBand = AutoGeneratorUtility.findGeneratedContent(definition.getItemBand());

    if (itemBand == null)
    {
      return;
    }

    final Float[] widthSpecs = new Float[detailFieldDefinitions.length];
    for (int i = 0; i < detailFieldDefinitions.length; i++)
    {
      final DetailFieldDefinition fieldDefinition = detailFieldDefinitions[i];
      final Length length = fieldDefinition.getWidth();
      if (length == null)
      {
        continue;
      }
      widthSpecs[i] = length.getNormalizedValue();
    }
    final float[] computedWidth =
        AutoGeneratorUtility.computeFieldWidths(widthSpecs, definition.getPageDefinition().getWidth());

    itemBand.getStyle().setStyleProperty(BandStyleKeys.LAYOUT, "row");
    if (detailsHeader != null)
    {
      detailsHeader.getStyle().setStyleProperty(BandStyleKeys.LAYOUT, "row");
    }
    if (detailsFooter != null)
View Full Code Here

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

      if (repeat != null)
      {
        header.setRepeat(repeat.booleanValue());
      }

      final Band content = AutoGeneratorUtility.findGeneratedContent(header);
      if (content == null)
      {
        return;
      }

      final Element headerElement = AutoGeneratorUtility.generateDetailsElement
          (groupDefinition.getField(), computeElementType(groupDefinition));
      final Length length = groupDefinition.getWidth();
      if (length != null)
      {
        headerElement.getStyle().setStyleProperty(ElementStyleKeys.MIN_WIDTH, length.getNormalizedValue());
      }
      headerElement.setAttribute(AttributeNames.Wizard.NAMESPACE, "CachedWizardFormatData", headerDefinition);
      headerElement.setAttribute(AttributeNames.Wizard.NAMESPACE, "CachedWizardFieldData", groupDefinition);

      content.clear();
      content.addElement(headerElement);
    }
  }
View Full Code Here

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

      if (repeat != null)
      {
        header.setRepeat(repeat.booleanValue());
      }

      final Band content = AutoGeneratorUtility.findGeneratedContent(header);
      if (content == null)
      {
        return;
      }

      final Element headerLabelElement = new Element();
      headerLabelElement.setElementType(new LabelType());
      if (groupDefinition.getDisplayName() != null)
      {
        headerLabelElement.setAttribute
            (AttributeNames.Core.NAMESPACE, AttributeNames.Core.VALUE, groupDefinition.getDisplayName());
      }
      else
      {
        headerLabelElement.setAttribute
            (AttributeNames.Core.NAMESPACE, AttributeNames.Core.VALUE, groupDefinition.getField());
        headerLabelElement.setAttribute
            (AttributeNames.Wizard.NAMESPACE, AttributeNames.Wizard.LABEL_FOR, groupDefinition.getField());
        headerLabelElement.setAttribute(AttributeNames.Wizard.NAMESPACE,
          AttributeNames.Wizard.ALLOW_METADATA_ATTRIBUTES, Boolean.TRUE);
      }

      final Element headerValueElement =
          AutoGeneratorUtility.generateDetailsElement(groupDefinition.getField(), computeElementType(groupDefinition));
      headerValueElement.setAttribute(AttributeNames.Core.NAMESPACE, AttributeNames.Core.NULL_VALUE, "-");
     
      final Band headerElement = new Band();
      headerElement.getStyle().setStyleProperty(BandStyleKeys.LAYOUT, "inline");
      headerElement.getStyle().setStyleProperty(ElementStyleKeys.MIN_WIDTH, new Float(-100));
      headerElement.getStyle().setStyleProperty(ElementStyleKeys.DYNAMIC_HEIGHT, Boolean.TRUE);
      headerElement.setAttribute(AttributeNames.Wizard.NAMESPACE,
          AttributeNames.Wizard.ALLOW_METADATA_STYLING, Boolean.TRUE);
      headerElement.setAttribute
          (AttributeNames.Wizard.NAMESPACE, AttributeNames.Wizard.LABEL_FOR, groupDefinition.getField());
      headerElement.setAttribute(AttributeNames.Wizard.NAMESPACE, "CachedWizardFormatData", headerDefinition);
      headerElement.addElement(headerLabelElement);
      headerElement.addElement(headerValueElement);
      content.clear();
      content.addElement(headerElement);
    }
  }
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.