/** * To put a table within the existing table at the current position * generateTable will of course re-arrange the widths of the columns. * * @param aTable the table you want to insert */ public void insertTable(Table aTable) { if (aTable == null) throw new NullPointerException("insertTable - table has null-value"); insertTable(aTable, curPosition); }
/** * To put a table within the existing table at the given position * generateTable will of course re-arrange the widths of the columns. * * @param aTable The <CODE>Table</CODE> to add * @param row The row where the <CODE>Cell</CODE> will be added * @param column The column where the <CODE>Cell</CODE> will be added */ public void insertTable(Table aTable, int row, int column) { if (aTable == null) throw new NullPointerException("insertTable - table has null-value"); insertTable(aTable, new Point(row, column)); }
/** * To put a table within the existing table at the current position * generateTable will of course re-arrange the widths of the columns. * * @param aTable the table you want to insert */ public void insertTable(Table aTable) { if (aTable == null) throw new NullPointerException(MessageLocalization.getComposedMessage("inserttable.table.has.null.value")); insertTable(aTable, curPosition); }
/** * To put a table within the existing table at the given position * generateTable will of course re-arrange the widths of the columns. * * @param aTable The <CODE>Table</CODE> to add * @param row The row where the <CODE>Cell</CODE> will be added * @param column The column where the <CODE>Cell</CODE> will be added */ public void insertTable(Table aTable, int row, int column) { if (aTable == null) throw new NullPointerException(MessageLocalization.getComposedMessage("inserttable.table.has.null.value")); insertTable(aTable, new Point(row, column)); }
/** * To put a table within the existing table at the current position * generateTable will of course re-arrange the widths of the columns. * * @param aTable the table you want to insert */ public void insertTable(Table aTable) { if (aTable == null) throw new NullPointerException(MessageLocalization.getComposedMessage("inserttable.table.has.null.value")); insertTable(aTable, curPosition); }
/** * To put a table within the existing table at the given position * generateTable will of course re-arrange the widths of the columns. * * @param aTable The <CODE>Table</CODE> to add * @param row The row where the <CODE>Cell</CODE> will be added * @param column The column where the <CODE>Cell</CODE> will be added */ public void insertTable(Table aTable, int row, int column) { if (aTable == null) throw new NullPointerException(MessageLocalization.getComposedMessage("inserttable.table.has.null.value")); insertTable(aTable, new Point(row, column)); }
/** * Adds a <CODE>Cell</CODE> to the <CODE>Table</CODE> at a certain location. * * @param aCell The <CODE>Cell</CODE> to add * @param aLocation The location where the <CODE>Cell</CODE> will be added * @throws BadElementException */ public void addCell(Cell aCell, Point aLocation) throws BadElementException { if (aCell == null) throw new NullPointerException(MessageLocalization.getComposedMessage("addcell.cell.has.null.value")); if (aLocation == null) throw new NullPointerException(MessageLocalization.getComposedMessage("addcell.point.has.null.value")); if (aCell.isTable()) insertTable((Table)aCell.getElements().next(), aLocation); if (aLocation.x < 0) throw new BadElementException(MessageLocalization.getComposedMessage("row.coordinate.of.location.must.be.gt.eq.0")); if ((aLocation.y <= 0) && (aLocation.y > columns)) throw new BadElementException(MessageLocalization.getComposedMessage("column.coordinate.of.location.must.be.gt.eq.0.and.lt.nr.of.columns")); if (!isValidLocation(aCell, aLocation)) throw new BadElementException(MessageLocalization.getComposedMessage("adding.a.cell.at.the.location.1.2.with.a.colspan.of.3.and.a.rowspan.of.4.is.illegal.beyond.boundaries.overlapping", String.valueOf(aLocation.x), String.valueOf(aLocation.y), String.valueOf(aCell.getColspan()), String.valueOf(aCell.getRowspan()))); if (aCell.getBorder() == UNDEFINED) aCell.setBorder(defaultCell.getBorder()); aCell.fill(); placeCell(rows, aCell, aLocation); setCurrentLocationToNextValidPosition(aLocation); }
/** * Adds a <CODE>Cell</CODE> to the <CODE>Table</CODE> at a certain location. * * @param aCell The <CODE>Cell</CODE> to add * @param aLocation The location where the <CODE>Cell</CODE> will be added * @throws BadElementException */ public void addCell(Cell aCell, Point aLocation) throws BadElementException { if (aCell == null) throw new NullPointerException(MessageLocalization.getComposedMessage("addcell.cell.has.null.value")); if (aLocation == null) throw new NullPointerException(MessageLocalization.getComposedMessage("addcell.point.has.null.value")); if (aCell.isTable()) insertTable((Table)aCell.getElements().next(), aLocation); if (aLocation.x < 0) throw new BadElementException(MessageLocalization.getComposedMessage("row.coordinate.of.location.must.be.gt.eq.0")); if ((aLocation.y <= 0) && (aLocation.y > columns)) throw new BadElementException(MessageLocalization.getComposedMessage("column.coordinate.of.location.must.be.gt.eq.0.and.lt.nr.of.columns")); if (!isValidLocation(aCell, aLocation)) throw new BadElementException(MessageLocalization.getComposedMessage("adding.a.cell.at.the.location.1.2.with.a.colspan.of.3.and.a.rowspan.of.4.is.illegal.beyond.boundaries.overlapping", String.valueOf(aLocation.x), String.valueOf(aLocation.y), String.valueOf(aCell.getColspan()), String.valueOf(aCell.getRowspan()))); if (aCell.getBorder() == UNDEFINED) aCell.setBorder(defaultCell.getBorder()); aCell.fill(); placeCell(rows, aCell, aLocation); setCurrentLocationToNextValidPosition(aLocation); }
/** * Adds a <CODE>Cell</CODE> to the <CODE>Table</CODE> at a certain location. * * @param aCell The <CODE>Cell</CODE> to add * @param aLocation The location where the <CODE>Cell</CODE> will be added * @throws BadElementException */ public void addCell(Cell aCell, Point aLocation) throws BadElementException { if (aCell == null) throw new NullPointerException("addCell - cell has null-value"); if (aLocation == null) throw new NullPointerException("addCell - point has null-value"); if (aCell.isTable()) insertTable((Table)aCell.getElements().next(), aLocation); if (aLocation.x < 0) throw new BadElementException("row coordinate of location must be >= 0"); if ((aLocation.y <= 0) && (aLocation.y > columns)) throw new BadElementException("column coordinate of location must be >= 0 and < nr of columns"); if (!isValidLocation(aCell, aLocation)) throw new BadElementException("Adding a cell at the location (" + aLocation.x + "," + aLocation.y + ") with a colspan of " + aCell.getColspan() + " and a rowspan of " + aCell.getRowspan() + " is illegal (beyond boundaries/overlapping)."); if (aCell.getBorder() == UNDEFINED) aCell.setBorder(defaultCell.getBorder()); aCell.fill(); placeCell(rows, aCell, aLocation); setCurrentLocationToNextValidPosition(aLocation); }
tmp.setBorder(NO_BORDER); table.addCell(tmp); table.insertTable((Table)element); tmp = new Cell(); tmp.setBorder(NO_BORDER);
tmp.setBorder(NO_BORDER); table.addCell(tmp); table.insertTable((Table)element); tmp = new Cell(); tmp.setBorder(NO_BORDER);
tmp.setBorder(NO_BORDER); table.addCell(tmp); table.insertTable((Table)element); tmp = new Cell(); tmp.setBorder(NO_BORDER);