|
Re: Arrows/decorations in the middle of a line [message #208573 is a reply to message #208266] |
Tue, 14 October 2008 21:29 |
Anthony Hunter Messages: 446 Registered: July 2009 |
Senior Member |
|
|
Hi Adam,
You will need to get into the code a little. The GMF PolylineConnection
comes from GEF. The GMF Runtime only supports source and target decorations.
Since GEF supports a ConnectionLocator at the source, target and middle, you
should be able to extend the generated code to move the decoration to the
middle.
Cheers...
Anthony
"AdamF" <adam@softfab.com> wrote in message
news:gcnj11$53c$1@build.eclipse.org...
> Dear all,
>
> Is it possible to put a shape/decoration in the middle of a line.
>
> We have a suggested notation for a model with a double arrow (kind of like
> the christmas tree in the mindmap example (but obviously smaller) which
> would need to go into the middle of a line.
>
> Can I set a polyline/polygon figure onto the middle of a connector/line?
>
> e.g. in:
>
> http://wiki.eclipse.org/GMF_Tutorial_Part_2#Graphical_Defini tion_2
>
> "Returning to our graphical definition model (mindmap.gmfgraph), let's
> right-click on our gallery and add a 'New Child > Figure Descriptor' and
> to it a 'New Child > Polyline Connection'. Name it 'DashedLineOpenArrow'
> and change 'Line Kind' to LINE_DASH. Then add a 'New Child > Polyline
> Decoration' element to the Figure Gallery and name it 'OpenArrow'. The
> default decoration will be an open arrow (while a Polygon Decoration will
> be a filled triangle), but if you want to make one explicitly, you could
> add three Template Point children to the OpenArrow with X:Y values
> of -1:1, 0:0, and -1:-1. Finally, add the OpenArrow as a Target Decoration
> to the DashedLineOpenArrow polyline."
>
>
> All I need to do is to find the middle wrt the X:Y coords & create the
> polygon/polyline decoration?
>
> TIA
>
> Adam
|
|
|
Re: Arrows/decorations in the middle of a line [message #208818 is a reply to message #208573] |
Thu, 16 October 2008 10:12 |
Adam Flinton Messages: 32 Registered: July 2009 |
Member |
|
|
Thanks
Adam
Anthony Hunter wrote:
> Hi Adam,
>
> You will need to get into the code a little. The GMF PolylineConnection
> comes from GEF. The GMF Runtime only supports source and target decorations.
> Since GEF supports a ConnectionLocator at the source, target and middle, you
> should be able to extend the generated code to move the decoration to the
> middle.
>
> Cheers...
> Anthony
>
> "AdamF" <adam@softfab.com> wrote in message
> news:gcnj11$53c$1@build.eclipse.org...
>> Dear all,
>>
>> Is it possible to put a shape/decoration in the middle of a line.
>>
>> We have a suggested notation for a model with a double arrow (kind of like
>> the christmas tree in the mindmap example (but obviously smaller) which
>> would need to go into the middle of a line.
>>
>> Can I set a polyline/polygon figure onto the middle of a connector/line?
>>
>> e.g. in:
>>
>> http://wiki.eclipse.org/GMF_Tutorial_Part_2#Graphical_Defini tion_2
>>
>> "Returning to our graphical definition model (mindmap.gmfgraph), let's
>> right-click on our gallery and add a 'New Child > Figure Descriptor' and
>> to it a 'New Child > Polyline Connection'. Name it 'DashedLineOpenArrow'
>> and change 'Line Kind' to LINE_DASH. Then add a 'New Child > Polyline
>> Decoration' element to the Figure Gallery and name it 'OpenArrow'. The
>> default decoration will be an open arrow (while a Polygon Decoration will
>> be a filled triangle), but if you want to make one explicitly, you could
>> add three Template Point children to the OpenArrow with X:Y values
>> of -1:1, 0:0, and -1:-1. Finally, add the OpenArrow as a Target Decoration
>> to the DashedLineOpenArrow polyline."
>>
>>
>> All I need to do is to find the middle wrt the X:Y coords & create the
>> polygon/polyline decoration?
>>
>> TIA
>>
>> Adam
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.04268 seconds