Ignore:
Timestamp:
08/07/08 10:23:55 (16 years ago)
Author:
ra33
Message:

Added some math stuff... able to group numbers inside a rectangle

File:
1 edited

Legend:

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

    r185 r190  
    477477                                if (i instanceof XRayable) {
    478478                                        results.addAll(i.getConnected());
    479                                         //Dont add circle centers
    480                                         //TODO change this to be isCircle center
    481                                 }else if (! i.hasEnclosures()) {
     479                                        // Dont add circle centers
     480                                        // TODO change this to be isCircle center
     481                                } else if (!i.hasEnclosures()) {
    482482                                        results.add(i);
    483483                                }
     
    662662                item.setParent(this);
    663663                item.setFloating(false); // esnure that it is anchored
    664                
     664
    665665                item.invalidateCommonTrait(ItemAppearence.Added);
    666666
     
    685685                item.onParentStateChanged(new ItemParentStateChangedEvent(this,
    686686                                ItemParentStateChangedEvent.EVENT_TYPE_ADDED));
     687                if (item.recalculateWhenChanged())
     688                        recalculate();
    687689
    688690                change();
     
    722724                        if (i.isAnnotation())
    723725                                i.getParentOrCurrentFrame().clearAnnotations();
     726                        // TODO Improve efficiency when addAll is called
    724727                        addItem(i);
    725728                }
     
    751754                                item.invalidateCommonTrait(ItemAppearence.Removed);
    752755                        }
    753 
     756                        // TODO Improve efficiency when removeAll is called
     757                        if (item.recalculateWhenChanged())
     758                                recalculate();
    754759                }
    755760        }
     
    15531558                                if (t.getText().toLowerCase().startsWith("@start")
    15541559                                                || t.getText().toLowerCase().equals("@start:")) {
    1555                                         //Used to allow users the option of putting an initial bullet after the @start
    1556                                         //This was replaced by width
    1557                                         //t.stripFirstWord();
     1560                                        // Used to allow users the option of putting an initial
     1561                                        // bullet after the @start
     1562                                        // This was replaced by width
     1563                                        // t.stripFirstWord();
    15581564                                        t.setText("");
    15591565
     
    19091915                return _annotations.get(annotation.toLowerCase());
    19101916        }
    1911        
     1917
    19121918        public void recalculate() {
    19131919                for (Item i : getItems()) {
    1914                         if(i.hasFormula() && !i.isAnnotation()){
     1920                        if (i.hasFormula() && !i.isAnnotation()) {
    19151921                                i.calculate(i.getFormula());
    19161922                        }
Note: See TracChangeset for help on using the changeset viewer.