Changeset 247 for trunk/src/org/expeditee/gui/Frame.java
- Timestamp:
- 08/22/08 10:54:44 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/gui/Frame.java
r242 r247 584 584 585 585 if (_body.size() > 0) 586 refreshItemPermissions( );586 refreshItemPermissions(permission); 587 587 } 588 588 … … 658 658 * The Item to add to this Frame. 659 659 */ 660 public void addItem(Item item) {660 public void addItem(Item item) { 661 661 addItem(item, true); 662 662 } 663 663 664 664 public void addItem(Item item, boolean recalculate) { 665 665 if (item == null || item.equals(_frameName) || _body.contains(item)) … … 756 756 } 757 757 758 public void removeItem(Item item) {758 public void removeItem(Item item) { 759 759 removeItem(item, true); 760 760 } 761 761 762 762 public void removeItem(Item item, boolean recalculate) { 763 763 // If an annotation is being deleted clear the annotation list … … 1279 1279 ItemParentStateChangedEvent.EVENT_TYPE_ADDED_VIA_OVERLAY, 1280 1280 permission)); 1281 i.setPermission(permission);1281 //i.setPermission(permission); 1282 1282 _overlayItems.add(i); 1283 1283 } … … 1421 1421 getNextItemID()); 1422 1422 1423 Item template = getTemplate(UserSettings. LineTemplate,1424 ItemUtils.TAG_ LINE_TEMPLATE);1423 Item template = getTemplate(UserSettings.DotTemplate, 1424 ItemUtils.TAG_DOT_TEMPLATE); 1425 1425 float thickness = template.getThickness(); 1426 1426 if (thickness > 0) … … 1429 1429 dot.setLinePattern(template.getLinePattern()); 1430 1430 dot.setColor(template.getColor()); 1431 dot.setFillColor(template.getFillColor()); 1431 1432 // reset attributes 1432 1433 dot.setParent(this); … … 1640 1641 * 1641 1642 */ 1642 public void refreshItemPermissions( ) {1643 Permission permission = getPermission();1643 public void refreshItemPermissions(Permission maxPermission) { 1644 Permission permission = Permission.min(maxPermission, getPermission()); 1644 1645 _frameName.setPermission(permission); 1645 1646 … … 1665 1666 } 1666 1667 1668 for (Overlay o : getOverlays()) 1669 o.Frame.refreshItemPermissions(o.permission); 1670 1671 //Only update the permissions if we have to 1672 if (_body.size() > 0 && permission.equals(_body.get(0)._permission)) 1673 return; 1674 1667 1675 for (Item i : _body) { 1668 i.setPermission(_permission); 1669 } 1676 i.setPermission(permission); 1677 } 1678 1679 1670 1680 } 1671 1681
Note:
See TracChangeset
for help on using the changeset viewer.