All Downloads are FREE. Search and download functionalities are using the official Maven repository.

kz.greetgo.msoffice.xlsx.gen.MergeCells Maven / Gradle / Ivy

There is a newer version: 0.5.9
Show newest version
package kz.greetgo.msoffice.xlsx.gen;

import java.io.PrintStream;
import java.util.ArrayList;
import java.util.List;

class MergeCells {
  MergeCells() {}

  private final List cells = new ArrayList();

  public void print(PrintStream out) {
    if (cells.size() == 0) return;
    out.println("");
    for (MergeCell cell : cells) {
      cell.print(out);
    }
    out.println("");
  }

  public void addMerge(int rowFrom, int colFrom, int rowTo, int colTo) {
    MergeCell x = new MergeCell();
    x.colFrom = colFrom - 1;
    x.colTo = colTo - 1;
    x.rowFrom = rowFrom;
    x.rowTo = rowTo;
    cells.add(x);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy