Examples of ItemBand


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

  }

  public void testAddToReport()
  {
    MasterReport report = new MasterReport();
    final ItemBand itemBand = new ItemBand();
    itemBand.setName("ItemBand!");
    report.setItemBand(itemBand);
    report.addGroup(new RelationalGroup());
    report.addGroup(createGroup("second", new String[]{"field"}));
    report.addGroup(createGroup("third", new String[]{"field", "field2"}));
View Full Code Here

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

    final Band landScape = new Band();
    landScape.setName("landscape");
    landScape.addElement(noLate);

    final ItemBand band = new ItemBand();
    band.addElement(landScape);

    assertEquals(noLate, FunctionUtilities.findElement(band, "noLate"));
  }
View Full Code Here

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

    // set up the functions...
    final PageFunction f1 = new PageFunction("page_number");
    result.addExpression(f1);

    // set up the item band...
    final ItemBand itemBand = result.getItemBand();
    configureItemBand(itemBand);

    // set up the page footer...
    final PageFooter pageFooter = result.getPageFooter();
    configurePageFooter(pageFooter);
View Full Code Here

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

  }

  public void testAddToReport()
  {
    MasterReport report = new MasterReport();
    final ItemBand itemBand = new ItemBand();
    itemBand.setName("ItemBand!");
    report.setItemBand(itemBand);

    final GroupList gl = new GroupList();
    gl.add(new RelationalGroup());
    gl.add(createGroup("second", new String[]{"field"}));
View Full Code Here

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

   *
   * @return the item band.
   */
  private ItemBand createItemBand()
  {
    final ItemBand items = new ItemBand();
    items.setName("Items");
    items.getStyle().setStyleProperty(ElementStyleKeys.MIN_HEIGHT, new Float(10));
    items.getStyle().setStyleProperty(TextStyleKeys.FONT, "Monospaced");
    items.getStyle().setStyleProperty(TextStyleKeys.FONTSIZE, new Integer(10));
    items.getStyle().setStyleProperty(ElementStyleKeys.BACKGROUND_COLOR, Color.decode("#dfdfdf"));


    items.addElement(HorizontalLineElementFactory.createHorizontalLine
        (0, Color.decode("#DFDFDF"), new BasicStroke(0.1f)));
    items.addElement(HorizontalLineElementFactory.createHorizontalLine
        (10, Color.decode("#DFDFDF"), new BasicStroke(0.1f)));

    TextFieldElementFactory factory = new TextFieldElementFactory();
    factory.setName("Country Element");
    factory.setAbsolutePosition(new Point2D.Float(0, 0));
    factory.setMinimumSize(new FloatDimension(176, 10));
    factory.setHorizontalAlignment(ElementAlignment.LEFT);
    factory.setVerticalAlignment(ElementAlignment.MIDDLE);
    factory.setNullString("<null>");
    factory.setFieldname("Country");
    items.addElement(factory.createElement());

    factory = new TextFieldElementFactory();
    factory.setName("Code Element");
    factory.setAbsolutePosition(new Point2D.Float(180, 0));
    factory.setMinimumSize(new FloatDimension(76, 10));
    factory.setHorizontalAlignment(ElementAlignment.LEFT);
    factory.setVerticalAlignment(ElementAlignment.MIDDLE);
    factory.setNullString("<null>");
    factory.setFieldname("ISO Code");
    items.addElement(factory.createElement());

    final NumberFieldElementFactory nfactory = new NumberFieldElementFactory();
    nfactory.setName("Population Element");
    nfactory.setAbsolutePosition(new Point2D.Float(260, 0));
    nfactory.setMinimumSize(new FloatDimension(76, 10));
    nfactory.setHorizontalAlignment(ElementAlignment.LEFT);
    nfactory.setVerticalAlignment(ElementAlignment.MIDDLE);
    nfactory.setNullString("<null>");
    nfactory.setFieldname("Population");
    nfactory.setFormatString("#,##0");
    items.addElement(nfactory.createElement());
    return items;
  }
View Full Code Here

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

    {
      trigger = (!trigger);
    }
    count += 1;

    final ItemBand itemBand = event.getReport().getItemBand();
    if (element == null)
    {
      if (trigger)
      {
        itemBand.getStyle().setStyleProperty(ElementStyleKeys.BACKGROUND_COLOR, visibleBackground);
      }
      else
      {
        itemBand.getStyle().setStyleProperty(ElementStyleKeys.BACKGROUND_COLOR, invisibleBackground);
      }
    }
    else
    {
      final Element[] e = FunctionUtilities.findAllElements(itemBand, getElement());
View Full Code Here

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

    // set up the functions...
    final PageFunction f1 = new PageFunction("page_number");
    result.addExpression(f1);

    // set up the item band...
    final ItemBand itemBand = result.getItemBand();
    configureItemBand(itemBand);

    // set up the page footer...
    final PageFooter pageFooter = result.getPageFooter();
    configurePageFooter(pageFooter);
View Full Code Here

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

        body.setDetailsFooter(footer);
        return footer;
      }
      if (insert instanceof ItemBand)
      {
        final ItemBand itemBand = (ItemBand) insert.derive();
        body.setItemBand(itemBand);
        return itemBand;
      }
      if (insert instanceof NoDataBand)
      {
View Full Code Here

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

    }

    if (data instanceof ItemBand)
    {
      final GroupDataBody g = (GroupDataBody) parent;
      final ItemBand oldBand = g.getItemBand();
      final ItemBand newBand = new ItemBand();
      g.setItemBand(newBand);
      return new SectionEditUndoEntry(g.getObjectID(), ModelUtility.findIndexOf(g, newBand), oldBand, newBand);
    }
    if (data instanceof NoDataBand)
    {
View Full Code Here

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

   *
   * @return the item band.
   */
  private ItemBand createItemBand()
  {
    final ItemBand items = new ItemBand();
    items.setName("Items");
    items.getStyle().setStyleProperty(ElementStyleKeys.MIN_HEIGHT, new Float(10));
    items.getStyle().setStyleProperty(TextStyleKeys.FONT, "Monospaced");
    items.getStyle().setStyleProperty(TextStyleKeys.FONTSIZE, new Integer(10));
    items.getStyle().setStyleProperty(ElementStyleKeys.BACKGROUND_COLOR, Color.decode("#dfdfdf"));


    items.addElement(HorizontalLineElementFactory.createHorizontalLine
        (0, Color.decode("#DFDFDF"), new BasicStroke(0.1f)));
    items.addElement(HorizontalLineElementFactory.createHorizontalLine
        (10, Color.decode("#DFDFDF"), new BasicStroke(0.1f)));

    TextFieldElementFactory factory = new TextFieldElementFactory();
    factory.setName("Country Element");
    factory.setAbsolutePosition(new Point2D.Float(0, 0));
    factory.setMinimumSize(new FloatDimension(176, 10));
    factory.setHorizontalAlignment(ElementAlignment.LEFT);
    factory.setVerticalAlignment(ElementAlignment.MIDDLE);
    factory.setNullString("<null>");
    factory.setFieldname("Country");
    items.addElement(factory.createElement());

    factory = new TextFieldElementFactory();
    factory.setName("Code Element");
    factory.setAbsolutePosition(new Point2D.Float(180, 0));
    factory.setMinimumSize(new FloatDimension(76, 10));
    factory.setHorizontalAlignment(ElementAlignment.LEFT);
    factory.setVerticalAlignment(ElementAlignment.MIDDLE);
    factory.setNullString("<null>");
    factory.setFieldname("ISO Code");
    items.addElement(factory.createElement());

    final NumberFieldElementFactory nfactory = new NumberFieldElementFactory();
    nfactory.setName("Population Element");
    nfactory.setAbsolutePosition(new Point2D.Float(260, 0));
    nfactory.setMinimumSize(new FloatDimension(76, 10));
    nfactory.setHorizontalAlignment(ElementAlignment.LEFT);
    nfactory.setVerticalAlignment(ElementAlignment.MIDDLE);
    nfactory.setNullString("<null>");
    nfactory.setFieldname("Population");
    nfactory.setFormatString("#,##0");
    items.addElement(nfactory.createElement());
    return items;
  }
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.