Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Set selection to a connection decorator
Set selection to a connection decorator [message #1778782] Thu, 21 December 2017 11:40 Go to next message
Julia Jung is currently offline Julia JungFriend
Messages: 2
Registered: December 2017
Junior Member
Hello everybody,

i have a question regarding setting the selection programmatically to a connection decorator. I already searched the forum but had no luck.

My diagram shows some kind of path (startpoint -> first point -> second point -> last point). The points are connected via FreeFormConnection decorated with a text label.
I want to navigate through the diagram via keyboard and select the shapes in an order i specify programmatically. I hooked in via KeyHandler and this works fine for pictogram elements. So i managed to set the selection to the pictogram elements programmatically. Now i got stucked setting the selection to text label connection decorators. Is it even possible and if so, how?

Thanks in advance for your help.
Re: Set selection to a connection decorator [message #1778980 is a reply to message #1778782] Wed, 27 December 2017 14:05 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1898
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Julia,

can you be a bit more specific what your issue is when you try to select a decorator? One difference is that they are children of their connections and do not appear in the list of the normal shapes of the diagram (diagram holds its connections, each connection holds its decorators).

Michael
Re: Set selection to a connection decorator [message #1779449 is a reply to message #1778980] Mon, 08 January 2018 08:50 Go to previous messageGo to next message
Julia Jung is currently offline Julia JungFriend
Messages: 2
Registered: December 2017
Junior Member
Hello Michael,

thank you for your answer.
Well, i have a diagram like in the attached file.
The letters are placeholders that should be changed to numbers by the user.
Now i want to enable the user to navigate through the diagram via keyboard in an order i specify programmatically.

I wanted to solve that in the following way: when the user presses for example Enter on the keyboard, i check in the KeyHandler which element should be selected next (information is saved in the underlying model) and then set the selection to that element. A and C are PictogramElements on which i can set the selection via the selectPictogramElements-method. B is just a text label of a FreeFormConnection and i did not find a way to select this one via KeyHandler.

Julia

  • Attachment: diagram.png
    (Size: 2.67KB, Downloaded 34 times)
Re: Set selection to a connection decorator [message #1779598 is a reply to message #1779449] Wed, 10 January 2018 08:31 Go to previous message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1898
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Hello Julia,

not fully sure without digging deeper in the coding. But from what I know, the selectPictogramElements method uses a map from pictogram element to GEF object for the selection to happen. Probably the decorator shapes are not contained in that.

So this looks like a gap in Graphiti, either we should enhance the selectPictogramElements method to also allow decorators or offer a new method for selecting decorators. Would you please file an enhancement bug for that?

Michael
Previous Topic:How to set the order of shape?
Next Topic:How to modify the default behavior of draw connection?
Goto Forum:
  


Current Time: Tue Sep 18 19:00:47 GMT 2018

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

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

Back to the top