Package jimm.datavision

Examples of jimm.datavision.Section


    // Copy of field's bounds
    origBounds =
  new jimm.datavision.field.Rectangle(b.x, b.y, b.width, b.height);

    // Section's bounding rectangle
    Section sect = fw.getSectionWidget().getSection();
    sectionBounds = new java.awt.Rectangle(0, 0, (int)sect.getWidth(),
             (int)sect.getMinHeight());

    // Field's bounds in screen coordinates
    java.awt.Point screenPos = fw.getComponent().getLocationOnScreen();
    screenBounds = new java.awt.Rectangle(screenPos.x, screenPos.y,
            (int)b.width, (int)b.height);
View Full Code Here


    // to Designer.select already does that.
}

protected SectionWidget sectionWidgetBySectionArea(Designer designer) {
    Report report = designer.getReport();
    Section s = report.getFirstSectionByArea(sectionArea.getArea());
    if (s == null)    // Can be null if area was group, for example
  // Will not be null; there is always at least one report header section
  s = report.getFirstSectionByArea(SectionArea.REPORT_HEADER);
    return designer.findSectionWidgetFor(s);
}
View Full Code Here

  String name = col.getName();
  name = name.substring(0, 1).toUpperCase()
      + name.substring(1).toLowerCase();

  // The title section resize command may not be used.
  Section titleSection = f.getReport().pageHeaders().first();
  SectionWidget titleSectionWidget =
      sw.getDesigner().findSectionWidgetFor(titleSection);
  titleSectionResizeCommand =
      new SectionResizeCommand(titleSectionWidget);
View Full Code Here

*
* @param ld a line drawer
*/
public void eachLine(LineDrawer ld, Object arg) {
    Rectangle rect = field.getBounds();
    Section section = field.getSection();
    BorderEdge edge;
    Line line;

    edge = top;
    if (edge != null && edge.getThickness() > 0 && edge.getNumber() > 0) {
View Full Code Here

}

public void setUp() {
    area = new SectionArea(SectionArea.DETAIL);
    report = new Report();
    sect = new Section(report);
}
View Full Code Here

    assertEquals(1, area.size());
    assertSame(area, sect.getArea());
    assertEquals(0, area.indexOf(sect));
    assertSame(sect, area.first());

    Section sect2 = new Section(report);
    area.add(sect2);
    assertEquals(2, area.size());
    assertSame(area, sect2.getArea());
    assertEquals(1, area.indexOf(sect2));
    assertSame(sect, area.first());

    Section sect3 = new Section(report);
    area.insertAfter(sect3, sect);
    assertEquals(1, area.indexOf(sect3));
    assertEquals(2, area.indexOf(sect2));
}
View Full Code Here

    assertEquals(2, area.indexOf(sect2));
}

public void testInsertAfter() {
    area.add(sect);
    Section newSection = area.insertAfter(null, sect);

    assertNotSame(newSection, sect);
    assertEquals(1, area.indexOf(newSection));
    assertEquals(area.getName(), newSection.getName());
    assertSame(area, newSection.getArea());
}
View Full Code Here

    assertSame(area, newSection.getArea());
}

public void testRemove() {
    area.add(sect);
    Section newSection = area.insertAfter(null, sect);

    assertEquals(2, area.size());
    area.remove(sect);
    assertNull(sect.getArea());
    assertEquals(1, area.size());
    assertSame(newSection, area.first());

    area.remove(newSection);
    assertNull(newSection.getArea());
    assertEquals(0, area.size());
}
View Full Code Here

public void testUnmodifiable() {
    area.add(sect);
    List sections = area.sections();
    try {
  sections.add(new Section(report));
    }
    catch (UnsupportedOperationException e) {
  assertTrue(true);
    }
}
View Full Code Here

  assertTrue(true);
    }
}

public void testClear() {
    Section sect2 = new Section(report);
    area.add(sect);
    area.add(sect2);
    assertEquals(2, area.size());

    area.clear();
    assertEquals(0, area.size());

    assertNull(sect.getArea());
    assertNull(sect2.getArea());
}
View Full Code Here

TOP

Related Classes of jimm.datavision.Section

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.