Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Positioning a Label at the end (beginning) of a connection figure ...
Positioning a Label at the end (beginning) of a connection figure ... [message #53380] Fri, 22 September 2006 09:45 Go to next message
Eclipse UserFriend
Originally posted by: snej_NO-SPAM_.esuark.de

Hi there,

i want to add a Label at the end of a (decorated) connection which
should represent the target (source) cardinality of the connection. What
could i add to my PolyLine Connection in my .gmfgraph file?

One thing i tried was a BorderLayout as child from the Connection and a
FigureRef also as child. Then the FigureRef gets the BorderLayoutData
(END). But this didn't work out:

<figures xsi:type="gmfgraph:PolylineConnection"
referencingElements="CompositionLink"
name="SolidLineFilledDiamond" targetDecoration="FilledDiamond">
<layout xsi:type="gmfgraph:BorderLayout"/>
<children xsi:type="gmfgraph:FigureRef"
figure="EjbRelationTargetCardinalityFigure">
<layoutData xsi:type="gmfgraph:BorderLayoutData"
alignment="END"/>
</children>
</figures>

Is there a build in possibility to solve this? Or must i implement an
own Layout?

regards
Jens Krause
Re: Positioning a Label at the end (beginning) of a connection figure ... [message #53463 is a reply to message #53380] Fri, 22 September 2006 10:34 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: 5d5.mail.ru

In gmfgraph model add AlignmentFacet to the DiagramLabel. In this facet
you may select appropriate label alignment relative to the link.

Jens Krause wrote:
> Hi there,
>
> i want to add a Label at the end of a (decorated) connection which
> should represent the target (source) cardinality of the connection. What
> could i add to my PolyLine Connection in my .gmfgraph file?
>
> One thing i tried was a BorderLayout as child from the Connection and a
> FigureRef also as child. Then the FigureRef gets the BorderLayoutData
> (END). But this didn't work out:
>
> <figures xsi:type="gmfgraph:PolylineConnection"
> referencingElements="CompositionLink" name="SolidLineFilledDiamond"
> targetDecoration="FilledDiamond">
> <layout xsi:type="gmfgraph:BorderLayout"/>
> <children xsi:type="gmfgraph:FigureRef"
> figure="EjbRelationTargetCardinalityFigure">
> <layoutData xsi:type="gmfgraph:BorderLayoutData" alignment="END"/>
> </children>
> </figures>
>
> Is there a build in possibility to solve this? Or must i implement an
> own Layout?
>
> regards
> Jens Krause
Re: Positioning a Label at the end (beginning) of a connection figure ... [message #53543 is a reply to message #53463] Fri, 22 September 2006 11:03 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: snej_NO-SPAM_.esuark.de

Dmitry Stadnik wrote:
> In gmfgraph model add AlignmentFacet to the DiagramLabel. In this facet
> you may select appropriate label alignment relative to the link.

Thanks a lot, that is a good step in the right direction :).

But the result is not quite satisfying me ... Could i influence the
position where at the beginning or end of the connection appears?
Perhaps with a LocationPoint or so?

Jens K.
Re: Positioning a Label at the end (beginning) of a connection figure ... [message #53570 is a reply to message #53543] Fri, 22 September 2006 11:20 Go to previous message
Eclipse UserFriend
Originally posted by: snej_NO-SPAM_.esuark.de

Jens Krause wrote:
> But the result is not quite satisfying me ... Could i influence the
> position where at the beginning or end of the connection appears?
> Perhaps with a LocationPoint or so?

Well, opened eyes are often useful ;). Found the "Label Offset Facet" :).

Thanks again
Previous Topic:How to remove Zoom palette entry ?
Next Topic:Problem with setting multiple reference in properties view
Goto Forum:
  


Current Time: Wed Sep 18 16:26:55 GMT 2024

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

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

Back to the top