Ignore:
Timestamp:
09/04/08 17:07:39 (16 years ago)
Author:
ra33
Message:
 
File:
1 edited

Legend:

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

    r290 r294  
    207207
    208208                if (_change) {
    209                         // Notify the frame listeners that the frame has changed
    210                         for (FrameObserver fl : _observers) {
    211                                 fl.update();
    212                         }
     209                        notifyObservers();
    213210
    214211                        setBufferValid(false);
    215212                        _saved = false;
     213                }
     214        }
     215
     216        public void notifyObservers() {
     217                // Notify the frame listeners that the frame has changed
     218                for (FrameObserver fl : _observers) {
     219                        fl.update();
    216220                }
    217221        }
     
    501505                for (Overlay o : _overlays.keySet())
    502506                        results.addAll(o.Frame.getItemsWithin(poly));
    503                
    504                 for(Item i: getVectorItems()){
     507
     508                for (Item i : getVectorItems()) {
    505509                        if (i.intersects(poly)) {
    506                                 //This assumes a results is a set
     510                                // This assumes a results is a set
    507511                                results.add(i.getEditTarget());
    508512                        }
     
    703707                        InteractiveWidget iw = ((WidgetCorner) item).getWidgetSource();
    704708                        if (!this._iWidgets.contains(iw)) { // A set would have been
    705                                 if(FrameMouseActions.isControlDown())
     709                                if (FrameMouseActions.isControlDown())
    706710                                        _iWidgets.add(iw);
    707711                                else
     
    719723
    720724        public void refreshSize() {
    721                 //assert (size != null);
     725                // assert (size != null);
    722726                boolean bReparse = false;
    723727                for (Item i : getItems()) {
     
    737741                        }
    738742                }
    739                
    740                 //Do the anchors on the overlays
    741                 for(Overlay o: getOverlays()){
     743
     744                // Do the anchors on the overlays
     745                for (Overlay o : getOverlays()) {
    742746                        o.Frame.refreshSize();
    743747                }
    744                
     748
    745749                if (bReparse) {
    746750                        FrameUtils.Parse(this, false);
     
    10771081                        int index = toCheck.indexOf(from);
    10781082
    1079                         //If its the title index will be 0
     1083                        // If its the title index will be 0
    10801084                        if (index < 0)
    10811085                                index = 0;
     
    11111115                int maxY = 0;
    11121116                HighlightMode mode = toAdd.Source.getHighlightMode();
    1113                 if(mode != HighlightMode.None)
     1117                if (mode != HighlightMode.None)
    11141118                        mode = HighlightMode.Connected;
    11151119                Color highlightColor = toAdd.Source.getHighlightColor();
     
    11231127                        i.invalidateAll();
    11241128                        i.invalidateFill();
    1125                         //Get the right most x and bottom most y pos
     1129                        // Get the right most x and bottom most y pos
    11261130                        int itemRight = i.getX() + i.getBoundsWidth();
    1127                         if(itemRight > maxX)
     1131                        if (itemRight > maxX)
    11281132                                maxX = itemRight;
    11291133                        int itemBottom = i.getY() + i.getBoundsHeight();
    1130                         if(itemBottom > maxY)
     1134                        if (itemBottom > maxY)
    11311135                                maxY = itemBottom;
    11321136                }
     
    13091313                                        ItemParentStateChangedEvent.EVENT_TYPE_ADDED_VIA_OVERLAY,
    13101314                                        permission));
    1311                         //i.setPermission(permission);
     1315                        // i.setPermission(permission);
    13121316                        _overlayItems.add(i);
    13131317                }
     
    16901694                for (Overlay o : getOverlays())
    16911695                        o.Frame.refreshItemPermissions(o.permission);
    1692                
    1693                 //Only update the permissions if we have to
     1696
     1697                // Only update the permissions if we have to
    16941698                if (_body.size() > 0 && permission.equals(_body.get(0)._permission))
    16951699                        return;
     
    16981702                        i.setPermission(permission);
    16991703                }
    1700                
    17011704
    17021705        }
     
    19321935                        }
    19331936                }
    1934                
    1935                 for(Vector v: getVectors()){
     1937
     1938                for (Vector v : getVectors()) {
    19361939                        toSave.add(v.Source);
    19371940                }
    1938                
     1941
    19391942                return toSave;
    19401943        }
     
    20392042
    20402043        public void parse() {
    2041                 for(Overlay o: getOverlays()){
     2044                for (Overlay o : getOverlays()) {
    20422045                        o.Frame.parse();
    20432046                }
    2044                 //Must parse the frame AFTER the overlays
     2047                // Must parse the frame AFTER the overlays
    20452048                FrameUtils.Parse(this);
    20462049        }
Note: See TracChangeset for help on using the changeset viewer.