Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Prolem with composite figure
Prolem with composite figure [message #221835] Wed, 18 March 2009 20:30 Go to next message
Arij is currently offline ArijFriend
Messages: 40
Registered: July 2009
Member
I want to insert Composite Figures as into the example of
mindmap(actor-style) but when I insert this only one the ellipse is
visible but the polygon is invisible. I not understand this problem and I
needs of the help.
I write this in *.gmfgraph:
<descriptors
name="RessourceFigure">
<actualFigure
xsi:type="gmfgraph:Rectangle"
name="RessourceFigure"
outline="false"
fill="false">
<layout
xsi:type="gmfgraph:StackLayout"/>
<children
xsi:type="gmfgraph:Rectangle"
name="Ressource"
outline="false"
fill="false">
<layout
xsi:type="gmfgraph:FlowLayout"
vertical="true"
forceSingleLine="true"
minorAlignment="CENTER"
majorSpacing="0"
minorSpacing="0"/>
<children
xsi:type="gmfgraph:Ellipse"
name="Head">
<foregroundColor
xsi:type="gmfgraph:RGBColor"
red="220"
green="220"
blue="250"/>
<backgroundColor
xsi:type="gmfgraph:RGBColor"
red="230"
green="230"
blue="255"/>
<size
x="40"
y="20"/>
</children>
<children
xsi:type="gmfgraph:Polygon"
name="Body">
<foregroundColor
xsi:type="gmfgraph:RGBColor"
red="220"
green="220"
blue="255"/>
<backgroundColor
xsi:type="gmfgraph:RGBColor"
red="230"
green="230"
blue="255"/>
<template
x="23"
y="19"/>
<template
x="23"
y="24"/>
<template
x="39"
y="24"/>
<template
x="39"
y="29"/>
<template
x="23"
y="29"/>
<template
x="23"
y="36"/>
<template
x="39"
y="48"/>
<template
x="39"
y="53"/>
<template
x="20"
y="42"/>
<template
x="1"
y="53"/>
<template
x="1"
y="48"/>
<template
x="17"
y="36"/>
<template
x="17"
y="29"/>
<template
x="1"
y="29"/>
<template
x="1"
y="24"/>
<template
x="17"
y="24"/>
<template
x="17"
y="19"/>
<template
x="23"
y="19"/>
</children>
</children>
</actualFigure>
</descriptors>
Re: Prolem with composite figure [message #221858 is a reply to message #221835] Thu, 19 March 2009 04:06 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rholland.igw.tfh-wildau.de

I had the same problem with Polygon Figure seems to be a general problem. I
would try Scalable Polygon instead, cause that worked for me.

"Arij " <lassoued.arij@yahoo.fr> schrieb im Newsbeitrag
news:c14fc6533f791d9f772f20bc808434e6$1@www.eclipse.org...
>I want to insert Composite Figures as into the example of
>mindmap(actor-style) but when I insert this only one the ellipse is visible
>but the polygon is invisible. I not understand this problem and I needs of
>the help.
> I write this in *.gmfgraph: <descriptors
> name="RessourceFigure">
> <actualFigure
> xsi:type="gmfgraph:Rectangle"
> name="RessourceFigure"
> outline="false"
> fill="false">
> <layout
> xsi:type="gmfgraph:StackLayout"/>
> <children
> xsi:type="gmfgraph:Rectangle"
> name="Ressource"
> outline="false"
> fill="false">
> <layout
> xsi:type="gmfgraph:FlowLayout"
> vertical="true"
> forceSingleLine="true"
> minorAlignment="CENTER"
> majorSpacing="0"
> minorSpacing="0"/>
> <children
> xsi:type="gmfgraph:Ellipse"
> name="Head">
> <foregroundColor
> xsi:type="gmfgraph:RGBColor"
> red="220"
> green="220"
> blue="250"/>
> <backgroundColor
> xsi:type="gmfgraph:RGBColor"
> red="230"
> green="230"
> blue="255"/>
> <size
> x="40"
> y="20"/>
> </children>
> <children
> xsi:type="gmfgraph:Polygon"
> name="Body">
> <foregroundColor
> xsi:type="gmfgraph:RGBColor"
> red="220"
> green="220"
> blue="255"/>
> <backgroundColor
> xsi:type="gmfgraph:RGBColor"
> red="230"
> green="230"
> blue="255"/>
> <template
> x="23"
> y="19"/>
> <template
> x="23"
> y="24"/>
> <template
> x="39"
> y="24"/>
> <template
> x="39"
> y="29"/>
> <template
> x="23"
> y="29"/>
> <template
> x="23"
> y="36"/>
> <template
> x="39"
> y="48"/>
> <template
> x="39"
> y="53"/>
> <template
> x="20"
> y="42"/>
> <template
> x="1"
> y="53"/>
> <template
> x="1"
> y="48"/>
> <template
> x="17"
> y="36"/>
> <template
> x="17"
> y="29"/>
> <template
> x="1"
> y="29"/>
> <template
> x="1"
> y="24"/>
> <template
> x="17"
> y="24"/>
> <template
> x="17"
> y="19"/>
> <template
> x="23"
> y="19"/>
> </children>
> </children>
> </actualFigure>
> </descriptors>
>
Re: Prolem with composite figure [message #221889 is a reply to message #221858] Thu, 19 March 2009 10:46 Go to previous messageGo to next message
Arij is currently offline ArijFriend
Messages: 40
Registered: July 2009
Member
Hello Ralph

I resolve this problem in the following way:
In the generated *.diagram.edit.parts.ResourceEditPart$ResourceFigure
class, set the attribute private boolean myUseLocalCoordinates = true; You
might want to set the comment above it to @generated NOT in order to
preserve this change. With that, set the fill(true) method on the body in
the generated figure code, as it seems otherwise to not be filled.

Please you can say to me what is the difference between the Scalable
Polygon and Polygon
Re: Prolem with composite figure [message #221910 is a reply to message #221835] Thu, 19 March 2009 12:36 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cayla_sha.gmx.net

Another solution to you problem:
Draw the polygon in a own custom class, like it`s done with the Port in
the Taipan-Example.
And for the ellipse use this tip:
http://wiki.eclipse.org/GMF_Newsgroup_Q_and_A#How_do_I_draw_ an_ellipse_inside_another_ellipse.3F


Arij schrieb:
> I want to insert Composite Figures as into the example of
> mindmap(actor-style) but when I insert this only one the ellipse is
> visible but the polygon is invisible. I not understand this problem and
> I needs of the help.
> I write this in *.gmfgraph: <descriptors
> name="RessourceFigure">
> <actualFigure
> xsi:type="gmfgraph:Rectangle"
> name="RessourceFigure"
> outline="false"
> fill="false">
> <layout
> xsi:type="gmfgraph:StackLayout"/>
> <children
> xsi:type="gmfgraph:Rectangle"
> name="Ressource"
> outline="false"
> fill="false">
> <layout
> xsi:type="gmfgraph:FlowLayout"
> vertical="true"
> forceSingleLine="true"
> minorAlignment="CENTER"
> majorSpacing="0"
> minorSpacing="0"/>
> <children
> xsi:type="gmfgraph:Ellipse"
> name="Head">
> <foregroundColor
> xsi:type="gmfgraph:RGBColor"
> red="220"
> green="220"
> blue="250"/>
> <backgroundColor
> xsi:type="gmfgraph:RGBColor"
> red="230"
> green="230"
> blue="255"/>
> <size
> x="40"
> y="20"/>
> </children>
> <children
> xsi:type="gmfgraph:Polygon"
> name="Body">
> <foregroundColor
> xsi:type="gmfgraph:RGBColor"
> red="220"
> green="220"
> blue="255"/>
> <backgroundColor
> xsi:type="gmfgraph:RGBColor"
> red="230"
> green="230"
> blue="255"/>
> <template
> x="23"
> y="19"/>
> <template
> x="23"
> y="24"/>
> <template
> x="39"
> y="24"/>
> <template
> x="39"
> y="29"/>
> <template
> x="23"
> y="29"/>
> <template
> x="23"
> y="36"/>
> <template
> x="39"
> y="48"/>
> <template
> x="39"
> y="53"/>
> <template
> x="20"
> y="42"/>
> <template
> x="1"
> y="53"/>
> <template
> x="1"
> y="48"/>
> <template
> x="17"
> y="36"/>
> <template
> x="17"
> y="29"/>
> <template
> x="1"
> y="29"/>
> <template
> x="1"
> y="24"/>
> <template
> x="17"
> y="24"/>
> <template
> x="17"
> y="19"/>
> <template
> x="23"
> y="19"/>
> </children>
> </children>
> </actualFigure>
> </descriptors>
>
Re: Prolem with composite figure [message #221931 is a reply to message #221889] Thu, 19 March 2009 14:10 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rholland.igw.tfh-wildau.de

A normal Polygon stays at the size it was created with, independently from
the size of the compound object. In a Scalable Polygon the points are first
transformed to fit the desired size.

"Arij " <lassoued.arij@yahoo.fr> schrieb im Newsbeitrag
news:c15126110c0b5d336bfeca74b0529fe7$1@www.eclipse.org...
> Hello Ralph
>
> I resolve this problem in the following way:
> In the generated *.diagram.edit.parts.ResourceEditPart$ResourceFigure
> class, set the attribute private boolean myUseLocalCoordinates = true; You
> might want to set the comment above it to @generated NOT in order to
> preserve this change. With that, set the fill(true) method on the body in
> the generated figure code, as it seems otherwise to not be filled.
>
> Please you can say to me what is the difference between the Scalable
> Polygon and Polygon
>
>
Re: Prolem with composite figure [message #221944 is a reply to message #221889] Thu, 19 March 2009 14:17 Go to previous message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Arij,

That's strange - looks like you've used a template from mindmap example (should
be working..)
Anyway, general idea is: gmfgraph:Polygon cannot be moved - you have to specify
points in it's parent relative coordinates, so try playing with "template"
points to make it drawing properly just after code generation.

-----------------
Alex Shatalin
Previous Topic:How can I store the bounds information in the model features?
Next Topic:how do I setup link target mapping?
Goto Forum:
  


Current Time: Thu Apr 25 00:27:40 GMT 2024

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

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

Back to the top