Changeset 143 for trunk/src/org/expeditee/agents/Format.java
- Timestamp:
- 07/15/08 12:55:33 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/agents/Format.java
r133 r143 2 2 3 3 import java.util.ArrayList; 4 import java.util.Collection; 4 5 import java.util.Collections; 5 6 import java.util.Comparator; … … 10 11 import org.expeditee.gui.FrameUtils; 11 12 import org.expeditee.items.Item; 13 import org.expeditee.items.Text; 12 14 13 15 /** … … 42 44 @Override 43 45 public Frame process(Frame start) { 46 //Check the position of the cursor and only format stuff inside the same box as the cursor 47 Collection<Text> itemsToFormat = FrameUtils.getCurrentTextItems(); 48 if(itemsToFormat.size() <= 1){ 49 itemsToFormat = start.getBodyTextItems(true); 50 } 51 44 52 ArrayList<Item> columnHeads = new ArrayList<Item>(); 45 53 46 54 ArrayList<ArrayList<Item>> columns = new ArrayList<ArrayList<Item>>(); 47 55 48 for (Item t : start.getBodyTextItems(true)) {56 for (Item t : itemsToFormat) { 49 57 int col = findColumn(columnHeads, t); 50 58 // if this is the head of a new column
Note:
See TracChangeset
for help on using the changeset viewer.