Login | Register
My pages Projects Community openCollabNet

Reply to message

* = Required fields
* Subject
* Body
Send reply to
Author (directly in email)
Please type the letters in the image above.

Original message

Author dthompson
Full name Dave Thompson
Date 2008-12-09 12:51:19 PST
Message Hi,

Since what I'm about to talk about really is a GEF question, not an ArgoUML
one, I'm sending it to the GEF list.

While working on issue1048, I have come to the problem of accessing the
PathItemPlacementStrategy for a given Fig (such as a label) on a FigEdge. I
need to access the PathItemPlacementStrategy, so that I can modify it's fields.

In the repository at the moment, once a pathItem has been created, I think
the access I have at a later date is quite limited. Assuming all I've got is
a reference to the FigEdge, all I can do is use
FigEdge.getPathItemStrategies() to get a list of all of the pathitems used
within that fig. Unfortunately, this does not help me to find out which
PathItem is associated with the Fig I am interested in. I can iterate
through the list, but all I can do is paint() or getPoint(), neither of these
helps me pin down the fig.

Possible options (there may be more!):

A) One option is of course to add more to the PathItemPlacementStrategy
interface, with a getFig() method for getting the anchored Fig. I could then
use this method during my search, to try each pathitem until the getFig()
pointed to the fig I was interested in.

B) My preferred option would be to add a method to figEdge:
getPathItemPlacement​Strategy(Fig fig). This method could be used to directly
return the PathItemPlacementStrategy for a particular fig. I think that if
we did this, we would probably no longer need the getPathItemStrategies() method.

I've out B and it works, with a few other changes to ArgoUML. Attached is my

(Bob?) please advise on which way you would like me to proceed.

Kind regards,