Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » How to keep ImageFigure position static?
How to keep ImageFigure position static? [message #524167] Tue, 30 March 2010 23:07 Go to next message
Wirianto Djunaidi is currently offline Wirianto Djunaidi
Messages: 8
Registered: July 2009
Junior Member
I have an ImageFigure as the top figure in the editor. The Image serves as background image which user can annotate.

The issue that I am facing is when user enlarge the size of the editor, the background image shift to maintain center-alignment and leave the annotation behind Crying or Very Sad

I figure there are 2 options to handle this:
1. Make the Image position fixed, maybe force it to keep upper-left alignment.
2. Translate position for all the annotation relatively to the re-alignment of the image.

I don't know how to do either of them. Any pointers?

I figure option 1 is much simpler and preferable.

Or maybe we are approaching it wrong; if anybody know of better way of doing annotation stuff, happy to hear that.

Regards,
-DJ

[Updated on: Tue, 30 March 2010 23:08]

Report message to a moderator

Re: How to keep ImageFigure position static? [message #524458 is a reply to message #524167] Wed, 31 March 2010 23:35 Go to previous message
Wirianto Djunaidi is currently offline Wirianto Djunaidi
Messages: 8
Registered: July 2009
Junior Member
Figure out the solution. Quite simple really, I just have to add this into the my ImageFigure-derived constructor:

setAlignment(PositionConstants.NORTH | PositionConstants.WEST);

[Updated on: Wed, 31 March 2010 23:35]

Report message to a moderator

Previous Topic:[Zest] Custom Connections
Next Topic:Wrong z-order in outline
Goto Forum:
  


Current Time: Fri Jul 25 01:19:27 EDT 2014

Powered by FUDForum. Page generated in 0.36198 seconds