Ignore:
Timestamp:
06/27/08 16:44:21 (16 years ago)
Author:
ra33
Message:

Heaps of changes!!!!
Added circles...
Better drawing of lines etc etc

File:
1 edited

Legend:

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

    r80 r108  
    22
    33import java.awt.Color;
    4 import java.awt.Point;
     4import java.awt.geom.Point2D;
    55
    66import org.expeditee.gui.Frame;
     
    1616                for (Text textItem : frame.getBodyTextItems(false)) {
    1717                        // Delete all non-annotations with more that one letter
    18                         if (textItem.getText().length() > 1)
     18                        if (textItem.getText().length() > 1){
    1919                                frame.removeItem(textItem);
    20                         else {
     20                                if(_stop)
     21                                        return null;
     22                        }else {
    2123                                // goto child frame of any linked 1 letter items
    2224                                String link = textItem.getAbsoluteLink();
     
    2426                                        Frame childFrame = FrameIO.LoadFrame(link);
    2527                                        if (childFrame != null) {
    26                                                 Point lastItemEnd = textItem.getEndParagraphPosition();
     28                                                Point2D.Float lastItemEnd = textItem.getEndParagraphPosition();
    2729                                                for (Text childItem : childFrame.getBodyTextItems(false)) {
    2830                                                        // look for red items
     
    3133                                                                Text itemCopy = childItem.copy();
    3234                                                                // add to the right of parent item
    33                                                                 lastItemEnd.translate(20, 0);
    34                                                                 itemCopy.setPosition(lastItemEnd);
     35                                                                lastItemEnd.setLocation(lastItemEnd.x + 20, lastItemEnd.y);
     36                                                                itemCopy.setPosition(lastItemEnd.x, lastItemEnd.y);
    3537                                                                lastItemEnd = itemCopy
    3638                                                                                .getEndParagraphPosition();
     
    3840                                                        }
    3941                                                        _itemCount++;
     42                                                        if(_stop)
     43                                                                return null;
    4044                                                }
    4145                                        }
Note: See TracChangeset for help on using the changeset viewer.