Пример #1
0
  private SheetLayout get1ColLayout(int columnID) {
    List<GroupContentPlaceholder> groupContentPlaceholders =
        new ArrayList<GroupContentPlaceholder>();
    GroupContentPlaceholder placeholder1 =
        new GroupContentPlaceholder(columnID, new Point(0, 0), new Point(0, 0));
    groupContentPlaceholders.add(placeholder1);

    SheetLayout layout = new SheetLayout(groupContentPlaceholders);
    layout.addRowMeasurement(MeasurementType.Pixel, 10);
    layout.addColMeasurement(MeasurementType.Percent, 100);

    return layout;
  }
Пример #2
0
  private SheetLayout get2ColLayout() {
    List<GroupContentPlaceholder> groupContentPlaceholders =
        new ArrayList<GroupContentPlaceholder>();
    GroupContentPlaceholder placeholder1 =
        new GroupContentPlaceholder(0, new Point(0, 0), new Point(0, 0));
    groupContentPlaceholders.add(placeholder1);

    GroupContentPlaceholder placeholder2 =
        new GroupContentPlaceholder(1, new Point(1, 0), new Point(0, 1));
    groupContentPlaceholders.add(placeholder2);

    SheetLayout layout = new SheetLayout(groupContentPlaceholders);
    layout.addRowMeasurement(MeasurementType.Pixel, 10);
    layout.addColMeasurement(MeasurementType.Pixel, 10);
    layout.addColMeasurement(MeasurementType.Pixel, 10);

    return layout;
  }