Ignore:
Timestamp:
07/25/08 09:24:45 (16 years ago)
Author:
ra33
Message:

Added calculate action

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/agents/Format.java

    r154 r156  
    5252                ArrayList<Item> columnHeads = new ArrayList<Item>();
    5353
    54                 ArrayList<ArrayList<Item>> columns = new ArrayList<ArrayList<Item>>();
     54                ArrayList<ArrayList<Text>> columns = new ArrayList<ArrayList<Text>>();
    5555
    56                 for (Item t : itemsToFormat) {
     56                for (Text t : itemsToFormat) {
    5757                        int col = findColumn(columnHeads, t);
    5858                        // if this is the head of a new column
    5959                        if (col < 0) {
    6060                                columnHeads.add(t);
    61                                 columns.add(new ArrayList<Item>());
     61                                columns.add(new ArrayList<Text>());
    6262                                // otherwise the column for this item has already been
    6363                                // found set the column to be the one we just added...
     
    9292
    9393                // 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) {
    9696                                if (o2.size() == 0)
    9797                                        return -10;
     
    112112
    113113                for (int i = 0; i < columns.size() - 1; i++) {
    114                         List<Item> list = columns.get(i);
     114                        List<Text> list = columns.get(i);
    115115
    116116                        int maxX = 0;
Note: See TracChangeset for help on using the changeset viewer.