Changeset 294 for trunk/src/org/expeditee/gui/Frame.java
- Timestamp:
- 09/04/08 17:07:39 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/gui/Frame.java
r290 r294 207 207 208 208 if (_change) { 209 // Notify the frame listeners that the frame has changed 210 for (FrameObserver fl : _observers) { 211 fl.update(); 212 } 209 notifyObservers(); 213 210 214 211 setBufferValid(false); 215 212 _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(); 216 220 } 217 221 } … … 501 505 for (Overlay o : _overlays.keySet()) 502 506 results.addAll(o.Frame.getItemsWithin(poly)); 503 504 for (Item i: getVectorItems()){507 508 for (Item i : getVectorItems()) { 505 509 if (i.intersects(poly)) { 506 // This assumes a results is a set510 // This assumes a results is a set 507 511 results.add(i.getEditTarget()); 508 512 } … … 703 707 InteractiveWidget iw = ((WidgetCorner) item).getWidgetSource(); 704 708 if (!this._iWidgets.contains(iw)) { // A set would have been 705 if (FrameMouseActions.isControlDown())709 if (FrameMouseActions.isControlDown()) 706 710 _iWidgets.add(iw); 707 711 else … … 719 723 720 724 public void refreshSize() { 721 // assert (size != null);725 // assert (size != null); 722 726 boolean bReparse = false; 723 727 for (Item i : getItems()) { … … 737 741 } 738 742 } 739 740 // Do the anchors on the overlays741 for (Overlay o: getOverlays()){743 744 // Do the anchors on the overlays 745 for (Overlay o : getOverlays()) { 742 746 o.Frame.refreshSize(); 743 747 } 744 748 745 749 if (bReparse) { 746 750 FrameUtils.Parse(this, false); … … 1077 1081 int index = toCheck.indexOf(from); 1078 1082 1079 // If its the title index will be 01083 // If its the title index will be 0 1080 1084 if (index < 0) 1081 1085 index = 0; … … 1111 1115 int maxY = 0; 1112 1116 HighlightMode mode = toAdd.Source.getHighlightMode(); 1113 if (mode != HighlightMode.None)1117 if (mode != HighlightMode.None) 1114 1118 mode = HighlightMode.Connected; 1115 1119 Color highlightColor = toAdd.Source.getHighlightColor(); … … 1123 1127 i.invalidateAll(); 1124 1128 i.invalidateFill(); 1125 // Get the right most x and bottom most y pos1129 // Get the right most x and bottom most y pos 1126 1130 int itemRight = i.getX() + i.getBoundsWidth(); 1127 if (itemRight > maxX)1131 if (itemRight > maxX) 1128 1132 maxX = itemRight; 1129 1133 int itemBottom = i.getY() + i.getBoundsHeight(); 1130 if (itemBottom > maxY)1134 if (itemBottom > maxY) 1131 1135 maxY = itemBottom; 1132 1136 } … … 1309 1313 ItemParentStateChangedEvent.EVENT_TYPE_ADDED_VIA_OVERLAY, 1310 1314 permission)); 1311 // i.setPermission(permission);1315 // i.setPermission(permission); 1312 1316 _overlayItems.add(i); 1313 1317 } … … 1690 1694 for (Overlay o : getOverlays()) 1691 1695 o.Frame.refreshItemPermissions(o.permission); 1692 1693 // Only update the permissions if we have to1696 1697 // Only update the permissions if we have to 1694 1698 if (_body.size() > 0 && permission.equals(_body.get(0)._permission)) 1695 1699 return; … … 1698 1702 i.setPermission(permission); 1699 1703 } 1700 1701 1704 1702 1705 } … … 1932 1935 } 1933 1936 } 1934 1935 for (Vector v: getVectors()){1937 1938 for (Vector v : getVectors()) { 1936 1939 toSave.add(v.Source); 1937 1940 } 1938 1941 1939 1942 return toSave; 1940 1943 } … … 2039 2042 2040 2043 public void parse() { 2041 for (Overlay o: getOverlays()){2044 for (Overlay o : getOverlays()) { 2042 2045 o.Frame.parse(); 2043 2046 } 2044 // Must parse the frame AFTER the overlays2047 // Must parse the frame AFTER the overlays 2045 2048 FrameUtils.Parse(this); 2046 2049 }
Note:
See TracChangeset
for help on using the changeset viewer.