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

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


  private DataFactoryReadHandler dataFactoryReadHandler;
  private GroupList groupList;

  public JFreeReportReadHandler()
  {
    this.groupList = new GroupList();
  }
View Full Code Here


      }
    }

    try
    {
      final GroupList groupList1 = (GroupList) groupList.clone();
      report.setGroups(groupList1);
    }
    catch (CloneNotSupportedException e)
    {
      throw new ParseException("Failed to add group-list to report", getLocator());
View Full Code Here

{
  private GroupList groupList;

  public ReportDescriptionReadHandler()
  {
    this.groupList = new GroupList();
  }
View Full Code Here

  public SimpleSubReportReadHandler()
  {
    importParameters = new ArrayList();
    exportParameters = new ArrayList();
    groupList = new GroupList();
  }
View Full Code Here

  }

  public void testCreate()
          throws CloneNotSupportedException
  {
    final GroupList gl = new GroupList();
    gl.clear();
    assertNotNull(gl.clone());
    assertNotNull(gl.iterator());
    assertNotNull(gl.toString());
  }
View Full Code Here

    assertNotNull(gl.toString());
  }

  public void testMethods()
  {
    final GroupList gl = new GroupList();
    try
    {
      gl.add(null);
    }
    catch (NullPointerException npe)
    {
      // expected, ignored
    }

    final RelationalGroup g1 = new RelationalGroup();
    gl.add(g1);
    gl.add(g1);
    assertTrue(gl.size() == 1); // the old instance gets removed and replaced by the new group
    gl.add(new RelationalGroup());
    assertTrue(gl.size() == 1); // the old instance gets removed and replaced by the new group

    final RelationalGroup g2 = new RelationalGroup();
    g2.addField("Test");

    final RelationalGroup g3 = new RelationalGroup();
    g3.addField("Failure");

    // group g2 and g3 are unreleated, g2 is no child or parent of g3
    gl.add(g2);
    try
    {
      gl.add(g3);
      fail();
    }
    catch (IllegalArgumentException iea)
    {
      // expected, ignored
    }
    assertEquals(2, gl.size());
  }
View Full Code Here

    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"}));
    gl.add(createGroup("third", new String[]{"field", "field2"}));
    report.setGroups(gl);

    // Only 3 groups, as the default group is replaced.
    assertEquals(3, report.getGroupCount());
    assertEquals("ItemBand!", report.getItemBand().getName());
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.GroupList

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.