TableRowpublic class TableRow extends Paragraph
Fields Summary |
---|
private static final char | TABLE_CELL_MARK | private static final short | SPRM_TJC | private static final short | SPRM_DXAGAPHALF | private static final short | SPRM_FCANTSPLIT | private static final short | SPRM_FTABLEHEADER | private static final short | SPRM_DYAROWHEIGHT | int | _levelNum | private TableProperties | _tprops | private TableCell[] | _cells |
Constructors Summary |
---|
public TableRow(int startIdx, int endIdx, Table parent, int levelNum)
super(startIdx, endIdx, parent);
_tprops = TableSprmUncompressor.uncompressTAP(_papx.toByteArray(), 2);
_levelNum = levelNum;
_cells = new TableCell[_tprops.getItcMac()];
int start = 0;
int end = 0;
for (int cellIndex = 0; cellIndex < _cells.length; cellIndex++)
{
Paragraph p = getParagraph(start);
String s = p.text();
while (! ( (s.charAt(s.length() - 1) == TABLE_CELL_MARK) ||
p.isEmbeddedCellMark() && p.getTableLevel() == levelNum))
{
end++;
p = getParagraph(end);
s = p.text();
}
_cells[cellIndex] = new TableCell(start, end, this, levelNum,
_tprops.getRgtc()[cellIndex],
_tprops.getRgdxaCenter()[cellIndex],
_tprops.getRgdxaCenter()[cellIndex+1]-_tprops.getRgdxaCenter()[cellIndex]);
end++;
start = end;
}
|
Methods Summary |
---|
public boolean | cantSplit()
return _tprops.getFCantSplit();
| public org.apache.poi.hwpf.usermodel.TableCell | getCell(int index)
return _cells[index];
| public int | getGapHalf()
return _tprops.getDxaGapHalf();
| public int | getRowHeight()
return _tprops.getDyaRowHeight();
| public int | getRowJustification()
return _tprops.getJc();
| public boolean | isTableHeader()
return _tprops.getFTableHeader();
| public int | numCells()
return _cells.length;
| public void | setCantSplit(boolean cantSplit)
_tprops.setFCantSplit(cantSplit);
_papx.updateSprm(SPRM_FCANTSPLIT, (byte)(cantSplit ? 1 : 0));
| public void | setGapHalf(int dxaGapHalf)
_tprops.setDxaGapHalf(dxaGapHalf);
_papx.updateSprm(SPRM_DXAGAPHALF, (short)dxaGapHalf);
| public void | setRowHeight(int dyaRowHeight)
_tprops.setDyaRowHeight(dyaRowHeight);
_papx.updateSprm(SPRM_DYAROWHEIGHT, (short)dyaRowHeight);
| public void | setRowJustification(int jc)
_tprops.setJc(jc);
_papx.updateSprm(SPRM_TJC, (short)jc);
| public void | setTableHeader(boolean tableHeader)
_tprops.setFTableHeader(tableHeader);
_papx.updateSprm(SPRM_FTABLEHEADER, (byte)(tableHeader ? 1 : 0));
|
|