Bug 279825 - Notify when image has changed for ImageFigure
Summary: Notify when image has changed for ImageFigure
Status: RESOLVED FIXED
Alias: None
Product: GEF
Classification: Tools
Component: GEF-Legacy Draw2d (show other bugs)
Version: 3.5   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 3.6.0 (Helios) M6   Edit
Assignee: Alex Boyko CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 279728
  Show dependency tree
 
Reported: 2009-06-10 12:19 EDT by Alex Boyko CLA
Modified: 2010-04-29 09:56 EDT (History)
2 users (show)

See Also:
ahunter.eclipse: helios+


Attachments
proposed patch (4.65 KB, patch)
2009-06-10 12:19 EDT, Alex Boyko CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Boyko CLA 2009-06-10 12:19:54 EDT
Created attachment 138815 [details]
proposed patch

If image figure can have special connection anchor such that connection would go through transparent pixels of the image and connect to actual image directly, there will be a problem with set different images for ImageFigure while it has incoming/outgoing connectors.

When the new Image is set figure is re-validated, such that if bounds of the figure change then connection anchors will be re-calculated. However, if image has the same size, but just different pixels are transparent, the anchor won't be recalculated

Attached patch introduces a mechanism to attach/detach IMageChangedListener to image figures. Also it introduces IIMageFigure interface and AbstractImageFigure such that current API won't break.
Comment 1 Anthony Hunter CLA 2010-02-04 19:21:04 EST
Alex, do you recall why we never committed this. Did you still need this change?
Comment 2 James Bruck CLA 2010-02-23 18:10:07 EST
Looks good to me.   I would suggest updating the copyright to 2010.
Comment 3 Alex Boyko CLA 2010-02-24 12:10:40 EST
Committed for 3.6
Comment 4 Alex Boyko CLA 2010-02-24 12:14:12 EST
Committed patch has
1. Corrected header dates and @since 3.6
2. Also made all methods AbstractImageFigure final - no need to override add /
remove listeners as well notify method.