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

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

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

import java.io.PrintStream;

/**
 * Графический объект листа для диаграмм
 */
class TwoCellAnchorChart extends TwoCellAnchor {

  private final Chart chart; // диаграмма

  public TwoCellAnchorChart(Chart chart, SheetCoord coordFrom, SheetCoord coordTo) {

    super(coordFrom, coordTo);
    this.chart = chart;
  }

  @Override
  int getRelId() {
    return chart.getRelId();
  }

  @Override
  String getType() {
    return "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart\" Target=\"../charts/chart"
      + chart.getFileId() + ".xml";
  }

  @Override
  void print(PrintStream os) {

    StringBuffer buf = new StringBuffer();

    buf.append("");
    buf.append(col1 - 1);
    buf.append("");
    buf.append(col1off);
    buf.append("");
    buf.append(row1 - 1);
    buf.append("");
    buf.append(row1off);
    buf.append("");
    buf.append(col2);
    buf.append("");
    buf.append(col2off);
    buf.append("");
    buf.append(row2);
    buf.append("");
    buf.append(row2off);
    buf.append("");
    buf.append("");
    buf.append("");
    buf.append("");

    os.print(buf.toString());
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy