Changeset 29298 in osm for applications/editors/josm/plugins/opendata/includes/org/jopendocument/model/table/TableTableRow.java
- Timestamp:
- 2013-03-02T00:32:50+01:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/opendata/includes/org/jopendocument/model/table/TableTableRow.java
r28000 r29298 16 16 package org.jopendocument.model.table; 17 17 18 import java.util.ArrayList; 19 import java.util.Collection; 18 20 import java.util.Vector; 19 21 … … 23 25 public class TableTableRow { 24 26 static int count = 0; 25 27 ArrayList<TableTableCell> allCells; 26 28 27 29 Vector<TableTableCell> cells = new Vector<TableTableCell>(); 28 30 29 31 int id = 0; 30 32 31 33 protected int tableNumberRowsRepeated = 1; 32 34 … … 39 41 this.cells.add(c); 40 42 43 } 44 45 /** 46 * Compute AllCell except the last one 47 */ 48 void computeAllCells() { 49 this.allCells = new ArrayList<TableTableCell>(); 50 for (int index = 0; index < this.cells.size(); index++) { 51 final TableTableCell c = this.cells.get(index); 52 // for (TableTableCell c : cells) { 53 //final int colPosition = this.allCells.size(); 54 int repeated = c.getTableNumberColumnsRepeated(); 55 // la derniere colonne n'est repétée que dans la limite de la zone d'impression 56 // sinon, on s'en coltine des milliers 57 if (index == this.cells.size() - 1) { 58 //repeated = this.getTable().getPrintStopCol() - this.allCells.size() + 1; 59 // Patch JOSM open data : do not care about last cell 60 repeated = 0; 61 } 62 for (int i = 0; i < repeated; i++) { 63 // Patch JOSM open data : do not care about column 64 //final TableTableColumn col = this.table.getColumnAtPosition(colPosition + i); 65 final TableTableCell cc = c.cloneCell(); 66 //cc.setRowAndColumn(this, col); 67 this.allCells.add(cc); 68 } 69 } 70 // }} 71 // System.err.println("Computed:" + allCells.size() + " :" + allCells); 72 } 73 74 public Collection<TableTableCell> getAllCells() { 75 76 if (this.allCells == null) { 77 this.computeAllCells(); 78 } 79 80 return this.allCells; 41 81 } 42 82 … … 56 96 // return cells; 57 97 // } 58 59 98 60 99 public String getText() {
Note:
See TracChangeset
for help on using the changeset viewer.