Ignore:
Timestamp:
07/30/08 14:53:21 (16 years ago)
Author:
ra33
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/gui/Frame.java

    r172 r176  
    477477                                if (i instanceof XRayable) {
    478478                                        results.addAll(i.getConnected());
    479                                 } else {
     479                                        //Dont add circle centers
     480                                        //TODO change this to be isCircle center
     481                                }else if (! i.hasEnclosures()) {
    480482                                        results.add(i);
    481483                                }
     
    10251027                }
    10261028
    1027                 // Make sure the items are sorted
    1028                 Collections.sort(toCheck);
    1029 
    10301029                List<Text> column = new ArrayList<Text>();
    1031 
    1032                 // Create a list of items consisting of the item 'from' and all the
    1033                 // items below it which are also in the same column as it
    1034                 for (int i = toCheck.indexOf(from); i < toCheck.size(); i++) {
    1035                         Text item = toCheck.get(i);
    1036                         if (FrameUtils.inSameColumn(from, item))
    1037                                 column.add(item);
     1030                if (toCheck.size() > 0) {
     1031
     1032                        // Make sure the items are sorted
     1033                        Collections.sort(toCheck);
     1034
     1035                        // Create a list of items consisting of the item 'from' and all the
     1036                        // items below it which are also in the same column as it
     1037                        for (int i = toCheck.indexOf(from); i < toCheck.size(); i++) {
     1038                                Text item = toCheck.get(i);
     1039                                if (FrameUtils.inSameColumn(from, item))
     1040                                        column.add(item);
     1041                        }
    10381042                }
    10391043
     
    13341338                change();
    13351339
    1336                 if (!keepAnnotations)
     1340                if (!keepAnnotations && _annotations != null)
    13371341                        _annotations.clear();
    13381342        }
     
    18951899                return textItems;
    18961900        }
     1901
     1902        public Text getAnnotation(String annotation) {
     1903                if (_annotations == null)
     1904                        refreshAnnotationList();
     1905
     1906                return _annotations.get(annotation.toLowerCase());
     1907        }
     1908       
     1909        public void recalculate() {
     1910                for (Item i : getItems()) {
     1911                        if(i.hasFormula() && !i.isAnnotation()){
     1912                                i.calculate(i.getFormula());
     1913                        }
     1914                }
     1915        }
    18971916}
Note: See TracChangeset for help on using the changeset viewer.