public IGridTable getColumns(int from) { return getColumns(from, getWidth() - 1); }
public String getUri() { int w = getWidth(); int h = getHeight(); return getGrid().getRangeUri(getGridColumn(0, 0), getGridRow(0, 0), getGridColumn(w - 1, h - 1), getGridRow(w - 1, h - 1)); }
public IGridTable getColumns(int from, int to) { int colsNum = to - from + 1; return getSubtable(from, 0, colsNum, getHeight()); }
public IGridTable getRows(int from, int to) { int rowsNum = to - from + 1; return getSubtable(0, from, getWidth(), rowsNum); }
public IGridRegion getRegion() { int left = getGridColumn(0, 0); int top = getGridRow(0, 0); int right = -1; int bottom = -1; if (isNormalOrientation()) { right = getGridColumn(getWidth() - 1, 0); bottom = getGridRow(0, getHeight() - 1); } else { right = getGridColumn(0, getHeight() - 1); bottom = getGridRow(getWidth() - 1, 0); } return new GridRegion(top, left, bottom, right); }
StringBuilder tableVizualization = new StringBuilder(); tableVizualization.append(super.toString()) .append(isNormalOrientation() ? "[N]" : "[T]") .append("(") .append(getWidth()) .append(" x ") .append(getHeight()) .append(")") .append(getRegion().toString()) .append("\n"); for (int i = 0; i < getHeight(); i++) { int length = 0; for (int j = 0; j < getWidth(); j++) { String strValue = getCell(j, i).getStringValue(); if (strValue == null) { strValue = "EMPTY";
public String getUri(int col, int row) { int colStart = getGridColumn(col, row); int rowStart = getGridRow(col, row); return getGrid().getRangeUri(colStart, rowStart, colStart, rowStart); }
public IGridTable getSubtable(int column, int row, int width, int height) { if (width == 0 || height == 0) { return null; } if (getWidth() == width && getHeight() == height) { return this; } if (width == 1 && height == 1) return new SingleCellGridTable(this, column, row); return new SubGridTable(this, column, row, width, height); }
public IGridTable getColumn(int column) { return getColumns(column, column); }
public IGridTable getRow(int row) { return getRows(row, row); }
@Override public XlsUrlParser getUriParser() { if (cacheUrlParser == null) { cacheUrlParser = new XlsUrlParser(getUri()); } return cacheUrlParser; }