Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Composite Figure
Composite Figure [message #75290] Tue, 07 November 2006 09:06 Go to next message
Eclipse UserFriend
Originally posted by: snej_NO-SPAM_.esuark.de

Hi There,

i need a little help. I want to have a figure wich the user could select
from the tools palette, but which creates 2 figures in the diagramm.

For example a checkbox:
* one figure for the checked (or unchecked) button
* one figure for the label

I solved the problem right now with one figure, but the label and the
checkbox should be moveable, so that you could move the label before or
over the checkbox. I don't know if i discribed it enought what my
problem is, so if there is any question ...

regards
jens
Re: Composite Figure [message #75349 is a reply to message #75290] Tue, 07 November 2006 09:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: snej_NO-SPAM_.esuark.de

Jens Krause wrote:
> I solved the problem right now with one figure, but the label and the
> checkbox should be moveable, so that you could move the label before or
> over the checkbox. I don't know if i discribed it enought what my
> problem is, so if there is any question ...

For additional information on how i solved it now, i send my figure
definition:

<figures
xsi:type="gmfgraph:Rectangle"
referencingElements="CheckBox"
name="CheckBoxFigure"
outline="false"
fill="false">
<layout xsi:type="gmfgraph:XYLayout"/>
<children xsi:type="gmfgraph:Label"
referencingElements="CheckBoxLabel"
name="CheckBoxLabelFigure"
text="label ..."/>
<children xsi:type="gmfgraph:Rectangle"
name="CheckboxBorderFigure">
<layoutData xsi:type="gmfgraph:XYLayoutData">
<topLeft x="2" y="4"/>
<size dx="12" dy="12"/>
</layoutData>
<foregroundColor xsi:type="gmfgraph:RGBColor"/>
<backgroundColor xsi:type="gmfgraph:RGBColor"
red="255"
green="255"
blue="255"/>
</children>
<children xsi:type="gmfgraph:Polygon"
name="CheckBoxHook">
<foregroundColor xsi:type="gmfgraph:RGBColor"/>
<backgroundColor xsi:type="gmfgraph:RGBColor"/>
<template x="4" y="8"/>
<template x="8" y="10"/>
<template x="13" y="2"/>
<template x="8" y="13"/>
<template x="4" y="8"/>
</children>
<backgroundColor xsi:type="gmfgraph:RGBColor"
red="200"
green="200"
blue="200"/>
<maximumSize dx="100" dy="18"/>
<minimumSize dx="100" dy="18"/>
<preferredSize dx="100" dy="18"/>
<size x="100" y="18"/>
</figures>


But this configuration makes the Rectangle with the hook stay at the
given position and i can't move this.
Did i have to build a CustomFigure or is there a other approach to get
what i need?

Any idea is welcome.

Jens
Re: Composite Figure [message #77751 is a reply to message #75290] Wed, 15 November 2006 08:52 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: 5d5.mail.ru

You could try to set node figure as checkbox and define label as
external label - it will be possible to position it anywhere around the
checkbox.

Jens Krause wrote:
> Hi There,
>
> i need a little help. I want to have a figure wich the user could select
> from the tools palette, but which creates 2 figures in the diagramm.
>
> For example a checkbox:
> * one figure for the checked (or unchecked) button
> * one figure for the label
>
> I solved the problem right now with one figure, but the label and the
> checkbox should be moveable, so that you could move the label before or
> over the checkbox. I don't know if i discribed it enought what my
> problem is, so if there is any question ...
>
> regards
> jens
Re: Composite Figure [message #82953 is a reply to message #77751] Tue, 05 December 2006 07:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: snej_NO-SPAM_.esuark.de

Dmitry Stadnik wrote:
> You could try to set node figure as checkbox and define label as
> external label - it will be possible to position it anywhere around the
> checkbox.

Well, this one solution, but then the label is created anywhere. If
there would be a possibility to set the position relative to the
checkbox figure, but i haven't found one.

jens
Re: Composite Figure [message #83010 is a reply to message #82953] Tue, 05 December 2006 08:35 Go to previous message
Eclipse UserFriend
Originally posted by: 5d5.mail.ru

Look at the generated <ModelID>ExtNodeLabelEditPart - label position is
calculated there.

Jens Krause wrote:
> Dmitry Stadnik wrote:
>> You could try to set node figure as checkbox and define label as
>> external label - it will be possible to position it anywhere around
>> the checkbox.
>
> Well, this one solution, but then the label is created anywhere. If
> there would be a possibility to set the position relative to the
> checkbox figure, but i haven't found one.
>
> jens
Previous Topic:how do I add a new connector to an existing node?
Next Topic:1 domain element - 2 node figure connections
Goto Forum:
  


Current Time: Thu Jul 17 19:59:46 EDT 2025

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

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

Back to the top