Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Alignment actions
Alignment actions [message #1774132] Tue, 10 October 2017 19:51 Go to next message
Eclipse UserFriend
In my Graphiti editor I have image figure and text label below that are nested in an invisible shape - this invisible shape holds these two components together. When I click anywhere is the figure - an outer invisible shape, and image or a text, the image is selected with a border around it. This signifies selection of the object.. I am doing this by overriding getSelection(PictogramElement pe, PictogramElement[] oldSelection) method in DesignerToolBehaviorProvider. This works well visually, however, when I select two or more shapes and try to align them, nothing happens - probably because alignment algorithm tries to align selected figures, but it can't because alignment happens in the context of outer invisible shape. Is there anything I can do to adjust alignment actions or do I need to rethink how I draw by figures?
Re: Alignment actions [message #1774657 is a reply to message #1774132] Wed, 18 October 2017 11:23 Go to previous message
Eclipse UserFriend
Alex,

hm, this is a gap in Graphiti. The align actions are provided purily on GEF level, meaning GEF aligns the shapes that are selected. In your case that does not work. I see 2 option:
1) In Graphiti we need to wrap the GEF align actions and trigger the GEF alignment based on the right shapes. Not sure if that is possible and aboutr the involved effort. Please raise an enhancement bug in case you would like to have that, but I already have to state that probably not much will happen here due to our current lack of development capacity.
2) Remove teh GEF alignment actions and provide your own tool specific ones that implement the desired behavior.

Michael
Previous Topic:Problems while modifying EList of string
Next Topic:How to create a custom shape?
Goto Forum:
  


Current Time: Wed Feb 19 16:22:51 GMT 2025

Powered by FUDForum. Page generated in 0.02763 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top