Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Custom Shape - black ellipse inside a white one ???
Custom Shape - black ellipse inside a white one ??? [message #198823] Thu, 24 July 2008 15:19 Go to next message
Eclipse UserFriend
Originally posted by: hasan.abdel.rwth-aachen.de

Hi,
I am trying to create a custom shape ( Black ellipse inside White ellipse ) using GMF Graphical Definition editor. My current implementation is the following:

<descriptors
name="EndFigure">
<actualFigure
xsi:type="gmfgraph:Ellipse"
name="EndFigure"
fill="false"
lineWidth="3">
<layout
xsi:type="gmfgraph:BorderLayout"/>
<foregroundColor
xsi:type="gmfgraph:ConstantColor"
value="black"/>
<minimumSize
dx="20"
dy="20"/>
<preferredSize
dx="40"
dy="40"/>
<border
xsi:type="gmfgraph:MarginBorder">
<insets
top="6"
left="6"
bottom="6"
right="6"/>
</border>
<location
x="40"
y="40"/>
<size
x="40"
y="40"/>
<children
xsi:type="gmfgraph:Ellipse"
name="EndInner">
<foregroundColor
xsi:type="gmfgraph:ConstantColor"
value="gray"/>
<backgroundColor
xsi:type="gmfgraph:ConstantColor"
value="gray"/>
<minimumSize
dx="10"
dy="10"/>
<preferredSize
dx="28"
dy="28"/>
<location/>
<size
x="28"
y="28"/>
</children>
</actualFigure>
</descriptors>

For strange reason, the inner white ellipse is not drawn. Any idea ?!!!

THanks in advance,
Hasan
Re: Custom Shape - black ellipse inside a white one ??? [message #198943 is a reply to message #198823] Fri, 25 July 2008 10:20 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Hasan,

> I am trying to create a custom shape ( Black ellipse inside White
> ellipse ) using GMF Graphical Definition editor. My current
Are you using WYSIWUG .gmfgraph editor?

> <layout xsi:type="gmfgraph:BorderLayout"/>
[skipped...]
> <children xsi:type="gmfgraph:Ellipse" name="EndInner">
> <foregroundColor xsi:type="gmfgraph:ConstantColor" value="gray"/>
> <backgroundColor xsi:type="gmfgraph:ConstantColor" value="gray"/>
> <minimumSize dx="10" dy="10"/>
> <preferredSize dx="28" dy="28"/>
> <location/>
> <size x="28" y="28"/>
> </children>
Looks like there is no LayoutConstraint (LayoutData) specified for this figure,
but you have to have BorderLayoutData instance associated with childFigure
to layout it properly inside its parent.

-----------------
Alex Shatalin
Re: Custom Shape - black ellipse inside a white one ??? [message #198998 is a reply to message #198943] Fri, 25 July 2008 15:58 Go to previous message
Eclipse UserFriend
Originally posted by: hasan.abdel.rwth-aachen.de

Hi Alex,

Thanks a lot. Yes, it was the LayoutConstraint. Now it is working as expected, thanks again.

I am still new to GMF&Draw2D technologies.

Regards,
Hasan

Alex Shatalin wrote:

> Hello Hasan,
>
>> I am trying to create a custom shape ( Black ellipse inside White
>> ellipse ) using GMF Graphical Definition editor. My current
> Are you using WYSIWUG .gmfgraph editor?
>
>> <layout xsi:type="gmfgraph:BorderLayout"/>
> [skipped...]
>> <children xsi:type="gmfgraph:Ellipse" name="EndInner">
>> <foregroundColor xsi:type="gmfgraph:ConstantColor" value="gray"/>
>> <backgroundColor xsi:type="gmfgraph:ConstantColor" value="gray"/>
>> <minimumSize dx="10" dy="10"/>
>> <preferredSize dx="28" dy="28"/>
>> <location/>
>> <size x="28" y="28"/>
>> </children>
> Looks like there is no LayoutConstraint (LayoutData) specified for this
> figure, but you have to have BorderLayoutData instance associated with
> childFigure to layout it properly inside its parent.
>
> -----------------
> Alex Shatalin
Previous Topic:configure palette dynamically
Next Topic:Compartment resizement
Goto Forum:
  


Current Time: Sat Apr 27 00:40:49 GMT 2024

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

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

Back to the top