Changeset 156 for trunk/src/org/expeditee/agents/Format.java
- Timestamp:
- 07/25/08 09:24:45 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/agents/Format.java
r154 r156 52 52 ArrayList<Item> columnHeads = new ArrayList<Item>(); 53 53 54 ArrayList<ArrayList< Item>> columns = new ArrayList<ArrayList<Item>>();54 ArrayList<ArrayList<Text>> columns = new ArrayList<ArrayList<Text>>(); 55 55 56 for ( Itemt : itemsToFormat) {56 for (Text t : itemsToFormat) { 57 57 int col = findColumn(columnHeads, t); 58 58 // if this is the head of a new column 59 59 if (col < 0) { 60 60 columnHeads.add(t); 61 columns.add(new ArrayList< Item>());61 columns.add(new ArrayList<Text>()); 62 62 // otherwise the column for this item has already been 63 63 // found set the column to be the one we just added... … … 92 92 93 93 // sort lists by their X axis 94 Collections.sort(columns, new Comparator<ArrayList< Item>>() {95 public int compare(ArrayList< Item> o1, ArrayList<Item> o2) {94 Collections.sort(columns, new Comparator<ArrayList<Text>>() { 95 public int compare(ArrayList<Text> o1, ArrayList<Text> o2) { 96 96 if (o2.size() == 0) 97 97 return -10; … … 112 112 113 113 for (int i = 0; i < columns.size() - 1; i++) { 114 List< Item> list = columns.get(i);114 List<Text> list = columns.get(i); 115 115 116 116 int maxX = 0;
Note:
See TracChangeset
for help on using the changeset viewer.